From 3340b565931e04400029da2ef2a6ac811d7fbad5 Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Mon, 21 Sep 2015 15:48:15 +0200 Subject: crypto: correct sig validation, add more unit tests --- crypto/crypto.go | 15 +---- crypto/crypto_test.go | 181 ++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 169 insertions(+), 27 deletions(-) diff --git a/crypto/crypto.go b/crypto/crypto.go index b3a8d730b..272050106 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -172,10 +172,10 @@ func GenerateKey() (*ecdsa.PrivateKey, error) { } func ValidateSignatureValues(v byte, r, s *big.Int) bool { - vint := uint32(v) - if r.Cmp(common.Big0) == 0 || s.Cmp(common.Big0) == 0 { + if r.Cmp(common.Big1) < 0 || s.Cmp(common.Big1) < 0 { return false } + vint := uint32(v) if r.Cmp(secp256k1n) < 0 && s.Cmp(secp256k1n) < 0 && (vint == 27 || vint == 28) { return true } else { @@ -302,17 +302,6 @@ func aesCBCDecrypt(key, cipherText, iv []byte) ([]byte, error) { } // From https://leanpub.com/gocrypto/read#leanpub-auto-block-cipher-modes -func PKCS7Pad(in []byte) []byte { - padding := 16 - (len(in) % 16) - if padding == 0 { - padding = 16 - } - for i := 0; i < padding; i++ { - in = append(in, byte(padding)) - } - return in -} - func PKCS7Unpad(in []byte) []byte { if len(in) == 0 { return nil diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go index b891f41a9..fdd9c1ee8 100644 --- a/crypto/crypto_test.go +++ b/crypto/crypto_test.go @@ -18,8 +18,12 @@ package crypto import ( "bytes" + "crypto/ecdsa" "encoding/hex" "fmt" + "io/ioutil" + "math/big" + "os" "testing" "time" @@ -27,10 +31,12 @@ import ( "github.com/ethereum/go-ethereum/crypto/secp256k1" ) +var testAddrHex = "970e8128ab834e8eac17ab8e3812f010678cf791" +var testPrivHex = "289c2857d4598e37fb9647507e47a309d6133539bf21a8b9cb6df88fd5232032" + // These tests are sanity checks. // They should ensure that we don't e.g. use Sha3-224 instead of Sha3-256 // and that the sha3 library uses keccak-f permutation. - func TestSha3(t *testing.T) { msg := []byte("abc") exp, _ := hex.DecodeString("4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45") @@ -55,13 +61,6 @@ func TestRipemd160(t *testing.T) { checkhash(t, "Ripemd160", Ripemd160, msg, exp) } -func checkhash(t *testing.T, name string, f func([]byte) []byte, msg, exp []byte) { - sum := f(msg) - if bytes.Compare(exp, sum) != 0 { - t.Errorf("hash %s returned wrong result.\ngot: %x\nwant: %x", name, sum, exp) - } -} - func BenchmarkSha3(b *testing.B) { a := []byte("hello world") amount := 1000000 @@ -74,13 +73,41 @@ func BenchmarkSha3(b *testing.B) { } func Test0Key(t *testing.T) { - t.Skip() - key := common.Hex2Bytes("1111111111111111111111111111111111111111111111111111111111111111") + key := common.Hex2Bytes("0000000000000000000000000000000000000000000000000000000000000000") + _, err := secp256k1.GeneratePubKey(key) + if err == nil { + t.Errorf("expected error due to zero privkey") + } +} + +func TestSign(t *testing.T) { + key, _ := HexToECDSA(testPrivHex) + addr := common.HexToAddress(testAddrHex) + + msg := Sha3([]byte("foo")) + sig, err := Sign(msg, key) + if err != nil { + t.Errorf("Sign error: %s", err) + } + recoveredPub, err := Ecrecover(msg, sig) + if err != nil { + t.Errorf("ECRecover error: %s", err) + } + recoveredAddr := PubkeyToAddress(*ToECDSAPub(recoveredPub)) + if addr != recoveredAddr { + t.Errorf("Address mismatch: want: %x have: %x", addr, recoveredAddr) + } + + // should be equal to SigToPub + recoveredPub2, err := SigToPub(msg, sig) + if err != nil { + t.Errorf("ECRecover error: %s", err) + } + recoveredAddr2 := PubkeyToAddress(*recoveredPub2) + if addr != recoveredAddr2 { + t.Errorf("Address mismatch: want: %x have: %x", addr, recoveredAddr2) + } - p, err := secp256k1.GeneratePubKey(key) - addr := Sha3(p[1:])[12:] - fmt.Printf("%x\n", p) - fmt.Printf("%v %x\n", err, addr) } func TestInvalidSign(t *testing.T) { @@ -94,3 +121,129 @@ func TestInvalidSign(t *testing.T) { t.Errorf("expected sign with hash 33 byte to error") } } + +func TestNewContractAddress(t *testing.T) { + key, _ := HexToECDSA(testPrivHex) + addr := common.HexToAddress(testAddrHex) + genAddr := PubkeyToAddress(key.PublicKey) + // sanity check before using addr to create contract address + checkAddr(t, genAddr, addr) + + caddr0 := CreateAddress(addr, 0) + caddr1 := CreateAddress(addr, 1) + caddr2 := CreateAddress(addr, 2) + checkAddr(t, common.HexToAddress("333c3310824b7c685133f2bedb2ca4b8b4df633d"), caddr0) + checkAddr(t, common.HexToAddress("8bda78331c916a08481428e4b07c96d3e916d165"), caddr1) + checkAddr(t, common.HexToAddress("c9ddedf451bc62ce88bf9292afb13df35b670699"), caddr2) +} + +func TestLoadECDSAFile(t *testing.T) { + keyBytes := common.FromHex(testPrivHex) + fileName0 := "test_key0" + fileName1 := "test_key1" + checkKey := func(k *ecdsa.PrivateKey) { + checkAddr(t, PubkeyToAddress(k.PublicKey), common.HexToAddress(testAddrHex)) + loadedKeyBytes := FromECDSA(k) + if !bytes.Equal(loadedKeyBytes, keyBytes) { + t.Fatalf("private key mismatch: want: %x have: %x", keyBytes, loadedKeyBytes) + } + } + + ioutil.WriteFile(fileName0, []byte(testPrivHex), 0600) + defer os.Remove(fileName0) + + key0, err := LoadECDSA(fileName0) + if err != nil { + t.Fatal(err) + } + checkKey(key0) + + // again, this time with SaveECDSA instead of manual save: + err = SaveECDSA(fileName1, key0) + if err != nil { + t.Fatal(err) + } + defer os.Remove(fileName1) + + key1, err := LoadECDSA(fileName1) + if err != nil { + t.Fatal(err) + } + checkKey(key1) +} + +func TestValidateSignatureValues(t *testing.T) { + check := func(expected bool, v byte, r, s *big.Int) { + if ValidateSignatureValues(v, r, s) != expected { + t.Errorf("mismatch for v: %d r: %d s: %d want: %v", v, r, s, expected) + } + } + minusOne := big.NewInt(-1) + one := common.Big1 + zero := common.Big0 + secp256k1nMinus1 := new(big.Int).Sub(secp256k1n, common.Big1) + + // correct v,r,s + check(true, 27, one, one) + check(true, 28, one, one) + // incorrect v, correct r,s, + check(false, 30, one, one) + check(false, 26, one, one) + + // incorrect v, combinations of incorrect/correct r,s at lower limit + check(false, 0, zero, zero) + check(false, 0, zero, one) + check(false, 0, one, zero) + check(false, 0, one, one) + + // correct v for any combination of incorrect r,s + check(false, 27, zero, zero) + check(false, 27, zero, one) + check(false, 27, one, zero) + + check(false, 28, zero, zero) + check(false, 28, zero, one) + check(false, 28, one, zero) + + // correct sig with max r,s + check(true, 27, secp256k1nMinus1, secp256k1nMinus1) + // correct v, combinations of incorrect r,s at upper limit + check(false, 27, secp256k1n, secp256k1nMinus1) + check(false, 27, secp256k1nMinus1, secp256k1n) + check(false, 27, secp256k1n, secp256k1n) + + // current callers ensures r,s cannot be negative, but let's test for that too + // as crypto package could be used stand-alone + check(false, 27, minusOne, one) + check(false, 27, one, minusOne) +} + +func checkhash(t *testing.T, name string, f func([]byte) []byte, msg, exp []byte) { + sum := f(msg) + if bytes.Compare(exp, sum) != 0 { + t.Fatalf("hash %s mismatch: want: %x have: %x", name, exp, sum) + } +} + +func checkAddr(t *testing.T, addr0, addr1 common.Address) { + if addr0 != addr1 { + t.Fatalf("address mismatch: want: %x have: %x", addr0, addr1) + } +} + +// test to help Python team with integration of libsecp256k1 +// skip but keep it after they are done +func TestPythonIntegration(t *testing.T) { + kh := "289c2857d4598e37fb9647507e47a309d6133539bf21a8b9cb6df88fd5232032" + k0, _ := HexToECDSA(kh) + k1 := FromECDSA(k0) + + msg0 := Sha3([]byte("foo")) + sig0, _ := secp256k1.Sign(msg0, k1) + + msg1 := common.FromHex("00000000000000000000000000000000") + sig1, _ := secp256k1.Sign(msg0, k1) + + fmt.Printf("msg: %x, privkey: %x sig: %x\n", msg0, k1, sig0) + fmt.Printf("msg: %x, privkey: %x sig: %x\n", msg1, k1, sig1) +} -- cgit v1.2.3 From 6b91a4abe529ea4f01771209e080b118ab847fe9 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 30 Jun 2015 14:54:37 +0200 Subject: trie: improve benchmarks --- trie/trie_test.go | 106 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 72 insertions(+), 34 deletions(-) diff --git a/trie/trie_test.go b/trie/trie_test.go index ae4e5efe4..607c96b0f 100644 --- a/trie/trie_test.go +++ b/trie/trie_test.go @@ -18,11 +18,15 @@ package trie import ( "bytes" + "encoding/binary" "fmt" + "io/ioutil" + "os" "testing" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethdb" ) type Db map[string][]byte @@ -100,7 +104,6 @@ func TestGet(t *testing.T) { func TestDelete(t *testing.T) { trie := NewEmpty() - vals := []struct{ k, v string }{ {"do", "verb"}, {"ether", "wookiedoo"}, @@ -254,39 +257,6 @@ func TestOutput(t *testing.T) { fmt.Println(trie2.root) } -func BenchmarkGets(b *testing.B) { - trie := NewEmpty() - vals := []struct{ k, v string }{ - {"do", "verb"}, - {"ether", "wookiedoo"}, - {"horse", "stallion"}, - {"shaman", "horse"}, - {"doge", "coin"}, - {"ether", ""}, - {"dog", "puppy"}, - {"shaman", ""}, - {"somethingveryoddindeedthis is", "myothernodedata"}, - } - for _, val := range vals { - trie.UpdateString(val.k, val.v) - } - - b.ResetTimer() - for i := 0; i < b.N; i++ { - trie.Get([]byte("horse")) - } -} - -func BenchmarkUpdate(b *testing.B) { - trie := NewEmpty() - - b.ResetTimer() - for i := 0; i < b.N; i++ { - trie.UpdateString(fmt.Sprintf("aaaaaaaaa%d", i), "value") - } - trie.Hash() -} - type kv struct { k, v []byte t bool @@ -352,3 +322,71 @@ func TestSecureDelete(t *testing.T) { t.Errorf("expected %x got %x", exp, hash) } } + +func BenchmarkGet(b *testing.B) { benchGet(b, false) } +func BenchmarkGetDB(b *testing.B) { benchGet(b, true) } +func BenchmarkUpdateBE(b *testing.B) { benchUpdate(b, binary.BigEndian) } +func BenchmarkUpdateLE(b *testing.B) { benchUpdate(b, binary.LittleEndian) } +func BenchmarkHashBE(b *testing.B) { benchHash(b, binary.BigEndian) } +func BenchmarkHashLE(b *testing.B) { benchHash(b, binary.LittleEndian) } + +const benchElemCount = 20000 + +func benchGet(b *testing.B, commit bool) { + trie := New(nil, nil) + if commit { + dir, tmpdb := tempDB() + defer os.RemoveAll(dir) + trie = New(nil, tmpdb) + } + k := make([]byte, 32) + for i := 0; i < benchElemCount; i++ { + binary.LittleEndian.PutUint64(k, uint64(i)) + trie.Update(k, k) + } + binary.LittleEndian.PutUint64(k, benchElemCount/2) + if commit { + trie.Commit() + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + trie.Get(k) + } +} + +func benchUpdate(b *testing.B, e binary.ByteOrder) *Trie { + trie := NewEmpty() + k := make([]byte, 32) + for i := 0; i < b.N; i++ { + e.PutUint64(k, uint64(i)) + trie.Update(k, k) + } + return trie +} + +func benchHash(b *testing.B, e binary.ByteOrder) { + trie := NewEmpty() + k := make([]byte, 32) + for i := 0; i < benchElemCount; i++ { + e.PutUint64(k, uint64(i)) + trie.Update(k, k) + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + trie.Hash() + } +} + +func tempDB() (string, Backend) { + dir, err := ioutil.TempDir("", "trie-bench") + if err != nil { + panic(fmt.Sprintf("can't create temporary directory: %v", err)) + } + db, err := ethdb.NewLDBDatabase(dir, 300*1024) + if err != nil { + panic(fmt.Sprintf("can't create temporary database: %v", err)) + } + return dir, db +} -- cgit v1.2.3 From 565d9f2306d19f63be6a6e1b8fc480af8dca9617 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 6 Jul 2015 01:19:48 +0200 Subject: core, trie: new trie --- build/update-license.go | 3 +- core/state/state_object.go | 15 +- core/state/statedb.go | 24 +- core/types/derive_sha.go | 15 +- trie/arc.go | 194 ++++++++++++++ trie/cache.go | 78 ------ trie/encoding.go | 72 +++-- trie/encoding_test.go | 36 ++- trie/fullnode.go | 94 ------- trie/hashnode.go | 46 ---- trie/iterator.go | 64 ++--- trie/iterator_test.go | 6 +- trie/node.go | 174 ++++++++++-- trie/secure_trie.go | 97 +++++-- trie/secure_trie_test.go | 74 ++++++ trie/shortnode.go | 57 ---- trie/slice.go | 69 ----- trie/trie.go | 639 ++++++++++++++++++++++++--------------------- trie/trie_test.go | 264 ++++++++++--------- trie/valuenode.go | 42 --- 20 files changed, 1110 insertions(+), 953 deletions(-) create mode 100644 trie/arc.go delete mode 100644 trie/cache.go delete mode 100644 trie/fullnode.go delete mode 100644 trie/hashnode.go create mode 100644 trie/secure_trie_test.go delete mode 100644 trie/shortnode.go delete mode 100644 trie/slice.go delete mode 100644 trie/valuenode.go diff --git a/build/update-license.go b/build/update-license.go index e28005cbd..04f52a13c 100644 --- a/build/update-license.go +++ b/build/update-license.go @@ -46,9 +46,10 @@ var ( skipPrefixes = []string{ // boring stuff "Godeps/", "tests/files/", "build/", - // don't relicense vendored packages + // don't relicense vendored sources "crypto/sha3/", "crypto/ecies/", "logger/glog/", "crypto/curve.go", + "trie/arc.go", } // paths with this prefix are licensed as GPL. all other files are LGPL. diff --git a/core/state/state_object.go b/core/state/state_object.go index 353f2357b..251a31093 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -90,15 +90,13 @@ type StateObject struct { func NewStateObject(address common.Address, db ethdb.Database) *StateObject { object := &StateObject{db: db, address: address, balance: new(big.Int), gasPool: new(big.Int), dirty: true} - object.trie = trie.NewSecure((common.Hash{}).Bytes(), db) + object.trie, _ = trie.NewSecure(common.Hash{}, db) object.storage = make(Storage) object.gasPool = new(big.Int) - return object } func NewStateObjectFromBytes(address common.Address, data []byte, db ethdb.Database) *StateObject { - // TODO clean me up var extobject struct { Nonce uint64 Balance *big.Int @@ -107,7 +105,13 @@ func NewStateObjectFromBytes(address common.Address, data []byte, db ethdb.Datab } err := rlp.Decode(bytes.NewReader(data), &extobject) if err != nil { - fmt.Println(err) + glog.Errorf("can't decode state object %x: %v", address, err) + return nil + } + trie, err := trie.NewSecure(extobject.Root, db) + if err != nil { + // TODO: bubble this up or panic + glog.Errorf("can't create account trie with root %x: %v", extobject.Root[:], err) return nil } @@ -115,11 +119,10 @@ func NewStateObjectFromBytes(address common.Address, data []byte, db ethdb.Datab object.nonce = extobject.Nonce object.balance = extobject.Balance object.codeHash = extobject.CodeHash - object.trie = trie.NewSecure(extobject.Root[:], db) + object.trie = trie object.storage = make(map[string]common.Hash) object.gasPool = new(big.Int) object.code, _ = db.Get(extobject.CodeHash) - return object } diff --git a/core/state/statedb.go b/core/state/statedb.go index 24f97e32a..c2bc99564 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -49,12 +49,20 @@ type StateDB struct { // Create a new state from a given trie func New(root common.Hash, db ethdb.Database) *StateDB { - trie := trie.NewSecure(root[:], db) - return &StateDB{root: root, db: db, trie: trie, stateObjects: make(map[string]*StateObject), refund: new(big.Int), logs: make(map[common.Hash]Logs)} -} - -func (self *StateDB) PrintRoot() { - self.trie.Trie.PrintRoot() + tr, err := trie.NewSecure(root, db) + if err != nil { + // TODO: bubble this up + tr, _ = trie.NewSecure(common.Hash{}, db) + glog.Errorf("can't create state trie with root %x: %v", root[:], err) + } + return &StateDB{ + root: root, + db: db, + trie: tr, + stateObjects: make(map[string]*StateObject), + refund: new(big.Int), + logs: make(map[common.Hash]Logs), + } } func (self *StateDB) StartRecord(thash, bhash common.Hash, ti int) { @@ -304,7 +312,7 @@ func (self *StateDB) Set(state *StateDB) { } func (s *StateDB) Root() common.Hash { - return common.BytesToHash(s.trie.Root()) + return s.trie.Hash() } // Syncs the trie and all siblings @@ -348,7 +356,7 @@ func (self *StateDB) SyncIntermediate() { // SyncObjects syncs the changed objects to the trie func (self *StateDB) SyncObjects() { - self.trie = trie.NewSecure(self.root[:], self.db) + self.trie, _ = trie.NewSecure(self.root, self.db) self.refund = new(big.Int) diff --git a/core/types/derive_sha.go b/core/types/derive_sha.go index 478edb0e8..00c42c5bc 100644 --- a/core/types/derive_sha.go +++ b/core/types/derive_sha.go @@ -17,8 +17,9 @@ package types import ( + "bytes" + "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/trie" ) @@ -29,12 +30,12 @@ type DerivableList interface { } func DeriveSha(list DerivableList) common.Hash { - db, _ := ethdb.NewMemDatabase() - trie := trie.New(nil, db) + keybuf := new(bytes.Buffer) + trie := new(trie.Trie) for i := 0; i < list.Len(); i++ { - key, _ := rlp.EncodeToBytes(uint(i)) - trie.Update(key, list.GetRlp(i)) + keybuf.Reset() + rlp.Encode(keybuf, uint(i)) + trie.Update(keybuf.Bytes(), list.GetRlp(i)) } - - return common.BytesToHash(trie.Root()) + return trie.Hash() } diff --git a/trie/arc.go b/trie/arc.go new file mode 100644 index 000000000..9da012e16 --- /dev/null +++ b/trie/arc.go @@ -0,0 +1,194 @@ +// Copyright (c) 2015 Hans Alexander Gugel +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +// This file contains a modified version of package arc from +// https://github.com/alexanderGugel/arc +// +// It implements the ARC (Adaptive Replacement Cache) algorithm as detailed in +// https://www.usenix.org/legacy/event/fast03/tech/full_papers/megiddo/megiddo.pdf + +package trie + +import ( + "container/list" + "sync" +) + +type arc struct { + p int + c int + t1 *list.List + b1 *list.List + t2 *list.List + b2 *list.List + cache map[string]*entry + mutex sync.Mutex +} + +type entry struct { + key hashNode + value node + ll *list.List + el *list.Element +} + +// newARC returns a new Adaptive Replacement Cache with the +// given capacity. +func newARC(c int) *arc { + return &arc{ + c: c, + t1: list.New(), + b1: list.New(), + t2: list.New(), + b2: list.New(), + cache: make(map[string]*entry, c), + } +} + +// Put inserts a new key-value pair into the cache. +// This optimizes future access to this entry (side effect). +func (a *arc) Put(key hashNode, value node) bool { + a.mutex.Lock() + defer a.mutex.Unlock() + ent, ok := a.cache[string(key)] + if ok != true { + ent = &entry{key: key, value: value} + a.req(ent) + a.cache[string(key)] = ent + } else { + ent.value = value + a.req(ent) + } + return ok +} + +// Get retrieves a previously via Set inserted entry. +// This optimizes future access to this entry (side effect). +func (a *arc) Get(key hashNode) (value node, ok bool) { + a.mutex.Lock() + defer a.mutex.Unlock() + ent, ok := a.cache[string(key)] + if ok { + a.req(ent) + return ent.value, ent.value != nil + } + return nil, false +} + +func (a *arc) req(ent *entry) { + if ent.ll == a.t1 || ent.ll == a.t2 { + // Case I + ent.setMRU(a.t2) + } else if ent.ll == a.b1 { + // Case II + // Cache Miss in t1 and t2 + + // Adaptation + var d int + if a.b1.Len() >= a.b2.Len() { + d = 1 + } else { + d = a.b2.Len() / a.b1.Len() + } + a.p = a.p + d + if a.p > a.c { + a.p = a.c + } + + a.replace(ent) + ent.setMRU(a.t2) + } else if ent.ll == a.b2 { + // Case III + // Cache Miss in t1 and t2 + + // Adaptation + var d int + if a.b2.Len() >= a.b1.Len() { + d = 1 + } else { + d = a.b1.Len() / a.b2.Len() + } + a.p = a.p - d + if a.p < 0 { + a.p = 0 + } + + a.replace(ent) + ent.setMRU(a.t2) + } else if ent.ll == nil { + // Case IV + + if a.t1.Len()+a.b1.Len() == a.c { + // Case A + if a.t1.Len() < a.c { + a.delLRU(a.b1) + a.replace(ent) + } else { + a.delLRU(a.t1) + } + } else if a.t1.Len()+a.b1.Len() < a.c { + // Case B + if a.t1.Len()+a.t2.Len()+a.b1.Len()+a.b2.Len() >= a.c { + if a.t1.Len()+a.t2.Len()+a.b1.Len()+a.b2.Len() == 2*a.c { + a.delLRU(a.b2) + } + a.replace(ent) + } + } + + ent.setMRU(a.t1) + } +} + +func (a *arc) delLRU(list *list.List) { + lru := list.Back() + list.Remove(lru) + delete(a.cache, string(lru.Value.(*entry).key)) +} + +func (a *arc) replace(ent *entry) { + if a.t1.Len() > 0 && ((a.t1.Len() > a.p) || (ent.ll == a.b2 && a.t1.Len() == a.p)) { + lru := a.t1.Back().Value.(*entry) + lru.value = nil + lru.setMRU(a.b1) + } else { + lru := a.t2.Back().Value.(*entry) + lru.value = nil + lru.setMRU(a.b2) + } +} + +func (e *entry) setLRU(list *list.List) { + e.detach() + e.ll = list + e.el = e.ll.PushBack(e) +} + +func (e *entry) setMRU(list *list.List) { + e.detach() + e.ll = list + e.el = e.ll.PushFront(e) +} + +func (e *entry) detach() { + if e.ll != nil { + e.ll.Remove(e.el) + } +} diff --git a/trie/cache.go b/trie/cache.go deleted file mode 100644 index e475fc861..000000000 --- a/trie/cache.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package trie - -import ( - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/syndtr/goleveldb/leveldb" -) - -type Backend interface { - Get([]byte) ([]byte, error) - Put([]byte, []byte) error -} - -type Cache struct { - batch *leveldb.Batch - store map[string][]byte - backend Backend -} - -func NewCache(backend Backend) *Cache { - return &Cache{new(leveldb.Batch), make(map[string][]byte), backend} -} - -func (self *Cache) Get(key []byte) []byte { - data := self.store[string(key)] - if data == nil { - data, _ = self.backend.Get(key) - } - - return data -} - -func (self *Cache) Put(key []byte, data []byte) { - self.batch.Put(key, data) - self.store[string(key)] = data -} - -// Flush flushes the trie to the backing layer. If this is a leveldb instance -// we'll use a batched write, otherwise we'll use regular put. -func (self *Cache) Flush() { - if db, ok := self.backend.(*ethdb.LDBDatabase); ok { - if err := db.LDB().Write(self.batch, nil); err != nil { - glog.Fatal("db write err:", err) - } - } else { - for k, v := range self.store { - self.backend.Put([]byte(k), v) - } - } -} - -func (self *Cache) Copy() *Cache { - cache := NewCache(self.backend) - for k, v := range self.store { - cache.store[k] = v - } - return cache -} - -func (self *Cache) Reset() { - //self.store = make(map[string][]byte) -} diff --git a/trie/encoding.go b/trie/encoding.go index 9c862d78f..3c172b843 100644 --- a/trie/encoding.go +++ b/trie/encoding.go @@ -16,34 +16,36 @@ package trie -func CompactEncode(hexSlice []byte) []byte { - terminator := 0 +func compactEncode(hexSlice []byte) []byte { + terminator := byte(0) if hexSlice[len(hexSlice)-1] == 16 { terminator = 1 - } - - if terminator == 1 { hexSlice = hexSlice[:len(hexSlice)-1] } - - oddlen := len(hexSlice) % 2 - flags := byte(2*terminator + oddlen) - if oddlen != 0 { - hexSlice = append([]byte{flags}, hexSlice...) - } else { - hexSlice = append([]byte{flags, 0}, hexSlice...) + var ( + odd = byte(len(hexSlice) % 2) + buflen = len(hexSlice)/2 + 1 + bi, hi = 0, 0 // indices + hs = byte(0) // shift: flips between 0 and 4 + ) + if odd == 0 { + bi = 1 + hs = 4 } - - l := len(hexSlice) / 2 - var buf = make([]byte, l) - for i := 0; i < l; i++ { - buf[i] = 16*hexSlice[2*i] + hexSlice[2*i+1] + buf := make([]byte, buflen) + buf[0] = terminator<<5 | byte(odd)<<4 + for bi < len(buf) && hi < len(hexSlice) { + buf[bi] |= hexSlice[hi] << hs + if hs == 0 { + bi++ + } + hi, hs = hi+1, hs^(1<<2) } return buf } -func CompactDecode(str []byte) []byte { - base := CompactHexDecode(str) +func compactDecode(str []byte) []byte { + base := compactHexDecode(str) base = base[:len(base)-1] if base[0] >= 2 { base = append(base, 16) @@ -53,11 +55,10 @@ func CompactDecode(str []byte) []byte { } else { base = base[2:] } - return base } -func CompactHexDecode(str []byte) []byte { +func compactHexDecode(str []byte) []byte { l := len(str)*2 + 1 var nibbles = make([]byte, l) for i, b := range str { @@ -68,7 +69,7 @@ func CompactHexDecode(str []byte) []byte { return nibbles } -func DecodeCompact(key []byte) []byte { +func decodeCompact(key []byte) []byte { l := len(key) / 2 var res = make([]byte, l) for i := 0; i < l; i++ { @@ -77,3 +78,30 @@ func DecodeCompact(key []byte) []byte { } return res } + +// prefixLen returns the length of the common prefix of a and b. +func prefixLen(a, b []byte) int { + var i, length = 0, len(a) + if len(b) < length { + length = len(b) + } + for ; i < length; i++ { + if a[i] != b[i] { + break + } + } + return i +} + +func hasTerm(s []byte) bool { + return s[len(s)-1] == 16 +} + +func remTerm(s []byte) []byte { + if hasTerm(s) { + b := make([]byte, len(s)-1) + copy(b, s) + return b + } + return s +} diff --git a/trie/encoding_test.go b/trie/encoding_test.go index e49b57ef0..061d48d58 100644 --- a/trie/encoding_test.go +++ b/trie/encoding_test.go @@ -23,7 +23,7 @@ import ( checker "gopkg.in/check.v1" ) -func Test(t *testing.T) { checker.TestingT(t) } +func TestEncoding(t *testing.T) { checker.TestingT(t) } type TrieEncodingSuite struct{} @@ -32,64 +32,64 @@ var _ = checker.Suite(&TrieEncodingSuite{}) func (s *TrieEncodingSuite) TestCompactEncode(c *checker.C) { // even compact encode test1 := []byte{1, 2, 3, 4, 5} - res1 := CompactEncode(test1) + res1 := compactEncode(test1) c.Assert(res1, checker.DeepEquals, []byte("\x11\x23\x45")) // odd compact encode test2 := []byte{0, 1, 2, 3, 4, 5} - res2 := CompactEncode(test2) + res2 := compactEncode(test2) c.Assert(res2, checker.DeepEquals, []byte("\x00\x01\x23\x45")) //odd terminated compact encode test3 := []byte{0, 15, 1, 12, 11, 8 /*term*/, 16} - res3 := CompactEncode(test3) + res3 := compactEncode(test3) c.Assert(res3, checker.DeepEquals, []byte("\x20\x0f\x1c\xb8")) // even terminated compact encode test4 := []byte{15, 1, 12, 11, 8 /*term*/, 16} - res4 := CompactEncode(test4) + res4 := compactEncode(test4) c.Assert(res4, checker.DeepEquals, []byte("\x3f\x1c\xb8")) } func (s *TrieEncodingSuite) TestCompactHexDecode(c *checker.C) { exp := []byte{7, 6, 6, 5, 7, 2, 6, 2, 16} - res := CompactHexDecode([]byte("verb")) + res := compactHexDecode([]byte("verb")) c.Assert(res, checker.DeepEquals, exp) } func (s *TrieEncodingSuite) TestCompactDecode(c *checker.C) { // odd compact decode exp := []byte{1, 2, 3, 4, 5} - res := CompactDecode([]byte("\x11\x23\x45")) + res := compactDecode([]byte("\x11\x23\x45")) c.Assert(res, checker.DeepEquals, exp) // even compact decode exp = []byte{0, 1, 2, 3, 4, 5} - res = CompactDecode([]byte("\x00\x01\x23\x45")) + res = compactDecode([]byte("\x00\x01\x23\x45")) c.Assert(res, checker.DeepEquals, exp) // even terminated compact decode exp = []byte{0, 15, 1, 12, 11, 8 /*term*/, 16} - res = CompactDecode([]byte("\x20\x0f\x1c\xb8")) + res = compactDecode([]byte("\x20\x0f\x1c\xb8")) c.Assert(res, checker.DeepEquals, exp) // even terminated compact decode exp = []byte{15, 1, 12, 11, 8 /*term*/, 16} - res = CompactDecode([]byte("\x3f\x1c\xb8")) + res = compactDecode([]byte("\x3f\x1c\xb8")) c.Assert(res, checker.DeepEquals, exp) } func (s *TrieEncodingSuite) TestDecodeCompact(c *checker.C) { exp, _ := hex.DecodeString("012345") - res := DecodeCompact([]byte{0, 1, 2, 3, 4, 5}) + res := decodeCompact([]byte{0, 1, 2, 3, 4, 5}) c.Assert(res, checker.DeepEquals, exp) exp, _ = hex.DecodeString("012345") - res = DecodeCompact([]byte{0, 1, 2, 3, 4, 5, 16}) + res = decodeCompact([]byte{0, 1, 2, 3, 4, 5, 16}) c.Assert(res, checker.DeepEquals, exp) exp, _ = hex.DecodeString("abcdef") - res = DecodeCompact([]byte{10, 11, 12, 13, 14, 15}) + res = decodeCompact([]byte{10, 11, 12, 13, 14, 15}) c.Assert(res, checker.DeepEquals, exp) } @@ -97,29 +97,27 @@ func BenchmarkCompactEncode(b *testing.B) { testBytes := []byte{0, 15, 1, 12, 11, 8 /*term*/, 16} for i := 0; i < b.N; i++ { - CompactEncode(testBytes) + compactEncode(testBytes) } } func BenchmarkCompactDecode(b *testing.B) { testBytes := []byte{0, 15, 1, 12, 11, 8 /*term*/, 16} for i := 0; i < b.N; i++ { - CompactDecode(testBytes) + compactDecode(testBytes) } } func BenchmarkCompactHexDecode(b *testing.B) { testBytes := []byte{7, 6, 6, 5, 7, 2, 6, 2, 16} for i := 0; i < b.N; i++ { - CompactHexDecode(testBytes) + compactHexDecode(testBytes) } - } func BenchmarkDecodeCompact(b *testing.B) { testBytes := []byte{7, 6, 6, 5, 7, 2, 6, 2, 16} for i := 0; i < b.N; i++ { - DecodeCompact(testBytes) + decodeCompact(testBytes) } - } diff --git a/trie/fullnode.go b/trie/fullnode.go deleted file mode 100644 index 8ff019ec4..000000000 --- a/trie/fullnode.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package trie - -type FullNode struct { - trie *Trie - nodes [17]Node - dirty bool -} - -func NewFullNode(t *Trie) *FullNode { - return &FullNode{trie: t} -} - -func (self *FullNode) Dirty() bool { return self.dirty } -func (self *FullNode) Value() Node { - self.nodes[16] = self.trie.trans(self.nodes[16]) - return self.nodes[16] -} -func (self *FullNode) Branches() []Node { - return self.nodes[:16] -} - -func (self *FullNode) Copy(t *Trie) Node { - nnode := NewFullNode(t) - for i, node := range self.nodes { - if node != nil { - nnode.nodes[i] = node - } - } - nnode.dirty = true - - return nnode -} - -// Returns the length of non-nil nodes -func (self *FullNode) Len() (amount int) { - for _, node := range self.nodes { - if node != nil { - amount++ - } - } - - return -} - -func (self *FullNode) Hash() interface{} { - return self.trie.store(self) -} - -func (self *FullNode) RlpData() interface{} { - t := make([]interface{}, 17) - for i, node := range self.nodes { - if node != nil { - t[i] = node.Hash() - } else { - t[i] = "" - } - } - - return t -} - -func (self *FullNode) set(k byte, value Node) { - self.nodes[int(k)] = value - self.dirty = true -} - -func (self *FullNode) branch(i byte) Node { - if self.nodes[int(i)] != nil { - self.nodes[int(i)] = self.trie.trans(self.nodes[int(i)]) - - return self.nodes[int(i)] - } - return nil -} - -func (self *FullNode) setDirty(dirty bool) { - self.dirty = dirty -} diff --git a/trie/hashnode.go b/trie/hashnode.go deleted file mode 100644 index d4a0bc7ec..000000000 --- a/trie/hashnode.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package trie - -import "github.com/ethereum/go-ethereum/common" - -type HashNode struct { - key []byte - trie *Trie - dirty bool -} - -func NewHash(key []byte, trie *Trie) *HashNode { - return &HashNode{key, trie, false} -} - -func (self *HashNode) RlpData() interface{} { - return self.key -} - -func (self *HashNode) Hash() interface{} { - return self.key -} - -func (self *HashNode) setDirty(dirty bool) { - self.dirty = dirty -} - -// These methods will never be called but we have to satisfy Node interface -func (self *HashNode) Value() Node { return nil } -func (self *HashNode) Dirty() bool { return true } -func (self *HashNode) Copy(t *Trie) Node { return NewHash(common.CopyBytes(self.key), t) } diff --git a/trie/iterator.go b/trie/iterator.go index 9c4c7fbe5..38555fe08 100644 --- a/trie/iterator.go +++ b/trie/iterator.go @@ -16,9 +16,7 @@ package trie -import ( - "bytes" -) +import "bytes" type Iterator struct { trie *Trie @@ -32,32 +30,29 @@ func NewIterator(trie *Trie) *Iterator { } func (self *Iterator) Next() bool { - self.trie.mu.Lock() - defer self.trie.mu.Unlock() - isIterStart := false if self.Key == nil { isIterStart = true self.Key = make([]byte, 32) } - key := RemTerm(CompactHexDecode(self.Key)) + key := remTerm(compactHexDecode(self.Key)) k := self.next(self.trie.root, key, isIterStart) - self.Key = []byte(DecodeCompact(k)) + self.Key = []byte(decodeCompact(k)) return len(k) > 0 } -func (self *Iterator) next(node Node, key []byte, isIterStart bool) []byte { +func (self *Iterator) next(node interface{}, key []byte, isIterStart bool) []byte { if node == nil { return nil } switch node := node.(type) { - case *FullNode: + case fullNode: if len(key) > 0 { - k := self.next(node.branch(key[0]), key[1:], isIterStart) + k := self.next(node[key[0]], key[1:], isIterStart) if k != nil { return append([]byte{key[0]}, k...) } @@ -69,31 +64,31 @@ func (self *Iterator) next(node Node, key []byte, isIterStart bool) []byte { } for i := r; i < 16; i++ { - k := self.key(node.branch(byte(i))) + k := self.key(node[i]) if k != nil { return append([]byte{i}, k...) } } - case *ShortNode: - k := RemTerm(node.Key()) - if vnode, ok := node.Value().(*ValueNode); ok { + case shortNode: + k := remTerm(node.Key) + if vnode, ok := node.Val.(valueNode); ok { switch bytes.Compare([]byte(k), key) { case 0: if isIterStart { - self.Value = vnode.Val() + self.Value = vnode return k } case 1: - self.Value = vnode.Val() + self.Value = vnode return k } } else { - cnode := node.Value() + cnode := node.Val var ret []byte skey := key[len(k):] - if BeginsWith(key, k) { + if bytes.HasPrefix(key, k) { ret = self.next(cnode, skey, isIterStart) } else if bytes.Compare(k, key[:len(k)]) > 0 { return self.key(node) @@ -103,37 +98,36 @@ func (self *Iterator) next(node Node, key []byte, isIterStart bool) []byte { return append(k, ret...) } } - } + case hashNode: + return self.next(self.trie.resolveHash(node), key, isIterStart) + } return nil } -func (self *Iterator) key(node Node) []byte { +func (self *Iterator) key(node interface{}) []byte { switch node := node.(type) { - case *ShortNode: + case shortNode: // Leaf node - if vnode, ok := node.Value().(*ValueNode); ok { - k := RemTerm(node.Key()) - self.Value = vnode.Val() - + k := remTerm(node.Key) + if vnode, ok := node.Val.(valueNode); ok { + self.Value = vnode return k - } else { - k := RemTerm(node.Key()) - return append(k, self.key(node.Value())...) } - case *FullNode: - if node.Value() != nil { - self.Value = node.Value().(*ValueNode).Val() - + return append(k, self.key(node.Val)...) + case fullNode: + if node[16] != nil { + self.Value = node[16].(valueNode) return []byte{16} } - for i := 0; i < 16; i++ { - k := self.key(node.branch(byte(i))) + k := self.key(node[i]) if k != nil { return append([]byte{byte(i)}, k...) } } + case hashNode: + return self.key(self.trie.resolveHash(node)) } return nil diff --git a/trie/iterator_test.go b/trie/iterator_test.go index 148f9adf9..fdc60b412 100644 --- a/trie/iterator_test.go +++ b/trie/iterator_test.go @@ -19,7 +19,7 @@ package trie import "testing" func TestIterator(t *testing.T) { - trie := NewEmpty() + trie := newEmpty() vals := []struct{ k, v string }{ {"do", "verb"}, {"ether", "wookiedoo"}, @@ -32,11 +32,11 @@ func TestIterator(t *testing.T) { v := make(map[string]bool) for _, val := range vals { v[val.k] = false - trie.UpdateString(val.k, val.v) + trie.Update([]byte(val.k), []byte(val.v)) } trie.Commit() - it := trie.Iterator() + it := NewIterator(trie) for it.Next() { v[string(it.Key)] = true } diff --git a/trie/node.go b/trie/node.go index 9d49029de..0bfa21dc4 100644 --- a/trie/node.go +++ b/trie/node.go @@ -16,46 +16,172 @@ package trie -import "fmt" +import ( + "fmt" + "io" + "strings" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/rlp" +) var indices = []string{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "[17]"} -type Node interface { - Value() Node - Copy(*Trie) Node // All nodes, for now, return them self - Dirty() bool +type node interface { fstring(string) string - Hash() interface{} - RlpData() interface{} - setDirty(dirty bool) } -// Value node -func (self *ValueNode) String() string { return self.fstring("") } -func (self *FullNode) String() string { return self.fstring("") } -func (self *ShortNode) String() string { return self.fstring("") } -func (self *ValueNode) fstring(ind string) string { return fmt.Sprintf("%x ", self.data) } +type ( + fullNode [17]node + shortNode struct { + Key []byte + Val node + } + hashNode []byte + valueNode []byte +) -//func (self *HashNode) fstring(ind string) string { return fmt.Sprintf("< %x > ", self.key) } -func (self *HashNode) fstring(ind string) string { - return fmt.Sprintf("%v", self.trie.trans(self)) -} +// Pretty printing. +func (n fullNode) String() string { return n.fstring("") } +func (n shortNode) String() string { return n.fstring("") } +func (n hashNode) String() string { return n.fstring("") } +func (n valueNode) String() string { return n.fstring("") } -// Full node -func (self *FullNode) fstring(ind string) string { +func (n fullNode) fstring(ind string) string { resp := fmt.Sprintf("[\n%s ", ind) - for i, node := range self.nodes { + for i, node := range n { if node == nil { resp += fmt.Sprintf("%s: ", indices[i]) } else { resp += fmt.Sprintf("%s: %v", indices[i], node.fstring(ind+" ")) } } - return resp + fmt.Sprintf("\n%s] ", ind) } +func (n shortNode) fstring(ind string) string { + return fmt.Sprintf("{%x: %v} ", n.Key, n.Val.fstring(ind+" ")) +} +func (n hashNode) fstring(ind string) string { + return fmt.Sprintf("<%x> ", []byte(n)) +} +func (n valueNode) fstring(ind string) string { + return fmt.Sprintf("%x ", []byte(n)) +} + +func mustDecodeNode(dbkey, buf []byte) node { + n, err := decodeNode(buf) + if err != nil { + panic(fmt.Sprintf("node %x: %v", dbkey, err)) + } + return n +} + +// decodeNode parses the RLP encoding of a trie node. +func decodeNode(buf []byte) (node, error) { + if len(buf) == 0 { + return nil, io.ErrUnexpectedEOF + } + elems, _, err := rlp.SplitList(buf) + if err != nil { + return nil, fmt.Errorf("decode error: %v", err) + } + switch c, _ := rlp.CountValues(elems); c { + case 2: + n, err := decodeShort(elems) + return n, wrapError(err, "short") + case 17: + n, err := decodeFull(elems) + return n, wrapError(err, "full") + default: + return nil, fmt.Errorf("invalid number of list elements: %v", c) + } +} + +func decodeShort(buf []byte) (node, error) { + kbuf, rest, err := rlp.SplitString(buf) + if err != nil { + return nil, err + } + key := compactDecode(kbuf) + if key[len(key)-1] == 16 { + // value node + val, _, err := rlp.SplitString(rest) + if err != nil { + return nil, fmt.Errorf("invalid value node: %v", err) + } + return shortNode{key, valueNode(val)}, nil + } + r, _, err := decodeRef(rest) + if err != nil { + return nil, wrapError(err, "val") + } + return shortNode{key, r}, nil +} + +func decodeFull(buf []byte) (fullNode, error) { + var n fullNode + for i := 0; i < 16; i++ { + cld, rest, err := decodeRef(buf) + if err != nil { + return n, wrapError(err, fmt.Sprintf("[%d]", i)) + } + n[i], buf = cld, rest + } + val, _, err := rlp.SplitString(buf) + if err != nil { + return n, err + } + if len(val) > 0 { + n[16] = valueNode(val) + } + return n, nil +} + +const hashLen = len(common.Hash{}) + +func decodeRef(buf []byte) (node, []byte, error) { + kind, val, rest, err := rlp.Split(buf) + if err != nil { + return nil, buf, err + } + switch { + case kind == rlp.List: + // 'embedded' node reference. The encoding must be smaller + // than a hash in order to be valid. + if size := len(buf) - len(rest); size > hashLen { + err := fmt.Errorf("oversized embedded node (size is %d bytes, want size < %d)", size, hashLen) + return nil, buf, err + } + n, err := decodeNode(buf) + return n, rest, err + case kind == rlp.String && len(val) == 0: + // empty node + return nil, rest, nil + case kind == rlp.String && len(val) == 32: + return hashNode(val), rest, nil + default: + return nil, nil, fmt.Errorf("invalid RLP string size %d (want 0 or 32)", len(val)) + } +} + +// wraps a decoding error with information about the path to the +// invalid child node (for debugging encoding issues). +type decodeError struct { + what error + stack []string +} + +func wrapError(err error, ctx string) error { + if err == nil { + return nil + } + if decErr, ok := err.(*decodeError); ok { + decErr.stack = append(decErr.stack, ctx) + return decErr + } + return &decodeError{err, []string{ctx}} +} -// Short node -func (self *ShortNode) fstring(ind string) string { - return fmt.Sprintf("[ %x: %v ] ", self.key, self.value.fstring(ind+" ")) +func (err *decodeError) Error() string { + return fmt.Sprintf("%v (decode path: %s)", err.what, strings.Join(err.stack, "<-")) } diff --git a/trie/secure_trie.go b/trie/secure_trie.go index 47c7542bb..47d1934d0 100644 --- a/trie/secure_trie.go +++ b/trie/secure_trie.go @@ -16,46 +16,93 @@ package trie -import "github.com/ethereum/go-ethereum/crypto" +import ( + "hash" -var keyPrefix = []byte("secure-key-") + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto/sha3" +) +var secureKeyPrefix = []byte("secure-key-") + +// SecureTrie wraps a trie with key hashing. In a secure trie, all +// access operations hash the key using keccak256. This prevents +// calling code from creating long chains of nodes that +// increase the access time. +// +// Contrary to a regular trie, a SecureTrie can only be created with +// New and must have an attached database. The database also stores +// the preimage of each key. +// +// SecureTrie is not safe for concurrent use. type SecureTrie struct { *Trie -} -func NewSecure(root []byte, backend Backend) *SecureTrie { - return &SecureTrie{New(root, backend)} + hash hash.Hash + secKeyBuf []byte + hashKeyBuf []byte } -func (self *SecureTrie) Update(key, value []byte) Node { - shaKey := crypto.Sha3(key) - self.Trie.cache.Put(append(keyPrefix, shaKey...), key) - - return self.Trie.Update(shaKey, value) -} -func (self *SecureTrie) UpdateString(key, value string) Node { - return self.Update([]byte(key), []byte(value)) +// NewSecure creates a trie with an existing root node from db. +// +// If root is the zero hash or the sha3 hash of an empty string, the +// trie is initially empty. Otherwise, New will panics if db is nil +// and returns ErrMissingRoot if the root node cannpt be found. +// Accessing the trie loads nodes from db on demand. +func NewSecure(root common.Hash, db Database) (*SecureTrie, error) { + if db == nil { + panic("NewSecure called with nil database") + } + trie, err := New(root, db) + if err != nil { + return nil, err + } + return &SecureTrie{Trie: trie}, nil } -func (self *SecureTrie) Get(key []byte) []byte { - return self.Trie.Get(crypto.Sha3(key)) +// Get returns the value for key stored in the trie. +// The value bytes must not be modified by the caller. +func (t *SecureTrie) Get(key []byte) []byte { + return t.Trie.Get(t.hashKey(key)) } -func (self *SecureTrie) GetString(key string) []byte { - return self.Get([]byte(key)) + +// Update associates key with value in the trie. Subsequent calls to +// Get will return value. If value has length zero, any existing value +// is deleted from the trie and calls to Get will return nil. +// +// The value bytes must not be modified by the caller while they are +// stored in the trie. +func (t *SecureTrie) Update(key, value []byte) { + hk := t.hashKey(key) + t.Trie.Update(hk, value) + t.Trie.db.Put(t.secKey(hk), key) } -func (self *SecureTrie) Delete(key []byte) Node { - return self.Trie.Delete(crypto.Sha3(key)) +// Delete removes any existing value for key from the trie. +func (t *SecureTrie) Delete(key []byte) { + t.Trie.Delete(t.hashKey(key)) } -func (self *SecureTrie) DeleteString(key string) Node { - return self.Delete([]byte(key)) + +// GetKey returns the sha3 preimage of a hashed key that was +// previously used to store a value. +func (t *SecureTrie) GetKey(shaKey []byte) []byte { + key, _ := t.Trie.db.Get(t.secKey(shaKey)) + return key } -func (self *SecureTrie) Copy() *SecureTrie { - return &SecureTrie{self.Trie.Copy()} +func (t *SecureTrie) secKey(key []byte) []byte { + t.secKeyBuf = append(t.secKeyBuf[:0], secureKeyPrefix...) + t.secKeyBuf = append(t.secKeyBuf, key...) + return t.secKeyBuf } -func (self *SecureTrie) GetKey(shaKey []byte) []byte { - return self.Trie.cache.Get(append(keyPrefix, shaKey...)) +func (t *SecureTrie) hashKey(key []byte) []byte { + if t.hash == nil { + t.hash = sha3.NewKeccak256() + t.hashKeyBuf = make([]byte, 32) + } + t.hash.Reset() + t.hash.Write(key) + t.hashKeyBuf = t.hash.Sum(t.hashKeyBuf[:0]) + return t.hashKeyBuf } diff --git a/trie/secure_trie_test.go b/trie/secure_trie_test.go new file mode 100644 index 000000000..13c6cd02e --- /dev/null +++ b/trie/secure_trie_test.go @@ -0,0 +1,74 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package trie + +import ( + "bytes" + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethdb" +) + +func newEmptySecure() *SecureTrie { + db, _ := ethdb.NewMemDatabase() + trie, _ := NewSecure(common.Hash{}, db) + return trie +} + +func TestSecureDelete(t *testing.T) { + trie := newEmptySecure() + vals := []struct{ k, v string }{ + {"do", "verb"}, + {"ether", "wookiedoo"}, + {"horse", "stallion"}, + {"shaman", "horse"}, + {"doge", "coin"}, + {"ether", ""}, + {"dog", "puppy"}, + {"shaman", ""}, + } + for _, val := range vals { + if val.v != "" { + trie.Update([]byte(val.k), []byte(val.v)) + } else { + trie.Delete([]byte(val.k)) + } + } + hash := trie.Hash() + exp := common.HexToHash("29b235a58c3c25ab83010c327d5932bcf05324b7d6b1185e650798034783ca9d") + if hash != exp { + t.Errorf("expected %x got %x", exp, hash) + } +} + +func TestSecureGetKey(t *testing.T) { + trie := newEmptySecure() + trie.Update([]byte("foo"), []byte("bar")) + + key := []byte("foo") + value := []byte("bar") + seckey := crypto.Sha3(key) + + if !bytes.Equal(trie.Get(key), value) { + t.Errorf("Get did not return bar") + } + if k := trie.GetKey(seckey); !bytes.Equal(k, key) { + t.Errorf("GetKey returned %q, want %q", k, key) + } +} diff --git a/trie/shortnode.go b/trie/shortnode.go deleted file mode 100644 index 569d5f109..000000000 --- a/trie/shortnode.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package trie - -import "github.com/ethereum/go-ethereum/common" - -type ShortNode struct { - trie *Trie - key []byte - value Node - dirty bool -} - -func NewShortNode(t *Trie, key []byte, value Node) *ShortNode { - return &ShortNode{t, CompactEncode(key), value, false} -} -func (self *ShortNode) Value() Node { - self.value = self.trie.trans(self.value) - - return self.value -} -func (self *ShortNode) Dirty() bool { return self.dirty } -func (self *ShortNode) Copy(t *Trie) Node { - node := &ShortNode{t, nil, self.value.Copy(t), self.dirty} - node.key = common.CopyBytes(self.key) - node.dirty = true - return node -} - -func (self *ShortNode) RlpData() interface{} { - return []interface{}{self.key, self.value.Hash()} -} -func (self *ShortNode) Hash() interface{} { - return self.trie.store(self) -} - -func (self *ShortNode) Key() []byte { - return CompactDecode(self.key) -} - -func (self *ShortNode) setDirty(dirty bool) { - self.dirty = dirty -} diff --git a/trie/slice.go b/trie/slice.go deleted file mode 100644 index ccefbd064..000000000 --- a/trie/slice.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package trie - -import ( - "bytes" - "math" -) - -// Helper function for comparing slices -func CompareIntSlice(a, b []int) bool { - if len(a) != len(b) { - return false - } - for i, v := range a { - if v != b[i] { - return false - } - } - return true -} - -// Returns the amount of nibbles that match each other from 0 ... -func MatchingNibbleLength(a, b []byte) int { - var i, length = 0, int(math.Min(float64(len(a)), float64(len(b)))) - - for i < length { - if a[i] != b[i] { - break - } - i++ - } - - return i -} - -func HasTerm(s []byte) bool { - return s[len(s)-1] == 16 -} - -func RemTerm(s []byte) []byte { - if HasTerm(s) { - return s[:len(s)-1] - } - - return s -} - -func BeginsWith(a, b []byte) bool { - if len(b) > len(a) { - return false - } - - return bytes.Equal(a[:len(b)], b) -} diff --git a/trie/trie.go b/trie/trie.go index abf48a850..aa8d39fe2 100644 --- a/trie/trie.go +++ b/trie/trie.go @@ -19,372 +19,425 @@ package trie import ( "bytes" - "container/list" + "errors" "fmt" - "sync" + "hash" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/crypto/sha3" + "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/logger/glog" + "github.com/ethereum/go-ethereum/rlp" ) -func ParanoiaCheck(t1 *Trie, backend Backend) (bool, *Trie) { - t2 := New(nil, backend) +const defaultCacheCapacity = 800 - it := t1.Iterator() - for it.Next() { - t2.Update(it.Key, it.Value) - } - - return bytes.Equal(t2.Hash(), t1.Hash()), t2 -} - -type Trie struct { - mu sync.Mutex - root Node - roothash []byte - cache *Cache - - revisions *list.List -} - -func New(root []byte, backend Backend) *Trie { - trie := &Trie{} - trie.revisions = list.New() - trie.roothash = root - if backend != nil { - trie.cache = NewCache(backend) - } +var ( + // The global cache stores decoded trie nodes by hash as they get loaded. + globalCache = newARC(defaultCacheCapacity) + // This is the known root hash of an empty trie. + emptyRoot = common.HexToHash("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") +) - if root != nil { - value := common.NewValueFromBytes(trie.cache.Get(root)) - trie.root = trie.mknode(value) - } +var ErrMissingRoot = errors.New("missing root node") - return trie +// Database must be implemented by backing stores for the trie. +type Database interface { + DatabaseWriter + // Get returns the value for key from the database. + Get(key []byte) (value []byte, err error) } -func (self *Trie) Iterator() *Iterator { - return NewIterator(self) +// DatabaseWriter wraps the Put method of a backing store for the trie. +type DatabaseWriter interface { + // Put stores the mapping key->value in the database. + // Implementations must not hold onto the value bytes, the trie + // will reuse the slice across calls to Put. + Put(key, value []byte) error } -func (self *Trie) Copy() *Trie { - cpy := make([]byte, 32) - copy(cpy, self.roothash) // NOTE: cpy isn't being used anywhere? - trie := New(nil, nil) - trie.cache = self.cache.Copy() - if self.root != nil { - trie.root = self.root.Copy(trie) - } - - return trie +// Trie is a Merkle Patricia Trie. +// The zero value is an empty trie with no database. +// Use New to create a trie that sits on top of a database. +// +// Trie is not safe for concurrent use. +type Trie struct { + root node + db Database + *hasher } -// Legacy support -func (self *Trie) Root() []byte { return self.Hash() } -func (self *Trie) Hash() []byte { - var hash []byte - if self.root != nil { - t := self.root.Hash() - if byts, ok := t.([]byte); ok && len(byts) > 0 { - hash = byts - } else { - hash = crypto.Sha3(common.Encode(self.root.RlpData())) +// New creates a trie with an existing root node from db. +// +// If root is the zero hash or the sha3 hash of an empty string, the +// trie is initially empty and does not require a database. Otherwise, +// New will panics if db is nil or root does not exist in the +// database. Accessing the trie loads nodes from db on demand. +func New(root common.Hash, db Database) (*Trie, error) { + trie := &Trie{db: db} + if (root != common.Hash{}) && root != emptyRoot { + if db == nil { + panic("trie.New: cannot use existing root without a database") } - } else { - hash = crypto.Sha3(common.Encode("")) - } - - if !bytes.Equal(hash, self.roothash) { - self.revisions.PushBack(self.roothash) - self.roothash = hash + if v, _ := trie.db.Get(root[:]); len(v) == 0 { + return nil, ErrMissingRoot + } + trie.root = hashNode(root.Bytes()) } - - return hash + return trie, nil } -func (self *Trie) Commit() { - self.mu.Lock() - defer self.mu.Unlock() - // Hash first - self.Hash() - - self.cache.Flush() +// Iterator returns an iterator over all mappings in the trie. +func (t *Trie) Iterator() *Iterator { + return NewIterator(t) } -// Reset should only be called if the trie has been hashed -func (self *Trie) Reset() { - self.mu.Lock() - defer self.mu.Unlock() - - self.cache.Reset() - - if self.revisions.Len() > 0 { - revision := self.revisions.Remove(self.revisions.Back()).([]byte) - self.roothash = revision +// Get returns the value for key stored in the trie. +// The value bytes must not be modified by the caller. +func (t *Trie) Get(key []byte) []byte { + key = compactHexDecode(key) + tn := t.root + for len(key) > 0 { + switch n := tn.(type) { + case shortNode: + if len(key) < len(n.Key) || !bytes.Equal(n.Key, key[:len(n.Key)]) { + return nil + } + tn = n.Val + key = key[len(n.Key):] + case fullNode: + tn = n[key[0]] + key = key[1:] + case nil: + return nil + case hashNode: + tn = t.resolveHash(n) + default: + panic(fmt.Sprintf("%T: invalid node: %v", tn, tn)) + } } - value := common.NewValueFromBytes(self.cache.Get(self.roothash)) - self.root = self.mknode(value) + return tn.(valueNode) } -func (self *Trie) UpdateString(key, value string) Node { return self.Update([]byte(key), []byte(value)) } -func (self *Trie) Update(key, value []byte) Node { - self.mu.Lock() - defer self.mu.Unlock() - - k := CompactHexDecode(key) - +// Update associates key with value in the trie. Subsequent calls to +// Get will return value. If value has length zero, any existing value +// is deleted from the trie and calls to Get will return nil. +// +// The value bytes must not be modified by the caller while they are +// stored in the trie. +func (t *Trie) Update(key, value []byte) { + k := compactHexDecode(key) if len(value) != 0 { - node := NewValueNode(self, value) - node.dirty = true - self.root = self.insert(self.root, k, node) + t.root = t.insert(t.root, k, valueNode(value)) } else { - self.root = self.delete(self.root, k) + t.root = t.delete(t.root, k) } - - return self.root -} - -func (self *Trie) GetString(key string) []byte { return self.Get([]byte(key)) } -func (self *Trie) Get(key []byte) []byte { - self.mu.Lock() - defer self.mu.Unlock() - - k := CompactHexDecode(key) - - n := self.get(self.root, k) - if n != nil { - return n.(*ValueNode).Val() - } - - return nil } -func (self *Trie) DeleteString(key string) Node { return self.Delete([]byte(key)) } -func (self *Trie) Delete(key []byte) Node { - self.mu.Lock() - defer self.mu.Unlock() - - k := CompactHexDecode(key) - self.root = self.delete(self.root, k) - - return self.root -} - -func (self *Trie) insert(node Node, key []byte, value Node) Node { +func (t *Trie) insert(n node, key []byte, value node) node { if len(key) == 0 { return value } - - if node == nil { - node := NewShortNode(self, key, value) - node.dirty = true - return node - } - - switch node := node.(type) { - case *ShortNode: - k := node.Key() - cnode := node.Value() - if bytes.Equal(k, key) { - node := NewShortNode(self, key, value) - node.dirty = true - return node - + switch n := n.(type) { + case shortNode: + matchlen := prefixLen(key, n.Key) + // If the whole key matches, keep this short node as is + // and only update the value. + if matchlen == len(n.Key) { + return shortNode{n.Key, t.insert(n.Val, key[matchlen:], value)} } - - var n Node - matchlength := MatchingNibbleLength(key, k) - if matchlength == len(k) { - n = self.insert(cnode, key[matchlength:], value) - } else { - pnode := self.insert(nil, k[matchlength+1:], cnode) - nnode := self.insert(nil, key[matchlength+1:], value) - fulln := NewFullNode(self) - fulln.dirty = true - fulln.set(k[matchlength], pnode) - fulln.set(key[matchlength], nnode) - n = fulln - } - if matchlength == 0 { - return n + // Otherwise branch out at the index where they differ. + var branch fullNode + branch[n.Key[matchlen]] = t.insert(nil, n.Key[matchlen+1:], n.Val) + branch[key[matchlen]] = t.insert(nil, key[matchlen+1:], value) + // Replace this shortNode with the branch if it occurs at index 0. + if matchlen == 0 { + return branch } + // Otherwise, replace it with a short node leading up to the branch. + return shortNode{key[:matchlen], branch} - snode := NewShortNode(self, key[:matchlength], n) - snode.dirty = true - return snode + case fullNode: + n[key[0]] = t.insert(n[key[0]], key[1:], value) + return n - case *FullNode: - cpy := node.Copy(self).(*FullNode) - cpy.set(key[0], self.insert(node.branch(key[0]), key[1:], value)) - cpy.dirty = true + case nil: + return shortNode{key, value} - return cpy + case hashNode: + // We've hit a part of the trie that isn't loaded yet. Load + // the node and insert into it. This leaves all child nodes on + // the path to the value in the trie. + // + // TODO: track whether insertion changed the value and keep + // n as a hash node if it didn't. + return t.insert(t.resolveHash(n), key, value) default: - panic(fmt.Sprintf("%T: invalid node: %v", node, node)) + panic(fmt.Sprintf("%T: invalid node: %v", n, n)) } } -func (self *Trie) get(node Node, key []byte) Node { - if len(key) == 0 { - return node - } - - if node == nil { - return nil - } - - switch node := node.(type) { - case *ShortNode: - k := node.Key() - cnode := node.Value() - - if len(key) >= len(k) && bytes.Equal(k, key[:len(k)]) { - return self.get(cnode, key[len(k):]) - } - - return nil - case *FullNode: - return self.get(node.branch(key[0]), key[1:]) - default: - panic(fmt.Sprintf("%T: invalid node: %v", node, node)) - } +// Delete removes any existing value for key from the trie. +func (t *Trie) Delete(key []byte) { + k := compactHexDecode(key) + t.root = t.delete(t.root, k) } -func (self *Trie) delete(node Node, key []byte) Node { - if len(key) == 0 && node == nil { - return nil - } - - switch node := node.(type) { - case *ShortNode: - k := node.Key() - cnode := node.Value() - if bytes.Equal(key, k) { - return nil - } else if bytes.Equal(key[:len(k)], k) { - child := self.delete(cnode, key[len(k):]) - - var n Node - switch child := child.(type) { - case *ShortNode: - nkey := append(k, child.Key()...) - n = NewShortNode(self, nkey, child.Value()) - n.(*ShortNode).dirty = true - case *FullNode: - sn := NewShortNode(self, node.Key(), child) - sn.dirty = true - sn.key = node.key - n = sn - } - - return n - } else { - return node +// delete returns the new root of the trie with key deleted. +// It reduces the trie to minimal form by simplifying +// nodes on the way up after deleting recursively. +func (t *Trie) delete(n node, key []byte) node { + switch n := n.(type) { + case shortNode: + matchlen := prefixLen(key, n.Key) + if matchlen < len(n.Key) { + return n // don't replace n on mismatch + } + if matchlen == len(key) { + return nil // remove n entirely for whole matches + } + // The key is longer than n.Key. Remove the remaining suffix + // from the subtrie. Child can never be nil here since the + // subtrie must contain at least two other values with keys + // longer than n.Key. + child := t.delete(n.Val, key[len(n.Key):]) + switch child := child.(type) { + case shortNode: + // Deleting from the subtrie reduced it to another + // short node. Merge the nodes to avoid creating a + // shortNode{..., shortNode{...}}. Use concat (which + // always creates a new slice) instead of append to + // avoid modifying n.Key since it might be shared with + // other nodes. + return shortNode{concat(n.Key, child.Key...), child.Val} + default: + return shortNode{n.Key, child} } - case *FullNode: - n := node.Copy(self).(*FullNode) - n.set(key[0], self.delete(n.branch(key[0]), key[1:])) - n.dirty = true - + case fullNode: + n[key[0]] = t.delete(n[key[0]], key[1:]) + // Check how many non-nil entries are left after deleting and + // reduce the full node to a short node if only one entry is + // left. Since n must've contained at least two children + // before deletion (otherwise it would not be a full node) n + // can never be reduced to nil. + // + // When the loop is done, pos contains the index of the single + // value that is left in n or -2 if n contains at least two + // values. pos := -1 - for i := 0; i < 17; i++ { - if n.branch(byte(i)) != nil { + for i, cld := range n { + if cld != nil { if pos == -1 { pos = i } else { pos = -2 + break } } } - - var nnode Node - if pos == 16 { - nnode = NewShortNode(self, []byte{16}, n.branch(byte(pos))) - nnode.(*ShortNode).dirty = true - } else if pos >= 0 { - cnode := n.branch(byte(pos)) - switch cnode := cnode.(type) { - case *ShortNode: - // Stitch keys - k := append([]byte{byte(pos)}, cnode.Key()...) - nnode = NewShortNode(self, k, cnode.Value()) - nnode.(*ShortNode).dirty = true - case *FullNode: - nnode = NewShortNode(self, []byte{byte(pos)}, n.branch(byte(pos))) - nnode.(*ShortNode).dirty = true + if pos >= 0 { + if pos != 16 { + // If the remaining entry is a short node, it replaces + // n and its key gets the missing nibble tacked to the + // front. This avoids creating an invalid + // shortNode{..., shortNode{...}}. Since the entry + // might not be loaded yet, resolve it just for this + // check. + cnode := t.resolve(n[pos]) + if cnode, ok := cnode.(shortNode); ok { + k := append([]byte{byte(pos)}, cnode.Key...) + return shortNode{k, cnode.Val} + } } - } else { - nnode = n + // Otherwise, n is replaced by a one-nibble short node + // containing the child. + return shortNode{[]byte{byte(pos)}, n[pos]} } + // n still contains at least two values and cannot be reduced. + return n - return nnode case nil: return nil + + case hashNode: + // We've hit a part of the trie that isn't loaded yet. Load + // the node and delete from it. This leaves all child nodes on + // the path to the value in the trie. + // + // TODO: track whether deletion actually hit a key and keep + // n as a hash node if it didn't. + return t.delete(t.resolveHash(n), key) + default: - panic(fmt.Sprintf("%T: invalid node: %v (%v)", node, node, key)) + panic(fmt.Sprintf("%T: invalid node: %v (%v)", n, n, key)) } } -// casting functions and cache storing -func (self *Trie) mknode(value *common.Value) Node { - l := value.Len() - switch l { - case 0: - return nil - case 2: - // A value node may consists of 2 bytes. - if value.Get(0).Len() != 0 { - key := CompactDecode(value.Get(0).Bytes()) - if key[len(key)-1] == 16 { - return NewShortNode(self, key, NewValueNode(self, value.Get(1).Bytes())) - } else { - return NewShortNode(self, key, self.mknode(value.Get(1))) - } - } - case 17: - if len(value.Bytes()) != 17 { - fnode := NewFullNode(self) - for i := 0; i < 16; i++ { - fnode.set(byte(i), self.mknode(value.Get(i))) - } - return fnode +func concat(s1 []byte, s2 ...byte) []byte { + r := make([]byte, len(s1)+len(s2)) + copy(r, s1) + copy(r[len(s1):], s2) + return r +} + +func (t *Trie) resolve(n node) node { + if n, ok := n.(hashNode); ok { + return t.resolveHash(n) + } + return n +} + +func (t *Trie) resolveHash(n hashNode) node { + if v, ok := globalCache.Get(n); ok { + return v + } + enc, err := t.db.Get(n) + if err != nil || enc == nil { + // TODO: This needs to be improved to properly distinguish errors. + // Disk I/O errors shouldn't produce nil (and cause a + // consensus failure or weird crash), but it is unclear how + // they could be handled because the entire stack above the trie isn't + // prepared to cope with missing state nodes. + if glog.V(logger.Error) { + glog.Errorf("Dangling hash node ref %x: %v", n, err) } - case 32: - return NewHash(value.Bytes(), self) + return nil + } + dec := mustDecodeNode(n, enc) + if dec != nil { + globalCache.Put(n, dec) } + return dec +} + +// Root returns the root hash of the trie. +// Deprecated: use Hash instead. +func (t *Trie) Root() []byte { return t.Hash().Bytes() } - return NewValueNode(self, value.Bytes()) +// Hash returns the root hash of the trie. It does not write to the +// database and can be used even if the trie doesn't have one. +func (t *Trie) Hash() common.Hash { + root, _ := t.hashRoot(nil) + return common.BytesToHash(root.(hashNode)) } -func (self *Trie) trans(node Node) Node { - switch node := node.(type) { - case *HashNode: - value := common.NewValueFromBytes(self.cache.Get(node.key)) - return self.mknode(value) - default: - return node +// Commit writes all nodes to the trie's database. +// Nodes are stored with their sha3 hash as the key. +// +// Committing flushes nodes from memory. +// Subsequent Get calls will load nodes from the database. +func (t *Trie) Commit() (root common.Hash, err error) { + if t.db == nil { + panic("Commit called on trie with nil database") } + return t.CommitTo(t.db) } -func (self *Trie) store(node Node) interface{} { - data := common.Encode(node) - if len(data) >= 32 { - key := crypto.Sha3(data) - if node.Dirty() { - //fmt.Println("save", node) - //fmt.Println() - self.cache.Put(key, data) - } +// CommitTo writes all nodes to the given database. +// Nodes are stored with their sha3 hash as the key. +// +// Committing flushes nodes from memory. Subsequent Get calls will +// load nodes from the trie's database. Calling code must ensure that +// the changes made to db are written back to the trie's attached +// database before using the trie. +func (t *Trie) CommitTo(db DatabaseWriter) (root common.Hash, err error) { + n, err := t.hashRoot(db) + if err != nil { + return (common.Hash{}), err + } + t.root = n + return common.BytesToHash(n.(hashNode)), nil +} - return key +func (t *Trie) hashRoot(db DatabaseWriter) (node, error) { + if t.root == nil { + return hashNode(emptyRoot.Bytes()), nil + } + if t.hasher == nil { + t.hasher = newHasher() } + return t.hasher.hash(t.root, db, true) +} - return node.RlpData() +type hasher struct { + tmp *bytes.Buffer + sha hash.Hash } -func (self *Trie) PrintRoot() { - fmt.Println(self.root) - fmt.Printf("root=%x\n", self.Root()) +func newHasher() *hasher { + return &hasher{tmp: new(bytes.Buffer), sha: sha3.NewKeccak256()} +} + +func (h *hasher) hash(n node, db DatabaseWriter, force bool) (node, error) { + hashed, err := h.replaceChildren(n, db) + if err != nil { + return hashNode{}, err + } + if n, err = h.store(hashed, db, force); err != nil { + return hashNode{}, err + } + return n, nil +} + +// hashChildren replaces child nodes of n with their hashes if the encoded +// size of the child is larger than a hash. +func (h *hasher) replaceChildren(n node, db DatabaseWriter) (node, error) { + var err error + switch n := n.(type) { + case shortNode: + n.Key = compactEncode(n.Key) + if _, ok := n.Val.(valueNode); !ok { + if n.Val, err = h.hash(n.Val, db, false); err != nil { + return n, err + } + } + if n.Val == nil { + // Ensure that nil children are encoded as empty strings. + n.Val = valueNode(nil) + } + return n, nil + case fullNode: + for i := 0; i < 16; i++ { + if n[i] != nil { + if n[i], err = h.hash(n[i], db, false); err != nil { + return n, err + } + } else { + // Ensure that nil children are encoded as empty strings. + n[i] = valueNode(nil) + } + } + if n[16] == nil { + n[16] = valueNode(nil) + } + return n, nil + default: + return n, nil + } +} + +func (h *hasher) store(n node, db DatabaseWriter, force bool) (node, error) { + // Don't store hashes or empty nodes. + if _, isHash := n.(hashNode); n == nil || isHash { + return n, nil + } + h.tmp.Reset() + if err := rlp.Encode(h.tmp, n); err != nil { + panic("encode error: " + err.Error()) + } + if h.tmp.Len() < 32 && !force { + // Nodes smaller than 32 bytes are stored inside their parent. + return n, nil + } + // Larger nodes are replaced by their hash and stored in the database. + h.sha.Reset() + h.sha.Write(h.tmp.Bytes()) + key := hashNode(h.sha.Sum(nil)) + if db != nil { + err := db.Put(key, h.tmp.Bytes()) + return key, err + } + return key, nil } diff --git a/trie/trie_test.go b/trie/trie_test.go index 607c96b0f..c96861bed 100644 --- a/trie/trie_test.go +++ b/trie/trie_test.go @@ -24,86 +24,103 @@ import ( "os" "testing" + "github.com/davecgh/go-spew/spew" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethdb" ) -type Db map[string][]byte - -func (self Db) Get(k []byte) ([]byte, error) { return self[string(k)], nil } -func (self Db) Put(k, v []byte) error { self[string(k)] = v; return nil } - -// Used for testing -func NewEmpty() *Trie { - return New(nil, make(Db)) +func init() { + spew.Config.Indent = " " + spew.Config.DisableMethods = true } -func NewEmptySecure() *SecureTrie { - return NewSecure(nil, make(Db)) +// Used for testing +func newEmpty() *Trie { + db, _ := ethdb.NewMemDatabase() + trie, _ := New(common.Hash{}, db) + return trie } func TestEmptyTrie(t *testing.T) { - trie := NewEmpty() + var trie Trie res := trie.Hash() - exp := crypto.Sha3(common.Encode("")) - if !bytes.Equal(res, exp) { + exp := emptyRoot + if res != common.Hash(exp) { t.Errorf("expected %x got %x", exp, res) } } func TestNull(t *testing.T) { - trie := NewEmpty() - + var trie Trie key := make([]byte, 32) value := common.FromHex("0x823140710bf13990e4500136726d8b55") trie.Update(key, value) value = trie.Get(key) } +func TestMissingRoot(t *testing.T) { + db, _ := ethdb.NewMemDatabase() + trie, err := New(common.HexToHash("0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33"), db) + if trie != nil { + t.Error("New returned non-nil trie for invalid root") + } + if err != ErrMissingRoot { + t.Error("New returned wrong error: %v", err) + } +} + func TestInsert(t *testing.T) { - trie := NewEmpty() + trie := newEmpty() - trie.UpdateString("doe", "reindeer") - trie.UpdateString("dog", "puppy") - trie.UpdateString("dogglesworth", "cat") + updateString(trie, "doe", "reindeer") + updateString(trie, "dog", "puppy") + updateString(trie, "dogglesworth", "cat") - exp := common.Hex2Bytes("8aad789dff2f538bca5d8ea56e8abe10f4c7ba3a5dea95fea4cd6e7c3a1168d3") + exp := common.HexToHash("8aad789dff2f538bca5d8ea56e8abe10f4c7ba3a5dea95fea4cd6e7c3a1168d3") root := trie.Hash() - if !bytes.Equal(root, exp) { + if root != exp { t.Errorf("exp %x got %x", exp, root) } - trie = NewEmpty() - trie.UpdateString("A", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") + trie = newEmpty() + updateString(trie, "A", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") - exp = common.Hex2Bytes("d23786fb4a010da3ce639d66d5e904a11dbc02746d1ce25029e53290cabf28ab") - root = trie.Hash() - if !bytes.Equal(root, exp) { + exp = common.HexToHash("d23786fb4a010da3ce639d66d5e904a11dbc02746d1ce25029e53290cabf28ab") + root, err := trie.Commit() + if err != nil { + t.Fatalf("commit error: %v", err) + } + if root != exp { t.Errorf("exp %x got %x", exp, root) } } func TestGet(t *testing.T) { - trie := NewEmpty() - - trie.UpdateString("doe", "reindeer") - trie.UpdateString("dog", "puppy") - trie.UpdateString("dogglesworth", "cat") + trie := newEmpty() + updateString(trie, "doe", "reindeer") + updateString(trie, "dog", "puppy") + updateString(trie, "dogglesworth", "cat") + + for i := 0; i < 2; i++ { + res := getString(trie, "dog") + if !bytes.Equal(res, []byte("puppy")) { + t.Errorf("expected puppy got %x", res) + } - res := trie.GetString("dog") - if !bytes.Equal(res, []byte("puppy")) { - t.Errorf("expected puppy got %x", res) - } + unknown := getString(trie, "unknown") + if unknown != nil { + t.Errorf("expected nil got %x", unknown) + } - unknown := trie.GetString("unknown") - if unknown != nil { - t.Errorf("expected nil got %x", unknown) + if i == 1 { + return + } + trie.Commit() } } func TestDelete(t *testing.T) { - trie := NewEmpty() + trie := newEmpty() vals := []struct{ k, v string }{ {"do", "verb"}, {"ether", "wookiedoo"}, @@ -116,21 +133,21 @@ func TestDelete(t *testing.T) { } for _, val := range vals { if val.v != "" { - trie.UpdateString(val.k, val.v) + updateString(trie, val.k, val.v) } else { - trie.DeleteString(val.k) + deleteString(trie, val.k) } } hash := trie.Hash() - exp := common.Hex2Bytes("5991bb8c6514148a29db676a14ac506cd2cd5775ace63c30a4fe457715e9ac84") - if !bytes.Equal(hash, exp) { + exp := common.HexToHash("5991bb8c6514148a29db676a14ac506cd2cd5775ace63c30a4fe457715e9ac84") + if hash != exp { t.Errorf("expected %x got %x", exp, hash) } } func TestEmptyValues(t *testing.T) { - trie := NewEmpty() + trie := newEmpty() vals := []struct{ k, v string }{ {"do", "verb"}, @@ -143,78 +160,85 @@ func TestEmptyValues(t *testing.T) { {"shaman", ""}, } for _, val := range vals { - trie.UpdateString(val.k, val.v) + updateString(trie, val.k, val.v) } hash := trie.Hash() - exp := common.Hex2Bytes("5991bb8c6514148a29db676a14ac506cd2cd5775ace63c30a4fe457715e9ac84") - if !bytes.Equal(hash, exp) { + exp := common.HexToHash("5991bb8c6514148a29db676a14ac506cd2cd5775ace63c30a4fe457715e9ac84") + if hash != exp { t.Errorf("expected %x got %x", exp, hash) } } func TestReplication(t *testing.T) { - trie := NewEmpty() + trie := newEmpty() vals := []struct{ k, v string }{ {"do", "verb"}, {"ether", "wookiedoo"}, {"horse", "stallion"}, {"shaman", "horse"}, {"doge", "coin"}, - {"ether", ""}, {"dog", "puppy"}, - {"shaman", ""}, {"somethingveryoddindeedthis is", "myothernodedata"}, } for _, val := range vals { - trie.UpdateString(val.k, val.v) + updateString(trie, val.k, val.v) } - trie.Commit() - - trie2 := New(trie.Root(), trie.cache.backend) - if string(trie2.GetString("horse")) != "stallion" { - t.Error("expected to have horse => stallion") + exp, err := trie.Commit() + if err != nil { + t.Fatalf("commit error: %v", err) } - hash := trie2.Hash() - exp := trie.Hash() - if !bytes.Equal(hash, exp) { + // create a new trie on top of the database and check that lookups work. + trie2, err := New(exp, trie.db) + if err != nil { + t.Fatalf("can't recreate trie at %x: %v", exp, err) + } + for _, kv := range vals { + if string(getString(trie2, kv.k)) != kv.v { + t.Errorf("trie2 doesn't have %q => %q", kv.k, kv.v) + } + } + hash, err := trie2.Commit() + if err != nil { + t.Fatalf("commit error: %v", err) + } + if hash != exp { t.Errorf("root failure. expected %x got %x", exp, hash) } -} - -func TestReset(t *testing.T) { - trie := NewEmpty() - vals := []struct{ k, v string }{ + // perform some insertions on the new trie. + vals2 := []struct{ k, v string }{ {"do", "verb"}, {"ether", "wookiedoo"}, {"horse", "stallion"}, + // {"shaman", "horse"}, + // {"doge", "coin"}, + // {"ether", ""}, + // {"dog", "puppy"}, + // {"somethingveryoddindeedthis is", "myothernodedata"}, + // {"shaman", ""}, } - for _, val := range vals { - trie.UpdateString(val.k, val.v) + for _, val := range vals2 { + updateString(trie2, val.k, val.v) } - trie.Commit() - - before := common.CopyBytes(trie.roothash) - trie.UpdateString("should", "revert") - trie.Hash() - // Should have no effect - trie.Hash() - trie.Hash() - // ### - - trie.Reset() - after := common.CopyBytes(trie.roothash) + if trie2.Hash() != exp { + t.Errorf("root failure. expected %x got %x", exp, hash) + } +} - if !bytes.Equal(before, after) { - t.Errorf("expected roots to be equal. %x - %x", before, after) +func paranoiaCheck(t1 *Trie) (bool, *Trie) { + t2 := new(Trie) + it := NewIterator(t1) + for it.Next() { + t2.Update(it.Key, it.Value) } + return t2.Hash() == t1.Hash(), t2 } func TestParanoia(t *testing.T) { t.Skip() - trie := NewEmpty() + trie := newEmpty() vals := []struct{ k, v string }{ {"do", "verb"}, @@ -228,13 +252,13 @@ func TestParanoia(t *testing.T) { {"somethingveryoddindeedthis is", "myothernodedata"}, } for _, val := range vals { - trie.UpdateString(val.k, val.v) + updateString(trie, val.k, val.v) } trie.Commit() - ok, t2 := ParanoiaCheck(trie, trie.cache.backend) + ok, t2 := paranoiaCheck(trie) if !ok { - t.Errorf("trie paranoia check failed %x %x", trie.roothash, t2.roothash) + t.Errorf("trie paranoia check failed %x %x", trie.Hash(), t2.Hash()) } } @@ -243,27 +267,35 @@ func TestOutput(t *testing.T) { t.Skip() base := "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - trie := NewEmpty() + trie := newEmpty() for i := 0; i < 50; i++ { - trie.UpdateString(fmt.Sprintf("%s%d", base, i), "valueeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee") + updateString(trie, fmt.Sprintf("%s%d", base, i), "valueeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee") } fmt.Println("############################## FULL ################################") fmt.Println(trie.root) trie.Commit() fmt.Println("############################## SMALL ################################") - trie2 := New(trie.roothash, trie.cache.backend) - trie2.GetString(base + "20") + trie2, _ := New(trie.Hash(), trie.db) + getString(trie2, base+"20") fmt.Println(trie2.root) } +func TestLargeValue(t *testing.T) { + trie := newEmpty() + trie.Update([]byte("key1"), []byte{99, 99, 99, 99}) + trie.Update([]byte("key2"), bytes.Repeat([]byte{1}, 32)) + trie.Hash() + +} + type kv struct { k, v []byte t bool } func TestLargeData(t *testing.T) { - trie := NewEmpty() + trie := newEmpty() vals := make(map[string]*kv) for i := byte(0); i < 255; i++ { @@ -275,7 +307,7 @@ func TestLargeData(t *testing.T) { vals[string(value2.k)] = value2 } - it := trie.Iterator() + it := NewIterator(trie) for it.Next() { vals[string(it.Key)].t = true } @@ -295,34 +327,6 @@ func TestLargeData(t *testing.T) { } } -func TestSecureDelete(t *testing.T) { - trie := NewEmptySecure() - - vals := []struct{ k, v string }{ - {"do", "verb"}, - {"ether", "wookiedoo"}, - {"horse", "stallion"}, - {"shaman", "horse"}, - {"doge", "coin"}, - {"ether", ""}, - {"dog", "puppy"}, - {"shaman", ""}, - } - for _, val := range vals { - if val.v != "" { - trie.UpdateString(val.k, val.v) - } else { - trie.DeleteString(val.k) - } - } - - hash := trie.Hash() - exp := common.Hex2Bytes("29b235a58c3c25ab83010c327d5932bcf05324b7d6b1185e650798034783ca9d") - if !bytes.Equal(hash, exp) { - t.Errorf("expected %x got %x", exp, hash) - } -} - func BenchmarkGet(b *testing.B) { benchGet(b, false) } func BenchmarkGetDB(b *testing.B) { benchGet(b, true) } func BenchmarkUpdateBE(b *testing.B) { benchUpdate(b, binary.BigEndian) } @@ -333,11 +337,11 @@ func BenchmarkHashLE(b *testing.B) { benchHash(b, binary.LittleEndian) } const benchElemCount = 20000 func benchGet(b *testing.B, commit bool) { - trie := New(nil, nil) + trie := new(Trie) if commit { dir, tmpdb := tempDB() defer os.RemoveAll(dir) - trie = New(nil, tmpdb) + trie, _ = New(common.Hash{}, tmpdb) } k := make([]byte, 32) for i := 0; i < benchElemCount; i++ { @@ -356,7 +360,7 @@ func benchGet(b *testing.B, commit bool) { } func benchUpdate(b *testing.B, e binary.ByteOrder) *Trie { - trie := NewEmpty() + trie := newEmpty() k := make([]byte, 32) for i := 0; i < b.N; i++ { e.PutUint64(k, uint64(i)) @@ -366,7 +370,7 @@ func benchUpdate(b *testing.B, e binary.ByteOrder) *Trie { } func benchHash(b *testing.B, e binary.ByteOrder) { - trie := NewEmpty() + trie := newEmpty() k := make([]byte, 32) for i := 0; i < benchElemCount; i++ { e.PutUint64(k, uint64(i)) @@ -379,7 +383,7 @@ func benchHash(b *testing.B, e binary.ByteOrder) { } } -func tempDB() (string, Backend) { +func tempDB() (string, Database) { dir, err := ioutil.TempDir("", "trie-bench") if err != nil { panic(fmt.Sprintf("can't create temporary directory: %v", err)) @@ -390,3 +394,15 @@ func tempDB() (string, Backend) { } return dir, db } + +func getString(trie *Trie, k string) []byte { + return trie.Get([]byte(k)) +} + +func updateString(trie *Trie, k, v string) { + trie.Update([]byte(k), []byte(v)) +} + +func deleteString(trie *Trie, k string) { + trie.Delete([]byte(k)) +} diff --git a/trie/valuenode.go b/trie/valuenode.go deleted file mode 100644 index 0afa64d54..000000000 --- a/trie/valuenode.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package trie - -import "github.com/ethereum/go-ethereum/common" - -type ValueNode struct { - trie *Trie - data []byte - dirty bool -} - -func NewValueNode(trie *Trie, data []byte) *ValueNode { - return &ValueNode{trie, data, false} -} - -func (self *ValueNode) Value() Node { return self } // Best not to call :-) -func (self *ValueNode) Val() []byte { return self.data } -func (self *ValueNode) Dirty() bool { return self.dirty } -func (self *ValueNode) Copy(t *Trie) Node { - return &ValueNode{t, common.CopyBytes(self.data), self.dirty} -} -func (self *ValueNode) RlpData() interface{} { return self.data } -func (self *ValueNode) Hash() interface{} { return self.data } - -func (self *ValueNode) setDirty(dirty bool) { - self.dirty = dirty -} -- cgit v1.2.3 From a2d5a60418e70ce56112381dffdd121cc678a1b6 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 18 Aug 2015 14:14:45 +0200 Subject: core, core/state: batch-based state sync --- core/block_processor.go | 20 +++++------ core/chain_makers.go | 14 +++++--- core/chain_manager.go | 8 ++--- core/genesis.go | 16 +++++---- core/state/state_object.go | 8 ++--- core/state/state_test.go | 3 +- core/state/statedb.go | 86 +++++++++++++++++++++++----------------------- miner/worker.go | 5 ++- tests/block_test_util.go | 12 +++---- tests/state_test_util.go | 8 ++--- 10 files changed, 90 insertions(+), 90 deletions(-) diff --git a/core/block_processor.go b/core/block_processor.go index 238b2db95..40590bdc5 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -100,10 +100,8 @@ func (self *BlockProcessor) ApplyTransaction(gp GasPool, statedb *state.StateDB, } // Update the state with pending changes - statedb.SyncIntermediate() - usedGas.Add(usedGas, gas) - receipt := types.NewReceipt(statedb.Root().Bytes(), usedGas) + receipt := types.NewReceipt(statedb.IntermediateRoot().Bytes(), usedGas) receipt.TxHash = tx.Hash() receipt.GasUsed = new(big.Int).Set(gas) if MessageCreatesContract(tx) { @@ -265,16 +263,16 @@ func (sm *BlockProcessor) processWithParent(block, parent *types.Block) (logs st // Accumulate static rewards; block reward, uncle's and uncle inclusion. AccumulateRewards(state, header, uncles) - // Commit state objects/accounts to a temporary trie (does not save) - // used to calculate the state root. - state.SyncObjects() - if header.Root != state.Root() { - err = fmt.Errorf("invalid merkle root. received=%x got=%x", header.Root, state.Root()) - return + // Commit state objects/accounts to a database batch and calculate + // the state root. The database is not modified if the root + // doesn't match. + root, batch := state.CommitBatch() + if header.Root != root { + return nil, nil, fmt.Errorf("invalid merkle root: header=%x computed=%x", header.Root, root) } - // Sync the current block's state to the database - state.Sync() + // Execute the database writes. + batch.Write() return state.Logs(), receipts, nil } diff --git a/core/chain_makers.go b/core/chain_makers.go index 70233438d..3af9b0b89 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -17,6 +17,7 @@ package core import ( + "fmt" "math/big" "github.com/ethereum/go-ethereum/common" @@ -94,9 +95,9 @@ func (b *BlockGen) AddTx(tx *types.Transaction) { if err != nil { panic(err) } - b.statedb.SyncIntermediate() + root := b.statedb.IntermediateRoot() b.header.GasUsed.Add(b.header.GasUsed, gas) - receipt := types.NewReceipt(b.statedb.Root().Bytes(), b.header.GasUsed) + receipt := types.NewReceipt(root.Bytes(), b.header.GasUsed) logs := b.statedb.GetLogs(tx.Hash()) receipt.SetLogs(logs) receipt.Bloom = types.CreateBloom(types.Receipts{receipt}) @@ -163,8 +164,11 @@ func GenerateChain(parent *types.Block, db ethdb.Database, n int, gen func(int, gen(i, b) } AccumulateRewards(statedb, h, b.uncles) - statedb.SyncIntermediate() - h.Root = statedb.Root() + root, err := statedb.Commit() + if err != nil { + panic(fmt.Sprintf("state write error: %v", err)) + } + h.Root = root return types.NewBlock(h, b.txs, b.uncles, b.receipts) } for i := 0; i < n; i++ { @@ -184,7 +188,7 @@ func makeHeader(parent *types.Block, state *state.StateDB) *types.Header { time = new(big.Int).Add(parent.Time(), big.NewInt(10)) // block time is fixed at 10 seconds } return &types.Header{ - Root: state.Root(), + Root: state.IntermediateRoot(), ParentHash: parent.Hash(), Coinbase: parent.Coinbase(), Difficulty: CalcDifficulty(time.Uint64(), new(big.Int).Sub(time, big.NewInt(10)).Uint64(), parent.Number(), parent.Difficulty()), diff --git a/core/chain_manager.go b/core/chain_manager.go index 42f70af33..0fb472308 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -839,8 +839,8 @@ out: } func blockErr(block *types.Block, err error) { - h := block.Header() - glog.V(logger.Error).Infof("Bad block #%v (%x)\n", h.Number, h.Hash().Bytes()) - glog.V(logger.Error).Infoln(err) - glog.V(logger.Debug).Infoln(verifyNonces) + if glog.V(logger.Error) { + glog.Errorf("Bad block #%v (%s)\n", block.Number(), block.Hash().Hex()) + glog.Errorf(" %v", err) + } } diff --git a/core/genesis.go b/core/genesis.go index b2346da65..bf97da2e2 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -69,7 +69,7 @@ func WriteGenesisBlock(chainDb ethdb.Database, reader io.Reader) (*types.Block, statedb.SetState(address, common.HexToHash(key), common.HexToHash(value)) } } - statedb.SyncObjects() + root, stateBatch := statedb.CommitBatch() difficulty := common.String2Big(genesis.Difficulty) block := types.NewBlock(&types.Header{ @@ -81,7 +81,7 @@ func WriteGenesisBlock(chainDb ethdb.Database, reader io.Reader) (*types.Block, Difficulty: difficulty, MixDigest: common.HexToHash(genesis.Mixhash), Coinbase: common.HexToAddress(genesis.Coinbase), - Root: statedb.Root(), + Root: root, }, nil, nil, nil) if block := GetBlock(chainDb, block.Hash()); block != nil { @@ -92,8 +92,10 @@ func WriteGenesisBlock(chainDb ethdb.Database, reader io.Reader) (*types.Block, } return block, nil } - statedb.Sync() + if err := stateBatch.Write(); err != nil { + return nil, fmt.Errorf("cannot write state: %v", err) + } if err := WriteTd(chainDb, block.Hash(), difficulty); err != nil { return nil, err } @@ -115,12 +117,14 @@ func GenesisBlockForTesting(db ethdb.Database, addr common.Address, balance *big statedb := state.New(common.Hash{}, db) obj := statedb.GetOrNewStateObject(addr) obj.SetBalance(balance) - statedb.SyncObjects() - statedb.Sync() + root, err := statedb.Commit() + if err != nil { + panic(fmt.Sprintf("cannot write state: %v", err)) + } block := types.NewBlock(&types.Header{ Difficulty: params.GenesisDifficulty, GasLimit: params.GenesisGasLimit, - Root: statedb.Root(), + Root: root, }, nil, nil, nil) return block } diff --git a/core/state/state_object.go b/core/state/state_object.go index 251a31093..40af9ed9c 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -218,6 +218,7 @@ func (c *StateObject) ReturnGas(gas, price *big.Int) {} func (self *StateObject) SetGasLimit(gasLimit *big.Int) { self.gasPool = new(big.Int).Set(gasLimit) + self.dirty = true if glog.V(logger.Core) { glog.Infof("%x: gas (+ %v)", self.Address(), self.gasPool) @@ -228,19 +229,14 @@ func (self *StateObject) SubGas(gas, price *big.Int) error { if self.gasPool.Cmp(gas) < 0 { return GasLimitError(self.gasPool, gas) } - self.gasPool.Sub(self.gasPool, gas) - - rGas := new(big.Int).Set(gas) - rGas.Mul(rGas, price) - self.dirty = true - return nil } func (self *StateObject) AddGas(gas, price *big.Int) { self.gasPool.Add(self.gasPool, gas) + self.dirty = true } func (self *StateObject) Copy() *StateObject { diff --git a/core/state/state_test.go b/core/state/state_test.go index 60836738e..b5a7f4081 100644 --- a/core/state/state_test.go +++ b/core/state/state_test.go @@ -89,8 +89,7 @@ func TestNull(t *testing.T) { //value := common.FromHex("0x823140710bf13990e4500136726d8b55") var value common.Hash state.SetState(address, common.Hash{}, value) - state.SyncIntermediate() - state.Sync() + state.Commit() value = state.GetState(address, common.Hash{}) if !common.EmptyHash(value) { t.Errorf("expected empty hash. got %x", value) diff --git a/core/state/statedb.go b/core/state/statedb.go index c2bc99564..4233c763b 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -35,7 +35,6 @@ import ( type StateDB struct { db ethdb.Database trie *trie.SecureTrie - root common.Hash stateObjects map[string]*StateObject @@ -56,7 +55,6 @@ func New(root common.Hash, db ethdb.Database) *StateDB { glog.Errorf("can't create state trie with root %x: %v", root[:], err) } return &StateDB{ - root: root, db: db, trie: tr, stateObjects: make(map[string]*StateObject), @@ -204,7 +202,6 @@ func (self *StateDB) UpdateStateObject(stateObject *StateObject) { if len(stateObject.CodeHash()) > 0 { self.db.Put(stateObject.CodeHash(), stateObject.code) } - addr := stateObject.Address() self.trie.Update(addr[:], stateObject.RlpEncode()) } @@ -215,6 +212,7 @@ func (self *StateDB) DeleteStateObject(stateObject *StateObject) { addr := stateObject.Address() self.trie.Delete(addr[:]) + //delete(self.stateObjects, addr.Str()) } // Retrieve a state object given my the address. Nil if not found @@ -311,65 +309,67 @@ func (self *StateDB) Set(state *StateDB) { self.logSize = state.logSize } -func (s *StateDB) Root() common.Hash { - return s.trie.Hash() -} - -// Syncs the trie and all siblings -func (s *StateDB) Sync() { - // Sync all nested states +// IntermediateRoot computes the current root hash of the state trie. +// It is called in between transactions to get the root hash that +// goes into transaction receipts. +func (s *StateDB) IntermediateRoot() common.Hash { + s.refund = new(big.Int) for _, stateObject := range s.stateObjects { - stateObject.trie.Commit() - } - - s.trie.Commit() - - s.Empty() -} - -func (self *StateDB) Empty() { - self.stateObjects = make(map[string]*StateObject) - self.refund = new(big.Int) -} - -func (self *StateDB) Refunds() *big.Int { - return self.refund -} - -// SyncIntermediate updates the intermediate state and all mid steps -func (self *StateDB) SyncIntermediate() { - self.refund = new(big.Int) - - for _, stateObject := range self.stateObjects { if stateObject.dirty { if stateObject.remove { - self.DeleteStateObject(stateObject) + s.DeleteStateObject(stateObject) } else { stateObject.Update() - - self.UpdateStateObject(stateObject) + s.UpdateStateObject(stateObject) } stateObject.dirty = false } } + return s.trie.Hash() } -// SyncObjects syncs the changed objects to the trie -func (self *StateDB) SyncObjects() { - self.trie, _ = trie.NewSecure(self.root, self.db) +// Commit commits all state changes to the database. +func (s *StateDB) Commit() (root common.Hash, err error) { + return s.commit(s.db) +} + +// CommitBatch commits all state changes to a write batch but does not +// execute the batch. It is used to validate state changes against +// the root hash stored in a block. +func (s *StateDB) CommitBatch() (root common.Hash, batch ethdb.Batch) { + batch = s.db.NewBatch() + root, _ = s.commit(batch) + return root, batch +} - self.refund = new(big.Int) +func (s *StateDB) commit(db trie.DatabaseWriter) (common.Hash, error) { + s.refund = new(big.Int) - for _, stateObject := range self.stateObjects { + for _, stateObject := range s.stateObjects { if stateObject.remove { - self.DeleteStateObject(stateObject) + // If the object has been removed, don't bother syncing it + // and just mark it for deletion in the trie. + s.DeleteStateObject(stateObject) } else { + // Write any storage changes in the state object to its trie. stateObject.Update() - - self.UpdateStateObject(stateObject) + // Commit the trie of the object to the batch. + // This updates the trie root internally, so + // getting the root hash of the storage trie + // through UpdateStateObject is fast. + if _, err := stateObject.trie.CommitTo(db); err != nil { + return common.Hash{}, err + } + // Update the object in the account trie. + s.UpdateStateObject(stateObject) } stateObject.dirty = false } + return s.trie.CommitTo(db) +} + +func (self *StateDB) Refunds() *big.Int { + return self.refund } // Debug stuff diff --git a/miner/worker.go b/miner/worker.go index 22d0b9b6e..098f42a72 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -266,7 +266,6 @@ func (self *worker) wait() { block := result.Block work := result.Work - work.state.Sync() if self.fullValidation { if _, err := self.chain.InsertChain(types.Blocks{block}); err != nil { glog.V(logger.Error).Infoln("mining err", err) @@ -274,6 +273,7 @@ func (self *worker) wait() { } go self.mux.Post(core.NewMinedBlockEvent{block}) } else { + work.state.Commit() parent := self.chain.GetBlock(block.ParentHash()) if parent == nil { glog.V(logger.Error).Infoln("Invalid block found during mining") @@ -528,8 +528,7 @@ func (self *worker) commitNewWork() { if atomic.LoadInt32(&self.mining) == 1 { // commit state root after all state transitions. core.AccumulateRewards(work.state, header, uncles) - work.state.SyncObjects() - header.Root = work.state.Root() + header.Root = work.state.IntermediateRoot() } // create the new block whose nonce will be mined. diff --git a/tests/block_test_util.go b/tests/block_test_util.go index 3ca00bae8..33577cf55 100644 --- a/tests/block_test_util.go +++ b/tests/block_test_util.go @@ -253,13 +253,13 @@ func (t *BlockTest) InsertPreState(ethereum *eth.Ethereum) (*state.StateDB, erro statedb.SetState(common.HexToAddress(addrString), common.HexToHash(k), common.HexToHash(v)) } } - // sync objects to trie - statedb.SyncObjects() - // sync trie to disk - statedb.Sync() - if !bytes.Equal(t.Genesis.Root().Bytes(), statedb.Root().Bytes()) { - return nil, fmt.Errorf("computed state root does not match genesis block %x %x", t.Genesis.Root().Bytes()[:4], statedb.Root().Bytes()[:4]) + root, err := statedb.Commit() + if err != nil { + return nil, fmt.Errorf("error writing state: %v", err) + } + if t.Genesis.Root() != root { + return nil, fmt.Errorf("computed state root does not match genesis block: genesis=%x computed=%x", t.Genesis.Root().Bytes()[:4], root.Bytes()[:4]) } return statedb, nil } diff --git a/tests/state_test_util.go b/tests/state_test_util.go index 086822461..669e90a1e 100644 --- a/tests/state_test_util.go +++ b/tests/state_test_util.go @@ -200,9 +200,9 @@ func runStateTest(test VmTest) error { } } - statedb.Sync() - if common.HexToHash(test.PostStateRoot) != statedb.Root() { - return fmt.Errorf("Post state root error. Expected %s, got %x", test.PostStateRoot, statedb.Root()) + root, _ := statedb.Commit() + if common.HexToHash(test.PostStateRoot) != root { + return fmt.Errorf("Post state root error. Expected %s, got %x", test.PostStateRoot, root) } // check logs @@ -246,7 +246,7 @@ func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state. if core.IsNonceErr(err) || core.IsInvalidTxErr(err) || state.IsGasLimitErr(err) { statedb.Set(snapshot) } - statedb.SyncObjects() + statedb.Commit() return ret, vmenv.state.Logs(), vmenv.Gas, err } -- cgit v1.2.3 From c1a352c1085baa5c5f7650d331603bbb5532dea4 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 9 Sep 2015 03:35:41 +0200 Subject: trie: add merkle proof functions --- trie/proof.go | 122 ++++++++++++++++++++++++++++++++++++++++++++++ trie/proof_test.go | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 261 insertions(+) create mode 100644 trie/proof.go create mode 100644 trie/proof_test.go diff --git a/trie/proof.go b/trie/proof.go new file mode 100644 index 000000000..a705c49db --- /dev/null +++ b/trie/proof.go @@ -0,0 +1,122 @@ +package trie + +import ( + "bytes" + "errors" + "fmt" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto/sha3" + "github.com/ethereum/go-ethereum/rlp" +) + +// Prove constructs a merkle proof for key. The result contains all +// encoded nodes on the path to the value at key. The value itself is +// also included in the last node and can be retrieved by verifying +// the proof. +// +// The returned proof is nil if the trie does not contain a value for key. +// For existing keys, the proof will have at least one element. +func (t *Trie) Prove(key []byte) []rlp.RawValue { + // Collect all nodes on the path to key. + key = compactHexDecode(key) + nodes := []node{} + tn := t.root + for len(key) > 0 { + switch n := tn.(type) { + case shortNode: + if len(key) < len(n.Key) || !bytes.Equal(n.Key, key[:len(n.Key)]) { + // The trie doesn't contain the key. + return nil + } + tn = n.Val + key = key[len(n.Key):] + nodes = append(nodes, n) + case fullNode: + tn = n[key[0]] + key = key[1:] + nodes = append(nodes, n) + case nil: + return nil + case hashNode: + tn = t.resolveHash(n) + default: + panic(fmt.Sprintf("%T: invalid node: %v", tn, tn)) + } + } + if t.hasher == nil { + t.hasher = newHasher() + } + proof := make([]rlp.RawValue, 0, len(nodes)) + for i, n := range nodes { + // Don't bother checking for errors here since hasher panics + // if encoding doesn't work and we're not writing to any database. + n, _ = t.hasher.replaceChildren(n, nil) + hn, _ := t.hasher.store(n, nil, false) + if _, ok := hn.(hashNode); ok || i == 0 { + // If the node's database encoding is a hash (or is the + // root node), it becomes a proof element. + enc, _ := rlp.EncodeToBytes(n) + proof = append(proof, enc) + } + } + return proof +} + +// VerifyProof checks merkle proofs. The given proof must contain the +// value for key in a trie with the given root hash. VerifyProof +// returns an error if the proof contains invalid trie nodes or the +// wrong value. +func VerifyProof(rootHash common.Hash, key []byte, proof []rlp.RawValue) (value []byte, err error) { + key = compactHexDecode(key) + sha := sha3.NewKeccak256() + wantHash := rootHash.Bytes() + for i, buf := range proof { + sha.Reset() + sha.Write(buf) + if !bytes.Equal(sha.Sum(nil), wantHash) { + return nil, fmt.Errorf("bad proof node %d: hash mismatch", i) + } + n, err := decodeNode(buf) + if err != nil { + return nil, fmt.Errorf("bad proof node %d: %v", i, err) + } + keyrest, cld := get(n, key) + switch cld := cld.(type) { + case nil: + return nil, fmt.Errorf("key mismatch at proof node %d", i) + case hashNode: + key = keyrest + wantHash = cld + case valueNode: + if i != len(proof)-1 { + return nil, errors.New("additional nodes at end of proof") + } + return cld, nil + } + } + return nil, errors.New("unexpected end of proof") +} + +func get(tn node, key []byte) ([]byte, node) { + for len(key) > 0 { + switch n := tn.(type) { + case shortNode: + if len(key) < len(n.Key) || !bytes.Equal(n.Key, key[:len(n.Key)]) { + return nil, nil + } + tn = n.Val + key = key[len(n.Key):] + case fullNode: + tn = n[key[0]] + key = key[1:] + case hashNode: + return key, n + case nil: + return key, nil + default: + panic(fmt.Sprintf("%T: invalid node: %v", tn, tn)) + } + } + return nil, tn.(valueNode) +} diff --git a/trie/proof_test.go b/trie/proof_test.go new file mode 100644 index 000000000..6b5bef05c --- /dev/null +++ b/trie/proof_test.go @@ -0,0 +1,139 @@ +package trie + +import ( + "bytes" + crand "crypto/rand" + mrand "math/rand" + "testing" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/rlp" +) + +func init() { + mrand.Seed(time.Now().Unix()) +} + +func TestProof(t *testing.T) { + trie, vals := randomTrie(500) + root := trie.Hash() + for _, kv := range vals { + proof := trie.Prove(kv.k) + if proof == nil { + t.Fatalf("missing key %x while constructing proof", kv.k) + } + val, err := VerifyProof(root, kv.k, proof) + if err != nil { + t.Fatalf("VerifyProof error for key %x: %v\nraw proof: %x", kv.k, err, proof) + } + if !bytes.Equal(val, kv.v) { + t.Fatalf("VerifyProof returned wrong value for key %x: got %x, want %x", kv.k, val, kv.v) + } + } +} + +func TestOneElementProof(t *testing.T) { + trie := new(Trie) + updateString(trie, "k", "v") + proof := trie.Prove([]byte("k")) + if proof == nil { + t.Fatal("nil proof") + } + if len(proof) != 1 { + t.Error("proof should have one element") + } + val, err := VerifyProof(trie.Hash(), []byte("k"), proof) + if err != nil { + t.Fatalf("VerifyProof error: %v\nraw proof: %x", err, proof) + } + if !bytes.Equal(val, []byte("v")) { + t.Fatalf("VerifyProof returned wrong value: got %x, want 'k'", val) + } +} + +func TestVerifyBadProof(t *testing.T) { + trie, vals := randomTrie(800) + root := trie.Hash() + for _, kv := range vals { + proof := trie.Prove(kv.k) + if proof == nil { + t.Fatal("nil proof") + } + mutateByte(proof[mrand.Intn(len(proof))]) + if _, err := VerifyProof(root, kv.k, proof); err == nil { + t.Fatalf("expected proof to fail for key %x", kv.k) + } + } +} + +// mutateByte changes one byte in b. +func mutateByte(b []byte) { + for r := mrand.Intn(len(b)); ; { + new := byte(mrand.Intn(255)) + if new != b[r] { + b[r] = new + break + } + } +} + +func BenchmarkProve(b *testing.B) { + trie, vals := randomTrie(100) + var keys []string + for k := range vals { + keys = append(keys, k) + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + kv := vals[keys[i%len(keys)]] + if trie.Prove(kv.k) == nil { + b.Fatalf("nil proof for %x", kv.k) + } + } +} + +func BenchmarkVerifyProof(b *testing.B) { + trie, vals := randomTrie(100) + root := trie.Hash() + var keys []string + var proofs [][]rlp.RawValue + for k := range vals { + keys = append(keys, k) + proofs = append(proofs, trie.Prove([]byte(k))) + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + im := i % len(keys) + if _, err := VerifyProof(root, []byte(keys[im]), proofs[im]); err != nil { + b.Fatalf("key %x: error", keys[im], err) + } + } +} + +func randomTrie(n int) (*Trie, map[string]*kv) { + trie := new(Trie) + vals := make(map[string]*kv) + for i := byte(0); i < 100; i++ { + value := &kv{common.LeftPadBytes([]byte{i}, 32), []byte{i}, false} + value2 := &kv{common.LeftPadBytes([]byte{i + 10}, 32), []byte{i}, false} + trie.Update(value.k, value.v) + trie.Update(value2.k, value2.v) + vals[string(value.k)] = value + vals[string(value2.k)] = value2 + } + for i := 0; i < n; i++ { + value := &kv{randBytes(32), randBytes(20), false} + trie.Update(value.k, value.v) + vals[string(value.k)] = value + } + return trie, vals +} + +func randBytes(n int) []byte { + r := make([]byte, n) + crand.Read(r) + return r +} -- cgit v1.2.3 From 830ddcee60cd3ff37a02d8ff3c1dd57c43708f36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 24 Sep 2015 19:36:23 +0300 Subject: core: fix #1848, block receipts db entry for the genesis too --- core/genesis.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/genesis.go b/core/genesis.go index b2346da65..11dbdee6d 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -100,6 +100,9 @@ func WriteGenesisBlock(chainDb ethdb.Database, reader io.Reader) (*types.Block, if err := WriteBlock(chainDb, block); err != nil { return nil, err } + if err := PutBlockReceipts(chainDb, block, nil); err != nil { + return nil, err + } if err := WriteCanonicalHash(chainDb, block.Hash(), block.NumberU64()); err != nil { return nil, err } -- cgit v1.2.3 From 8636f0e1c326c88bee636cc269da660e954b96b1 Mon Sep 17 00:00:00 2001 From: Bas van Kervel Date: Fri, 25 Sep 2015 13:08:48 +0200 Subject: console/history respect datadir --- cmd/geth/js.go | 17 ++++++----------- cmd/geth/main.go | 1 + 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/cmd/geth/js.go b/cmd/geth/js.go index 3e3600705..b5ec82b57 100644 --- a/cmd/geth/js.go +++ b/cmd/geth/js.go @@ -145,7 +145,7 @@ func apiWordCompleter(line string, pos int) (head string, completions []string, return begin, completionWords, end } -func newLightweightJSRE(libPath string, client comms.EthereumClient, interactive bool) *jsre { +func newLightweightJSRE(libPath string, client comms.EthereumClient, datadir string, interactive bool) *jsre { js := &jsre{ps1: "> "} js.wait = make(chan *big.Int) js.client = client @@ -161,14 +161,14 @@ func newLightweightJSRE(libPath string, client comms.EthereumClient, interactive js.prompter = dumbterm{bufio.NewReader(os.Stdin)} } else { lr := liner.NewLiner() - js.withHistory(func(hist *os.File) { lr.ReadHistory(hist) }) + js.withHistory(datadir, func(hist *os.File) { lr.ReadHistory(hist) }) lr.SetCtrlCAborts(true) js.loadAutoCompletion() lr.SetWordCompleter(apiWordCompleter) lr.SetTabCompletionStyle(liner.TabPrints) js.prompter = lr js.atexit = func() { - js.withHistory(func(hist *os.File) { hist.Truncate(0); lr.WriteHistory(hist) }) + js.withHistory(datadir, func(hist *os.File) { hist.Truncate(0); lr.WriteHistory(hist) }) lr.Close() close(js.wait) } @@ -203,14 +203,14 @@ func newJSRE(ethereum *eth.Ethereum, libPath, corsDomain string, client comms.Et js.prompter = dumbterm{bufio.NewReader(os.Stdin)} } else { lr := liner.NewLiner() - js.withHistory(func(hist *os.File) { lr.ReadHistory(hist) }) + js.withHistory(ethereum.DataDir, func(hist *os.File) { lr.ReadHistory(hist) }) lr.SetCtrlCAborts(true) js.loadAutoCompletion() lr.SetWordCompleter(apiWordCompleter) lr.SetTabCompletionStyle(liner.TabPrints) js.prompter = lr js.atexit = func() { - js.withHistory(func(hist *os.File) { hist.Truncate(0); lr.WriteHistory(hist) }) + js.withHistory(ethereum.DataDir, func(hist *os.File) { hist.Truncate(0); lr.WriteHistory(hist) }) lr.Close() close(js.wait) } @@ -433,12 +433,7 @@ func hidepassword(input string) string { } } -func (self *jsre) withHistory(op func(*os.File)) { - datadir := common.DefaultDataDir() - if self.ethereum != nil { - datadir = self.ethereum.DataDir - } - +func (self *jsre) withHistory(datadir string, op func(*os.File)) { hist, err := os.OpenFile(filepath.Join(datadir, "history"), os.O_RDWR|os.O_CREATE, os.ModePerm) if err != nil { fmt.Printf("unable to open history file: %v\n", err) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index daffda30c..a9766b7f7 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -429,6 +429,7 @@ func attach(ctx *cli.Context) { repl := newLightweightJSRE( ctx.GlobalString(utils.JSpathFlag.Name), client, + ctx.GlobalString(utils.DataDirFlag.Name), true, ) -- cgit v1.2.3 From 1d20b0247c35f440d3fdc3d21de19b2d5256c3cf Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Mon, 28 Sep 2015 17:46:17 +0200 Subject: Update libsecp256k1 --- crypto/secp256k1/libsecp256k1/.gitignore | 41 + crypto/secp256k1/libsecp256k1/.travis.yml | 62 + crypto/secp256k1/libsecp256k1/COPYING | 19 + crypto/secp256k1/libsecp256k1/Makefile.am | 110 + crypto/secp256k1/libsecp256k1/README.md | 61 + crypto/secp256k1/libsecp256k1/TODO | 3 + crypto/secp256k1/libsecp256k1/autogen.sh | 3 + crypto/secp256k1/libsecp256k1/configure.ac | 376 ++++ crypto/secp256k1/libsecp256k1/include/secp256k1.h | 547 +++++ .../libsecp256k1/include/secp256k1_ecdh.h | 30 + .../libsecp256k1/include/secp256k1_recovery.h | 110 + .../libsecp256k1/include/secp256k1_schnorr.h | 173 ++ crypto/secp256k1/libsecp256k1/libsecp256k1.pc.in | 13 + crypto/secp256k1/libsecp256k1/obj/.gitignore | 0 crypto/secp256k1/libsecp256k1/src/basic-config.h | 32 + crypto/secp256k1/libsecp256k1/src/bench.h | 66 + crypto/secp256k1/libsecp256k1/src/bench_ecdh.c | 53 + crypto/secp256k1/libsecp256k1/src/bench_internal.c | 354 +++ crypto/secp256k1/libsecp256k1/src/bench_recover.c | 60 + .../libsecp256k1/src/bench_schnorr_verify.c | 73 + crypto/secp256k1/libsecp256k1/src/bench_sign.c | 56 + crypto/secp256k1/libsecp256k1/src/bench_verify.c | 67 + crypto/secp256k1/libsecp256k1/src/ecdsa.h | 22 + crypto/secp256k1/libsecp256k1/src/ecdsa_impl.h | 264 +++ crypto/secp256k1/libsecp256k1/src/eckey.h | 28 + crypto/secp256k1/libsecp256k1/src/eckey_impl.h | 202 ++ crypto/secp256k1/libsecp256k1/src/ecmult.h | 31 + crypto/secp256k1/libsecp256k1/src/ecmult_const.h | 15 + .../secp256k1/libsecp256k1/src/ecmult_const_impl.h | 260 +++ crypto/secp256k1/libsecp256k1/src/ecmult_gen.h | 43 + .../secp256k1/libsecp256k1/src/ecmult_gen_impl.h | 205 ++ crypto/secp256k1/libsecp256k1/src/ecmult_impl.h | 389 ++++ crypto/secp256k1/libsecp256k1/src/field.h | 119 + crypto/secp256k1/libsecp256k1/src/field_10x26.h | 47 + .../secp256k1/libsecp256k1/src/field_10x26_impl.h | 1138 ++++++++++ crypto/secp256k1/libsecp256k1/src/field_5x52.h | 47 + .../libsecp256k1/src/field_5x52_asm_impl.h | 502 +++++ .../secp256k1/libsecp256k1/src/field_5x52_impl.h | 456 ++++ .../libsecp256k1/src/field_5x52_int128_impl.h | 277 +++ crypto/secp256k1/libsecp256k1/src/field_impl.h | 271 +++ crypto/secp256k1/libsecp256k1/src/gen_context.c | 74 + crypto/secp256k1/libsecp256k1/src/group.h | 141 ++ crypto/secp256k1/libsecp256k1/src/group_impl.h | 632 ++++++ crypto/secp256k1/libsecp256k1/src/hash.h | 41 + crypto/secp256k1/libsecp256k1/src/hash_impl.h | 283 +++ .../src/java/org/bitcoin/NativeSecp256k1.java | 60 + .../src/java/org_bitcoin_NativeSecp256k1.c | 23 + .../src/java/org_bitcoin_NativeSecp256k1.h | 21 + .../src/modules/ecdh/Makefile.am.include | 9 + .../libsecp256k1/src/modules/ecdh/main_impl.h | 54 + .../libsecp256k1/src/modules/ecdh/tests_impl.h | 75 + .../src/modules/recovery/Makefile.am.include | 9 + .../libsecp256k1/src/modules/recovery/main_impl.h | 156 ++ .../libsecp256k1/src/modules/recovery/tests_impl.h | 249 +++ .../src/modules/schnorr/Makefile.am.include | 11 + .../libsecp256k1/src/modules/schnorr/main_impl.h | 164 ++ .../libsecp256k1/src/modules/schnorr/schnorr.h | 20 + .../src/modules/schnorr/schnorr_impl.h | 207 ++ .../libsecp256k1/src/modules/schnorr/tests_impl.h | 175 ++ crypto/secp256k1/libsecp256k1/src/num.h | 68 + crypto/secp256k1/libsecp256k1/src/num_gmp.h | 20 + crypto/secp256k1/libsecp256k1/src/num_gmp_impl.h | 260 +++ crypto/secp256k1/libsecp256k1/src/num_impl.h | 24 + crypto/secp256k1/libsecp256k1/src/scalar.h | 104 + crypto/secp256k1/libsecp256k1/src/scalar_4x64.h | 19 + .../secp256k1/libsecp256k1/src/scalar_4x64_impl.h | 947 ++++++++ crypto/secp256k1/libsecp256k1/src/scalar_8x32.h | 19 + .../secp256k1/libsecp256k1/src/scalar_8x32_impl.h | 721 ++++++ crypto/secp256k1/libsecp256k1/src/scalar_impl.h | 337 +++ crypto/secp256k1/libsecp256k1/src/secp256k1.c | 513 +++++ crypto/secp256k1/libsecp256k1/src/testrand.h | 28 + crypto/secp256k1/libsecp256k1/src/testrand_impl.h | 60 + crypto/secp256k1/libsecp256k1/src/tests.c | 2357 ++++++++++++++++++++ crypto/secp256k1/libsecp256k1/src/util.h | 110 + crypto/secp256k1/secp256k1/.travis.yml | 32 - crypto/secp256k1/secp256k1/COPYING | 19 - crypto/secp256k1/secp256k1/Makefile.am | 77 - crypto/secp256k1/secp256k1/README.md | 61 - crypto/secp256k1/secp256k1/TODO | 3 - crypto/secp256k1/secp256k1/autogen.sh | 3 - .../secp256k1/build-aux/m4/bitcoin_secp.m4 | 61 - crypto/secp256k1/secp256k1/configure.ac | 330 --- crypto/secp256k1/secp256k1/include/secp256k1.h | 295 --- crypto/secp256k1/secp256k1/libsecp256k1.pc.in | 13 - crypto/secp256k1/secp256k1/obj/.gitignore | 0 crypto/secp256k1/secp256k1/src/bench.h | 56 - crypto/secp256k1/secp256k1/src/bench_internal.c | 318 --- crypto/secp256k1/secp256k1/src/bench_recover.c | 49 - crypto/secp256k1/secp256k1/src/bench_sign.c | 48 - crypto/secp256k1/secp256k1/src/bench_verify.c | 55 - crypto/secp256k1/secp256k1/src/ecdsa.h | 23 - crypto/secp256k1/secp256k1/src/ecdsa_impl.h | 263 --- crypto/secp256k1/secp256k1/src/eckey.h | 24 - crypto/secp256k1/secp256k1/src/eckey_impl.h | 202 -- crypto/secp256k1/secp256k1/src/ecmult.h | 19 - crypto/secp256k1/secp256k1/src/ecmult_gen.h | 19 - crypto/secp256k1/secp256k1/src/ecmult_gen_impl.h | 128 -- crypto/secp256k1/secp256k1/src/ecmult_impl.h | 302 --- crypto/secp256k1/secp256k1/src/field.h | 116 - crypto/secp256k1/secp256k1/src/field_10x26.h | 47 - crypto/secp256k1/secp256k1/src/field_10x26_impl.h | 1116 --------- crypto/secp256k1/secp256k1/src/field_5x52.h | 47 - .../secp256k1/secp256k1/src/field_5x52_asm_impl.h | 502 ----- crypto/secp256k1/secp256k1/src/field_5x52_impl.h | 439 ---- .../secp256k1/src/field_5x52_int128_impl.h | 277 --- crypto/secp256k1/secp256k1/src/field_impl.h | 263 --- crypto/secp256k1/secp256k1/src/group.h | 118 - crypto/secp256k1/secp256k1/src/group_impl.h | 434 ---- crypto/secp256k1/secp256k1/src/hash.h | 41 - crypto/secp256k1/secp256k1/src/hash_impl.h | 293 --- .../src/java/org/bitcoin/NativeSecp256k1.java | 60 - .../src/java/org_bitcoin_NativeSecp256k1.c | 23 - .../src/java/org_bitcoin_NativeSecp256k1.h | 21 - crypto/secp256k1/secp256k1/src/num.h | 68 - crypto/secp256k1/secp256k1/src/num_gmp.h | 20 - crypto/secp256k1/secp256k1/src/num_gmp_impl.h | 260 --- crypto/secp256k1/secp256k1/src/num_impl.h | 24 - crypto/secp256k1/secp256k1/src/scalar.h | 93 - crypto/secp256k1/secp256k1/src/scalar_4x64.h | 19 - crypto/secp256k1/secp256k1/src/scalar_4x64_impl.h | 920 -------- crypto/secp256k1/secp256k1/src/scalar_8x32.h | 19 - crypto/secp256k1/secp256k1/src/scalar_8x32_impl.h | 681 ------ crypto/secp256k1/secp256k1/src/scalar_impl.h | 327 --- crypto/secp256k1/secp256k1/src/secp256k1.c | 372 --- crypto/secp256k1/secp256k1/src/testrand.h | 28 - crypto/secp256k1/secp256k1/src/testrand_impl.h | 60 - crypto/secp256k1/secp256k1/src/tests.c | 1917 ---------------- crypto/secp256k1/secp256k1/src/util.h | 104 - 128 files changed, 14616 insertions(+), 11109 deletions(-) create mode 100644 crypto/secp256k1/libsecp256k1/.gitignore create mode 100644 crypto/secp256k1/libsecp256k1/.travis.yml create mode 100644 crypto/secp256k1/libsecp256k1/COPYING create mode 100644 crypto/secp256k1/libsecp256k1/Makefile.am create mode 100644 crypto/secp256k1/libsecp256k1/README.md create mode 100644 crypto/secp256k1/libsecp256k1/TODO create mode 100755 crypto/secp256k1/libsecp256k1/autogen.sh create mode 100644 crypto/secp256k1/libsecp256k1/configure.ac create mode 100644 crypto/secp256k1/libsecp256k1/include/secp256k1.h create mode 100644 crypto/secp256k1/libsecp256k1/include/secp256k1_ecdh.h create mode 100644 crypto/secp256k1/libsecp256k1/include/secp256k1_recovery.h create mode 100644 crypto/secp256k1/libsecp256k1/include/secp256k1_schnorr.h create mode 100644 crypto/secp256k1/libsecp256k1/libsecp256k1.pc.in create mode 100644 crypto/secp256k1/libsecp256k1/obj/.gitignore create mode 100644 crypto/secp256k1/libsecp256k1/src/basic-config.h create mode 100644 crypto/secp256k1/libsecp256k1/src/bench.h create mode 100644 crypto/secp256k1/libsecp256k1/src/bench_ecdh.c create mode 100644 crypto/secp256k1/libsecp256k1/src/bench_internal.c create mode 100644 crypto/secp256k1/libsecp256k1/src/bench_recover.c create mode 100644 crypto/secp256k1/libsecp256k1/src/bench_schnorr_verify.c create mode 100644 crypto/secp256k1/libsecp256k1/src/bench_sign.c create mode 100644 crypto/secp256k1/libsecp256k1/src/bench_verify.c create mode 100644 crypto/secp256k1/libsecp256k1/src/ecdsa.h create mode 100644 crypto/secp256k1/libsecp256k1/src/ecdsa_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/eckey.h create mode 100644 crypto/secp256k1/libsecp256k1/src/eckey_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/ecmult.h create mode 100644 crypto/secp256k1/libsecp256k1/src/ecmult_const.h create mode 100644 crypto/secp256k1/libsecp256k1/src/ecmult_const_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/ecmult_gen.h create mode 100644 crypto/secp256k1/libsecp256k1/src/ecmult_gen_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/ecmult_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/field.h create mode 100644 crypto/secp256k1/libsecp256k1/src/field_10x26.h create mode 100644 crypto/secp256k1/libsecp256k1/src/field_10x26_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/field_5x52.h create mode 100644 crypto/secp256k1/libsecp256k1/src/field_5x52_asm_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/field_5x52_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/field_5x52_int128_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/field_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/gen_context.c create mode 100644 crypto/secp256k1/libsecp256k1/src/group.h create mode 100644 crypto/secp256k1/libsecp256k1/src/group_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/hash.h create mode 100644 crypto/secp256k1/libsecp256k1/src/hash_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/java/org/bitcoin/NativeSecp256k1.java create mode 100644 crypto/secp256k1/libsecp256k1/src/java/org_bitcoin_NativeSecp256k1.c create mode 100644 crypto/secp256k1/libsecp256k1/src/java/org_bitcoin_NativeSecp256k1.h create mode 100644 crypto/secp256k1/libsecp256k1/src/modules/ecdh/Makefile.am.include create mode 100644 crypto/secp256k1/libsecp256k1/src/modules/ecdh/main_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/modules/ecdh/tests_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/modules/recovery/Makefile.am.include create mode 100644 crypto/secp256k1/libsecp256k1/src/modules/recovery/main_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/modules/recovery/tests_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/modules/schnorr/Makefile.am.include create mode 100644 crypto/secp256k1/libsecp256k1/src/modules/schnorr/main_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/modules/schnorr/schnorr.h create mode 100644 crypto/secp256k1/libsecp256k1/src/modules/schnorr/schnorr_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/modules/schnorr/tests_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/num.h create mode 100644 crypto/secp256k1/libsecp256k1/src/num_gmp.h create mode 100644 crypto/secp256k1/libsecp256k1/src/num_gmp_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/num_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/scalar.h create mode 100644 crypto/secp256k1/libsecp256k1/src/scalar_4x64.h create mode 100644 crypto/secp256k1/libsecp256k1/src/scalar_4x64_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/scalar_8x32.h create mode 100644 crypto/secp256k1/libsecp256k1/src/scalar_8x32_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/scalar_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/secp256k1.c create mode 100644 crypto/secp256k1/libsecp256k1/src/testrand.h create mode 100644 crypto/secp256k1/libsecp256k1/src/testrand_impl.h create mode 100644 crypto/secp256k1/libsecp256k1/src/tests.c create mode 100644 crypto/secp256k1/libsecp256k1/src/util.h delete mode 100644 crypto/secp256k1/secp256k1/.travis.yml delete mode 100644 crypto/secp256k1/secp256k1/COPYING delete mode 100644 crypto/secp256k1/secp256k1/Makefile.am delete mode 100644 crypto/secp256k1/secp256k1/README.md delete mode 100644 crypto/secp256k1/secp256k1/TODO delete mode 100755 crypto/secp256k1/secp256k1/autogen.sh delete mode 100644 crypto/secp256k1/secp256k1/build-aux/m4/bitcoin_secp.m4 delete mode 100644 crypto/secp256k1/secp256k1/configure.ac delete mode 100644 crypto/secp256k1/secp256k1/include/secp256k1.h delete mode 100644 crypto/secp256k1/secp256k1/libsecp256k1.pc.in delete mode 100644 crypto/secp256k1/secp256k1/obj/.gitignore delete mode 100644 crypto/secp256k1/secp256k1/src/bench.h delete mode 100644 crypto/secp256k1/secp256k1/src/bench_internal.c delete mode 100644 crypto/secp256k1/secp256k1/src/bench_recover.c delete mode 100644 crypto/secp256k1/secp256k1/src/bench_sign.c delete mode 100644 crypto/secp256k1/secp256k1/src/bench_verify.c delete mode 100644 crypto/secp256k1/secp256k1/src/ecdsa.h delete mode 100644 crypto/secp256k1/secp256k1/src/ecdsa_impl.h delete mode 100644 crypto/secp256k1/secp256k1/src/eckey.h delete mode 100644 crypto/secp256k1/secp256k1/src/eckey_impl.h delete mode 100644 crypto/secp256k1/secp256k1/src/ecmult.h delete mode 100644 crypto/secp256k1/secp256k1/src/ecmult_gen.h delete mode 100644 crypto/secp256k1/secp256k1/src/ecmult_gen_impl.h delete mode 100644 crypto/secp256k1/secp256k1/src/ecmult_impl.h delete mode 100644 crypto/secp256k1/secp256k1/src/field.h delete mode 100644 crypto/secp256k1/secp256k1/src/field_10x26.h delete mode 100644 crypto/secp256k1/secp256k1/src/field_10x26_impl.h delete mode 100644 crypto/secp256k1/secp256k1/src/field_5x52.h delete mode 100644 crypto/secp256k1/secp256k1/src/field_5x52_asm_impl.h delete mode 100644 crypto/secp256k1/secp256k1/src/field_5x52_impl.h delete mode 100644 crypto/secp256k1/secp256k1/src/field_5x52_int128_impl.h delete mode 100644 crypto/secp256k1/secp256k1/src/field_impl.h delete mode 100644 crypto/secp256k1/secp256k1/src/group.h delete mode 100644 crypto/secp256k1/secp256k1/src/group_impl.h delete mode 100644 crypto/secp256k1/secp256k1/src/hash.h delete mode 100644 crypto/secp256k1/secp256k1/src/hash_impl.h delete mode 100644 crypto/secp256k1/secp256k1/src/java/org/bitcoin/NativeSecp256k1.java delete mode 100644 crypto/secp256k1/secp256k1/src/java/org_bitcoin_NativeSecp256k1.c delete mode 100644 crypto/secp256k1/secp256k1/src/java/org_bitcoin_NativeSecp256k1.h delete mode 100644 crypto/secp256k1/secp256k1/src/num.h delete mode 100644 crypto/secp256k1/secp256k1/src/num_gmp.h delete mode 100644 crypto/secp256k1/secp256k1/src/num_gmp_impl.h delete mode 100644 crypto/secp256k1/secp256k1/src/num_impl.h delete mode 100644 crypto/secp256k1/secp256k1/src/scalar.h delete mode 100644 crypto/secp256k1/secp256k1/src/scalar_4x64.h delete mode 100644 crypto/secp256k1/secp256k1/src/scalar_4x64_impl.h delete mode 100644 crypto/secp256k1/secp256k1/src/scalar_8x32.h delete mode 100644 crypto/secp256k1/secp256k1/src/scalar_8x32_impl.h delete mode 100644 crypto/secp256k1/secp256k1/src/scalar_impl.h delete mode 100644 crypto/secp256k1/secp256k1/src/secp256k1.c delete mode 100644 crypto/secp256k1/secp256k1/src/testrand.h delete mode 100644 crypto/secp256k1/secp256k1/src/testrand_impl.h delete mode 100644 crypto/secp256k1/secp256k1/src/tests.c delete mode 100644 crypto/secp256k1/secp256k1/src/util.h diff --git a/crypto/secp256k1/libsecp256k1/.gitignore b/crypto/secp256k1/libsecp256k1/.gitignore new file mode 100644 index 000000000..e0b7b7a48 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/.gitignore @@ -0,0 +1,41 @@ +bench_inv +bench_ecdh +bench_sign +bench_verify +bench_schnorr_verify +bench_recover +bench_internal +tests +gen_context +*.exe +*.so +*.a +!.gitignore + +Makefile +configure +.libs/ +Makefile.in +aclocal.m4 +autom4te.cache/ +config.log +config.status +*.tar.gz +*.la +libtool +.deps/ +.dirstamp +build-aux/ +*.lo +*.o +*~ +src/libsecp256k1-config.h +src/libsecp256k1-config.h.in +src/ecmult_static_context.h +m4/libtool.m4 +m4/ltoptions.m4 +m4/ltsugar.m4 +m4/ltversion.m4 +m4/lt~obsolete.m4 +src/stamp-h1 +libsecp256k1.pc diff --git a/crypto/secp256k1/libsecp256k1/.travis.yml b/crypto/secp256k1/libsecp256k1/.travis.yml new file mode 100644 index 000000000..fba0892dd --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/.travis.yml @@ -0,0 +1,62 @@ +language: c +sudo: false +addons: + apt: + packages: libgmp-dev +compiler: + - clang + - gcc +env: + global: + - FIELD=auto BIGNUM=auto SCALAR=auto ENDOMORPHISM=no STATICPRECOMPUTATION=yes ASM=no BUILD=check EXTRAFLAGS= HOST= ECDH=no schnorr=NO RECOVERY=NO + matrix: + - SCALAR=32bit RECOVERY=yes + - SCALAR=32bit FIELD=32bit ECDH=yes + - SCALAR=64bit + - FIELD=64bit RECOVERY=yes + - FIELD=64bit ENDOMORPHISM=yes + - FIELD=64bit ENDOMORPHISM=yes ECDH=yes + - FIELD=64bit ASM=x86_64 + - FIELD=64bit ENDOMORPHISM=yes ASM=x86_64 + - FIELD=32bit SCHNORR=yes + - FIELD=32bit ENDOMORPHISM=yes + - BIGNUM=no + - BIGNUM=no ENDOMORPHISM=yes SCHNORR=yes RECOVERY=yes + - BIGNUM=no STATICPRECOMPUTATION=no + - BUILD=distcheck + - EXTRAFLAGS=CFLAGS=-DDETERMINISTIC +matrix: + fast_finish: true + include: + - compiler: clang + env: HOST=i686-linux-gnu ENDOMORPHISM=yes + addons: + apt: + packages: + - gcc-multilib + - libgmp-dev:i386 + - compiler: clang + env: HOST=i686-linux-gnu + addons: + apt: + packages: + - gcc-multilib + - compiler: gcc + env: HOST=i686-linux-gnu ENDOMORPHISM=yes + addons: + apt: + packages: + - gcc-multilib + - compiler: gcc + env: HOST=i686-linux-gnu + addons: + apt: + packages: + - gcc-multilib + - libgmp-dev:i386 +before_script: ./autogen.sh +script: + - if [ -n "$HOST" ]; then export USE_HOST="--host=$HOST"; fi + - if [ "x$HOST" = "xi686-linux-gnu" ]; then export CC="$CC -m32"; fi + - ./configure --enable-endomorphism=$ENDOMORPHISM --with-field=$FIELD --with-bignum=$BIGNUM --with-scalar=$SCALAR --enable-ecmult-static-precomputation=$STATICPRECOMPUTATION --enable-module-ecdh=$ECDH --enable-module-schnorr=$SCHNORR $EXTRAFLAGS $USE_HOST && make -j2 $BUILD +os: linux diff --git a/crypto/secp256k1/libsecp256k1/COPYING b/crypto/secp256k1/libsecp256k1/COPYING new file mode 100644 index 000000000..4522a5990 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/COPYING @@ -0,0 +1,19 @@ +Copyright (c) 2013 Pieter Wuille + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/crypto/secp256k1/libsecp256k1/Makefile.am b/crypto/secp256k1/libsecp256k1/Makefile.am new file mode 100644 index 000000000..57524fab0 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/Makefile.am @@ -0,0 +1,110 @@ +ACLOCAL_AMFLAGS = -I build-aux/m4 + +lib_LTLIBRARIES = libsecp256k1.la +include_HEADERS = include/secp256k1.h +noinst_HEADERS = +noinst_HEADERS += src/scalar.h +noinst_HEADERS += src/scalar_4x64.h +noinst_HEADERS += src/scalar_8x32.h +noinst_HEADERS += src/scalar_impl.h +noinst_HEADERS += src/scalar_4x64_impl.h +noinst_HEADERS += src/scalar_8x32_impl.h +noinst_HEADERS += src/group.h +noinst_HEADERS += src/group_impl.h +noinst_HEADERS += src/num_gmp.h +noinst_HEADERS += src/num_gmp_impl.h +noinst_HEADERS += src/ecdsa.h +noinst_HEADERS += src/ecdsa_impl.h +noinst_HEADERS += src/eckey.h +noinst_HEADERS += src/eckey_impl.h +noinst_HEADERS += src/ecmult.h +noinst_HEADERS += src/ecmult_impl.h +noinst_HEADERS += src/ecmult_const.h +noinst_HEADERS += src/ecmult_const_impl.h +noinst_HEADERS += src/ecmult_gen.h +noinst_HEADERS += src/ecmult_gen_impl.h +noinst_HEADERS += src/num.h +noinst_HEADERS += src/num_impl.h +noinst_HEADERS += src/field_10x26.h +noinst_HEADERS += src/field_10x26_impl.h +noinst_HEADERS += src/field_5x52.h +noinst_HEADERS += src/field_5x52_impl.h +noinst_HEADERS += src/field_5x52_int128_impl.h +noinst_HEADERS += src/field_5x52_asm_impl.h +noinst_HEADERS += src/java/org_bitcoin_NativeSecp256k1.h +noinst_HEADERS += src/util.h +noinst_HEADERS += src/testrand.h +noinst_HEADERS += src/testrand_impl.h +noinst_HEADERS += src/hash.h +noinst_HEADERS += src/hash_impl.h +noinst_HEADERS += src/field.h +noinst_HEADERS += src/field_impl.h +noinst_HEADERS += src/bench.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libsecp256k1.pc + +libsecp256k1_la_SOURCES = src/secp256k1.c +libsecp256k1_la_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES) +libsecp256k1_la_LIBADD = $(SECP_LIBS) + + +noinst_PROGRAMS = +if USE_BENCHMARK +noinst_PROGRAMS += bench_verify bench_sign bench_internal +bench_verify_SOURCES = src/bench_verify.c +bench_verify_LDADD = libsecp256k1.la $(SECP_LIBS) +bench_verify_LDFLAGS = -static +bench_sign_SOURCES = src/bench_sign.c +bench_sign_LDADD = libsecp256k1.la $(SECP_LIBS) +bench_sign_LDFLAGS = -static +bench_internal_SOURCES = src/bench_internal.c +bench_internal_LDADD = $(SECP_LIBS) +bench_internal_LDFLAGS = -static +bench_internal_CPPFLAGS = $(SECP_INCLUDES) +endif + +if USE_TESTS +noinst_PROGRAMS += tests +tests_SOURCES = src/tests.c +tests_CPPFLAGS = -DVERIFY -I$(top_srcdir)/src $(SECP_INCLUDES) $(SECP_TEST_INCLUDES) +tests_LDADD = $(SECP_LIBS) $(SECP_TEST_LIBS) +tests_LDFLAGS = -static +TESTS = tests +endif + +if USE_ECMULT_STATIC_PRECOMPUTATION +CPPFLAGS_FOR_BUILD +=-I$(top_srcdir)/ +CFLAGS_FOR_BUILD += -Wall -Wextra -Wno-unused-function + +gen_context_OBJECTS = gen_context.o +gen_context_BIN = gen_context$(BUILD_EXEEXT) +gen_%.o: src/gen_%.c + $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c $< -o $@ + +$(gen_context_BIN): $(gen_context_OBJECTS) + $(CC_FOR_BUILD) $^ -o $@ + +$(libsecp256k1_la_OBJECTS): src/ecmult_static_context.h +$(tests_OBJECTS): src/ecmult_static_context.h +$(bench_internal_OBJECTS): src/ecmult_static_context.h + +src/ecmult_static_context.h: $(gen_context_BIN) + ./$(gen_context_BIN) + +CLEANFILES = $(gen_context_BIN) src/ecmult_static_context.h +endif + +EXTRA_DIST = autogen.sh src/gen_context.c src/basic-config.h + +if ENABLE_MODULE_ECDH +include src/modules/ecdh/Makefile.am.include +endif + +if ENABLE_MODULE_SCHNORR +include src/modules/schnorr/Makefile.am.include +endif + +if ENABLE_MODULE_RECOVERY +include src/modules/recovery/Makefile.am.include +endif diff --git a/crypto/secp256k1/libsecp256k1/README.md b/crypto/secp256k1/libsecp256k1/README.md new file mode 100644 index 000000000..6095db422 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/README.md @@ -0,0 +1,61 @@ +libsecp256k1 +============ + +[![Build Status](https://travis-ci.org/bitcoin/secp256k1.svg?branch=master)](https://travis-ci.org/bitcoin/secp256k1) + +Optimized C library for EC operations on curve secp256k1. + +This library is a work in progress and is being used to research best practices. Use at your own risk. + +Features: +* secp256k1 ECDSA signing/verification and key generation. +* Adding/multiplying private/public keys. +* Serialization/parsing of private keys, public keys, signatures. +* Constant time, constant memory access signing and pubkey generation. +* Derandomized DSA (via RFC6979 or with a caller provided function.) +* Very efficient implementation. + +Implementation details +---------------------- + +* General + * No runtime heap allocation. + * Extensive testing infrastructure. + * Structured to facilitate review and analysis. + * Intended to be portable to any system with a C89 compiler and uint64_t support. + * Expose only higher level interfaces to minimize the API surface and improve application security. ("Be difficult to use insecurely.") +* Field operations + * Optimized implementation of arithmetic modulo the curve's field size (2^256 - 0x1000003D1). + * Using 5 52-bit limbs (including hand-optimized assembly for x86_64, by Diederik Huys). + * Using 10 26-bit limbs. + * Field inverses and square roots using a sliding window over blocks of 1s (by Peter Dettman). +* Scalar operations + * Optimized implementation without data-dependent branches of arithmetic modulo the curve's order. + * Using 4 64-bit limbs (relying on __int128 support in the compiler). + * Using 8 32-bit limbs. +* Group operations + * Point addition formula specifically simplified for the curve equation (y^2 = x^3 + 7). + * Use addition between points in Jacobian and affine coordinates where possible. + * Use a unified addition/doubling formula where necessary to avoid data-dependent branches. + * Point/x comparison without a field inversion by comparison in the Jacobian coordinate space. +* Point multiplication for verification (a*P + b*G). + * Use wNAF notation for point multiplicands. + * Use a much larger window for multiples of G, using precomputed multiples. + * Use Shamir's trick to do the multiplication with the public key and the generator simultaneously. + * Optionally (off by default) use secp256k1's efficiently-computable endomorphism to split the P multiplicand into 2 half-sized ones. +* Point multiplication for signing + * Use a precomputed table of multiples of powers of 16 multiplied with the generator, so general multiplication becomes a series of additions. + * Access the table with branch-free conditional moves so memory access is uniform. + * No data-dependent branches + * The precomputed tables add and eventually subtract points for which no known scalar (private key) is known, preventing even an attacker with control over the private key used to control the data internally. + +Build steps +----------- + +libsecp256k1 is built using autotools: + + $ ./autogen.sh + $ ./configure + $ make + $ ./tests + $ sudo make install # optional diff --git a/crypto/secp256k1/libsecp256k1/TODO b/crypto/secp256k1/libsecp256k1/TODO new file mode 100644 index 000000000..a300e1c5e --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/TODO @@ -0,0 +1,3 @@ +* Unit tests for fieldelem/groupelem, including ones intended to + trigger fieldelem's boundary cases. +* Complete constant-time operations for signing/keygen diff --git a/crypto/secp256k1/libsecp256k1/autogen.sh b/crypto/secp256k1/libsecp256k1/autogen.sh new file mode 100755 index 000000000..65286b935 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/autogen.sh @@ -0,0 +1,3 @@ +#!/bin/sh +set -e +autoreconf -if --warnings=all diff --git a/crypto/secp256k1/libsecp256k1/configure.ac b/crypto/secp256k1/libsecp256k1/configure.ac new file mode 100644 index 000000000..786d8dcfb --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/configure.ac @@ -0,0 +1,376 @@ +AC_PREREQ([2.60]) +AC_INIT([libsecp256k1],[0.1]) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([build-aux/m4]) +AC_CANONICAL_HOST +AH_TOP([#ifndef LIBSECP256K1_CONFIG_H]) +AH_TOP([#define LIBSECP256K1_CONFIG_H]) +AH_BOTTOM([#endif /*LIBSECP256K1_CONFIG_H*/]) +AM_INIT_AUTOMAKE([foreign subdir-objects]) +LT_INIT + +dnl make the compilation flags quiet unless V=1 is used +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +PKG_PROG_PKG_CONFIG + +AC_PATH_TOOL(AR, ar) +AC_PATH_TOOL(RANLIB, ranlib) +AC_PATH_TOOL(STRIP, strip) +AX_PROG_CC_FOR_BUILD + +if test "x$CFLAGS" = "x"; then + CFLAGS="-O3 -g" +fi + +AM_PROG_CC_C_O + +AC_PROG_CC_C89 +if test x"$ac_cv_prog_cc_c89" = x"no"; then + AC_MSG_ERROR([c89 compiler support required]) +fi + +case $host_os in + *darwin*) + if test x$cross_compiling != xyes; then + AC_PATH_PROG([BREW],brew,) + if test x$BREW != x; then + dnl These Homebrew packages may be keg-only, meaning that they won't be found + dnl in expected paths because they may conflict with system files. Ask + dnl Homebrew where each one is located, then adjust paths accordingly. + + openssl_prefix=`$BREW --prefix openssl 2>/dev/null` + gmp_prefix=`$BREW --prefix gmp 2>/dev/null` + if test x$openssl_prefix != x; then + PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH" + export PKG_CONFIG_PATH + fi + if test x$gmp_prefix != x; then + GMP_CPPFLAGS="-I$gmp_prefix/include" + GMP_LIBS="-L$gmp_prefix/lib" + fi + else + AC_PATH_PROG([PORT],port,) + dnl if homebrew isn't installed and macports is, add the macports default paths + dnl as a last resort. + if test x$PORT != x; then + CPPFLAGS="$CPPFLAGS -isystem /opt/local/include" + LDFLAGS="$LDFLAGS -L/opt/local/lib" + fi + fi + fi + ;; +esac + +CFLAGS="$CFLAGS -W" + +warn_CFLAGS="-std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-unused-function -Wno-long-long -Wno-overlength-strings" +saved_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS $warn_CFLAGS" +AC_MSG_CHECKING([if ${CC} supports ${warn_CFLAGS}]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])], + [ AC_MSG_RESULT([yes]) ], + [ AC_MSG_RESULT([no]) + CFLAGS="$saved_CFLAGS" + ]) + +saved_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -fvisibility=hidden" +AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])], + [ AC_MSG_RESULT([yes]) ], + [ AC_MSG_RESULT([no]) + CFLAGS="$saved_CFLAGS" + ]) + +AC_ARG_ENABLE(benchmark, + AS_HELP_STRING([--enable-benchmark],[compile benchmark (default is no)]), + [use_benchmark=$enableval], + [use_benchmark=no]) + +AC_ARG_ENABLE(tests, + AS_HELP_STRING([--enable-tests],[compile tests (default is yes)]), + [use_tests=$enableval], + [use_tests=yes]) + +AC_ARG_ENABLE(endomorphism, + AS_HELP_STRING([--enable-endomorphism],[enable endomorphism (default is no)]), + [use_endomorphism=$enableval], + [use_endomorphism=no]) + +AC_ARG_ENABLE(ecmult_static_precomputation, + AS_HELP_STRING([--enable-ecmult-static-precomputation],[enable precomputed ecmult table for signing (default is yes)]), + [use_ecmult_static_precomputation=$enableval], + [use_ecmult_static_precomputation=yes]) + +AC_ARG_ENABLE(module_ecdh, + AS_HELP_STRING([--enable-module-ecdh],[enable ECDH shared secret computation (default is no)]), + [enable_module_ecdh=$enableval], + [enable_module_ecdh=no]) + +AC_ARG_ENABLE(module_schnorr, + AS_HELP_STRING([--enable-module-schnorr],[enable Schnorr signature module (default is no)]), + [enable_module_schnorr=$enableval], + [enable_module_schnorr=no]) + +AC_ARG_ENABLE(module_recovery, + AS_HELP_STRING([--enable-module-recovery],[enable ECDSA pubkey recovery module (default is no)]), + [enable_module_recovery=$enableval], + [enable_module_recovery=no]) + +AC_ARG_WITH([field], [AS_HELP_STRING([--with-field=64bit|32bit|auto], +[Specify Field Implementation. Default is auto])],[req_field=$withval], [req_field=auto]) + +AC_ARG_WITH([bignum], [AS_HELP_STRING([--with-bignum=gmp|no|auto], +[Specify Bignum Implementation. Default is auto])],[req_bignum=$withval], [req_bignum=auto]) + +AC_ARG_WITH([scalar], [AS_HELP_STRING([--with-scalar=64bit|32bit|auto], +[Specify scalar implementation. Default is auto])],[req_scalar=$withval], [req_scalar=auto]) + +AC_ARG_WITH([asm], [AS_HELP_STRING([--with-asm=x86_64|no|auto] +[Specify assembly optimizations to use. Default is auto])],[req_asm=$withval], [req_asm=auto]) + +AC_CHECK_TYPES([__int128]) + +AC_MSG_CHECKING([for __builtin_expect]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[void myfunc() {__builtin_expect(0,0);}]])], + [ AC_MSG_RESULT([yes]);AC_DEFINE(HAVE_BUILTIN_EXPECT,1,[Define this symbol if __builtin_expect is available]) ], + [ AC_MSG_RESULT([no]) + ]) + +if test x"$req_asm" = x"auto"; then + SECP_64BIT_ASM_CHECK + if test x"$has_64bit_asm" = x"yes"; then + set_asm=x86_64 + fi + if test x"$set_asm" = x; then + set_asm=no + fi +else + set_asm=$req_asm + case $set_asm in + x86_64) + SECP_64BIT_ASM_CHECK + if test x"$has_64bit_asm" != x"yes"; then + AC_MSG_ERROR([x86_64 assembly optimization requested but not available]) + fi + ;; + no) + ;; + *) + AC_MSG_ERROR([invalid assembly optimization selection]) + ;; + esac +fi + +if test x"$req_field" = x"auto"; then + if test x"set_asm" = x"x86_64"; then + set_field=64bit + fi + if test x"$set_field" = x; then + SECP_INT128_CHECK + if test x"$has_int128" = x"yes"; then + set_field=64bit + fi + fi + if test x"$set_field" = x; then + set_field=32bit + fi +else + set_field=$req_field + case $set_field in + 64bit) + if test x"$set_asm" != x"x86_64"; then + SECP_INT128_CHECK + if test x"$has_int128" != x"yes"; then + AC_MSG_ERROR([64bit field explicitly requested but neither __int128 support or x86_64 assembly available]) + fi + fi + ;; + 32bit) + ;; + *) + AC_MSG_ERROR([invalid field implementation selection]) + ;; + esac +fi + +if test x"$req_scalar" = x"auto"; then + SECP_INT128_CHECK + if test x"$has_int128" = x"yes"; then + set_scalar=64bit + fi + if test x"$set_scalar" = x; then + set_scalar=32bit + fi +else + set_scalar=$req_scalar + case $set_scalar in + 64bit) + SECP_INT128_CHECK + if test x"$has_int128" != x"yes"; then + AC_MSG_ERROR([64bit scalar explicitly requested but __int128 support not available]) + fi + ;; + 32bit) + ;; + *) + AC_MSG_ERROR([invalid scalar implementation selected]) + ;; + esac +fi + +if test x"$req_bignum" = x"auto"; then + SECP_GMP_CHECK + if test x"$has_gmp" = x"yes"; then + set_bignum=gmp + fi + + if test x"$set_bignum" = x; then + set_bignum=no + fi +else + set_bignum=$req_bignum + case $set_bignum in + gmp) + SECP_GMP_CHECK + if test x"$has_gmp" != x"yes"; then + AC_MSG_ERROR([gmp bignum explicitly requested but libgmp not available]) + fi + ;; + no) + ;; + *) + AC_MSG_ERROR([invalid bignum implementation selection]) + ;; + esac +fi + +# select assembly optimization +case $set_asm in +x86_64) + AC_DEFINE(USE_ASM_X86_64, 1, [Define this symbol to enable x86_64 assembly optimizations]) + ;; +no) + ;; +*) + AC_MSG_ERROR([invalid assembly optimizations]) + ;; +esac + +# select field implementation +case $set_field in +64bit) + AC_DEFINE(USE_FIELD_5X52, 1, [Define this symbol to use the FIELD_5X52 implementation]) + ;; +32bit) + AC_DEFINE(USE_FIELD_10X26, 1, [Define this symbol to use the FIELD_10X26 implementation]) + ;; +*) + AC_MSG_ERROR([invalid field implementation]) + ;; +esac + +# select bignum implementation +case $set_bignum in +gmp) + AC_DEFINE(HAVE_LIBGMP, 1, [Define this symbol if libgmp is installed]) + AC_DEFINE(USE_NUM_GMP, 1, [Define this symbol to use the gmp implementation for num]) + AC_DEFINE(USE_FIELD_INV_NUM, 1, [Define this symbol to use the num-based field inverse implementation]) + AC_DEFINE(USE_SCALAR_INV_NUM, 1, [Define this symbol to use the num-based scalar inverse implementation]) + ;; +no) + AC_DEFINE(USE_NUM_NONE, 1, [Define this symbol to use no num implementation]) + AC_DEFINE(USE_FIELD_INV_BUILTIN, 1, [Define this symbol to use the native field inverse implementation]) + AC_DEFINE(USE_SCALAR_INV_BUILTIN, 1, [Define this symbol to use the native scalar inverse implementation]) + ;; +*) + AC_MSG_ERROR([invalid bignum implementation]) + ;; +esac + +#select scalar implementation +case $set_scalar in +64bit) + AC_DEFINE(USE_SCALAR_4X64, 1, [Define this symbol to use the 4x64 scalar implementation]) + ;; +32bit) + AC_DEFINE(USE_SCALAR_8X32, 1, [Define this symbol to use the 8x32 scalar implementation]) + ;; +*) + AC_MSG_ERROR([invalid scalar implementation]) + ;; +esac + +if test x"$use_tests" = x"yes"; then + SECP_OPENSSL_CHECK + if test x"$has_openssl_ec" = x"yes"; then + AC_DEFINE(ENABLE_OPENSSL_TESTS, 1, [Define this symbol if OpenSSL EC functions are available]) + SECP_TEST_INCLUDES="$SSL_CFLAGS $CRYPTO_CFLAGS" + SECP_TEST_LIBS="$CRYPTO_LIBS" + + case $host in + *mingw*) + SECP_TEST_LIBS="$SECP_TEST_LIBS -lgdi32" + ;; + esac + + fi +fi + +if test x"$set_bignum" = x"gmp"; then + SECP_LIBS="$SECP_LIBS $GMP_LIBS" + SECP_INCLUDES="$SECP_INCLUDES $GMP_CPPFLAGS" +fi + +if test x"$use_endomorphism" = x"yes"; then + AC_DEFINE(USE_ENDOMORPHISM, 1, [Define this symbol to use endomorphism optimization]) +fi + +if test x"$use_ecmult_static_precomputation" = x"yes"; then + AC_DEFINE(USE_ECMULT_STATIC_PRECOMPUTATION, 1, [Define this symbol to use a statically generated ecmult table]) +fi + +if test x"$enable_module_ecdh" = x"yes"; then + AC_DEFINE(ENABLE_MODULE_ECDH, 1, [Define this symbol to enable the ECDH module]) +fi + +if test x"$enable_module_schnorr" = x"yes"; then + AC_DEFINE(ENABLE_MODULE_SCHNORR, 1, [Define this symbol to enable the Schnorr signature module]) +fi + +if test x"$enable_module_recovery" = x"yes"; then + AC_DEFINE(ENABLE_MODULE_RECOVERY, 1, [Define this symbol to enable the ECDSA pubkey recovery module]) +fi + +AC_C_BIGENDIAN() + +AC_MSG_NOTICE([Using assembly optimizations: $set_asm]) +AC_MSG_NOTICE([Using field implementation: $set_field]) +AC_MSG_NOTICE([Using bignum implementation: $set_bignum]) +AC_MSG_NOTICE([Using scalar implementation: $set_scalar]) +AC_MSG_NOTICE([Using endomorphism optimizations: $use_endomorphism]) +AC_MSG_NOTICE([Building ECDH module: $enable_module_ecdh]) + +AC_MSG_NOTICE([Building Schnorr signatures module: $enable_module_schnorr]) +AC_MSG_NOTICE([Building ECDSA pubkey recovery module: $enable_module_recovery]) + +AC_CONFIG_HEADERS([src/libsecp256k1-config.h]) +AC_CONFIG_FILES([Makefile libsecp256k1.pc]) +AC_SUBST(SECP_INCLUDES) +AC_SUBST(SECP_LIBS) +AC_SUBST(SECP_TEST_LIBS) +AC_SUBST(SECP_TEST_INCLUDES) +AM_CONDITIONAL([USE_TESTS], [test x"$use_tests" != x"no"]) +AM_CONDITIONAL([USE_BENCHMARK], [test x"$use_benchmark" = x"yes"]) +AM_CONDITIONAL([USE_ECMULT_STATIC_PRECOMPUTATION], [test x"$use_ecmult_static_precomputation" = x"yes"]) +AM_CONDITIONAL([ENABLE_MODULE_ECDH], [test x"$enable_module_ecdh" = x"yes"]) +AM_CONDITIONAL([ENABLE_MODULE_SCHNORR], [test x"$enable_module_schnorr" = x"yes"]) +AM_CONDITIONAL([ENABLE_MODULE_RECOVERY], [test x"$enable_module_recovery" = x"yes"]) + +dnl make sure nothing new is exported so that we don't break the cache +PKGCONFIG_PATH_TEMP="$PKG_CONFIG_PATH" +unset PKG_CONFIG_PATH +PKG_CONFIG_PATH="$PKGCONFIG_PATH_TEMP" + +AC_OUTPUT diff --git a/crypto/secp256k1/libsecp256k1/include/secp256k1.h b/crypto/secp256k1/libsecp256k1/include/secp256k1.h new file mode 100644 index 000000000..23378de1f --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/include/secp256k1.h @@ -0,0 +1,547 @@ +#ifndef _SECP256K1_ +# define _SECP256K1_ + +# ifdef __cplusplus +extern "C" { +# endif + +#include + +/* These rules specify the order of arguments in API calls: + * + * 1. Context pointers go first, followed by output arguments, combined + * output/input arguments, and finally input-only arguments. + * 2. Array lengths always immediately the follow the argument whose length + * they describe, even if this violates rule 1. + * 3. Within the OUT/OUTIN/IN groups, pointers to data that is typically generated + * later go first. This means: signatures, public nonces, private nonces, + * messages, public keys, secret keys, tweaks. + * 4. Arguments that are not data pointers go last, from more complex to less + * complex: function pointers, algorithm names, messages, void pointers, + * counts, flags, booleans. + * 5. Opaque data pointers follow the function pointer they are to be passed to. + */ + +/** Opaque data structure that holds context information (precomputed tables etc.). + * + * The purpose of context structures is to cache large precomputed data tables + * that are expensive to construct, and also to maintain the randomization data + * for blinding. + * + * Do not create a new context object for each operation, as construction is + * far slower than all other API calls (~100 times slower than an ECDSA + * verification). + * + * A constructed context can safely be used from multiple threads + * simultaneously, but API call that take a non-const pointer to a context + * need exclusive access to it. In particular this is the case for + * secp256k1_context_destroy and secp256k1_context_randomize. + * + * Regarding randomization, either do it once at creation time (in which case + * you do not need any locking for the other calls), or use a read-write lock. + */ +typedef struct secp256k1_context_struct secp256k1_context; + +/** Opaque data structure that holds a parsed and valid public key. + * + * The exact representation of data inside is implementation defined and not + * guaranteed to be portable between different platforms or versions. It is + * however guaranteed to be 64 bytes in size, and can be safely copied/moved. + * If you need to convert to a format suitable for storage or transmission, use + * secp256k1_ec_pubkey_serialize and secp256k1_ec_pubkey_parse. + * + * Furthermore, it is guaranteed that identical public keys (ignoring + * compression) will have identical representation, so they can be memcmp'ed. + */ +typedef struct { + unsigned char data[64]; +} secp256k1_pubkey; + +/** Opaque data structured that holds a parsed ECDSA signature. + * + * The exact representation of data inside is implementation defined and not + * guaranteed to be portable between different platforms or versions. It is + * however guaranteed to be 64 bytes in size, and can be safely copied/moved. + * If you need to convert to a format suitable for storage or transmission, use + * the secp256k1_ecdsa_signature_serialize_* and + * secp256k1_ecdsa_signature_serialize_* functions. + * + * Furthermore, it is guaranteed to identical signatures will have identical + * representation, so they can be memcmp'ed. + */ +typedef struct { + unsigned char data[64]; +} secp256k1_ecdsa_signature; + +/** A pointer to a function to deterministically generate a nonce. + * + * Returns: 1 if a nonce was successfully generated. 0 will cause signing to fail. + * Out: nonce32: pointer to a 32-byte array to be filled by the function. + * In: msg32: the 32-byte message hash being verified (will not be NULL) + * key32: pointer to a 32-byte secret key (will not be NULL) + * algo16: pointer to a 16-byte array describing the signature + * algorithm (will be NULL for ECDSA for compatibility). + * data: Arbitrary data pointer that is passed through. + * attempt: how many iterations we have tried to find a nonce. + * This will almost always be 0, but different attempt values + * are required to result in a different nonce. + * + * Except for test cases, this function should compute some cryptographic hash of + * the message, the algorithm, the key and the attempt. + */ +typedef int (*secp256k1_nonce_function)( + unsigned char *nonce32, + const unsigned char *msg32, + const unsigned char *key32, + const unsigned char *algo16, + void *data, + unsigned int attempt +); + +# if !defined(SECP256K1_GNUC_PREREQ) +# if defined(__GNUC__)&&defined(__GNUC_MINOR__) +# define SECP256K1_GNUC_PREREQ(_maj,_min) \ + ((__GNUC__<<16)+__GNUC_MINOR__>=((_maj)<<16)+(_min)) +# else +# define SECP256K1_GNUC_PREREQ(_maj,_min) 0 +# endif +# endif + +# if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) ) +# if SECP256K1_GNUC_PREREQ(2,7) +# define SECP256K1_INLINE __inline__ +# elif (defined(_MSC_VER)) +# define SECP256K1_INLINE __inline +# else +# define SECP256K1_INLINE +# endif +# else +# define SECP256K1_INLINE inline +# endif + +#ifndef SECP256K1_API +# if defined(_WIN32) +# ifdef SECP256K1_BUILD +# define SECP256K1_API __declspec(dllexport) +# else +# define SECP256K1_API +# endif +# elif defined(__GNUC__) && defined(SECP256K1_BUILD) +# define SECP256K1_API __attribute__ ((visibility ("default"))) +# else +# define SECP256K1_API +# endif +#endif + +/**Warning attributes + * NONNULL is not used if SECP256K1_BUILD is set to avoid the compiler optimizing out + * some paranoid null checks. */ +# if defined(__GNUC__) && SECP256K1_GNUC_PREREQ(3, 4) +# define SECP256K1_WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__)) +# else +# define SECP256K1_WARN_UNUSED_RESULT +# endif +# if !defined(SECP256K1_BUILD) && defined(__GNUC__) && SECP256K1_GNUC_PREREQ(3, 4) +# define SECP256K1_ARG_NONNULL(_x) __attribute__ ((__nonnull__(_x))) +# else +# define SECP256K1_ARG_NONNULL(_x) +# endif + +/** Flags to pass to secp256k1_context_create. */ +# define SECP256K1_CONTEXT_VERIFY (1 << 0) +# define SECP256K1_CONTEXT_SIGN (1 << 1) + +/** Flag to pass to secp256k1_ec_pubkey_serialize and secp256k1_ec_privkey_export. */ +# define SECP256K1_EC_COMPRESSED (1 << 0) + +/** Create a secp256k1 context object. + * + * Returns: a newly created context object. + * In: flags: which parts of the context to initialize. + */ +SECP256K1_API secp256k1_context* secp256k1_context_create( + unsigned int flags +) SECP256K1_WARN_UNUSED_RESULT; + +/** Copies a secp256k1 context object. + * + * Returns: a newly created context object. + * Args: ctx: an existing context to copy (cannot be NULL) + */ +SECP256K1_API secp256k1_context* secp256k1_context_clone( + const secp256k1_context* ctx +) SECP256K1_ARG_NONNULL(1) SECP256K1_WARN_UNUSED_RESULT; + +/** Destroy a secp256k1 context object. + * + * The context pointer may not be used afterwards. + * Args: ctx: an existing context to destroy (cannot be NULL) + */ +SECP256K1_API void secp256k1_context_destroy( + secp256k1_context* ctx +); + +/** Set a callback function to be called when an illegal argument is passed to + * an API call. It will only trigger for violations that are mentioned + * explicitly in the header. + * + * The philosophy is that these shouldn't be dealt with through a + * specific return value, as calling code should not have branches to deal with + * the case that this code itself is broken. + * + * On the other hand, during debug stage, one would want to be informed about + * such mistakes, and the default (crashing) may be inadvisable. + * When this callback is triggered, the API function called is guaranteed not + * to cause a crash, though its return value and output arguments are + * undefined. + * + * Args: ctx: an existing context object (cannot be NULL) + * In: fun: a pointer to a function to call when an illegal argument is + * passed to the API, taking a message and an opaque pointer + * (NULL restores a default handler that calls abort). + * data: the opaque pointer to pass to fun above. + */ +SECP256K1_API void secp256k1_context_set_illegal_callback( + secp256k1_context* ctx, + void (*fun)(const char* message, void* data), + const void* data +) SECP256K1_ARG_NONNULL(1); + +/** Set a callback function to be called when an internal consistency check + * fails. The default is crashing. + * + * This can only trigger in case of a hardware failure, miscompilation, + * memory corruption, serious bug in the library, or other error would can + * otherwise result in undefined behaviour. It will not trigger due to mere + * incorrect usage of the API (see secp256k1_context_set_illegal_callback + * for that). After this callback returns, anything may happen, including + * crashing. + * + * Args: ctx: an existing context object (cannot be NULL) + * In: fun: a pointer to a function to call when an interal error occurs, + * taking a message and an opaque pointer (NULL restores a default + * handler that calls abort). + * data: the opaque pointer to pass to fun above. + */ +SECP256K1_API void secp256k1_context_set_error_callback( + secp256k1_context* ctx, + void (*fun)(const char* message, void* data), + const void* data +) SECP256K1_ARG_NONNULL(1); + +/** Parse a variable-length public key into the pubkey object. + * + * Returns: 1 if the public key was fully valid. + * 0 if the public key could not be parsed or is invalid. + * Args: ctx: a secp256k1 context object. + * Out: pubkey: pointer to a pubkey object. If 1 is returned, it is set to a + * parsed version of input. If not, its value is undefined. + * In: input: pointer to a serialized public key + * inputlen: length of the array pointed to by input + * + * This function supports parsing compressed (33 bytes, header byte 0x02 or + * 0x03), uncompressed (65 bytes, header byte 0x04), or hybrid (65 bytes, header + * byte 0x06 or 0x07) format public keys. + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_parse( + const secp256k1_context* ctx, + secp256k1_pubkey* pubkey, + const unsigned char *input, + size_t inputlen +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Serialize a pubkey object into a serialized byte sequence. + * + * Returns: 1 always. + * Args: ctx: a secp256k1 context object. + * Out: output: a pointer to a 65-byte (if compressed==0) or 33-byte (if + * compressed==1) byte array to place the serialized key in. + * outputlen: a pointer to an integer which will contain the serialized + * size. + * In: pubkey: a pointer to a secp256k1_pubkey containing an initialized + * public key. + * flags: SECP256K1_EC_COMPRESSED if serialization should be in + * compressed format. + */ +SECP256K1_API int secp256k1_ec_pubkey_serialize( + const secp256k1_context* ctx, + unsigned char *output, + size_t *outputlen, + const secp256k1_pubkey* pubkey, + unsigned int flags +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +/** Parse a DER ECDSA signature. + * + * Returns: 1 when the signature could be parsed, 0 otherwise. + * Args: ctx: a secp256k1 context object + * Out: sig: a pointer to a signature object + * In: input: a pointer to the signature to be parsed + * inputlen: the length of the array pointed to be input + * + * Note that this function also supports some violations of DER and even BER. + */ +SECP256K1_API int secp256k1_ecdsa_signature_parse_der( + const secp256k1_context* ctx, + secp256k1_ecdsa_signature* sig, + const unsigned char *input, + size_t inputlen +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Serialize an ECDSA signature in DER format. + * + * Returns: 1 if enough space was available to serialize, 0 otherwise + * Args: ctx: a secp256k1 context object + * Out: output: a pointer to an array to store the DER serialization + * In/Out: outputlen: a pointer to a length integer. Initially, this integer + * should be set to the length of output. After the call + * it will be set to the length of the serialization (even + * if 0 was returned). + * In: sig: a pointer to an initialized signature object + */ +SECP256K1_API int secp256k1_ecdsa_signature_serialize_der( + const secp256k1_context* ctx, + unsigned char *output, + size_t *outputlen, + const secp256k1_ecdsa_signature* sig +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +/** Verify an ECDSA signature. + * + * Returns: 1: correct signature + * 0: incorrect or unparseable signature + * Args: ctx: a secp256k1 context object, initialized for verification. + * In: sig: the signature being verified (cannot be NULL) + * msg32: the 32-byte message hash being verified (cannot be NULL) + * pubkey: pointer to an initialized public key to verify with (cannot be NULL) + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdsa_verify( + const secp256k1_context* ctx, + const secp256k1_ecdsa_signature *sig, + const unsigned char *msg32, + const secp256k1_pubkey *pubkey +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +/** An implementation of RFC6979 (using HMAC-SHA256) as nonce generation function. + * If a data pointer is passed, it is assumed to be a pointer to 32 bytes of + * extra entropy. + */ +extern const secp256k1_nonce_function secp256k1_nonce_function_rfc6979; + +/** A default safe nonce generation function (currently equal to secp256k1_nonce_function_rfc6979). */ +extern const secp256k1_nonce_function secp256k1_nonce_function_default; + +/** Create an ECDSA signature. + * + * Returns: 1: signature created + * 0: the nonce generation function failed, or the private key was invalid. + * Args: ctx: pointer to a context object, initialized for signing (cannot be NULL) + * Out: sig: pointer to an array where the signature will be placed (cannot be NULL) + * In: msg32: the 32-byte message hash being signed (cannot be NULL) + * seckey: pointer to a 32-byte secret key (cannot be NULL) + * noncefp:pointer to a nonce generation function. If NULL, secp256k1_nonce_function_default is used + * ndata: pointer to arbitrary data used by the nonce generation function (can be NULL) + * + * The sig always has an s value in the lower half of the range (From 0x1 + * to 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, + * inclusive), unlike many other implementations. + * + * With ECDSA a third-party can can forge a second distinct signature + * of the same message given a single initial signature without knowing + * the key by setting s to its additive inverse mod-order, 'flipping' the + * sign of the random point R which is not included in the signature. + * Since the forgery is of the same message this isn't universally + * problematic, but in systems where message malleability or uniqueness + * of signatures is important this can cause issues. This forgery can be + * blocked by all verifiers forcing signers to use a canonical form. The + * lower-S form reduces the size of signatures slightly on average when + * variable length encodings (such as DER) are used and is cheap to + * verify, making it a good choice. Security of always using lower-S is + * assured because anyone can trivially modify a signature after the + * fact to enforce this property. Adjusting it inside the signing + * function avoids the need to re-serialize or have curve specific + * constants outside of the library. By always using a canonical form + * even in applications where it isn't needed it becomes possible to + * impose a requirement later if a need is discovered. + * No other forms of ECDSA malleability are known and none seem likely, + * but there is no formal proof that ECDSA, even with this additional + * restriction, is free of other malleability. Commonly used serialization + * schemes will also accept various non-unique encodings, so care should + * be taken when this property is required for an application. + */ +SECP256K1_API int secp256k1_ecdsa_sign( + const secp256k1_context* ctx, + secp256k1_ecdsa_signature *sig, + const unsigned char *msg32, + const unsigned char *seckey, + secp256k1_nonce_function noncefp, + const void *ndata +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +/** Verify an ECDSA secret key. + * + * Returns: 1: secret key is valid + * 0: secret key is invalid + * Args: ctx: pointer to a context object (cannot be NULL) + * In: seckey: pointer to a 32-byte secret key (cannot be NULL) + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_verify( + const secp256k1_context* ctx, + const unsigned char *seckey +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2); + +/** Compute the public key for a secret key. + * + * Returns: 1: secret was valid, public key stores + * 0: secret was invalid, try again + * Args: ctx: pointer to a context object, initialized for signing (cannot be NULL) + * Out: pubkey: pointer to the created public key (cannot be NULL) + * In: seckey: pointer to a 32-byte private key (cannot be NULL) + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_create( + const secp256k1_context* ctx, + secp256k1_pubkey *pubkey, + const unsigned char *seckey +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Export a private key in BER format. + * + * Returns: 1 if the private key was valid. + * Args: ctx: pointer to a context object, initialized for signing (cannot + * be NULL) + * Out: privkey: pointer to an array for storing the private key in BER. + * Should have space for 279 bytes, and cannot be NULL. + * privkeylen: Pointer to an int where the length of the private key in + * privkey will be stored. + * In: seckey: pointer to a 32-byte secret key to export. + * flags: SECP256K1_EC_COMPRESSED if the key should be exported in + * compressed format. + * + * This function is purely meant for compatibility with applications that + * require BER encoded keys. When working with secp256k1-specific code, the + * simple 32-byte private keys are sufficient. + * + * Note that this function does not guarantee correct DER output. It is + * guaranteed to be parsable by secp256k1_ec_privkey_import. + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_export( + const secp256k1_context* ctx, + unsigned char *privkey, + size_t *privkeylen, + const unsigned char *seckey, + unsigned int flags +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +/** Import a private key in DER format. + * Returns: 1 if a private key was extracted. + * Args: ctx: pointer to a context object (cannot be NULL). + * Out: seckey: pointer to a 32-byte array for storing the private key. + * (cannot be NULL). + * In: privkey: pointer to a private key in DER format (cannot be NULL). + * privkeylen: length of the DER private key pointed to be privkey. + * + * This function will accept more than just strict DER, and even allow some BER + * violations. The public key stored inside the DER-encoded private key is not + * verified for correctness, nor are the curve parameters. Use this function + * only if you know in advance it is supposed to contain a secp256k1 private + * key. + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_import( + const secp256k1_context* ctx, + unsigned char *seckey, + const unsigned char *privkey, + size_t privkeylen +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Tweak a private key by adding tweak to it. + * Returns: 0 if the tweak was out of range (chance of around 1 in 2^128 for + * uniformly random 32-byte arrays, or if the resulting private key + * would be invalid (only when the tweak is the complement of the + * private key). 1 otherwise. + * Args: ctx: pointer to a context object (cannot be NULL). + * In/Out: seckey: pointer to a 32-byte private key. + * In: tweak: pointer to a 32-byte tweak. + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_add( + const secp256k1_context* ctx, + unsigned char *seckey, + const unsigned char *tweak +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Tweak a public key by adding tweak times the generator to it. + * Returns: 0 if the tweak was out of range (chance of around 1 in 2^128 for + * uniformly random 32-byte arrays, or if the resulting public key + * would be invalid (only when the tweak is the complement of the + * corresponding private key). 1 otherwise. + * Args: ctx: pointer to a context object initialized for validation + * (cannot be NULL). + * In/Out: pubkey: pointer to a public key object. + * In: tweak: pointer to a 32-byte tweak. + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_add( + const secp256k1_context* ctx, + secp256k1_pubkey *pubkey, + const unsigned char *tweak +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Tweak a private key by multiplying it by a tweak. + * Returns: 0 if the tweak was out of range (chance of around 1 in 2^128 for + * uniformly random 32-byte arrays, or equal to zero. 1 otherwise. + * Args: ctx: pointer to a context object (cannot be NULL). + * In/Out: seckey: pointer to a 32-byte private key. + * In: tweak: pointer to a 32-byte tweak. + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_mul( + const secp256k1_context* ctx, + unsigned char *seckey, + const unsigned char *tweak +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Tweak a public key by multiplying it by a tweak value. + * Returns: 0 if the tweak was out of range (chance of around 1 in 2^128 for + * uniformly random 32-byte arrays, or equal to zero. 1 otherwise. + * Args: ctx: pointer to a context object initialized for validation + * (cannot be NULL). + * In/Out: pubkey: pointer to a public key obkect. + * In: tweak: pointer to a 32-byte tweak. + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_mul( + const secp256k1_context* ctx, + secp256k1_pubkey *pubkey, + const unsigned char *tweak +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Updates the context randomization. + * Returns: 1: randomization successfully updated + * 0: error + * Args: ctx: pointer to a context object (cannot be NULL) + * In: seed32: pointer to a 32-byte random seed (NULL resets to initial state) + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_context_randomize( + secp256k1_context* ctx, + const unsigned char *seed32 +) SECP256K1_ARG_NONNULL(1); + +/** Add a number of public keys together. + * Returns: 1: the sum of the public keys is valid. + * 0: the sum of the public keys is not valid. + * Args: ctx: pointer to a context object + * Out: out: pointer to pubkey for placing the resulting public key + * (cannot be NULL) + * In: ins: pointer to array of pointers to public keys (cannot be NULL) + * n: the number of public keys to add together (must be at least 1) + * Use secp256k1_ec_pubkey_compress and secp256k1_ec_pubkey_decompress if the + * uncompressed format is needed. + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_combine( + const secp256k1_context* ctx, + secp256k1_pubkey *out, + const secp256k1_pubkey * const * ins, + int n +) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +# ifdef __cplusplus +} +# endif + +#endif diff --git a/crypto/secp256k1/libsecp256k1/include/secp256k1_ecdh.h b/crypto/secp256k1/libsecp256k1/include/secp256k1_ecdh.h new file mode 100644 index 000000000..db520f446 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/include/secp256k1_ecdh.h @@ -0,0 +1,30 @@ +#ifndef _SECP256K1_ECDH_ +# define _SECP256K1_ECDH_ + +# include "secp256k1.h" + +# ifdef __cplusplus +extern "C" { +# endif + +/** Compute an EC Diffie-Hellman secret in constant time + * Returns: 1: exponentiation was successful + * 0: scalar was invalid (zero or overflow) + * Args: ctx: pointer to a context object (cannot be NULL) + * Out: result: a 32-byte array which will be populated by an ECDH + * secret computed from the point and scalar + * In: point: pointer to a public point + * scalar: a 32-byte scalar with which to multiply the point + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdh( + const secp256k1_context* ctx, + unsigned char *result, + const secp256k1_pubkey *point, + const unsigned char *scalar +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +# ifdef __cplusplus +} +# endif + +#endif diff --git a/crypto/secp256k1/libsecp256k1/include/secp256k1_recovery.h b/crypto/secp256k1/libsecp256k1/include/secp256k1_recovery.h new file mode 100644 index 000000000..c9b8c0a30 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/include/secp256k1_recovery.h @@ -0,0 +1,110 @@ +#ifndef _SECP256K1_RECOVERY_ +# define _SECP256K1_RECOVERY_ + +# include "secp256k1.h" + +# ifdef __cplusplus +extern "C" { +# endif + +/** Opaque data structured that holds a parsed ECDSA signature, + * supporting pubkey recovery. + * + * The exact representation of data inside is implementation defined and not + * guaranteed to be portable between different platforms or versions. It is + * however guaranteed to be 65 bytes in size, and can be safely copied/moved. + * If you need to convert to a format suitable for storage or transmission, use + * the secp256k1_ecdsa_signature_serialize_* and + * secp256k1_ecdsa_signature_parse_* functions. + * + * Furthermore, it is guaranteed that identical signatures (including their + * recoverability) will have identical representation, so they can be + * memcmp'ed. + */ +typedef struct { + unsigned char data[65]; +} secp256k1_ecdsa_recoverable_signature; + +/** Parse a compact ECDSA signature (64 bytes + recovery id). + * + * Returns: 1 when the signature could be parsed, 0 otherwise + * Args: ctx: a secp256k1 context object + * Out: sig: a pointer to a signature object + * In: input64: a pointer to a 64-byte compact signature + * recid: the recovery id (0, 1, 2 or 3) + */ +SECP256K1_API int secp256k1_ecdsa_recoverable_signature_parse_compact( + const secp256k1_context* ctx, + secp256k1_ecdsa_recoverable_signature* sig, + const unsigned char *input64, + int recid +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Convert a recoverable signature into a normal signature. + * + * Returns: 1 + * Out: sig: a pointer to a normal signature (cannot be NULL). + * In: sigin: a pointer to a recoverable signature (cannot be NULL). + */ +SECP256K1_API int secp256k1_ecdsa_recoverable_signature_convert( + const secp256k1_context* ctx, + secp256k1_ecdsa_signature* sig, + const secp256k1_ecdsa_recoverable_signature* sigin +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Serialize an ECDSA signature in compact format (64 bytes + recovery id). + * + * Returns: 1 + * Args: ctx: a secp256k1 context object + * Out: output64: a pointer to a 64-byte array of the compact signature (cannot be NULL) + * recid: a pointer to an integer to hold the recovery id (can be NULL). + * In: sig: a pointer to an initialized signature object (cannot be NULL) + */ +SECP256K1_API int secp256k1_ecdsa_recoverable_signature_serialize_compact( + const secp256k1_context* ctx, + unsigned char *output64, + int *recid, + const secp256k1_ecdsa_recoverable_signature* sig +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(4); + +/** Create a recoverable ECDSA signature. + * + * Returns: 1: signature created + * 0: the nonce generation function failed, or the private key was invalid. + * Args: ctx: pointer to a context object, initialized for signing (cannot be NULL) + * Out: sig: pointer to an array where the signature will be placed (cannot be NULL) + * In: msg32: the 32-byte message hash being signed (cannot be NULL) + * seckey: pointer to a 32-byte secret key (cannot be NULL) + * noncefp:pointer to a nonce generation function. If NULL, secp256k1_nonce_function_default is used + * ndata: pointer to arbitrary data used by the nonce generation function (can be NULL) + */ +SECP256K1_API int secp256k1_ecdsa_sign_recoverable( + const secp256k1_context* ctx, + secp256k1_ecdsa_recoverable_signature *sig, + const unsigned char *msg32, + const unsigned char *seckey, + secp256k1_nonce_function noncefp, + const void *ndata +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +/** Recover an ECDSA public key from a signature. + * + * Returns: 1: public key successfully recovered (which guarantees a correct signature). + * 0: otherwise. + * Args: ctx: pointer to a context object, initialized for verification (cannot be NULL) + * Out: pubkey: pointer to the recoved public key (cannot be NULL) + * In: sig: pointer to initialized signature that supports pubkey recovery (cannot be NULL) + * msg32: the 32-byte message hash assumed to be signed (cannot be NULL) + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdsa_recover( + const secp256k1_context* ctx, + secp256k1_pubkey *pubkey, + const secp256k1_ecdsa_recoverable_signature *sig, + const unsigned char *msg32 +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +# ifdef __cplusplus +} +# endif + +#endif diff --git a/crypto/secp256k1/libsecp256k1/include/secp256k1_schnorr.h b/crypto/secp256k1/libsecp256k1/include/secp256k1_schnorr.h new file mode 100644 index 000000000..49354933d --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/include/secp256k1_schnorr.h @@ -0,0 +1,173 @@ +#ifndef _SECP256K1_SCHNORR_ +# define _SECP256K1_SCHNORR_ + +# include "secp256k1.h" + +# ifdef __cplusplus +extern "C" { +# endif + +/** Create a signature using a custom EC-Schnorr-SHA256 construction. It + * produces non-malleable 64-byte signatures which support public key recovery + * batch validation, and multiparty signing. + * Returns: 1: signature created + * 0: the nonce generation function failed, or the private key was + * invalid. + * Args: ctx: pointer to a context object, initialized for signing + * (cannot be NULL) + * Out: sig64: pointer to a 64-byte array where the signature will be + * placed (cannot be NULL) + * In: msg32: the 32-byte message hash being signed (cannot be NULL) + * seckey: pointer to a 32-byte secret key (cannot be NULL) + * noncefp:pointer to a nonce generation function. If NULL, + * secp256k1_nonce_function_default is used + * ndata: pointer to arbitrary data used by the nonce generation + * function (can be NULL) + */ +SECP256K1_API int secp256k1_schnorr_sign( + const secp256k1_context* ctx, + unsigned char *sig64, + const unsigned char *msg32, + const unsigned char *seckey, + secp256k1_nonce_function noncefp, + const void *ndata +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +/** Verify a signature created by secp256k1_schnorr_sign. + * Returns: 1: correct signature + * 0: incorrect signature + * Args: ctx: a secp256k1 context object, initialized for verification. + * In: sig64: the 64-byte signature being verified (cannot be NULL) + * msg32: the 32-byte message hash being verified (cannot be NULL) + * pubkey: the public key to verify with (cannot be NULL) + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_schnorr_verify( + const secp256k1_context* ctx, + const unsigned char *sig64, + const unsigned char *msg32, + const secp256k1_pubkey *pubkey +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +/** Recover an EC public key from a Schnorr signature created using + * secp256k1_schnorr_sign. + * Returns: 1: public key successfully recovered (which guarantees a correct + * signature). + * 0: otherwise. + * Args: ctx: pointer to a context object, initialized for + * verification (cannot be NULL) + * Out: pubkey: pointer to a pubkey to set to the recovered public key + * (cannot be NULL). + * In: sig64: signature as 64 byte array (cannot be NULL) + * msg32: the 32-byte message hash assumed to be signed (cannot + * be NULL) + */ +SECP256K1_API int secp256k1_schnorr_recover( + const secp256k1_context* ctx, + secp256k1_pubkey *pubkey, + const unsigned char *sig64, + const unsigned char *msg32 +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); + +/** Generate a nonce pair deterministically for use with + * secp256k1_schnorr_partial_sign. + * Returns: 1: valid nonce pair was generated. + * 0: otherwise (nonce generation function failed) + * Args: ctx: pointer to a context object, initialized for signing + * (cannot be NULL) + * Out: pubnonce: public side of the nonce (cannot be NULL) + * privnonce32: private side of the nonce (32 byte) (cannot be NULL) + * In: msg32: the 32-byte message hash assumed to be signed (cannot + * be NULL) + * sec32: the 32-byte private key (cannot be NULL) + * noncefp: pointer to a nonce generation function. If NULL, + * secp256k1_nonce_function_default is used + * noncedata: pointer to arbitrary data used by the nonce generation + * function (can be NULL) + * + * Do not use the output as a private/public key pair for signing/validation. + */ +SECP256K1_API int secp256k1_schnorr_generate_nonce_pair( + const secp256k1_context* ctx, + secp256k1_pubkey *pubnonce, + unsigned char *privnonce32, + const unsigned char *msg32, + const unsigned char *sec32, + secp256k1_nonce_function noncefp, + const void* noncedata +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +/** Produce a partial Schnorr signature, which can be combined using + * secp256k1_schnorr_partial_combine, to end up with a full signature that is + * verifiable using secp256k1_schnorr_verify. + * Returns: 1: signature created succesfully. + * 0: no valid signature exists with this combination of keys, nonces + * and message (chance around 1 in 2^128) + * -1: invalid private key, nonce, or public nonces. + * Args: ctx: pointer to context object, initialized for signing (cannot + * be NULL) + * Out: sig64: pointer to 64-byte array to put partial signature in + * In: msg32: pointer to 32-byte message to sign + * sec32: pointer to 32-byte private key + * pubnonce_others: pointer to pubkey containing the sum of the other's + * nonces (see secp256k1_ec_pubkey_combine) + * secnonce32: pointer to 32-byte array containing our nonce + * + * The intended procedure for creating a multiparty signature is: + * - Each signer S[i] with private key x[i] and public key Q[i] runs + * secp256k1_schnorr_generate_nonce_pair to produce a pair (k[i],R[i]) of + * private/public nonces. + * - All signers communicate their public nonces to each other (revealing your + * private nonce can lead to discovery of your private key, so it should be + * considered secret). + * - All signers combine all the public nonces they received (excluding their + * own) using secp256k1_ec_pubkey_combine to obtain an + * Rall[i] = sum(R[0..i-1,i+1..n]). + * - All signers produce a partial signature using + * secp256k1_schnorr_partial_sign, passing in their own private key x[i], + * their own private nonce k[i], and the sum of the others' public nonces + * Rall[i]. + * - All signers communicate their partial signatures to each other. + * - Someone combines all partial signatures using + * secp256k1_schnorr_partial_combine, to obtain a full signature. + * - The resulting signature is validatable using secp256k1_schnorr_verify, with + * public key equal to the result of secp256k1_ec_pubkey_combine of the + * signers' public keys (sum(Q[0..n])). + * + * Note that secp256k1_schnorr_partial_combine and secp256k1_ec_pubkey_combine + * function take their arguments in any order, and it is possible to + * pre-combine several inputs already with one call, and add more inputs later + * by calling the function again (they are commutative and associative). + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_schnorr_partial_sign( + const secp256k1_context* ctx, + unsigned char *sig64, + const unsigned char *msg32, + const unsigned char *sec32, + const secp256k1_pubkey *pubnonce_others, + const unsigned char *secnonce32 +) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4) SECP256K1_ARG_NONNULL(5) SECP256K1_ARG_NONNULL(6); + +/** Combine multiple Schnorr partial signatures. + * Returns: 1: the passed signatures were succesfully combined. + * 0: the resulting signature is not valid (chance of 1 in 2^256) + * -1: some inputs were invalid, or the signatures were not created + * using the same set of nonces + * Args: ctx: pointer to a context object + * Out: sig64: pointer to a 64-byte array to place the combined signature + * (cannot be NULL) + * In: sig64sin: pointer to an array of n pointers to 64-byte input + * signatures + * n: the number of signatures to combine (at least 1) + */ +SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_schnorr_partial_combine( + const secp256k1_context* ctx, + unsigned char *sig64, + const unsigned char * const * sig64sin, + int n +) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); + +# ifdef __cplusplus +} +# endif + +#endif diff --git a/crypto/secp256k1/libsecp256k1/libsecp256k1.pc.in b/crypto/secp256k1/libsecp256k1/libsecp256k1.pc.in new file mode 100644 index 000000000..1c72dd000 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/libsecp256k1.pc.in @@ -0,0 +1,13 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libsecp256k1 +Description: Optimized C library for EC operations on curve secp256k1 +URL: https://github.com/bitcoin/secp256k1 +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs.private: @SECP_LIBS@ +Libs: -L${libdir} -lsecp256k1 + diff --git a/crypto/secp256k1/libsecp256k1/obj/.gitignore b/crypto/secp256k1/libsecp256k1/obj/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/crypto/secp256k1/libsecp256k1/src/basic-config.h b/crypto/secp256k1/libsecp256k1/src/basic-config.h new file mode 100644 index 000000000..c4c16eb7c --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/basic-config.h @@ -0,0 +1,32 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_BASIC_CONFIG_ +#define _SECP256K1_BASIC_CONFIG_ + +#ifdef USE_BASIC_CONFIG + +#undef USE_ASM_X86_64 +#undef USE_ENDOMORPHISM +#undef USE_FIELD_10X26 +#undef USE_FIELD_5X52 +#undef USE_FIELD_INV_BUILTIN +#undef USE_FIELD_INV_NUM +#undef USE_NUM_GMP +#undef USE_NUM_NONE +#undef USE_SCALAR_4X64 +#undef USE_SCALAR_8X32 +#undef USE_SCALAR_INV_BUILTIN +#undef USE_SCALAR_INV_NUM + +#define USE_NUM_NONE 1 +#define USE_FIELD_INV_BUILTIN 1 +#define USE_SCALAR_INV_BUILTIN 1 +#define USE_FIELD_10X26 1 +#define USE_SCALAR_8X32 1 + +#endif // USE_BASIC_CONFIG +#endif // _SECP256K1_BASIC_CONFIG_ diff --git a/crypto/secp256k1/libsecp256k1/src/bench.h b/crypto/secp256k1/libsecp256k1/src/bench.h new file mode 100644 index 000000000..3a71b4aaf --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/bench.h @@ -0,0 +1,66 @@ +/********************************************************************** + * Copyright (c) 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_BENCH_H_ +#define _SECP256K1_BENCH_H_ + +#include +#include +#include "sys/time.h" + +static double gettimedouble(void) { + struct timeval tv; + gettimeofday(&tv, NULL); + return tv.tv_usec * 0.000001 + tv.tv_sec; +} + +void print_number(double x) { + double y = x; + int c = 0; + if (y < 0.0) { + y = -y; + } + while (y < 100.0) { + y *= 10.0; + c++; + } + printf("%.*f", c, x); +} + +void run_benchmark(char *name, void (*benchmark)(void*), void (*setup)(void*), void (*teardown)(void*), void* data, int count, int iter) { + int i; + double min = HUGE_VAL; + double sum = 0.0; + double max = 0.0; + for (i = 0; i < count; i++) { + double begin, total; + if (setup != NULL) { + setup(data); + } + begin = gettimedouble(); + benchmark(data); + total = gettimedouble() - begin; + if (teardown != NULL) { + teardown(data); + } + if (total < min) { + min = total; + } + if (total > max) { + max = total; + } + sum += total; + } + printf("%s: min ", name); + print_number(min * 1000000.0 / iter); + printf("us / avg "); + print_number((sum / count) * 1000000.0 / iter); + printf("us / max "); + print_number(max * 1000000.0 / iter); + printf("us\n"); +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/bench_ecdh.c b/crypto/secp256k1/libsecp256k1/src/bench_ecdh.c new file mode 100644 index 000000000..5a7c6376e --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/bench_ecdh.c @@ -0,0 +1,53 @@ +/********************************************************************** + * Copyright (c) 2015 Pieter Wuille, Andrew Poelstra * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#include + +#include "include/secp256k1.h" +#include "include/secp256k1_ecdh.h" +#include "util.h" +#include "bench.h" + +typedef struct { + secp256k1_context *ctx; + secp256k1_pubkey point; + unsigned char scalar[32]; +} bench_ecdh_t; + +static void bench_ecdh_setup(void* arg) { + int i; + bench_ecdh_t *data = (bench_ecdh_t*)arg; + const unsigned char point[] = { + 0x03, + 0x54, 0x94, 0xc1, 0x5d, 0x32, 0x09, 0x97, 0x06, + 0xc2, 0x39, 0x5f, 0x94, 0x34, 0x87, 0x45, 0xfd, + 0x75, 0x7c, 0xe3, 0x0e, 0x4e, 0x8c, 0x90, 0xfb, + 0xa2, 0xba, 0xd1, 0x84, 0xf8, 0x83, 0xc6, 0x9f + }; + + data->ctx = secp256k1_context_create(0); + for (i = 0; i < 32; i++) { + data->scalar[i] = i + 1; + } + CHECK(secp256k1_ec_pubkey_parse(data->ctx, &data->point, point, sizeof(point)) == 1); +} + +static void bench_ecdh(void* arg) { + int i; + unsigned char res[32]; + bench_ecdh_t *data = (bench_ecdh_t*)arg; + + for (i = 0; i < 20000; i++) { + CHECK(secp256k1_ecdh(data->ctx, res, &data->point, data->scalar) == 1); + } +} + +int main(void) { + bench_ecdh_t data; + + run_benchmark("ecdh", bench_ecdh, bench_ecdh_setup, NULL, &data, 10, 20000); + return 0; +} diff --git a/crypto/secp256k1/libsecp256k1/src/bench_internal.c b/crypto/secp256k1/libsecp256k1/src/bench_internal.c new file mode 100644 index 000000000..7809f5f8c --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/bench_internal.c @@ -0,0 +1,354 @@ +/********************************************************************** + * Copyright (c) 2014-2015 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ +#include + +#include "include/secp256k1.h" + +#include "util.h" +#include "hash_impl.h" +#include "num_impl.h" +#include "field_impl.h" +#include "group_impl.h" +#include "scalar_impl.h" +#include "ecmult_const_impl.h" +#include "ecmult_impl.h" +#include "bench.h" +#include "secp256k1.c" + +typedef struct { + secp256k1_scalar scalar_x, scalar_y; + secp256k1_fe fe_x, fe_y; + secp256k1_ge ge_x, ge_y; + secp256k1_gej gej_x, gej_y; + unsigned char data[64]; + int wnaf[256]; +} bench_inv_t; + +void bench_setup(void* arg) { + bench_inv_t *data = (bench_inv_t*)arg; + + static const unsigned char init_x[32] = { + 0x02, 0x03, 0x05, 0x07, 0x0b, 0x0d, 0x11, 0x13, + 0x17, 0x1d, 0x1f, 0x25, 0x29, 0x2b, 0x2f, 0x35, + 0x3b, 0x3d, 0x43, 0x47, 0x49, 0x4f, 0x53, 0x59, + 0x61, 0x65, 0x67, 0x6b, 0x6d, 0x71, 0x7f, 0x83 + }; + + static const unsigned char init_y[32] = { + 0x82, 0x83, 0x85, 0x87, 0x8b, 0x8d, 0x81, 0x83, + 0x97, 0xad, 0xaf, 0xb5, 0xb9, 0xbb, 0xbf, 0xc5, + 0xdb, 0xdd, 0xe3, 0xe7, 0xe9, 0xef, 0xf3, 0xf9, + 0x11, 0x15, 0x17, 0x1b, 0x1d, 0xb1, 0xbf, 0xd3 + }; + + secp256k1_scalar_set_b32(&data->scalar_x, init_x, NULL); + secp256k1_scalar_set_b32(&data->scalar_y, init_y, NULL); + secp256k1_fe_set_b32(&data->fe_x, init_x); + secp256k1_fe_set_b32(&data->fe_y, init_y); + CHECK(secp256k1_ge_set_xo_var(&data->ge_x, &data->fe_x, 0)); + CHECK(secp256k1_ge_set_xo_var(&data->ge_y, &data->fe_y, 1)); + secp256k1_gej_set_ge(&data->gej_x, &data->ge_x); + secp256k1_gej_set_ge(&data->gej_y, &data->ge_y); + memcpy(data->data, init_x, 32); + memcpy(data->data + 32, init_y, 32); +} + +void bench_scalar_add(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 2000000; i++) { + secp256k1_scalar_add(&data->scalar_x, &data->scalar_x, &data->scalar_y); + } +} + +void bench_scalar_negate(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 2000000; i++) { + secp256k1_scalar_negate(&data->scalar_x, &data->scalar_x); + } +} + +void bench_scalar_sqr(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 200000; i++) { + secp256k1_scalar_sqr(&data->scalar_x, &data->scalar_x); + } +} + +void bench_scalar_mul(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 200000; i++) { + secp256k1_scalar_mul(&data->scalar_x, &data->scalar_x, &data->scalar_y); + } +} + +#ifdef USE_ENDOMORPHISM +void bench_scalar_split(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 20000; i++) { + secp256k1_scalar l, r; + secp256k1_scalar_split_lambda(&l, &r, &data->scalar_x); + secp256k1_scalar_add(&data->scalar_x, &data->scalar_x, &data->scalar_y); + } +} +#endif + +void bench_scalar_inverse(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 2000; i++) { + secp256k1_scalar_inverse(&data->scalar_x, &data->scalar_x); + secp256k1_scalar_add(&data->scalar_x, &data->scalar_x, &data->scalar_y); + } +} + +void bench_scalar_inverse_var(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 2000; i++) { + secp256k1_scalar_inverse_var(&data->scalar_x, &data->scalar_x); + secp256k1_scalar_add(&data->scalar_x, &data->scalar_x, &data->scalar_y); + } +} + +void bench_field_normalize(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 2000000; i++) { + secp256k1_fe_normalize(&data->fe_x); + } +} + +void bench_field_normalize_weak(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 2000000; i++) { + secp256k1_fe_normalize_weak(&data->fe_x); + } +} + +void bench_field_mul(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 200000; i++) { + secp256k1_fe_mul(&data->fe_x, &data->fe_x, &data->fe_y); + } +} + +void bench_field_sqr(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 200000; i++) { + secp256k1_fe_sqr(&data->fe_x, &data->fe_x); + } +} + +void bench_field_inverse(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 20000; i++) { + secp256k1_fe_inv(&data->fe_x, &data->fe_x); + secp256k1_fe_add(&data->fe_x, &data->fe_y); + } +} + +void bench_field_inverse_var(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 20000; i++) { + secp256k1_fe_inv_var(&data->fe_x, &data->fe_x); + secp256k1_fe_add(&data->fe_x, &data->fe_y); + } +} + +void bench_field_sqrt_var(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 20000; i++) { + secp256k1_fe_sqrt_var(&data->fe_x, &data->fe_x); + secp256k1_fe_add(&data->fe_x, &data->fe_y); + } +} + +void bench_group_double_var(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 200000; i++) { + secp256k1_gej_double_var(&data->gej_x, &data->gej_x, NULL); + } +} + +void bench_group_add_var(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 200000; i++) { + secp256k1_gej_add_var(&data->gej_x, &data->gej_x, &data->gej_y, NULL); + } +} + +void bench_group_add_affine(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 200000; i++) { + secp256k1_gej_add_ge(&data->gej_x, &data->gej_x, &data->ge_y); + } +} + +void bench_group_add_affine_var(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 200000; i++) { + secp256k1_gej_add_ge_var(&data->gej_x, &data->gej_x, &data->ge_y, NULL); + } +} + +void bench_ecmult_wnaf(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 20000; i++) { + secp256k1_ecmult_wnaf(data->wnaf, 256, &data->scalar_x, WINDOW_A); + secp256k1_scalar_add(&data->scalar_x, &data->scalar_x, &data->scalar_y); + } +} + +void bench_wnaf_const(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 20000; i++) { + secp256k1_wnaf_const(data->wnaf, data->scalar_x, WINDOW_A); + secp256k1_scalar_add(&data->scalar_x, &data->scalar_x, &data->scalar_y); + } +} + + +void bench_sha256(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + secp256k1_sha256_t sha; + + for (i = 0; i < 20000; i++) { + secp256k1_sha256_initialize(&sha); + secp256k1_sha256_write(&sha, data->data, 32); + secp256k1_sha256_finalize(&sha, data->data); + } +} + +void bench_hmac_sha256(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + secp256k1_hmac_sha256_t hmac; + + for (i = 0; i < 20000; i++) { + secp256k1_hmac_sha256_initialize(&hmac, data->data, 32); + secp256k1_hmac_sha256_write(&hmac, data->data, 32); + secp256k1_hmac_sha256_finalize(&hmac, data->data); + } +} + +void bench_rfc6979_hmac_sha256(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + secp256k1_rfc6979_hmac_sha256_t rng; + + for (i = 0; i < 20000; i++) { + secp256k1_rfc6979_hmac_sha256_initialize(&rng, data->data, 64); + secp256k1_rfc6979_hmac_sha256_generate(&rng, data->data, 32); + } +} + +void bench_context_verify(void* arg) { + int i; + (void)arg; + for (i = 0; i < 20; i++) { + secp256k1_context_destroy(secp256k1_context_create(SECP256K1_CONTEXT_VERIFY)); + } +} + +void bench_context_sign(void* arg) { + int i; + (void)arg; + for (i = 0; i < 200; i++) { + secp256k1_context_destroy(secp256k1_context_create(SECP256K1_CONTEXT_SIGN)); + } +} + + +int have_flag(int argc, char** argv, char *flag) { + char** argm = argv + argc; + argv++; + if (argv == argm) { + return 1; + } + while (argv != NULL && argv != argm) { + if (strcmp(*argv, flag) == 0) { + return 1; + } + argv++; + } + return 0; +} + +int main(int argc, char **argv) { + bench_inv_t data; + if (have_flag(argc, argv, "scalar") || have_flag(argc, argv, "add")) run_benchmark("scalar_add", bench_scalar_add, bench_setup, NULL, &data, 10, 2000000); + if (have_flag(argc, argv, "scalar") || have_flag(argc, argv, "negate")) run_benchmark("scalar_negate", bench_scalar_negate, bench_setup, NULL, &data, 10, 2000000); + if (have_flag(argc, argv, "scalar") || have_flag(argc, argv, "sqr")) run_benchmark("scalar_sqr", bench_scalar_sqr, bench_setup, NULL, &data, 10, 200000); + if (have_flag(argc, argv, "scalar") || have_flag(argc, argv, "mul")) run_benchmark("scalar_mul", bench_scalar_mul, bench_setup, NULL, &data, 10, 200000); +#ifdef USE_ENDOMORPHISM + if (have_flag(argc, argv, "scalar") || have_flag(argc, argv, "split")) run_benchmark("scalar_split", bench_scalar_split, bench_setup, NULL, &data, 10, 20000); +#endif + if (have_flag(argc, argv, "scalar") || have_flag(argc, argv, "inverse")) run_benchmark("scalar_inverse", bench_scalar_inverse, bench_setup, NULL, &data, 10, 2000); + if (have_flag(argc, argv, "scalar") || have_flag(argc, argv, "inverse")) run_benchmark("scalar_inverse_var", bench_scalar_inverse_var, bench_setup, NULL, &data, 10, 2000); + + if (have_flag(argc, argv, "field") || have_flag(argc, argv, "normalize")) run_benchmark("field_normalize", bench_field_normalize, bench_setup, NULL, &data, 10, 2000000); + if (have_flag(argc, argv, "field") || have_flag(argc, argv, "normalize")) run_benchmark("field_normalize_weak", bench_field_normalize_weak, bench_setup, NULL, &data, 10, 2000000); + if (have_flag(argc, argv, "field") || have_flag(argc, argv, "sqr")) run_benchmark("field_sqr", bench_field_sqr, bench_setup, NULL, &data, 10, 200000); + if (have_flag(argc, argv, "field") || have_flag(argc, argv, "mul")) run_benchmark("field_mul", bench_field_mul, bench_setup, NULL, &data, 10, 200000); + if (have_flag(argc, argv, "field") || have_flag(argc, argv, "inverse")) run_benchmark("field_inverse", bench_field_inverse, bench_setup, NULL, &data, 10, 20000); + if (have_flag(argc, argv, "field") || have_flag(argc, argv, "inverse")) run_benchmark("field_inverse_var", bench_field_inverse_var, bench_setup, NULL, &data, 10, 20000); + if (have_flag(argc, argv, "field") || have_flag(argc, argv, "sqrt")) run_benchmark("field_sqrt_var", bench_field_sqrt_var, bench_setup, NULL, &data, 10, 20000); + + if (have_flag(argc, argv, "group") || have_flag(argc, argv, "double")) run_benchmark("group_double_var", bench_group_double_var, bench_setup, NULL, &data, 10, 200000); + if (have_flag(argc, argv, "group") || have_flag(argc, argv, "add")) run_benchmark("group_add_var", bench_group_add_var, bench_setup, NULL, &data, 10, 200000); + if (have_flag(argc, argv, "group") || have_flag(argc, argv, "add")) run_benchmark("group_add_affine", bench_group_add_affine, bench_setup, NULL, &data, 10, 200000); + if (have_flag(argc, argv, "group") || have_flag(argc, argv, "add")) run_benchmark("group_add_affine_var", bench_group_add_affine_var, bench_setup, NULL, &data, 10, 200000); + + if (have_flag(argc, argv, "ecmult") || have_flag(argc, argv, "wnaf")) run_benchmark("wnaf_const", bench_wnaf_const, bench_setup, NULL, &data, 10, 20000); + if (have_flag(argc, argv, "ecmult") || have_flag(argc, argv, "wnaf")) run_benchmark("ecmult_wnaf", bench_ecmult_wnaf, bench_setup, NULL, &data, 10, 20000); + + if (have_flag(argc, argv, "hash") || have_flag(argc, argv, "sha256")) run_benchmark("hash_sha256", bench_sha256, bench_setup, NULL, &data, 10, 20000); + if (have_flag(argc, argv, "hash") || have_flag(argc, argv, "hmac")) run_benchmark("hash_hmac_sha256", bench_hmac_sha256, bench_setup, NULL, &data, 10, 20000); + if (have_flag(argc, argv, "hash") || have_flag(argc, argv, "rng6979")) run_benchmark("hash_rfc6979_hmac_sha256", bench_rfc6979_hmac_sha256, bench_setup, NULL, &data, 10, 20000); + + if (have_flag(argc, argv, "context") || have_flag(argc, argv, "verify")) run_benchmark("context_verify", bench_context_verify, bench_setup, NULL, &data, 10, 20); + if (have_flag(argc, argv, "context") || have_flag(argc, argv, "sign")) run_benchmark("context_sign", bench_context_sign, bench_setup, NULL, &data, 10, 200); + + return 0; +} diff --git a/crypto/secp256k1/libsecp256k1/src/bench_recover.c b/crypto/secp256k1/libsecp256k1/src/bench_recover.c new file mode 100644 index 000000000..6489378cc --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/bench_recover.c @@ -0,0 +1,60 @@ +/********************************************************************** + * Copyright (c) 2014-2015 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#include "include/secp256k1.h" +#include "include/secp256k1_recovery.h" +#include "util.h" +#include "bench.h" + +typedef struct { + secp256k1_context *ctx; + unsigned char msg[32]; + unsigned char sig[64]; +} bench_recover_t; + +void bench_recover(void* arg) { + int i; + bench_recover_t *data = (bench_recover_t*)arg; + secp256k1_pubkey pubkey; + unsigned char pubkeyc[33]; + + for (i = 0; i < 20000; i++) { + int j; + size_t pubkeylen = 33; + secp256k1_ecdsa_recoverable_signature sig; + CHECK(secp256k1_ecdsa_recoverable_signature_parse_compact(data->ctx, &sig, data->sig, i % 2)); + CHECK(secp256k1_ecdsa_recover(data->ctx, &pubkey, &sig, data->msg)); + CHECK(secp256k1_ec_pubkey_serialize(data->ctx, pubkeyc, &pubkeylen, &pubkey, SECP256K1_EC_COMPRESSED)); + for (j = 0; j < 32; j++) { + data->sig[j + 32] = data->msg[j]; /* Move former message to S. */ + data->msg[j] = data->sig[j]; /* Move former R to message. */ + data->sig[j] = pubkeyc[j + 1]; /* Move recovered pubkey X coordinate to R (which must be a valid X coordinate). */ + } + } +} + +void bench_recover_setup(void* arg) { + int i; + bench_recover_t *data = (bench_recover_t*)arg; + + for (i = 0; i < 32; i++) { + data->msg[i] = 1 + i; + } + for (i = 0; i < 64; i++) { + data->sig[i] = 65 + i; + } +} + +int main(void) { + bench_recover_t data; + + data.ctx = secp256k1_context_create(SECP256K1_CONTEXT_VERIFY); + + run_benchmark("ecdsa_recover", bench_recover, bench_recover_setup, NULL, &data, 10, 20000); + + secp256k1_context_destroy(data.ctx); + return 0; +} diff --git a/crypto/secp256k1/libsecp256k1/src/bench_schnorr_verify.c b/crypto/secp256k1/libsecp256k1/src/bench_schnorr_verify.c new file mode 100644 index 000000000..5f137dda2 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/bench_schnorr_verify.c @@ -0,0 +1,73 @@ +/********************************************************************** + * Copyright (c) 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#include +#include + +#include "include/secp256k1.h" +#include "include/secp256k1_schnorr.h" +#include "util.h" +#include "bench.h" + +typedef struct { + unsigned char key[32]; + unsigned char sig[64]; + unsigned char pubkey[33]; + size_t pubkeylen; +} benchmark_schnorr_sig_t; + +typedef struct { + secp256k1_context *ctx; + unsigned char msg[32]; + benchmark_schnorr_sig_t sigs[64]; + int numsigs; +} benchmark_schnorr_verify_t; + +static void benchmark_schnorr_init(void* arg) { + int i, k; + benchmark_schnorr_verify_t* data = (benchmark_schnorr_verify_t*)arg; + + for (i = 0; i < 32; i++) { + data->msg[i] = 1 + i; + } + for (k = 0; k < data->numsigs; k++) { + secp256k1_pubkey pubkey; + for (i = 0; i < 32; i++) { + data->sigs[k].key[i] = 33 + i + k; + } + secp256k1_schnorr_sign(data->ctx, data->sigs[k].sig, data->msg, data->sigs[k].key, NULL, NULL); + data->sigs[k].pubkeylen = 33; + CHECK(secp256k1_ec_pubkey_create(data->ctx, &pubkey, data->sigs[k].key)); + CHECK(secp256k1_ec_pubkey_serialize(data->ctx, data->sigs[k].pubkey, &data->sigs[k].pubkeylen, &pubkey, SECP256K1_EC_COMPRESSED)); + } +} + +static void benchmark_schnorr_verify(void* arg) { + int i; + benchmark_schnorr_verify_t* data = (benchmark_schnorr_verify_t*)arg; + + for (i = 0; i < 20000 / data->numsigs; i++) { + secp256k1_pubkey pubkey; + data->sigs[0].sig[(i >> 8) % 64] ^= (i & 0xFF); + CHECK(secp256k1_ec_pubkey_parse(data->ctx, &pubkey, data->sigs[0].pubkey, data->sigs[0].pubkeylen)); + CHECK(secp256k1_schnorr_verify(data->ctx, data->sigs[0].sig, data->msg, &pubkey) == ((i & 0xFF) == 0)); + data->sigs[0].sig[(i >> 8) % 64] ^= (i & 0xFF); + } +} + + + +int main(void) { + benchmark_schnorr_verify_t data; + + data.ctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY); + + data.numsigs = 1; + run_benchmark("schnorr_verify", benchmark_schnorr_verify, benchmark_schnorr_init, NULL, &data, 10, 20000); + + secp256k1_context_destroy(data.ctx); + return 0; +} diff --git a/crypto/secp256k1/libsecp256k1/src/bench_sign.c b/crypto/secp256k1/libsecp256k1/src/bench_sign.c new file mode 100644 index 000000000..ed7224d75 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/bench_sign.c @@ -0,0 +1,56 @@ +/********************************************************************** + * Copyright (c) 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#include "include/secp256k1.h" +#include "util.h" +#include "bench.h" + +typedef struct { + secp256k1_context* ctx; + unsigned char msg[32]; + unsigned char key[32]; +} bench_sign_t; + +static void bench_sign_setup(void* arg) { + int i; + bench_sign_t *data = (bench_sign_t*)arg; + + for (i = 0; i < 32; i++) { + data->msg[i] = i + 1; + } + for (i = 0; i < 32; i++) { + data->key[i] = i + 65; + } +} + +static void bench_sign(void* arg) { + int i; + bench_sign_t *data = (bench_sign_t*)arg; + + unsigned char sig[74]; + for (i = 0; i < 20000; i++) { + size_t siglen = 74; + int j; + secp256k1_ecdsa_signature signature; + CHECK(secp256k1_ecdsa_sign(data->ctx, &signature, data->msg, data->key, NULL, NULL)); + CHECK(secp256k1_ecdsa_signature_serialize_der(data->ctx, sig, &siglen, &signature)); + for (j = 0; j < 32; j++) { + data->msg[j] = sig[j]; + data->key[j] = sig[j + 32]; + } + } +} + +int main(void) { + bench_sign_t data; + + data.ctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN); + + run_benchmark("ecdsa_sign", bench_sign, bench_sign_setup, NULL, &data, 10, 20000); + + secp256k1_context_destroy(data.ctx); + return 0; +} diff --git a/crypto/secp256k1/libsecp256k1/src/bench_verify.c b/crypto/secp256k1/libsecp256k1/src/bench_verify.c new file mode 100644 index 000000000..0cafbdc4e --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/bench_verify.c @@ -0,0 +1,67 @@ +/********************************************************************** + * Copyright (c) 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#include +#include + +#include "include/secp256k1.h" +#include "util.h" +#include "bench.h" + +typedef struct { + secp256k1_context *ctx; + unsigned char msg[32]; + unsigned char key[32]; + unsigned char sig[72]; + size_t siglen; + unsigned char pubkey[33]; + size_t pubkeylen; +} benchmark_verify_t; + +static void benchmark_verify(void* arg) { + int i; + benchmark_verify_t* data = (benchmark_verify_t*)arg; + + for (i = 0; i < 20000; i++) { + secp256k1_pubkey pubkey; + secp256k1_ecdsa_signature sig; + data->sig[data->siglen - 1] ^= (i & 0xFF); + data->sig[data->siglen - 2] ^= ((i >> 8) & 0xFF); + data->sig[data->siglen - 3] ^= ((i >> 16) & 0xFF); + CHECK(secp256k1_ec_pubkey_parse(data->ctx, &pubkey, data->pubkey, data->pubkeylen) == 1); + CHECK(secp256k1_ecdsa_signature_parse_der(data->ctx, &sig, data->sig, data->siglen) == 1); + CHECK(secp256k1_ecdsa_verify(data->ctx, &sig, data->msg, &pubkey) == (i == 0)); + data->sig[data->siglen - 1] ^= (i & 0xFF); + data->sig[data->siglen - 2] ^= ((i >> 8) & 0xFF); + data->sig[data->siglen - 3] ^= ((i >> 16) & 0xFF); + } +} + +int main(void) { + int i; + secp256k1_pubkey pubkey; + secp256k1_ecdsa_signature sig; + benchmark_verify_t data; + + data.ctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY); + + for (i = 0; i < 32; i++) { + data.msg[i] = 1 + i; + } + for (i = 0; i < 32; i++) { + data.key[i] = 33 + i; + } + data.siglen = 72; + CHECK(secp256k1_ecdsa_sign(data.ctx, &sig, data.msg, data.key, NULL, NULL)); + CHECK(secp256k1_ecdsa_signature_serialize_der(data.ctx, data.sig, &data.siglen, &sig)); + CHECK(secp256k1_ec_pubkey_create(data.ctx, &pubkey, data.key)); + CHECK(secp256k1_ec_pubkey_serialize(data.ctx, data.pubkey, &data.pubkeylen, &pubkey, SECP256K1_EC_COMPRESSED) == 1); + + run_benchmark("ecdsa_verify", benchmark_verify, NULL, NULL, &data, 10, 20000); + + secp256k1_context_destroy(data.ctx); + return 0; +} diff --git a/crypto/secp256k1/libsecp256k1/src/ecdsa.h b/crypto/secp256k1/libsecp256k1/src/ecdsa.h new file mode 100644 index 000000000..4c0a4a89e --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/ecdsa.h @@ -0,0 +1,22 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_ECDSA_ +#define _SECP256K1_ECDSA_ + +#include + +#include "scalar.h" +#include "group.h" +#include "ecmult.h" + +static int secp256k1_ecdsa_sig_parse(secp256k1_scalar *r, secp256k1_scalar *s, const unsigned char *sig, size_t size); +static int secp256k1_ecdsa_sig_serialize(unsigned char *sig, size_t *size, const secp256k1_scalar *r, const secp256k1_scalar *s); +static int secp256k1_ecdsa_sig_verify(const secp256k1_ecmult_context *ctx, const secp256k1_scalar* r, const secp256k1_scalar* s, const secp256k1_ge *pubkey, const secp256k1_scalar *message); +static int secp256k1_ecdsa_sig_sign(const secp256k1_ecmult_gen_context *ctx, secp256k1_scalar* r, secp256k1_scalar* s, const secp256k1_scalar *seckey, const secp256k1_scalar *message, const secp256k1_scalar *nonce, int *recid); +static int secp256k1_ecdsa_sig_recover(const secp256k1_ecmult_context *ctx, const secp256k1_scalar* r, const secp256k1_scalar* s, secp256k1_ge *pubkey, const secp256k1_scalar *message, int recid); + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/ecdsa_impl.h b/crypto/secp256k1/libsecp256k1/src/ecdsa_impl.h new file mode 100644 index 000000000..4a172b3c5 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/ecdsa_impl.h @@ -0,0 +1,264 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + + +#ifndef _SECP256K1_ECDSA_IMPL_H_ +#define _SECP256K1_ECDSA_IMPL_H_ + +#include "scalar.h" +#include "field.h" +#include "group.h" +#include "ecmult.h" +#include "ecmult_gen.h" +#include "ecdsa.h" + +/** Group order for secp256k1 defined as 'n' in "Standards for Efficient Cryptography" (SEC2) 2.7.1 + * sage: for t in xrange(1023, -1, -1): + * .. p = 2**256 - 2**32 - t + * .. if p.is_prime(): + * .. print '%x'%p + * .. break + * 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f' + * sage: a = 0 + * sage: b = 7 + * sage: F = FiniteField (p) + * sage: '%x' % (EllipticCurve ([F (a), F (b)]).order()) + * 'fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141' + */ +static const secp256k1_fe secp256k1_ecdsa_const_order_as_fe = SECP256K1_FE_CONST( + 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFEUL, + 0xBAAEDCE6UL, 0xAF48A03BUL, 0xBFD25E8CUL, 0xD0364141UL +); + +/** Difference between field and order, values 'p' and 'n' values defined in + * "Standards for Efficient Cryptography" (SEC2) 2.7.1. + * sage: p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F + * sage: a = 0 + * sage: b = 7 + * sage: F = FiniteField (p) + * sage: '%x' % (p - EllipticCurve ([F (a), F (b)]).order()) + * '14551231950b75fc4402da1722fc9baee' + */ +static const secp256k1_fe secp256k1_ecdsa_const_p_minus_order = SECP256K1_FE_CONST( + 0, 0, 0, 1, 0x45512319UL, 0x50B75FC4UL, 0x402DA172UL, 0x2FC9BAEEUL +); + +static int secp256k1_ecdsa_sig_parse(secp256k1_scalar *rr, secp256k1_scalar *rs, const unsigned char *sig, size_t size) { + unsigned char ra[32] = {0}, sa[32] = {0}; + const unsigned char *rp; + const unsigned char *sp; + size_t lenr; + size_t lens; + int overflow; + if (sig[0] != 0x30) { + return 0; + } + lenr = sig[3]; + if (5+lenr >= size) { + return 0; + } + lens = sig[lenr+5]; + if (sig[1] != lenr+lens+4) { + return 0; + } + if (lenr+lens+6 > size) { + return 0; + } + if (sig[2] != 0x02) { + return 0; + } + if (lenr == 0) { + return 0; + } + if (sig[lenr+4] != 0x02) { + return 0; + } + if (lens == 0) { + return 0; + } + sp = sig + 6 + lenr; + while (lens > 0 && sp[0] == 0) { + lens--; + sp++; + } + if (lens > 32) { + return 0; + } + rp = sig + 4; + while (lenr > 0 && rp[0] == 0) { + lenr--; + rp++; + } + if (lenr > 32) { + return 0; + } + memcpy(ra + 32 - lenr, rp, lenr); + memcpy(sa + 32 - lens, sp, lens); + overflow = 0; + secp256k1_scalar_set_b32(rr, ra, &overflow); + if (overflow) { + return 0; + } + secp256k1_scalar_set_b32(rs, sa, &overflow); + if (overflow) { + return 0; + } + return 1; +} + +static int secp256k1_ecdsa_sig_serialize(unsigned char *sig, size_t *size, const secp256k1_scalar* ar, const secp256k1_scalar* as) { + unsigned char r[33] = {0}, s[33] = {0}; + unsigned char *rp = r, *sp = s; + size_t lenR = 33, lenS = 33; + secp256k1_scalar_get_b32(&r[1], ar); + secp256k1_scalar_get_b32(&s[1], as); + while (lenR > 1 && rp[0] == 0 && rp[1] < 0x80) { lenR--; rp++; } + while (lenS > 1 && sp[0] == 0 && sp[1] < 0x80) { lenS--; sp++; } + if (*size < 6+lenS+lenR) { + *size = 6 + lenS + lenR; + return 0; + } + *size = 6 + lenS + lenR; + sig[0] = 0x30; + sig[1] = 4 + lenS + lenR; + sig[2] = 0x02; + sig[3] = lenR; + memcpy(sig+4, rp, lenR); + sig[4+lenR] = 0x02; + sig[5+lenR] = lenS; + memcpy(sig+lenR+6, sp, lenS); + return 1; +} + +static int secp256k1_ecdsa_sig_verify(const secp256k1_ecmult_context *ctx, const secp256k1_scalar *sigr, const secp256k1_scalar *sigs, const secp256k1_ge *pubkey, const secp256k1_scalar *message) { + unsigned char c[32]; + secp256k1_scalar sn, u1, u2; + secp256k1_fe xr; + secp256k1_gej pubkeyj; + secp256k1_gej pr; + + if (secp256k1_scalar_is_zero(sigr) || secp256k1_scalar_is_zero(sigs)) { + return 0; + } + + secp256k1_scalar_inverse_var(&sn, sigs); + secp256k1_scalar_mul(&u1, &sn, message); + secp256k1_scalar_mul(&u2, &sn, sigr); + secp256k1_gej_set_ge(&pubkeyj, pubkey); + secp256k1_ecmult(ctx, &pr, &pubkeyj, &u2, &u1); + if (secp256k1_gej_is_infinity(&pr)) { + return 0; + } + secp256k1_scalar_get_b32(c, sigr); + secp256k1_fe_set_b32(&xr, c); + + /** We now have the recomputed R point in pr, and its claimed x coordinate (modulo n) + * in xr. Naively, we would extract the x coordinate from pr (requiring a inversion modulo p), + * compute the remainder modulo n, and compare it to xr. However: + * + * xr == X(pr) mod n + * <=> exists h. (xr + h * n < p && xr + h * n == X(pr)) + * [Since 2 * n > p, h can only be 0 or 1] + * <=> (xr == X(pr)) || (xr + n < p && xr + n == X(pr)) + * [In Jacobian coordinates, X(pr) is pr.x / pr.z^2 mod p] + * <=> (xr == pr.x / pr.z^2 mod p) || (xr + n < p && xr + n == pr.x / pr.z^2 mod p) + * [Multiplying both sides of the equations by pr.z^2 mod p] + * <=> (xr * pr.z^2 mod p == pr.x) || (xr + n < p && (xr + n) * pr.z^2 mod p == pr.x) + * + * Thus, we can avoid the inversion, but we have to check both cases separately. + * secp256k1_gej_eq_x implements the (xr * pr.z^2 mod p == pr.x) test. + */ + if (secp256k1_gej_eq_x_var(&xr, &pr)) { + /* xr.x == xr * xr.z^2 mod p, so the signature is valid. */ + return 1; + } + if (secp256k1_fe_cmp_var(&xr, &secp256k1_ecdsa_const_p_minus_order) >= 0) { + /* xr + p >= n, so we can skip testing the second case. */ + return 0; + } + secp256k1_fe_add(&xr, &secp256k1_ecdsa_const_order_as_fe); + if (secp256k1_gej_eq_x_var(&xr, &pr)) { + /* (xr + n) * pr.z^2 mod p == pr.x, so the signature is valid. */ + return 1; + } + return 0; +} + +static int secp256k1_ecdsa_sig_recover(const secp256k1_ecmult_context *ctx, const secp256k1_scalar *sigr, const secp256k1_scalar* sigs, secp256k1_ge *pubkey, const secp256k1_scalar *message, int recid) { + unsigned char brx[32]; + secp256k1_fe fx; + secp256k1_ge x; + secp256k1_gej xj; + secp256k1_scalar rn, u1, u2; + secp256k1_gej qj; + + if (secp256k1_scalar_is_zero(sigr) || secp256k1_scalar_is_zero(sigs)) { + return 0; + } + + secp256k1_scalar_get_b32(brx, sigr); + VERIFY_CHECK(secp256k1_fe_set_b32(&fx, brx)); /* brx comes from a scalar, so is less than the order; certainly less than p */ + if (recid & 2) { + if (secp256k1_fe_cmp_var(&fx, &secp256k1_ecdsa_const_p_minus_order) >= 0) { + return 0; + } + secp256k1_fe_add(&fx, &secp256k1_ecdsa_const_order_as_fe); + } + if (!secp256k1_ge_set_xo_var(&x, &fx, recid & 1)) { + return 0; + } + secp256k1_gej_set_ge(&xj, &x); + secp256k1_scalar_inverse_var(&rn, sigr); + secp256k1_scalar_mul(&u1, &rn, message); + secp256k1_scalar_negate(&u1, &u1); + secp256k1_scalar_mul(&u2, &rn, sigs); + secp256k1_ecmult(ctx, &qj, &xj, &u2, &u1); + secp256k1_ge_set_gej_var(pubkey, &qj); + return !secp256k1_gej_is_infinity(&qj); +} + +static int secp256k1_ecdsa_sig_sign(const secp256k1_ecmult_gen_context *ctx, secp256k1_scalar *sigr, secp256k1_scalar *sigs, const secp256k1_scalar *seckey, const secp256k1_scalar *message, const secp256k1_scalar *nonce, int *recid) { + unsigned char b[32]; + secp256k1_gej rp; + secp256k1_ge r; + secp256k1_scalar n; + int overflow = 0; + + secp256k1_ecmult_gen(ctx, &rp, nonce); + secp256k1_ge_set_gej(&r, &rp); + secp256k1_fe_normalize(&r.x); + secp256k1_fe_normalize(&r.y); + secp256k1_fe_get_b32(b, &r.x); + secp256k1_scalar_set_b32(sigr, b, &overflow); + if (secp256k1_scalar_is_zero(sigr)) { + /* P.x = order is on the curve, so technically sig->r could end up zero, which would be an invalid signature. */ + secp256k1_gej_clear(&rp); + secp256k1_ge_clear(&r); + return 0; + } + if (recid) { + *recid = (overflow ? 2 : 0) | (secp256k1_fe_is_odd(&r.y) ? 1 : 0); + } + secp256k1_scalar_mul(&n, sigr, seckey); + secp256k1_scalar_add(&n, &n, message); + secp256k1_scalar_inverse(sigs, nonce); + secp256k1_scalar_mul(sigs, sigs, &n); + secp256k1_scalar_clear(&n); + secp256k1_gej_clear(&rp); + secp256k1_ge_clear(&r); + if (secp256k1_scalar_is_zero(sigs)) { + return 0; + } + if (secp256k1_scalar_is_high(sigs)) { + secp256k1_scalar_negate(sigs, sigs); + if (recid) { + *recid ^= 1; + } + } + return 1; +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/eckey.h b/crypto/secp256k1/libsecp256k1/src/eckey.h new file mode 100644 index 000000000..71c4096df --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/eckey.h @@ -0,0 +1,28 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_ECKEY_ +#define _SECP256K1_ECKEY_ + +#include + +#include "group.h" +#include "scalar.h" +#include "ecmult.h" +#include "ecmult_gen.h" + +static int secp256k1_eckey_pubkey_parse(secp256k1_ge *elem, const unsigned char *pub, size_t size); +static int secp256k1_eckey_pubkey_serialize(secp256k1_ge *elem, unsigned char *pub, size_t *size, unsigned int flags); + +static int secp256k1_eckey_privkey_parse(secp256k1_scalar *key, const unsigned char *privkey, size_t privkeylen); +static int secp256k1_eckey_privkey_serialize(const secp256k1_ecmult_gen_context *ctx, unsigned char *privkey, size_t *privkeylen, const secp256k1_scalar *key, unsigned int flags); + +static int secp256k1_eckey_privkey_tweak_add(secp256k1_scalar *key, const secp256k1_scalar *tweak); +static int secp256k1_eckey_pubkey_tweak_add(const secp256k1_ecmult_context *ctx, secp256k1_ge *key, const secp256k1_scalar *tweak); +static int secp256k1_eckey_privkey_tweak_mul(secp256k1_scalar *key, const secp256k1_scalar *tweak); +static int secp256k1_eckey_pubkey_tweak_mul(const secp256k1_ecmult_context *ctx, secp256k1_ge *key, const secp256k1_scalar *tweak); + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/eckey_impl.h b/crypto/secp256k1/libsecp256k1/src/eckey_impl.h new file mode 100644 index 000000000..ae4424015 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/eckey_impl.h @@ -0,0 +1,202 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_ECKEY_IMPL_H_ +#define _SECP256K1_ECKEY_IMPL_H_ + +#include "eckey.h" + +#include "scalar.h" +#include "field.h" +#include "group.h" +#include "ecmult_gen.h" + +static int secp256k1_eckey_pubkey_parse(secp256k1_ge *elem, const unsigned char *pub, size_t size) { + if (size == 33 && (pub[0] == 0x02 || pub[0] == 0x03)) { + secp256k1_fe x; + return secp256k1_fe_set_b32(&x, pub+1) && secp256k1_ge_set_xo_var(elem, &x, pub[0] == 0x03); + } else if (size == 65 && (pub[0] == 0x04 || pub[0] == 0x06 || pub[0] == 0x07)) { + secp256k1_fe x, y; + if (!secp256k1_fe_set_b32(&x, pub+1) || !secp256k1_fe_set_b32(&y, pub+33)) { + return 0; + } + secp256k1_ge_set_xy(elem, &x, &y); + if ((pub[0] == 0x06 || pub[0] == 0x07) && secp256k1_fe_is_odd(&y) != (pub[0] == 0x07)) { + return 0; + } + return secp256k1_ge_is_valid_var(elem); + } else { + return 0; + } +} + +static int secp256k1_eckey_pubkey_serialize(secp256k1_ge *elem, unsigned char *pub, size_t *size, unsigned int flags) { + if (secp256k1_ge_is_infinity(elem)) { + return 0; + } + secp256k1_fe_normalize_var(&elem->x); + secp256k1_fe_normalize_var(&elem->y); + secp256k1_fe_get_b32(&pub[1], &elem->x); + if (flags & SECP256K1_EC_COMPRESSED) { + *size = 33; + pub[0] = 0x02 | (secp256k1_fe_is_odd(&elem->y) ? 0x01 : 0x00); + } else { + *size = 65; + pub[0] = 0x04; + secp256k1_fe_get_b32(&pub[33], &elem->y); + } + return 1; +} + +static int secp256k1_eckey_privkey_parse(secp256k1_scalar *key, const unsigned char *privkey, size_t privkeylen) { + unsigned char c[32] = {0}; + const unsigned char *end = privkey + privkeylen; + int lenb = 0; + int len = 0; + int overflow = 0; + /* sequence header */ + if (end < privkey+1 || *privkey != 0x30) { + return 0; + } + privkey++; + /* sequence length constructor */ + if (end < privkey+1 || !(*privkey & 0x80)) { + return 0; + } + lenb = *privkey & ~0x80; privkey++; + if (lenb < 1 || lenb > 2) { + return 0; + } + if (end < privkey+lenb) { + return 0; + } + /* sequence length */ + len = privkey[lenb-1] | (lenb > 1 ? privkey[lenb-2] << 8 : 0); + privkey += lenb; + if (end < privkey+len) { + return 0; + } + /* sequence element 0: version number (=1) */ + if (end < privkey+3 || privkey[0] != 0x02 || privkey[1] != 0x01 || privkey[2] != 0x01) { + return 0; + } + privkey += 3; + /* sequence element 1: octet string, up to 32 bytes */ + if (end < privkey+2 || privkey[0] != 0x04 || privkey[1] > 0x20 || end < privkey+2+privkey[1]) { + return 0; + } + memcpy(c + 32 - privkey[1], privkey + 2, privkey[1]); + secp256k1_scalar_set_b32(key, c, &overflow); + memset(c, 0, 32); + return !overflow; +} + +static int secp256k1_eckey_privkey_serialize(const secp256k1_ecmult_gen_context *ctx, unsigned char *privkey, size_t *privkeylen, const secp256k1_scalar *key, unsigned int flags) { + secp256k1_gej rp; + secp256k1_ge r; + size_t pubkeylen = 0; + secp256k1_ecmult_gen(ctx, &rp, key); + secp256k1_ge_set_gej(&r, &rp); + if (flags & SECP256K1_EC_COMPRESSED) { + static const unsigned char begin[] = { + 0x30,0x81,0xD3,0x02,0x01,0x01,0x04,0x20 + }; + static const unsigned char middle[] = { + 0xA0,0x81,0x85,0x30,0x81,0x82,0x02,0x01,0x01,0x30,0x2C,0x06,0x07,0x2A,0x86,0x48, + 0xCE,0x3D,0x01,0x01,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFE,0xFF,0xFF,0xFC,0x2F,0x30,0x06,0x04,0x01,0x00,0x04,0x01,0x07,0x04, + 0x21,0x02,0x79,0xBE,0x66,0x7E,0xF9,0xDC,0xBB,0xAC,0x55,0xA0,0x62,0x95,0xCE,0x87, + 0x0B,0x07,0x02,0x9B,0xFC,0xDB,0x2D,0xCE,0x28,0xD9,0x59,0xF2,0x81,0x5B,0x16,0xF8, + 0x17,0x98,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFE,0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,0xBF,0xD2,0x5E, + 0x8C,0xD0,0x36,0x41,0x41,0x02,0x01,0x01,0xA1,0x24,0x03,0x22,0x00 + }; + unsigned char *ptr = privkey; + memcpy(ptr, begin, sizeof(begin)); ptr += sizeof(begin); + secp256k1_scalar_get_b32(ptr, key); ptr += 32; + memcpy(ptr, middle, sizeof(middle)); ptr += sizeof(middle); + if (!secp256k1_eckey_pubkey_serialize(&r, ptr, &pubkeylen, 1)) { + return 0; + } + ptr += pubkeylen; + *privkeylen = ptr - privkey; + } else { + static const unsigned char begin[] = { + 0x30,0x82,0x01,0x13,0x02,0x01,0x01,0x04,0x20 + }; + static const unsigned char middle[] = { + 0xA0,0x81,0xA5,0x30,0x81,0xA2,0x02,0x01,0x01,0x30,0x2C,0x06,0x07,0x2A,0x86,0x48, + 0xCE,0x3D,0x01,0x01,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFE,0xFF,0xFF,0xFC,0x2F,0x30,0x06,0x04,0x01,0x00,0x04,0x01,0x07,0x04, + 0x41,0x04,0x79,0xBE,0x66,0x7E,0xF9,0xDC,0xBB,0xAC,0x55,0xA0,0x62,0x95,0xCE,0x87, + 0x0B,0x07,0x02,0x9B,0xFC,0xDB,0x2D,0xCE,0x28,0xD9,0x59,0xF2,0x81,0x5B,0x16,0xF8, + 0x17,0x98,0x48,0x3A,0xDA,0x77,0x26,0xA3,0xC4,0x65,0x5D,0xA4,0xFB,0xFC,0x0E,0x11, + 0x08,0xA8,0xFD,0x17,0xB4,0x48,0xA6,0x85,0x54,0x19,0x9C,0x47,0xD0,0x8F,0xFB,0x10, + 0xD4,0xB8,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFE,0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,0xBF,0xD2,0x5E, + 0x8C,0xD0,0x36,0x41,0x41,0x02,0x01,0x01,0xA1,0x44,0x03,0x42,0x00 + }; + unsigned char *ptr = privkey; + memcpy(ptr, begin, sizeof(begin)); ptr += sizeof(begin); + secp256k1_scalar_get_b32(ptr, key); ptr += 32; + memcpy(ptr, middle, sizeof(middle)); ptr += sizeof(middle); + if (!secp256k1_eckey_pubkey_serialize(&r, ptr, &pubkeylen, 0)) { + return 0; + } + ptr += pubkeylen; + *privkeylen = ptr - privkey; + } + return 1; +} + +static int secp256k1_eckey_privkey_tweak_add(secp256k1_scalar *key, const secp256k1_scalar *tweak) { + secp256k1_scalar_add(key, key, tweak); + if (secp256k1_scalar_is_zero(key)) { + return 0; + } + return 1; +} + +static int secp256k1_eckey_pubkey_tweak_add(const secp256k1_ecmult_context *ctx, secp256k1_ge *key, const secp256k1_scalar *tweak) { + secp256k1_gej pt; + secp256k1_scalar one; + secp256k1_gej_set_ge(&pt, key); + secp256k1_scalar_set_int(&one, 1); + secp256k1_ecmult(ctx, &pt, &pt, &one, tweak); + + if (secp256k1_gej_is_infinity(&pt)) { + return 0; + } + secp256k1_ge_set_gej(key, &pt); + return 1; +} + +static int secp256k1_eckey_privkey_tweak_mul(secp256k1_scalar *key, const secp256k1_scalar *tweak) { + if (secp256k1_scalar_is_zero(tweak)) { + return 0; + } + + secp256k1_scalar_mul(key, key, tweak); + return 1; +} + +static int secp256k1_eckey_pubkey_tweak_mul(const secp256k1_ecmult_context *ctx, secp256k1_ge *key, const secp256k1_scalar *tweak) { + secp256k1_scalar zero; + secp256k1_gej pt; + if (secp256k1_scalar_is_zero(tweak)) { + return 0; + } + + secp256k1_scalar_set_int(&zero, 0); + secp256k1_gej_set_ge(&pt, key); + secp256k1_ecmult(ctx, &pt, &pt, tweak, &zero); + secp256k1_ge_set_gej(key, &pt); + return 1; +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/ecmult.h b/crypto/secp256k1/libsecp256k1/src/ecmult.h new file mode 100644 index 000000000..20484134f --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/ecmult.h @@ -0,0 +1,31 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_ECMULT_ +#define _SECP256K1_ECMULT_ + +#include "num.h" +#include "group.h" + +typedef struct { + /* For accelerating the computation of a*P + b*G: */ + secp256k1_ge_storage (*pre_g)[]; /* odd multiples of the generator */ +#ifdef USE_ENDOMORPHISM + secp256k1_ge_storage (*pre_g_128)[]; /* odd multiples of 2^128*generator */ +#endif +} secp256k1_ecmult_context; + +static void secp256k1_ecmult_context_init(secp256k1_ecmult_context *ctx); +static void secp256k1_ecmult_context_build(secp256k1_ecmult_context *ctx, const secp256k1_callback *cb); +static void secp256k1_ecmult_context_clone(secp256k1_ecmult_context *dst, + const secp256k1_ecmult_context *src, const secp256k1_callback *cb); +static void secp256k1_ecmult_context_clear(secp256k1_ecmult_context *ctx); +static int secp256k1_ecmult_context_is_built(const secp256k1_ecmult_context *ctx); + +/** Double multiply: R = na*A + ng*G */ +static void secp256k1_ecmult(const secp256k1_ecmult_context *ctx, secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_scalar *na, const secp256k1_scalar *ng); + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/ecmult_const.h b/crypto/secp256k1/libsecp256k1/src/ecmult_const.h new file mode 100644 index 000000000..2b0097655 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/ecmult_const.h @@ -0,0 +1,15 @@ +/********************************************************************** + * Copyright (c) 2015 Andrew Poelstra * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_ECMULT_CONST_ +#define _SECP256K1_ECMULT_CONST_ + +#include "scalar.h" +#include "group.h" + +static void secp256k1_ecmult_const(secp256k1_gej *r, const secp256k1_ge *a, const secp256k1_scalar *q); + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/ecmult_const_impl.h b/crypto/secp256k1/libsecp256k1/src/ecmult_const_impl.h new file mode 100644 index 000000000..90ac94770 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/ecmult_const_impl.h @@ -0,0 +1,260 @@ +/********************************************************************** + * Copyright (c) 2015 Pieter Wuille, Andrew Poelstra * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_ECMULT_CONST_IMPL_ +#define _SECP256K1_ECMULT_CONST_IMPL_ + +#include "scalar.h" +#include "group.h" +#include "ecmult_const.h" +#include "ecmult_impl.h" + +#ifdef USE_ENDOMORPHISM + #define WNAF_BITS 128 +#else + #define WNAF_BITS 256 +#endif +#define WNAF_SIZE(w) ((WNAF_BITS + (w) - 1) / (w)) + +/* This is like `ECMULT_TABLE_GET_GE` but is constant time */ +#define ECMULT_CONST_TABLE_GET_GE(r,pre,n,w) do { \ + int m; \ + int abs_n = (n) * (((n) > 0) * 2 - 1); \ + int idx_n = abs_n / 2; \ + secp256k1_fe neg_y; \ + VERIFY_CHECK(((n) & 1) == 1); \ + VERIFY_CHECK((n) >= -((1 << ((w)-1)) - 1)); \ + VERIFY_CHECK((n) <= ((1 << ((w)-1)) - 1)); \ + VERIFY_SETUP(secp256k1_fe_clear(&(r)->x)); \ + VERIFY_SETUP(secp256k1_fe_clear(&(r)->y)); \ + for (m = 0; m < ECMULT_TABLE_SIZE(w); m++) { \ + /* This loop is used to avoid secret data in array indices. See + * the comment in ecmult_gen_impl.h for rationale. */ \ + secp256k1_fe_cmov(&(r)->x, &(pre)[m].x, m == idx_n); \ + secp256k1_fe_cmov(&(r)->y, &(pre)[m].y, m == idx_n); \ + } \ + (r)->infinity = 0; \ + secp256k1_fe_negate(&neg_y, &(r)->y, 1); \ + secp256k1_fe_cmov(&(r)->y, &neg_y, (n) != abs_n); \ +} while(0) + + +/** Convert a number to WNAF notation. The number becomes represented by sum(2^{wi} * wnaf[i], i=0..return_val) + * with the following guarantees: + * - each wnaf[i] an odd integer between -(1 << w) and (1 << w) + * - each wnaf[i] is nonzero + * - the number of words set is returned; this is always (WNAF_BITS + w - 1) / w + * + * Adapted from `The Width-w NAF Method Provides Small Memory and Fast Elliptic Scalar + * Multiplications Secure against Side Channel Attacks`, Okeya and Tagaki. M. Joye (Ed.) + * CT-RSA 2003, LNCS 2612, pp. 328-443, 2003. Springer-Verlagy Berlin Heidelberg 2003 + * + * Numbers reference steps of `Algorithm SPA-resistant Width-w NAF with Odd Scalar` on pp. 335 + */ +static int secp256k1_wnaf_const(int *wnaf, secp256k1_scalar s, int w) { + int global_sign; + int skew = 0; + int word = 0; + /* 1 2 3 */ + int u_last; + int u; + +#ifdef USE_ENDOMORPHISM + int flip; + int bit; + secp256k1_scalar neg_s; + int not_neg_one; + /* If we are using the endomorphism, we cannot handle even numbers by negating + * them, since we are working with 128-bit numbers whose negations would be 256 + * bits, eliminating the performance advantage. Instead we use a technique from + * Section 4.2 of the Okeya/Tagaki paper, which is to add either 1 (for even) + * or 2 (for odd) to the number we are encoding, then compensating after the + * multiplication. */ + /* Negative 128-bit numbers will be negated, since otherwise they are 256-bit */ + flip = secp256k1_scalar_is_high(&s); + /* We add 1 to even numbers, 2 to odd ones, noting that negation flips parity */ + bit = flip ^ (s.d[0] & 1); + /* We check for negative one, since adding 2 to it will cause an overflow */ + secp256k1_scalar_negate(&neg_s, &s); + not_neg_one = !secp256k1_scalar_is_one(&neg_s); + secp256k1_scalar_cadd_bit(&s, bit, not_neg_one); + /* If we had negative one, flip == 1, s.d[0] == 0, bit == 1, so caller expects + * that we added two to it and flipped it. In fact for -1 these operations are + * identical. We only flipped, but since skewing is required (in the sense that + * the skew must be 1 or 2, never zero) and flipping is not, we need to change + * our flags to claim that we only skewed. */ + global_sign = secp256k1_scalar_cond_negate(&s, flip); + global_sign *= not_neg_one * 2 - 1; + skew = 1 << bit; +#else + /* Otherwise, we just negate to force oddness */ + int is_even = secp256k1_scalar_is_even(&s); + global_sign = secp256k1_scalar_cond_negate(&s, is_even); +#endif + + /* 4 */ + u_last = secp256k1_scalar_shr_int(&s, w); + while (word * w < WNAF_BITS) { + int sign; + int even; + + /* 4.1 4.4 */ + u = secp256k1_scalar_shr_int(&s, w); + /* 4.2 */ + even = ((u & 1) == 0); + sign = 2 * (u_last > 0) - 1; + u += sign * even; + u_last -= sign * even * (1 << w); + + /* 4.3, adapted for global sign change */ + wnaf[word++] = u_last * global_sign; + + u_last = u; + } + wnaf[word] = u * global_sign; + + VERIFY_CHECK(secp256k1_scalar_is_zero(&s)); + VERIFY_CHECK(word == WNAF_SIZE(w)); + return skew; +} + + +static void secp256k1_ecmult_const(secp256k1_gej *r, const secp256k1_ge *a, const secp256k1_scalar *scalar) { + secp256k1_ge pre_a[ECMULT_TABLE_SIZE(WINDOW_A)]; + secp256k1_ge tmpa; + secp256k1_fe Z; + +#ifdef USE_ENDOMORPHISM + secp256k1_ge pre_a_lam[ECMULT_TABLE_SIZE(WINDOW_A)]; + int wnaf_1[1 + WNAF_SIZE(WINDOW_A - 1)]; + int wnaf_lam[1 + WNAF_SIZE(WINDOW_A - 1)]; + int skew_1; + int skew_lam; + secp256k1_scalar q_1, q_lam; +#else + int wnaf[1 + WNAF_SIZE(WINDOW_A - 1)]; +#endif + + int i; + secp256k1_scalar sc = *scalar; + + /* build wnaf representation for q. */ +#ifdef USE_ENDOMORPHISM + /* split q into q_1 and q_lam (where q = q_1 + q_lam*lambda, and q_1 and q_lam are ~128 bit) */ + secp256k1_scalar_split_lambda(&q_1, &q_lam, &sc); + /* no need for zero correction when using endomorphism since even + * numbers have one added to them anyway */ + skew_1 = secp256k1_wnaf_const(wnaf_1, q_1, WINDOW_A - 1); + skew_lam = secp256k1_wnaf_const(wnaf_lam, q_lam, WINDOW_A - 1); +#else + int is_zero = secp256k1_scalar_is_zero(scalar); + /* the wNAF ladder cannot handle zero, so bump this to one .. we will + * correct the result after the fact */ + sc.d[0] += is_zero; + VERIFY_CHECK(!secp256k1_scalar_is_zero(&sc)); + + secp256k1_wnaf_const(wnaf, sc, WINDOW_A - 1); +#endif + + /* Calculate odd multiples of a. + * All multiples are brought to the same Z 'denominator', which is stored + * in Z. Due to secp256k1' isomorphism we can do all operations pretending + * that the Z coordinate was 1, use affine addition formulae, and correct + * the Z coordinate of the result once at the end. + */ + secp256k1_gej_set_ge(r, a); + secp256k1_ecmult_odd_multiples_table_globalz_windowa(pre_a, &Z, r); + for (i = 0; i < ECMULT_TABLE_SIZE(WINDOW_A); i++) { + secp256k1_fe_normalize_weak(&pre_a[i].y); + } +#ifdef USE_ENDOMORPHISM + for (i = 0; i < ECMULT_TABLE_SIZE(WINDOW_A); i++) { + secp256k1_ge_mul_lambda(&pre_a_lam[i], &pre_a[i]); + } +#endif + + /* first loop iteration (separated out so we can directly set r, rather + * than having it start at infinity, get doubled several times, then have + * its new value added to it) */ +#ifdef USE_ENDOMORPHISM + i = wnaf_1[WNAF_SIZE(WINDOW_A - 1)]; + VERIFY_CHECK(i != 0); + ECMULT_CONST_TABLE_GET_GE(&tmpa, pre_a, i, WINDOW_A); + secp256k1_gej_set_ge(r, &tmpa); + + i = wnaf_lam[WNAF_SIZE(WINDOW_A - 1)]; + VERIFY_CHECK(i != 0); + ECMULT_CONST_TABLE_GET_GE(&tmpa, pre_a_lam, i, WINDOW_A); + secp256k1_gej_add_ge(r, r, &tmpa); +#else + i = wnaf[WNAF_SIZE(WINDOW_A - 1)]; + VERIFY_CHECK(i != 0); + ECMULT_CONST_TABLE_GET_GE(&tmpa, pre_a, i, WINDOW_A); + secp256k1_gej_set_ge(r, &tmpa); +#endif + /* remaining loop iterations */ + for (i = WNAF_SIZE(WINDOW_A - 1) - 1; i >= 0; i--) { + int n; + int j; + for (j = 0; j < WINDOW_A - 1; ++j) { + secp256k1_gej_double_nonzero(r, r, NULL); + } +#ifdef USE_ENDOMORPHISM + n = wnaf_1[i]; + ECMULT_CONST_TABLE_GET_GE(&tmpa, pre_a, n, WINDOW_A); + VERIFY_CHECK(n != 0); + secp256k1_gej_add_ge(r, r, &tmpa); + + n = wnaf_lam[i]; + ECMULT_CONST_TABLE_GET_GE(&tmpa, pre_a_lam, n, WINDOW_A); + VERIFY_CHECK(n != 0); + secp256k1_gej_add_ge(r, r, &tmpa); +#else + n = wnaf[i]; + VERIFY_CHECK(n != 0); + ECMULT_CONST_TABLE_GET_GE(&tmpa, pre_a, n, WINDOW_A); + secp256k1_gej_add_ge(r, r, &tmpa); +#endif + } + + secp256k1_fe_mul(&r->z, &r->z, &Z); + +#ifdef USE_ENDOMORPHISM + { + /* Correct for wNAF skew */ + secp256k1_ge correction = *a; + secp256k1_ge_storage correction_1_stor; + secp256k1_ge_storage correction_lam_stor; + secp256k1_ge_storage a2_stor; + secp256k1_gej tmpj; + secp256k1_gej_set_ge(&tmpj, &correction); + secp256k1_gej_double_var(&tmpj, &tmpj, NULL); + secp256k1_ge_set_gej(&correction, &tmpj); + secp256k1_ge_to_storage(&correction_1_stor, a); + secp256k1_ge_to_storage(&correction_lam_stor, a); + secp256k1_ge_to_storage(&a2_stor, &correction); + + /* For odd numbers this is 2a (so replace it), for even ones a (so no-op) */ + secp256k1_ge_storage_cmov(&correction_1_stor, &a2_stor, skew_1 == 2); + secp256k1_ge_storage_cmov(&correction_lam_stor, &a2_stor, skew_lam == 2); + + /* Apply the correction */ + secp256k1_ge_from_storage(&correction, &correction_1_stor); + secp256k1_ge_neg(&correction, &correction); + secp256k1_gej_add_ge(r, r, &correction); + + secp256k1_ge_from_storage(&correction, &correction_lam_stor); + secp256k1_ge_neg(&correction, &correction); + secp256k1_ge_mul_lambda(&correction, &correction); + secp256k1_gej_add_ge(r, r, &correction); + } +#else + /* correct for zero */ + r->infinity |= is_zero; +#endif +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/ecmult_gen.h b/crypto/secp256k1/libsecp256k1/src/ecmult_gen.h new file mode 100644 index 000000000..eb2cc9ead --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/ecmult_gen.h @@ -0,0 +1,43 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_ECMULT_GEN_ +#define _SECP256K1_ECMULT_GEN_ + +#include "scalar.h" +#include "group.h" + +typedef struct { + /* For accelerating the computation of a*G: + * To harden against timing attacks, use the following mechanism: + * * Break up the multiplicand into groups of 4 bits, called n_0, n_1, n_2, ..., n_63. + * * Compute sum(n_i * 16^i * G + U_i, i=0..63), where: + * * U_i = U * 2^i (for i=0..62) + * * U_i = U * (1-2^63) (for i=63) + * where U is a point with no known corresponding scalar. Note that sum(U_i, i=0..63) = 0. + * For each i, and each of the 16 possible values of n_i, (n_i * 16^i * G + U_i) is + * precomputed (call it prec(i, n_i)). The formula now becomes sum(prec(i, n_i), i=0..63). + * None of the resulting prec group elements have a known scalar, and neither do any of + * the intermediate sums while computing a*G. + */ + secp256k1_ge_storage (*prec)[64][16]; /* prec[j][i] = 16^j * i * G + U_i */ + secp256k1_scalar blind; + secp256k1_gej initial; +} secp256k1_ecmult_gen_context; + +static void secp256k1_ecmult_gen_context_init(secp256k1_ecmult_gen_context* ctx); +static void secp256k1_ecmult_gen_context_build(secp256k1_ecmult_gen_context* ctx, const secp256k1_callback* cb); +static void secp256k1_ecmult_gen_context_clone(secp256k1_ecmult_gen_context *dst, + const secp256k1_ecmult_gen_context* src, const secp256k1_callback* cb); +static void secp256k1_ecmult_gen_context_clear(secp256k1_ecmult_gen_context* ctx); +static int secp256k1_ecmult_gen_context_is_built(const secp256k1_ecmult_gen_context* ctx); + +/** Multiply with the generator: R = a*G */ +static void secp256k1_ecmult_gen(const secp256k1_ecmult_gen_context* ctx, secp256k1_gej *r, const secp256k1_scalar *a); + +static void secp256k1_ecmult_gen_blind(secp256k1_ecmult_gen_context *ctx, const unsigned char *seed32); + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/ecmult_gen_impl.h b/crypto/secp256k1/libsecp256k1/src/ecmult_gen_impl.h new file mode 100644 index 000000000..2ee27377f --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/ecmult_gen_impl.h @@ -0,0 +1,205 @@ +/********************************************************************** + * Copyright (c) 2013, 2014, 2015 Pieter Wuille, Gregory Maxwell * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_ECMULT_GEN_IMPL_H_ +#define _SECP256K1_ECMULT_GEN_IMPL_H_ + +#include "scalar.h" +#include "group.h" +#include "ecmult_gen.h" +#include "hash_impl.h" +#ifdef USE_ECMULT_STATIC_PRECOMPUTATION +#include "ecmult_static_context.h" +#endif +static void secp256k1_ecmult_gen_context_init(secp256k1_ecmult_gen_context *ctx) { + ctx->prec = NULL; +} + +static void secp256k1_ecmult_gen_context_build(secp256k1_ecmult_gen_context *ctx, const secp256k1_callback* cb) { +#ifndef USE_ECMULT_STATIC_PRECOMPUTATION + secp256k1_ge prec[1024]; + secp256k1_gej gj; + secp256k1_gej nums_gej; + int i, j; +#endif + + if (ctx->prec != NULL) { + return; + } +#ifndef USE_ECMULT_STATIC_PRECOMPUTATION + ctx->prec = (secp256k1_ge_storage (*)[64][16])checked_malloc(cb, sizeof(*ctx->prec)); + + /* get the generator */ + secp256k1_gej_set_ge(&gj, &secp256k1_ge_const_g); + + /* Construct a group element with no known corresponding scalar (nothing up my sleeve). */ + { + static const unsigned char nums_b32[33] = "The scalar for this x is unknown"; + secp256k1_fe nums_x; + secp256k1_ge nums_ge; + VERIFY_CHECK(secp256k1_fe_set_b32(&nums_x, nums_b32)); + VERIFY_CHECK(secp256k1_ge_set_xo_var(&nums_ge, &nums_x, 0)); + secp256k1_gej_set_ge(&nums_gej, &nums_ge); + /* Add G to make the bits in x uniformly distributed. */ + secp256k1_gej_add_ge_var(&nums_gej, &nums_gej, &secp256k1_ge_const_g, NULL); + } + + /* compute prec. */ + { + secp256k1_gej precj[1024]; /* Jacobian versions of prec. */ + secp256k1_gej gbase; + secp256k1_gej numsbase; + gbase = gj; /* 16^j * G */ + numsbase = nums_gej; /* 2^j * nums. */ + for (j = 0; j < 64; j++) { + /* Set precj[j*16 .. j*16+15] to (numsbase, numsbase + gbase, ..., numsbase + 15*gbase). */ + precj[j*16] = numsbase; + for (i = 1; i < 16; i++) { + secp256k1_gej_add_var(&precj[j*16 + i], &precj[j*16 + i - 1], &gbase, NULL); + } + /* Multiply gbase by 16. */ + for (i = 0; i < 4; i++) { + secp256k1_gej_double_var(&gbase, &gbase, NULL); + } + /* Multiply numbase by 2. */ + secp256k1_gej_double_var(&numsbase, &numsbase, NULL); + if (j == 62) { + /* In the last iteration, numsbase is (1 - 2^j) * nums instead. */ + secp256k1_gej_neg(&numsbase, &numsbase); + secp256k1_gej_add_var(&numsbase, &numsbase, &nums_gej, NULL); + } + } + secp256k1_ge_set_all_gej_var(1024, prec, precj, cb); + } + for (j = 0; j < 64; j++) { + for (i = 0; i < 16; i++) { + secp256k1_ge_to_storage(&(*ctx->prec)[j][i], &prec[j*16 + i]); + } + } +#else + (void)cb; + ctx->prec = (secp256k1_ge_storage (*)[64][16])secp256k1_ecmult_static_context; +#endif + secp256k1_ecmult_gen_blind(ctx, NULL); +} + +static int secp256k1_ecmult_gen_context_is_built(const secp256k1_ecmult_gen_context* ctx) { + return ctx->prec != NULL; +} + +static void secp256k1_ecmult_gen_context_clone(secp256k1_ecmult_gen_context *dst, + const secp256k1_ecmult_gen_context *src, const secp256k1_callback* cb) { + if (src->prec == NULL) { + dst->prec = NULL; + } else { +#ifndef USE_ECMULT_STATIC_PRECOMPUTATION + dst->prec = (secp256k1_ge_storage (*)[64][16])checked_malloc(cb, sizeof(*dst->prec)); + memcpy(dst->prec, src->prec, sizeof(*dst->prec)); +#else + (void)cb; + dst->prec = src->prec; +#endif + dst->initial = src->initial; + dst->blind = src->blind; + } +} + +static void secp256k1_ecmult_gen_context_clear(secp256k1_ecmult_gen_context *ctx) { +#ifndef USE_ECMULT_STATIC_PRECOMPUTATION + free(ctx->prec); +#endif + secp256k1_scalar_clear(&ctx->blind); + secp256k1_gej_clear(&ctx->initial); + ctx->prec = NULL; +} + +static void secp256k1_ecmult_gen(const secp256k1_ecmult_gen_context *ctx, secp256k1_gej *r, const secp256k1_scalar *gn) { + secp256k1_ge add; + secp256k1_ge_storage adds; + secp256k1_scalar gnb; + int bits; + int i, j; + memset(&adds, 0, sizeof(adds)); + *r = ctx->initial; + /* Blind scalar/point multiplication by computing (n-b)G + bG instead of nG. */ + secp256k1_scalar_add(&gnb, gn, &ctx->blind); + add.infinity = 0; + for (j = 0; j < 64; j++) { + bits = secp256k1_scalar_get_bits(&gnb, j * 4, 4); + for (i = 0; i < 16; i++) { + /** This uses a conditional move to avoid any secret data in array indexes. + * _Any_ use of secret indexes has been demonstrated to result in timing + * sidechannels, even when the cache-line access patterns are uniform. + * See also: + * "A word of warning", CHES 2013 Rump Session, by Daniel J. Bernstein and Peter Schwabe + * (https://cryptojedi.org/peter/data/chesrump-20130822.pdf) and + * "Cache Attacks and Countermeasures: the Case of AES", RSA 2006, + * by Dag Arne Osvik, Adi Shamir, and Eran Tromer + * (http://www.tau.ac.il/~tromer/papers/cache.pdf) + */ + secp256k1_ge_storage_cmov(&adds, &(*ctx->prec)[j][i], i == bits); + } + secp256k1_ge_from_storage(&add, &adds); + secp256k1_gej_add_ge(r, r, &add); + } + bits = 0; + secp256k1_ge_clear(&add); + secp256k1_scalar_clear(&gnb); +} + +/* Setup blinding values for secp256k1_ecmult_gen. */ +static void secp256k1_ecmult_gen_blind(secp256k1_ecmult_gen_context *ctx, const unsigned char *seed32) { + secp256k1_scalar b; + secp256k1_gej gb; + secp256k1_fe s; + unsigned char nonce32[32]; + secp256k1_rfc6979_hmac_sha256_t rng; + int retry; + unsigned char keydata[64] = {0}; + if (seed32 == NULL) { + /* When seed is NULL, reset the initial point and blinding value. */ + secp256k1_gej_set_ge(&ctx->initial, &secp256k1_ge_const_g); + secp256k1_gej_neg(&ctx->initial, &ctx->initial); + secp256k1_scalar_set_int(&ctx->blind, 1); + } + /* The prior blinding value (if not reset) is chained forward by including it in the hash. */ + secp256k1_scalar_get_b32(nonce32, &ctx->blind); + /** Using a CSPRNG allows a failure free interface, avoids needing large amounts of random data, + * and guards against weak or adversarial seeds. This is a simpler and safer interface than + * asking the caller for blinding values directly and expecting them to retry on failure. + */ + memcpy(keydata, nonce32, 32); + if (seed32 != NULL) { + memcpy(keydata + 32, seed32, 32); + } + secp256k1_rfc6979_hmac_sha256_initialize(&rng, keydata, seed32 ? 64 : 32); + memset(keydata, 0, sizeof(keydata)); + /* Retry for out of range results to achieve uniformity. */ + do { + secp256k1_rfc6979_hmac_sha256_generate(&rng, nonce32, 32); + retry = !secp256k1_fe_set_b32(&s, nonce32); + retry |= secp256k1_fe_is_zero(&s); + } while (retry); + /* Randomize the projection to defend against multiplier sidechannels. */ + secp256k1_gej_rescale(&ctx->initial, &s); + secp256k1_fe_clear(&s); + do { + secp256k1_rfc6979_hmac_sha256_generate(&rng, nonce32, 32); + secp256k1_scalar_set_b32(&b, nonce32, &retry); + /* A blinding value of 0 works, but would undermine the projection hardening. */ + retry |= secp256k1_scalar_is_zero(&b); + } while (retry); + secp256k1_rfc6979_hmac_sha256_finalize(&rng); + memset(nonce32, 0, 32); + secp256k1_ecmult_gen(ctx, &gb, &b); + secp256k1_scalar_negate(&b, &b); + ctx->blind = b; + ctx->initial = gb; + secp256k1_scalar_clear(&b); + secp256k1_gej_clear(&gb); +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/ecmult_impl.h b/crypto/secp256k1/libsecp256k1/src/ecmult_impl.h new file mode 100644 index 000000000..e6e5f4718 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/ecmult_impl.h @@ -0,0 +1,389 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_ECMULT_IMPL_H_ +#define _SECP256K1_ECMULT_IMPL_H_ + +#include "group.h" +#include "scalar.h" +#include "ecmult.h" + +/* optimal for 128-bit and 256-bit exponents. */ +#define WINDOW_A 5 + +/** larger numbers may result in slightly better performance, at the cost of + exponentially larger precomputed tables. */ +#ifdef USE_ENDOMORPHISM +/** Two tables for window size 15: 1.375 MiB. */ +#define WINDOW_G 15 +#else +/** One table for window size 16: 1.375 MiB. */ +#define WINDOW_G 16 +#endif + +/** The number of entries a table with precomputed multiples needs to have. */ +#define ECMULT_TABLE_SIZE(w) (1 << ((w)-2)) + +/** Fill a table 'prej' with precomputed odd multiples of a. Prej will contain + * the values [1*a,3*a,...,(2*n-1)*a], so it space for n values. zr[0] will + * contain prej[0].z / a.z. The other zr[i] values = prej[i].z / prej[i-1].z. + * Prej's Z values are undefined, except for the last value. + */ +static void secp256k1_ecmult_odd_multiples_table(int n, secp256k1_gej *prej, secp256k1_fe *zr, const secp256k1_gej *a) { + secp256k1_gej d; + secp256k1_ge a_ge, d_ge; + int i; + + VERIFY_CHECK(!a->infinity); + + secp256k1_gej_double_var(&d, a, NULL); + + /* + * Perform the additions on an isomorphism where 'd' is affine: drop the z coordinate + * of 'd', and scale the 1P starting value's x/y coordinates without changing its z. + */ + d_ge.x = d.x; + d_ge.y = d.y; + d_ge.infinity = 0; + + secp256k1_ge_set_gej_zinv(&a_ge, a, &d.z); + prej[0].x = a_ge.x; + prej[0].y = a_ge.y; + prej[0].z = a->z; + prej[0].infinity = 0; + + zr[0] = d.z; + for (i = 1; i < n; i++) { + secp256k1_gej_add_ge_var(&prej[i], &prej[i-1], &d_ge, &zr[i]); + } + + /* + * Each point in 'prej' has a z coordinate too small by a factor of 'd.z'. Only + * the final point's z coordinate is actually used though, so just update that. + */ + secp256k1_fe_mul(&prej[n-1].z, &prej[n-1].z, &d.z); +} + +/** Fill a table 'pre' with precomputed odd multiples of a. + * + * There are two versions of this function: + * - secp256k1_ecmult_odd_multiples_table_globalz_windowa which brings its + * resulting point set to a single constant Z denominator, stores the X and Y + * coordinates as ge_storage points in pre, and stores the global Z in rz. + * It only operates on tables sized for WINDOW_A wnaf multiples. + * - secp256k1_ecmult_odd_multiples_table_storage_var, which converts its + * resulting point set to actually affine points, and stores those in pre. + * It operates on tables of any size, but uses heap-allocated temporaries. + * + * To compute a*P + b*G, we compute a table for P using the first function, + * and for G using the second (which requires an inverse, but it only needs to + * happen once). + */ +static void secp256k1_ecmult_odd_multiples_table_globalz_windowa(secp256k1_ge *pre, secp256k1_fe *globalz, const secp256k1_gej *a) { + secp256k1_gej prej[ECMULT_TABLE_SIZE(WINDOW_A)]; + secp256k1_fe zr[ECMULT_TABLE_SIZE(WINDOW_A)]; + + /* Compute the odd multiples in Jacobian form. */ + secp256k1_ecmult_odd_multiples_table(ECMULT_TABLE_SIZE(WINDOW_A), prej, zr, a); + /* Bring them to the same Z denominator. */ + secp256k1_ge_globalz_set_table_gej(ECMULT_TABLE_SIZE(WINDOW_A), pre, globalz, prej, zr); +} + +static void secp256k1_ecmult_odd_multiples_table_storage_var(int n, secp256k1_ge_storage *pre, const secp256k1_gej *a, const secp256k1_callback *cb) { + secp256k1_gej *prej = (secp256k1_gej*)checked_malloc(cb, sizeof(secp256k1_gej) * n); + secp256k1_ge *prea = (secp256k1_ge*)checked_malloc(cb, sizeof(secp256k1_ge) * n); + secp256k1_fe *zr = (secp256k1_fe*)checked_malloc(cb, sizeof(secp256k1_fe) * n); + int i; + + /* Compute the odd multiples in Jacobian form. */ + secp256k1_ecmult_odd_multiples_table(n, prej, zr, a); + /* Convert them in batch to affine coordinates. */ + secp256k1_ge_set_table_gej_var(n, prea, prej, zr); + /* Convert them to compact storage form. */ + for (i = 0; i < n; i++) { + secp256k1_ge_to_storage(&pre[i], &prea[i]); + } + + free(prea); + free(prej); + free(zr); +} + +/** The following two macro retrieves a particular odd multiple from a table + * of precomputed multiples. */ +#define ECMULT_TABLE_GET_GE(r,pre,n,w) do { \ + VERIFY_CHECK(((n) & 1) == 1); \ + VERIFY_CHECK((n) >= -((1 << ((w)-1)) - 1)); \ + VERIFY_CHECK((n) <= ((1 << ((w)-1)) - 1)); \ + if ((n) > 0) { \ + *(r) = (pre)[((n)-1)/2]; \ + } else { \ + secp256k1_ge_neg((r), &(pre)[(-(n)-1)/2]); \ + } \ +} while(0) + +#define ECMULT_TABLE_GET_GE_STORAGE(r,pre,n,w) do { \ + VERIFY_CHECK(((n) & 1) == 1); \ + VERIFY_CHECK((n) >= -((1 << ((w)-1)) - 1)); \ + VERIFY_CHECK((n) <= ((1 << ((w)-1)) - 1)); \ + if ((n) > 0) { \ + secp256k1_ge_from_storage((r), &(pre)[((n)-1)/2]); \ + } else { \ + secp256k1_ge_from_storage((r), &(pre)[(-(n)-1)/2]); \ + secp256k1_ge_neg((r), (r)); \ + } \ +} while(0) + +static void secp256k1_ecmult_context_init(secp256k1_ecmult_context *ctx) { + ctx->pre_g = NULL; +#ifdef USE_ENDOMORPHISM + ctx->pre_g_128 = NULL; +#endif +} + +static void secp256k1_ecmult_context_build(secp256k1_ecmult_context *ctx, const secp256k1_callback *cb) { + secp256k1_gej gj; + + if (ctx->pre_g != NULL) { + return; + } + + /* get the generator */ + secp256k1_gej_set_ge(&gj, &secp256k1_ge_const_g); + + ctx->pre_g = (secp256k1_ge_storage (*)[])checked_malloc(cb, sizeof((*ctx->pre_g)[0]) * ECMULT_TABLE_SIZE(WINDOW_G)); + + /* precompute the tables with odd multiples */ + secp256k1_ecmult_odd_multiples_table_storage_var(ECMULT_TABLE_SIZE(WINDOW_G), *ctx->pre_g, &gj, cb); + +#ifdef USE_ENDOMORPHISM + { + secp256k1_gej g_128j; + int i; + + ctx->pre_g_128 = (secp256k1_ge_storage (*)[])checked_malloc(cb, sizeof((*ctx->pre_g_128)[0]) * ECMULT_TABLE_SIZE(WINDOW_G)); + + /* calculate 2^128*generator */ + g_128j = gj; + for (i = 0; i < 128; i++) { + secp256k1_gej_double_var(&g_128j, &g_128j, NULL); + } + secp256k1_ecmult_odd_multiples_table_storage_var(ECMULT_TABLE_SIZE(WINDOW_G), *ctx->pre_g_128, &g_128j, cb); + } +#endif +} + +static void secp256k1_ecmult_context_clone(secp256k1_ecmult_context *dst, + const secp256k1_ecmult_context *src, const secp256k1_callback *cb) { + if (src->pre_g == NULL) { + dst->pre_g = NULL; + } else { + size_t size = sizeof((*dst->pre_g)[0]) * ECMULT_TABLE_SIZE(WINDOW_G); + dst->pre_g = (secp256k1_ge_storage (*)[])checked_malloc(cb, size); + memcpy(dst->pre_g, src->pre_g, size); + } +#ifdef USE_ENDOMORPHISM + if (src->pre_g_128 == NULL) { + dst->pre_g_128 = NULL; + } else { + size_t size = sizeof((*dst->pre_g_128)[0]) * ECMULT_TABLE_SIZE(WINDOW_G); + dst->pre_g_128 = (secp256k1_ge_storage (*)[])checked_malloc(cb, size); + memcpy(dst->pre_g_128, src->pre_g_128, size); + } +#endif +} + +static int secp256k1_ecmult_context_is_built(const secp256k1_ecmult_context *ctx) { + return ctx->pre_g != NULL; +} + +static void secp256k1_ecmult_context_clear(secp256k1_ecmult_context *ctx) { + free(ctx->pre_g); +#ifdef USE_ENDOMORPHISM + free(ctx->pre_g_128); +#endif + secp256k1_ecmult_context_init(ctx); +} + +/** Convert a number to WNAF notation. The number becomes represented by sum(2^i * wnaf[i], i=0..bits), + * with the following guarantees: + * - each wnaf[i] is either 0, or an odd integer between -(1<<(w-1) - 1) and (1<<(w-1) - 1) + * - two non-zero entries in wnaf are separated by at least w-1 zeroes. + * - the number of set values in wnaf is returned. This number is at most 256, and at most one more + * than the number of bits in the (absolute value) of the input. + */ +static int secp256k1_ecmult_wnaf(int *wnaf, int len, const secp256k1_scalar *a, int w) { + secp256k1_scalar s = *a; + int last_set_bit = -1; + int bit = 0; + int sign = 1; + int carry = 0; + + VERIFY_CHECK(wnaf != NULL); + VERIFY_CHECK(0 <= len && len <= 256); + VERIFY_CHECK(a != NULL); + VERIFY_CHECK(2 <= w && w <= 31); + + memset(wnaf, 0, len * sizeof(wnaf[0])); + + if (secp256k1_scalar_get_bits(&s, 255, 1)) { + secp256k1_scalar_negate(&s, &s); + sign = -1; + } + + while (bit < len) { + int now; + int word; + if (secp256k1_scalar_get_bits(&s, bit, 1) == (unsigned int)carry) { + bit++; + continue; + } + + now = w; + if (now > len - bit) { + now = len - bit; + } + + word = secp256k1_scalar_get_bits_var(&s, bit, now) + carry; + + carry = (word >> (w-1)) & 1; + word -= carry << w; + + wnaf[bit] = sign * word; + last_set_bit = bit; + + bit += now; + } +#ifdef VERIFY + CHECK(carry == 0); + while (bit < 256) { + CHECK(secp256k1_scalar_get_bits(&s, bit++, 1) == 0); + } +#endif + return last_set_bit + 1; +} + +static void secp256k1_ecmult(const secp256k1_ecmult_context *ctx, secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_scalar *na, const secp256k1_scalar *ng) { + secp256k1_ge pre_a[ECMULT_TABLE_SIZE(WINDOW_A)]; + secp256k1_ge tmpa; + secp256k1_fe Z; +#ifdef USE_ENDOMORPHISM + secp256k1_ge pre_a_lam[ECMULT_TABLE_SIZE(WINDOW_A)]; + secp256k1_scalar na_1, na_lam; + /* Splitted G factors. */ + secp256k1_scalar ng_1, ng_128; + int wnaf_na_1[130]; + int wnaf_na_lam[130]; + int bits_na_1; + int bits_na_lam; + int wnaf_ng_1[129]; + int bits_ng_1; + int wnaf_ng_128[129]; + int bits_ng_128; +#else + int wnaf_na[256]; + int bits_na; + int wnaf_ng[256]; + int bits_ng; +#endif + int i; + int bits; + +#ifdef USE_ENDOMORPHISM + /* split na into na_1 and na_lam (where na = na_1 + na_lam*lambda, and na_1 and na_lam are ~128 bit) */ + secp256k1_scalar_split_lambda(&na_1, &na_lam, na); + + /* build wnaf representation for na_1 and na_lam. */ + bits_na_1 = secp256k1_ecmult_wnaf(wnaf_na_1, 130, &na_1, WINDOW_A); + bits_na_lam = secp256k1_ecmult_wnaf(wnaf_na_lam, 130, &na_lam, WINDOW_A); + VERIFY_CHECK(bits_na_1 <= 130); + VERIFY_CHECK(bits_na_lam <= 130); + bits = bits_na_1; + if (bits_na_lam > bits) { + bits = bits_na_lam; + } +#else + /* build wnaf representation for na. */ + bits_na = secp256k1_ecmult_wnaf(wnaf_na, 256, na, WINDOW_A); + bits = bits_na; +#endif + + /* Calculate odd multiples of a. + * All multiples are brought to the same Z 'denominator', which is stored + * in Z. Due to secp256k1' isomorphism we can do all operations pretending + * that the Z coordinate was 1, use affine addition formulae, and correct + * the Z coordinate of the result once at the end. + * The exception is the precomputed G table points, which are actually + * affine. Compared to the base used for other points, they have a Z ratio + * of 1/Z, so we can use secp256k1_gej_add_zinv_var, which uses the same + * isomorphism to efficiently add with a known Z inverse. + */ + secp256k1_ecmult_odd_multiples_table_globalz_windowa(pre_a, &Z, a); + +#ifdef USE_ENDOMORPHISM + for (i = 0; i < ECMULT_TABLE_SIZE(WINDOW_A); i++) { + secp256k1_ge_mul_lambda(&pre_a_lam[i], &pre_a[i]); + } + + /* split ng into ng_1 and ng_128 (where gn = gn_1 + gn_128*2^128, and gn_1 and gn_128 are ~128 bit) */ + secp256k1_scalar_split_128(&ng_1, &ng_128, ng); + + /* Build wnaf representation for ng_1 and ng_128 */ + bits_ng_1 = secp256k1_ecmult_wnaf(wnaf_ng_1, 129, &ng_1, WINDOW_G); + bits_ng_128 = secp256k1_ecmult_wnaf(wnaf_ng_128, 129, &ng_128, WINDOW_G); + if (bits_ng_1 > bits) { + bits = bits_ng_1; + } + if (bits_ng_128 > bits) { + bits = bits_ng_128; + } +#else + bits_ng = secp256k1_ecmult_wnaf(wnaf_ng, 256, ng, WINDOW_G); + if (bits_ng > bits) { + bits = bits_ng; + } +#endif + + secp256k1_gej_set_infinity(r); + + for (i = bits - 1; i >= 0; i--) { + int n; + secp256k1_gej_double_var(r, r, NULL); +#ifdef USE_ENDOMORPHISM + if (i < bits_na_1 && (n = wnaf_na_1[i])) { + ECMULT_TABLE_GET_GE(&tmpa, pre_a, n, WINDOW_A); + secp256k1_gej_add_ge_var(r, r, &tmpa, NULL); + } + if (i < bits_na_lam && (n = wnaf_na_lam[i])) { + ECMULT_TABLE_GET_GE(&tmpa, pre_a_lam, n, WINDOW_A); + secp256k1_gej_add_ge_var(r, r, &tmpa, NULL); + } + if (i < bits_ng_1 && (n = wnaf_ng_1[i])) { + ECMULT_TABLE_GET_GE_STORAGE(&tmpa, *ctx->pre_g, n, WINDOW_G); + secp256k1_gej_add_zinv_var(r, r, &tmpa, &Z); + } + if (i < bits_ng_128 && (n = wnaf_ng_128[i])) { + ECMULT_TABLE_GET_GE_STORAGE(&tmpa, *ctx->pre_g_128, n, WINDOW_G); + secp256k1_gej_add_zinv_var(r, r, &tmpa, &Z); + } +#else + if (i < bits_na && (n = wnaf_na[i])) { + ECMULT_TABLE_GET_GE(&tmpa, pre_a, n, WINDOW_A); + secp256k1_gej_add_ge_var(r, r, &tmpa, NULL); + } + if (i < bits_ng && (n = wnaf_ng[i])) { + ECMULT_TABLE_GET_GE_STORAGE(&tmpa, *ctx->pre_g, n, WINDOW_G); + secp256k1_gej_add_zinv_var(r, r, &tmpa, &Z); + } +#endif + } + + if (!r->infinity) { + secp256k1_fe_mul(&r->z, &r->z, &Z); + } +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/field.h b/crypto/secp256k1/libsecp256k1/src/field.h new file mode 100644 index 000000000..311329b92 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/field.h @@ -0,0 +1,119 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_FIELD_ +#define _SECP256K1_FIELD_ + +/** Field element module. + * + * Field elements can be represented in several ways, but code accessing + * it (and implementations) need to take certain properaties into account: + * - Each field element can be normalized or not. + * - Each field element has a magnitude, which represents how far away + * its representation is away from normalization. Normalized elements + * always have a magnitude of 1, but a magnitude of 1 doesn't imply + * normality. + */ + +#if defined HAVE_CONFIG_H +#include "libsecp256k1-config.h" +#endif + +#if defined(USE_FIELD_10X26) +#include "field_10x26.h" +#elif defined(USE_FIELD_5X52) +#include "field_5x52.h" +#else +#error "Please select field implementation" +#endif + +/** Normalize a field element. */ +static void secp256k1_fe_normalize(secp256k1_fe *r); + +/** Weakly normalize a field element: reduce it magnitude to 1, but don't fully normalize. */ +static void secp256k1_fe_normalize_weak(secp256k1_fe *r); + +/** Normalize a field element, without constant-time guarantee. */ +static void secp256k1_fe_normalize_var(secp256k1_fe *r); + +/** Verify whether a field element represents zero i.e. would normalize to a zero value. The field + * implementation may optionally normalize the input, but this should not be relied upon. */ +static int secp256k1_fe_normalizes_to_zero(secp256k1_fe *r); + +/** Verify whether a field element represents zero i.e. would normalize to a zero value. The field + * implementation may optionally normalize the input, but this should not be relied upon. */ +static int secp256k1_fe_normalizes_to_zero_var(secp256k1_fe *r); + +/** Set a field element equal to a small integer. Resulting field element is normalized. */ +static void secp256k1_fe_set_int(secp256k1_fe *r, int a); + +/** Verify whether a field element is zero. Requires the input to be normalized. */ +static int secp256k1_fe_is_zero(const secp256k1_fe *a); + +/** Check the "oddness" of a field element. Requires the input to be normalized. */ +static int secp256k1_fe_is_odd(const secp256k1_fe *a); + +/** Compare two field elements. Requires magnitude-1 inputs. */ +static int secp256k1_fe_equal_var(const secp256k1_fe *a, const secp256k1_fe *b); + +/** Compare two field elements. Requires both inputs to be normalized */ +static int secp256k1_fe_cmp_var(const secp256k1_fe *a, const secp256k1_fe *b); + +/** Set a field element equal to 32-byte big endian value. If successful, the resulting field element is normalized. */ +static int secp256k1_fe_set_b32(secp256k1_fe *r, const unsigned char *a); + +/** Convert a field element to a 32-byte big endian value. Requires the input to be normalized */ +static void secp256k1_fe_get_b32(unsigned char *r, const secp256k1_fe *a); + +/** Set a field element equal to the additive inverse of another. Takes a maximum magnitude of the input + * as an argument. The magnitude of the output is one higher. */ +static void secp256k1_fe_negate(secp256k1_fe *r, const secp256k1_fe *a, int m); + +/** Multiplies the passed field element with a small integer constant. Multiplies the magnitude by that + * small integer. */ +static void secp256k1_fe_mul_int(secp256k1_fe *r, int a); + +/** Adds a field element to another. The result has the sum of the inputs' magnitudes as magnitude. */ +static void secp256k1_fe_add(secp256k1_fe *r, const secp256k1_fe *a); + +/** Sets a field element to be the product of two others. Requires the inputs' magnitudes to be at most 8. + * The output magnitude is 1 (but not guaranteed to be normalized). */ +static void secp256k1_fe_mul(secp256k1_fe *r, const secp256k1_fe *a, const secp256k1_fe * SECP256K1_RESTRICT b); + +/** Sets a field element to be the square of another. Requires the input's magnitude to be at most 8. + * The output magnitude is 1 (but not guaranteed to be normalized). */ +static void secp256k1_fe_sqr(secp256k1_fe *r, const secp256k1_fe *a); + +/** Sets a field element to be the (modular) square root (if any exist) of another. Requires the + * input's magnitude to be at most 8. The output magnitude is 1 (but not guaranteed to be + * normalized). Return value indicates whether a square root was found. */ +static int secp256k1_fe_sqrt_var(secp256k1_fe *r, const secp256k1_fe *a); + +/** Sets a field element to be the (modular) inverse of another. Requires the input's magnitude to be + * at most 8. The output magnitude is 1 (but not guaranteed to be normalized). */ +static void secp256k1_fe_inv(secp256k1_fe *r, const secp256k1_fe *a); + +/** Potentially faster version of secp256k1_fe_inv, without constant-time guarantee. */ +static void secp256k1_fe_inv_var(secp256k1_fe *r, const secp256k1_fe *a); + +/** Calculate the (modular) inverses of a batch of field elements. Requires the inputs' magnitudes to be + * at most 8. The output magnitudes are 1 (but not guaranteed to be normalized). The inputs and + * outputs must not overlap in memory. */ +static void secp256k1_fe_inv_all_var(size_t len, secp256k1_fe *r, const secp256k1_fe *a); + +/** Convert a field element to the storage type. */ +static void secp256k1_fe_to_storage(secp256k1_fe_storage *r, const secp256k1_fe *a); + +/** Convert a field element back from the storage type. */ +static void secp256k1_fe_from_storage(secp256k1_fe *r, const secp256k1_fe_storage *a); + +/** If flag is true, set *r equal to *a; otherwise leave it. Constant-time. */ +static void secp256k1_fe_storage_cmov(secp256k1_fe_storage *r, const secp256k1_fe_storage *a, int flag); + +/** If flag is true, set *r equal to *a; otherwise leave it. Constant-time. */ +static void secp256k1_fe_cmov(secp256k1_fe *r, const secp256k1_fe *a, int flag); + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/field_10x26.h b/crypto/secp256k1/libsecp256k1/src/field_10x26.h new file mode 100644 index 000000000..61ee1e096 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/field_10x26.h @@ -0,0 +1,47 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_FIELD_REPR_ +#define _SECP256K1_FIELD_REPR_ + +#include + +typedef struct { + /* X = sum(i=0..9, elem[i]*2^26) mod n */ + uint32_t n[10]; +#ifdef VERIFY + int magnitude; + int normalized; +#endif +} secp256k1_fe; + +/* Unpacks a constant into a overlapping multi-limbed FE element. */ +#define SECP256K1_FE_CONST_INNER(d7, d6, d5, d4, d3, d2, d1, d0) { \ + (d0) & 0x3FFFFFFUL, \ + (((uint32_t)d0) >> 26) | (((uint32_t)(d1) & 0xFFFFFUL) << 6), \ + (((uint32_t)d1) >> 20) | (((uint32_t)(d2) & 0x3FFFUL) << 12), \ + (((uint32_t)d2) >> 14) | (((uint32_t)(d3) & 0xFFUL) << 18), \ + (((uint32_t)d3) >> 8) | (((uint32_t)(d4) & 0x3UL) << 24), \ + (((uint32_t)d4) >> 2) & 0x3FFFFFFUL, \ + (((uint32_t)d4) >> 28) | (((uint32_t)(d5) & 0x3FFFFFUL) << 4), \ + (((uint32_t)d5) >> 22) | (((uint32_t)(d6) & 0xFFFFUL) << 10), \ + (((uint32_t)d6) >> 16) | (((uint32_t)(d7) & 0x3FFUL) << 16), \ + (((uint32_t)d7) >> 10) \ +} + +#ifdef VERIFY +#define SECP256K1_FE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {SECP256K1_FE_CONST_INNER((d7), (d6), (d5), (d4), (d3), (d2), (d1), (d0)), 1, 1} +#else +#define SECP256K1_FE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {SECP256K1_FE_CONST_INNER((d7), (d6), (d5), (d4), (d3), (d2), (d1), (d0))} +#endif + +typedef struct { + uint32_t n[8]; +} secp256k1_fe_storage; + +#define SECP256K1_FE_STORAGE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{ (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }} +#define SECP256K1_FE_STORAGE_CONST_GET(d) d.n[7], d.n[6], d.n[5], d.n[4],d.n[3], d.n[2], d.n[1], d.n[0] +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/field_10x26_impl.h b/crypto/secp256k1/libsecp256k1/src/field_10x26_impl.h new file mode 100644 index 000000000..212cc5396 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/field_10x26_impl.h @@ -0,0 +1,1138 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_FIELD_REPR_IMPL_H_ +#define _SECP256K1_FIELD_REPR_IMPL_H_ + +#include +#include +#include "util.h" +#include "num.h" +#include "field.h" + +#ifdef VERIFY +static void secp256k1_fe_verify(const secp256k1_fe *a) { + const uint32_t *d = a->n; + int m = a->normalized ? 1 : 2 * a->magnitude, r = 1; + r &= (d[0] <= 0x3FFFFFFUL * m); + r &= (d[1] <= 0x3FFFFFFUL * m); + r &= (d[2] <= 0x3FFFFFFUL * m); + r &= (d[3] <= 0x3FFFFFFUL * m); + r &= (d[4] <= 0x3FFFFFFUL * m); + r &= (d[5] <= 0x3FFFFFFUL * m); + r &= (d[6] <= 0x3FFFFFFUL * m); + r &= (d[7] <= 0x3FFFFFFUL * m); + r &= (d[8] <= 0x3FFFFFFUL * m); + r &= (d[9] <= 0x03FFFFFUL * m); + r &= (a->magnitude >= 0); + r &= (a->magnitude <= 32); + if (a->normalized) { + r &= (a->magnitude <= 1); + if (r && (d[9] == 0x03FFFFFUL)) { + uint32_t mid = d[8] & d[7] & d[6] & d[5] & d[4] & d[3] & d[2]; + if (mid == 0x3FFFFFFUL) { + r &= ((d[1] + 0x40UL + ((d[0] + 0x3D1UL) >> 26)) <= 0x3FFFFFFUL); + } + } + } + VERIFY_CHECK(r == 1); +} +#else +static void secp256k1_fe_verify(const secp256k1_fe *a) { + (void)a; +} +#endif + +static void secp256k1_fe_normalize(secp256k1_fe *r) { + uint32_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4], + t5 = r->n[5], t6 = r->n[6], t7 = r->n[7], t8 = r->n[8], t9 = r->n[9]; + + /* Reduce t9 at the start so there will be at most a single carry from the first pass */ + uint32_t m; + uint32_t x = t9 >> 22; t9 &= 0x03FFFFFUL; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x3D1UL; t1 += (x << 6); + t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL; + t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; + t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; m = t2; + t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; m &= t3; + t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; m &= t4; + t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; m &= t5; + t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; m &= t6; + t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; m &= t7; + t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; m &= t8; + + /* ... except for a possible carry at bit 22 of t9 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t9 >> 23 == 0); + + /* At most a single final reduction is needed; check if the value is >= the field characteristic */ + x = (t9 >> 22) | ((t9 == 0x03FFFFFUL) & (m == 0x3FFFFFFUL) + & ((t1 + 0x40UL + ((t0 + 0x3D1UL) >> 26)) > 0x3FFFFFFUL)); + + /* Apply the final reduction (for constant-time behaviour, we do it always) */ + t0 += x * 0x3D1UL; t1 += (x << 6); + t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL; + t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; + t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; + t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; + t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; + t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; + t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; + t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; + t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; + + /* If t9 didn't carry to bit 22 already, then it should have after any final reduction */ + VERIFY_CHECK(t9 >> 22 == x); + + /* Mask off the possible multiple of 2^256 from the final reduction */ + t9 &= 0x03FFFFFUL; + + r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4; + r->n[5] = t5; r->n[6] = t6; r->n[7] = t7; r->n[8] = t8; r->n[9] = t9; + +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; + secp256k1_fe_verify(r); +#endif +} + +static void secp256k1_fe_normalize_weak(secp256k1_fe *r) { + uint32_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4], + t5 = r->n[5], t6 = r->n[6], t7 = r->n[7], t8 = r->n[8], t9 = r->n[9]; + + /* Reduce t9 at the start so there will be at most a single carry from the first pass */ + uint32_t x = t9 >> 22; t9 &= 0x03FFFFFUL; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x3D1UL; t1 += (x << 6); + t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL; + t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; + t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; + t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; + t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; + t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; + t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; + t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; + t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; + + /* ... except for a possible carry at bit 22 of t9 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t9 >> 23 == 0); + + r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4; + r->n[5] = t5; r->n[6] = t6; r->n[7] = t7; r->n[8] = t8; r->n[9] = t9; + +#ifdef VERIFY + r->magnitude = 1; + secp256k1_fe_verify(r); +#endif +} + +static void secp256k1_fe_normalize_var(secp256k1_fe *r) { + uint32_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4], + t5 = r->n[5], t6 = r->n[6], t7 = r->n[7], t8 = r->n[8], t9 = r->n[9]; + + /* Reduce t9 at the start so there will be at most a single carry from the first pass */ + uint32_t m; + uint32_t x = t9 >> 22; t9 &= 0x03FFFFFUL; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x3D1UL; t1 += (x << 6); + t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL; + t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; + t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; m = t2; + t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; m &= t3; + t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; m &= t4; + t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; m &= t5; + t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; m &= t6; + t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; m &= t7; + t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; m &= t8; + + /* ... except for a possible carry at bit 22 of t9 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t9 >> 23 == 0); + + /* At most a single final reduction is needed; check if the value is >= the field characteristic */ + x = (t9 >> 22) | ((t9 == 0x03FFFFFUL) & (m == 0x3FFFFFFUL) + & ((t1 + 0x40UL + ((t0 + 0x3D1UL) >> 26)) > 0x3FFFFFFUL)); + + if (x) { + t0 += 0x3D1UL; t1 += (x << 6); + t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL; + t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; + t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; + t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; + t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; + t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; + t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; + t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; + t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; + + /* If t9 didn't carry to bit 22 already, then it should have after any final reduction */ + VERIFY_CHECK(t9 >> 22 == x); + + /* Mask off the possible multiple of 2^256 from the final reduction */ + t9 &= 0x03FFFFFUL; + } + + r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4; + r->n[5] = t5; r->n[6] = t6; r->n[7] = t7; r->n[8] = t8; r->n[9] = t9; + +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; + secp256k1_fe_verify(r); +#endif +} + +static int secp256k1_fe_normalizes_to_zero(secp256k1_fe *r) { + uint32_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4], + t5 = r->n[5], t6 = r->n[6], t7 = r->n[7], t8 = r->n[8], t9 = r->n[9]; + + /* z0 tracks a possible raw value of 0, z1 tracks a possible raw value of P */ + uint32_t z0, z1; + + /* Reduce t9 at the start so there will be at most a single carry from the first pass */ + uint32_t x = t9 >> 22; t9 &= 0x03FFFFFUL; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x3D1UL; t1 += (x << 6); + t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL; z0 = t0; z1 = t0 ^ 0x3D0UL; + t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; z0 |= t1; z1 &= t1 ^ 0x40UL; + t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; z0 |= t2; z1 &= t2; + t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; z0 |= t3; z1 &= t3; + t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; z0 |= t4; z1 &= t4; + t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; z0 |= t5; z1 &= t5; + t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; z0 |= t6; z1 &= t6; + t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; z0 |= t7; z1 &= t7; + t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; z0 |= t8; z1 &= t8; + z0 |= t9; z1 &= t9 ^ 0x3C00000UL; + + /* ... except for a possible carry at bit 22 of t9 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t9 >> 23 == 0); + + return (z0 == 0) | (z1 == 0x3FFFFFFUL); +} + +static int secp256k1_fe_normalizes_to_zero_var(secp256k1_fe *r) { + uint32_t t0, t1, t2, t3, t4, t5, t6, t7, t8, t9; + uint32_t z0, z1; + uint32_t x; + + t0 = r->n[0]; + t9 = r->n[9]; + + /* Reduce t9 at the start so there will be at most a single carry from the first pass */ + x = t9 >> 22; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x3D1UL; + + /* z0 tracks a possible raw value of 0, z1 tracks a possible raw value of P */ + z0 = t0 & 0x3FFFFFFUL; + z1 = z0 ^ 0x3D0UL; + + /* Fast return path should catch the majority of cases */ + if ((z0 != 0UL) & (z1 != 0x3FFFFFFUL)) { + return 0; + } + + t1 = r->n[1]; + t2 = r->n[2]; + t3 = r->n[3]; + t4 = r->n[4]; + t5 = r->n[5]; + t6 = r->n[6]; + t7 = r->n[7]; + t8 = r->n[8]; + + t9 &= 0x03FFFFFUL; + t1 += (x << 6); + + t1 += (t0 >> 26); + t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; z0 |= t1; z1 &= t1 ^ 0x40UL; + t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; z0 |= t2; z1 &= t2; + t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; z0 |= t3; z1 &= t3; + t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; z0 |= t4; z1 &= t4; + t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; z0 |= t5; z1 &= t5; + t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; z0 |= t6; z1 &= t6; + t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; z0 |= t7; z1 &= t7; + t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; z0 |= t8; z1 &= t8; + z0 |= t9; z1 &= t9 ^ 0x3C00000UL; + + /* ... except for a possible carry at bit 22 of t9 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t9 >> 23 == 0); + + return (z0 == 0) | (z1 == 0x3FFFFFFUL); +} + +SECP256K1_INLINE static void secp256k1_fe_set_int(secp256k1_fe *r, int a) { + r->n[0] = a; + r->n[1] = r->n[2] = r->n[3] = r->n[4] = r->n[5] = r->n[6] = r->n[7] = r->n[8] = r->n[9] = 0; +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; + secp256k1_fe_verify(r); +#endif +} + +SECP256K1_INLINE static int secp256k1_fe_is_zero(const secp256k1_fe *a) { + const uint32_t *t = a->n; +#ifdef VERIFY + VERIFY_CHECK(a->normalized); + secp256k1_fe_verify(a); +#endif + return (t[0] | t[1] | t[2] | t[3] | t[4] | t[5] | t[6] | t[7] | t[8] | t[9]) == 0; +} + +SECP256K1_INLINE static int secp256k1_fe_is_odd(const secp256k1_fe *a) { +#ifdef VERIFY + VERIFY_CHECK(a->normalized); + secp256k1_fe_verify(a); +#endif + return a->n[0] & 1; +} + +SECP256K1_INLINE static void secp256k1_fe_clear(secp256k1_fe *a) { + int i; +#ifdef VERIFY + a->magnitude = 0; + a->normalized = 1; +#endif + for (i=0; i<10; i++) { + a->n[i] = 0; + } +} + +static int secp256k1_fe_cmp_var(const secp256k1_fe *a, const secp256k1_fe *b) { + int i; +#ifdef VERIFY + VERIFY_CHECK(a->normalized); + VERIFY_CHECK(b->normalized); + secp256k1_fe_verify(a); + secp256k1_fe_verify(b); +#endif + for (i = 9; i >= 0; i--) { + if (a->n[i] > b->n[i]) { + return 1; + } + if (a->n[i] < b->n[i]) { + return -1; + } + } + return 0; +} + +static int secp256k1_fe_set_b32(secp256k1_fe *r, const unsigned char *a) { + int i; + r->n[0] = r->n[1] = r->n[2] = r->n[3] = r->n[4] = 0; + r->n[5] = r->n[6] = r->n[7] = r->n[8] = r->n[9] = 0; + for (i=0; i<32; i++) { + int j; + for (j=0; j<4; j++) { + int limb = (8*i+2*j)/26; + int shift = (8*i+2*j)%26; + r->n[limb] |= (uint32_t)((a[31-i] >> (2*j)) & 0x3) << shift; + } + } + if (r->n[9] == 0x3FFFFFUL && (r->n[8] & r->n[7] & r->n[6] & r->n[5] & r->n[4] & r->n[3] & r->n[2]) == 0x3FFFFFFUL && (r->n[1] + 0x40UL + ((r->n[0] + 0x3D1UL) >> 26)) > 0x3FFFFFFUL) { + return 0; + } +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; + secp256k1_fe_verify(r); +#endif + return 1; +} + +/** Convert a field element to a 32-byte big endian value. Requires the input to be normalized */ +static void secp256k1_fe_get_b32(unsigned char *r, const secp256k1_fe *a) { + int i; +#ifdef VERIFY + VERIFY_CHECK(a->normalized); + secp256k1_fe_verify(a); +#endif + for (i=0; i<32; i++) { + int j; + int c = 0; + for (j=0; j<4; j++) { + int limb = (8*i+2*j)/26; + int shift = (8*i+2*j)%26; + c |= ((a->n[limb] >> shift) & 0x3) << (2 * j); + } + r[31-i] = c; + } +} + +SECP256K1_INLINE static void secp256k1_fe_negate(secp256k1_fe *r, const secp256k1_fe *a, int m) { +#ifdef VERIFY + VERIFY_CHECK(a->magnitude <= m); + secp256k1_fe_verify(a); +#endif + r->n[0] = 0x3FFFC2FUL * 2 * (m + 1) - a->n[0]; + r->n[1] = 0x3FFFFBFUL * 2 * (m + 1) - a->n[1]; + r->n[2] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[2]; + r->n[3] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[3]; + r->n[4] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[4]; + r->n[5] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[5]; + r->n[6] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[6]; + r->n[7] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[7]; + r->n[8] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[8]; + r->n[9] = 0x03FFFFFUL * 2 * (m + 1) - a->n[9]; +#ifdef VERIFY + r->magnitude = m + 1; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +SECP256K1_INLINE static void secp256k1_fe_mul_int(secp256k1_fe *r, int a) { + r->n[0] *= a; + r->n[1] *= a; + r->n[2] *= a; + r->n[3] *= a; + r->n[4] *= a; + r->n[5] *= a; + r->n[6] *= a; + r->n[7] *= a; + r->n[8] *= a; + r->n[9] *= a; +#ifdef VERIFY + r->magnitude *= a; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +SECP256K1_INLINE static void secp256k1_fe_add(secp256k1_fe *r, const secp256k1_fe *a) { +#ifdef VERIFY + secp256k1_fe_verify(a); +#endif + r->n[0] += a->n[0]; + r->n[1] += a->n[1]; + r->n[2] += a->n[2]; + r->n[3] += a->n[3]; + r->n[4] += a->n[4]; + r->n[5] += a->n[5]; + r->n[6] += a->n[6]; + r->n[7] += a->n[7]; + r->n[8] += a->n[8]; + r->n[9] += a->n[9]; +#ifdef VERIFY + r->magnitude += a->magnitude; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +#ifdef VERIFY +#define VERIFY_BITS(x, n) VERIFY_CHECK(((x) >> (n)) == 0) +#else +#define VERIFY_BITS(x, n) do { } while(0) +#endif + +SECP256K1_INLINE static void secp256k1_fe_mul_inner(uint32_t *r, const uint32_t *a, const uint32_t * SECP256K1_RESTRICT b) { + uint64_t c, d; + uint64_t u0, u1, u2, u3, u4, u5, u6, u7, u8; + uint32_t t9, t1, t0, t2, t3, t4, t5, t6, t7; + const uint32_t M = 0x3FFFFFFUL, R0 = 0x3D10UL, R1 = 0x400UL; + + VERIFY_BITS(a[0], 30); + VERIFY_BITS(a[1], 30); + VERIFY_BITS(a[2], 30); + VERIFY_BITS(a[3], 30); + VERIFY_BITS(a[4], 30); + VERIFY_BITS(a[5], 30); + VERIFY_BITS(a[6], 30); + VERIFY_BITS(a[7], 30); + VERIFY_BITS(a[8], 30); + VERIFY_BITS(a[9], 26); + VERIFY_BITS(b[0], 30); + VERIFY_BITS(b[1], 30); + VERIFY_BITS(b[2], 30); + VERIFY_BITS(b[3], 30); + VERIFY_BITS(b[4], 30); + VERIFY_BITS(b[5], 30); + VERIFY_BITS(b[6], 30); + VERIFY_BITS(b[7], 30); + VERIFY_BITS(b[8], 30); + VERIFY_BITS(b[9], 26); + + /** [... a b c] is a shorthand for ... + a<<52 + b<<26 + c<<0 mod n. + * px is a shorthand for sum(a[i]*b[x-i], i=0..x). + * Note that [x 0 0 0 0 0 0 0 0 0 0] = [x*R1 x*R0]. + */ + + d = (uint64_t)a[0] * b[9] + + (uint64_t)a[1] * b[8] + + (uint64_t)a[2] * b[7] + + (uint64_t)a[3] * b[6] + + (uint64_t)a[4] * b[5] + + (uint64_t)a[5] * b[4] + + (uint64_t)a[6] * b[3] + + (uint64_t)a[7] * b[2] + + (uint64_t)a[8] * b[1] + + (uint64_t)a[9] * b[0]; + /* VERIFY_BITS(d, 64); */ + /* [d 0 0 0 0 0 0 0 0 0] = [p9 0 0 0 0 0 0 0 0 0] */ + t9 = d & M; d >>= 26; + VERIFY_BITS(t9, 26); + VERIFY_BITS(d, 38); + /* [d t9 0 0 0 0 0 0 0 0 0] = [p9 0 0 0 0 0 0 0 0 0] */ + + c = (uint64_t)a[0] * b[0]; + VERIFY_BITS(c, 60); + /* [d t9 0 0 0 0 0 0 0 0 c] = [p9 0 0 0 0 0 0 0 0 p0] */ + d += (uint64_t)a[1] * b[9] + + (uint64_t)a[2] * b[8] + + (uint64_t)a[3] * b[7] + + (uint64_t)a[4] * b[6] + + (uint64_t)a[5] * b[5] + + (uint64_t)a[6] * b[4] + + (uint64_t)a[7] * b[3] + + (uint64_t)a[8] * b[2] + + (uint64_t)a[9] * b[1]; + VERIFY_BITS(d, 63); + /* [d t9 0 0 0 0 0 0 0 0 c] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ + u0 = d & M; d >>= 26; c += u0 * R0; + VERIFY_BITS(u0, 26); + VERIFY_BITS(d, 37); + VERIFY_BITS(c, 61); + /* [d u0 t9 0 0 0 0 0 0 0 0 c-u0*R0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ + t0 = c & M; c >>= 26; c += u0 * R1; + VERIFY_BITS(t0, 26); + VERIFY_BITS(c, 37); + /* [d u0 t9 0 0 0 0 0 0 0 c-u0*R1 t0-u0*R0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ + /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ + + c += (uint64_t)a[0] * b[1] + + (uint64_t)a[1] * b[0]; + VERIFY_BITS(c, 62); + /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p10 p9 0 0 0 0 0 0 0 p1 p0] */ + d += (uint64_t)a[2] * b[9] + + (uint64_t)a[3] * b[8] + + (uint64_t)a[4] * b[7] + + (uint64_t)a[5] * b[6] + + (uint64_t)a[6] * b[5] + + (uint64_t)a[7] * b[4] + + (uint64_t)a[8] * b[3] + + (uint64_t)a[9] * b[2]; + VERIFY_BITS(d, 63); + /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ + u1 = d & M; d >>= 26; c += u1 * R0; + VERIFY_BITS(u1, 26); + VERIFY_BITS(d, 37); + VERIFY_BITS(c, 63); + /* [d u1 0 t9 0 0 0 0 0 0 0 c-u1*R0 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ + t1 = c & M; c >>= 26; c += u1 * R1; + VERIFY_BITS(t1, 26); + VERIFY_BITS(c, 38); + /* [d u1 0 t9 0 0 0 0 0 0 c-u1*R1 t1-u1*R0 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ + /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ + + c += (uint64_t)a[0] * b[2] + + (uint64_t)a[1] * b[1] + + (uint64_t)a[2] * b[0]; + VERIFY_BITS(c, 62); + /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + d += (uint64_t)a[3] * b[9] + + (uint64_t)a[4] * b[8] + + (uint64_t)a[5] * b[7] + + (uint64_t)a[6] * b[6] + + (uint64_t)a[7] * b[5] + + (uint64_t)a[8] * b[4] + + (uint64_t)a[9] * b[3]; + VERIFY_BITS(d, 63); + /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + u2 = d & M; d >>= 26; c += u2 * R0; + VERIFY_BITS(u2, 26); + VERIFY_BITS(d, 37); + VERIFY_BITS(c, 63); + /* [d u2 0 0 t9 0 0 0 0 0 0 c-u2*R0 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + t2 = c & M; c >>= 26; c += u2 * R1; + VERIFY_BITS(t2, 26); + VERIFY_BITS(c, 38); + /* [d u2 0 0 t9 0 0 0 0 0 c-u2*R1 t2-u2*R0 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + + c += (uint64_t)a[0] * b[3] + + (uint64_t)a[1] * b[2] + + (uint64_t)a[2] * b[1] + + (uint64_t)a[3] * b[0]; + VERIFY_BITS(c, 63); + /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + d += (uint64_t)a[4] * b[9] + + (uint64_t)a[5] * b[8] + + (uint64_t)a[6] * b[7] + + (uint64_t)a[7] * b[6] + + (uint64_t)a[8] * b[5] + + (uint64_t)a[9] * b[4]; + VERIFY_BITS(d, 63); + /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + u3 = d & M; d >>= 26; c += u3 * R0; + VERIFY_BITS(u3, 26); + VERIFY_BITS(d, 37); + /* VERIFY_BITS(c, 64); */ + /* [d u3 0 0 0 t9 0 0 0 0 0 c-u3*R0 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + t3 = c & M; c >>= 26; c += u3 * R1; + VERIFY_BITS(t3, 26); + VERIFY_BITS(c, 39); + /* [d u3 0 0 0 t9 0 0 0 0 c-u3*R1 t3-u3*R0 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + + c += (uint64_t)a[0] * b[4] + + (uint64_t)a[1] * b[3] + + (uint64_t)a[2] * b[2] + + (uint64_t)a[3] * b[1] + + (uint64_t)a[4] * b[0]; + VERIFY_BITS(c, 63); + /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + d += (uint64_t)a[5] * b[9] + + (uint64_t)a[6] * b[8] + + (uint64_t)a[7] * b[7] + + (uint64_t)a[8] * b[6] + + (uint64_t)a[9] * b[5]; + VERIFY_BITS(d, 62); + /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + u4 = d & M; d >>= 26; c += u4 * R0; + VERIFY_BITS(u4, 26); + VERIFY_BITS(d, 36); + /* VERIFY_BITS(c, 64); */ + /* [d u4 0 0 0 0 t9 0 0 0 0 c-u4*R0 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + t4 = c & M; c >>= 26; c += u4 * R1; + VERIFY_BITS(t4, 26); + VERIFY_BITS(c, 39); + /* [d u4 0 0 0 0 t9 0 0 0 c-u4*R1 t4-u4*R0 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + + c += (uint64_t)a[0] * b[5] + + (uint64_t)a[1] * b[4] + + (uint64_t)a[2] * b[3] + + (uint64_t)a[3] * b[2] + + (uint64_t)a[4] * b[1] + + (uint64_t)a[5] * b[0]; + VERIFY_BITS(c, 63); + /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + d += (uint64_t)a[6] * b[9] + + (uint64_t)a[7] * b[8] + + (uint64_t)a[8] * b[7] + + (uint64_t)a[9] * b[6]; + VERIFY_BITS(d, 62); + /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + u5 = d & M; d >>= 26; c += u5 * R0; + VERIFY_BITS(u5, 26); + VERIFY_BITS(d, 36); + /* VERIFY_BITS(c, 64); */ + /* [d u5 0 0 0 0 0 t9 0 0 0 c-u5*R0 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + t5 = c & M; c >>= 26; c += u5 * R1; + VERIFY_BITS(t5, 26); + VERIFY_BITS(c, 39); + /* [d u5 0 0 0 0 0 t9 0 0 c-u5*R1 t5-u5*R0 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + + c += (uint64_t)a[0] * b[6] + + (uint64_t)a[1] * b[5] + + (uint64_t)a[2] * b[4] + + (uint64_t)a[3] * b[3] + + (uint64_t)a[4] * b[2] + + (uint64_t)a[5] * b[1] + + (uint64_t)a[6] * b[0]; + VERIFY_BITS(c, 63); + /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + d += (uint64_t)a[7] * b[9] + + (uint64_t)a[8] * b[8] + + (uint64_t)a[9] * b[7]; + VERIFY_BITS(d, 61); + /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + u6 = d & M; d >>= 26; c += u6 * R0; + VERIFY_BITS(u6, 26); + VERIFY_BITS(d, 35); + /* VERIFY_BITS(c, 64); */ + /* [d u6 0 0 0 0 0 0 t9 0 0 c-u6*R0 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + t6 = c & M; c >>= 26; c += u6 * R1; + VERIFY_BITS(t6, 26); + VERIFY_BITS(c, 39); + /* [d u6 0 0 0 0 0 0 t9 0 c-u6*R1 t6-u6*R0 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + + c += (uint64_t)a[0] * b[7] + + (uint64_t)a[1] * b[6] + + (uint64_t)a[2] * b[5] + + (uint64_t)a[3] * b[4] + + (uint64_t)a[4] * b[3] + + (uint64_t)a[5] * b[2] + + (uint64_t)a[6] * b[1] + + (uint64_t)a[7] * b[0]; + /* VERIFY_BITS(c, 64); */ + VERIFY_CHECK(c <= 0x8000007C00000007ULL); + /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + d += (uint64_t)a[8] * b[9] + + (uint64_t)a[9] * b[8]; + VERIFY_BITS(d, 58); + /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + u7 = d & M; d >>= 26; c += u7 * R0; + VERIFY_BITS(u7, 26); + VERIFY_BITS(d, 32); + /* VERIFY_BITS(c, 64); */ + VERIFY_CHECK(c <= 0x800001703FFFC2F7ULL); + /* [d u7 0 0 0 0 0 0 0 t9 0 c-u7*R0 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + t7 = c & M; c >>= 26; c += u7 * R1; + VERIFY_BITS(t7, 26); + VERIFY_BITS(c, 38); + /* [d u7 0 0 0 0 0 0 0 t9 c-u7*R1 t7-u7*R0 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + + c += (uint64_t)a[0] * b[8] + + (uint64_t)a[1] * b[7] + + (uint64_t)a[2] * b[6] + + (uint64_t)a[3] * b[5] + + (uint64_t)a[4] * b[4] + + (uint64_t)a[5] * b[3] + + (uint64_t)a[6] * b[2] + + (uint64_t)a[7] * b[1] + + (uint64_t)a[8] * b[0]; + /* VERIFY_BITS(c, 64); */ + VERIFY_CHECK(c <= 0x9000007B80000008ULL); + /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + d += (uint64_t)a[9] * b[9]; + VERIFY_BITS(d, 57); + /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + u8 = d & M; d >>= 26; c += u8 * R0; + VERIFY_BITS(u8, 26); + VERIFY_BITS(d, 31); + /* VERIFY_BITS(c, 64); */ + VERIFY_CHECK(c <= 0x9000016FBFFFC2F8ULL); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 t4 t3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + + r[3] = t3; + VERIFY_BITS(r[3], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 t4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[4] = t4; + VERIFY_BITS(r[4], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[5] = t5; + VERIFY_BITS(r[5], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[6] = t6; + VERIFY_BITS(r[6], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[7] = t7; + VERIFY_BITS(r[7], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + + r[8] = c & M; c >>= 26; c += u8 * R1; + VERIFY_BITS(r[8], 26); + VERIFY_BITS(c, 39); + /* [d u8 0 0 0 0 0 0 0 0 t9+c-u8*R1 r8-u8*R0 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 0 0 0 t9+c r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + c += d * R0 + t9; + VERIFY_BITS(c, 45); + /* [d 0 0 0 0 0 0 0 0 0 c-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[9] = c & (M >> 4); c >>= 22; c += d * (R1 << 4); + VERIFY_BITS(r[9], 22); + VERIFY_BITS(c, 46); + /* [d 0 0 0 0 0 0 0 0 r9+((c-d*R1<<4)<<22)-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 0 -d*R1 r9+(c<<22)-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + + d = c * (R0 >> 4) + t0; + VERIFY_BITS(d, 56); + /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1 d-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[0] = d & M; d >>= 26; + VERIFY_BITS(r[0], 26); + VERIFY_BITS(d, 30); + /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1+d r0-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + d += c * (R1 >> 4) + t1; + VERIFY_BITS(d, 53); + VERIFY_CHECK(d <= 0x10000003FFFFBFULL); + /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 d-c*R1>>4 r0-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [r9 r8 r7 r6 r5 r4 r3 t2 d r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[1] = d & M; d >>= 26; + VERIFY_BITS(r[1], 26); + VERIFY_BITS(d, 27); + VERIFY_CHECK(d <= 0x4000000ULL); + /* [r9 r8 r7 r6 r5 r4 r3 t2+d r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + d += t2; + VERIFY_BITS(d, 27); + /* [r9 r8 r7 r6 r5 r4 r3 d r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[2] = d; + VERIFY_BITS(r[2], 27); + /* [r9 r8 r7 r6 r5 r4 r3 r2 r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ +} + +SECP256K1_INLINE static void secp256k1_fe_sqr_inner(uint32_t *r, const uint32_t *a) { + uint64_t c, d; + uint64_t u0, u1, u2, u3, u4, u5, u6, u7, u8; + uint32_t t9, t0, t1, t2, t3, t4, t5, t6, t7; + const uint32_t M = 0x3FFFFFFUL, R0 = 0x3D10UL, R1 = 0x400UL; + + VERIFY_BITS(a[0], 30); + VERIFY_BITS(a[1], 30); + VERIFY_BITS(a[2], 30); + VERIFY_BITS(a[3], 30); + VERIFY_BITS(a[4], 30); + VERIFY_BITS(a[5], 30); + VERIFY_BITS(a[6], 30); + VERIFY_BITS(a[7], 30); + VERIFY_BITS(a[8], 30); + VERIFY_BITS(a[9], 26); + + /** [... a b c] is a shorthand for ... + a<<52 + b<<26 + c<<0 mod n. + * px is a shorthand for sum(a[i]*a[x-i], i=0..x). + * Note that [x 0 0 0 0 0 0 0 0 0 0] = [x*R1 x*R0]. + */ + + d = (uint64_t)(a[0]*2) * a[9] + + (uint64_t)(a[1]*2) * a[8] + + (uint64_t)(a[2]*2) * a[7] + + (uint64_t)(a[3]*2) * a[6] + + (uint64_t)(a[4]*2) * a[5]; + /* VERIFY_BITS(d, 64); */ + /* [d 0 0 0 0 0 0 0 0 0] = [p9 0 0 0 0 0 0 0 0 0] */ + t9 = d & M; d >>= 26; + VERIFY_BITS(t9, 26); + VERIFY_BITS(d, 38); + /* [d t9 0 0 0 0 0 0 0 0 0] = [p9 0 0 0 0 0 0 0 0 0] */ + + c = (uint64_t)a[0] * a[0]; + VERIFY_BITS(c, 60); + /* [d t9 0 0 0 0 0 0 0 0 c] = [p9 0 0 0 0 0 0 0 0 p0] */ + d += (uint64_t)(a[1]*2) * a[9] + + (uint64_t)(a[2]*2) * a[8] + + (uint64_t)(a[3]*2) * a[7] + + (uint64_t)(a[4]*2) * a[6] + + (uint64_t)a[5] * a[5]; + VERIFY_BITS(d, 63); + /* [d t9 0 0 0 0 0 0 0 0 c] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ + u0 = d & M; d >>= 26; c += u0 * R0; + VERIFY_BITS(u0, 26); + VERIFY_BITS(d, 37); + VERIFY_BITS(c, 61); + /* [d u0 t9 0 0 0 0 0 0 0 0 c-u0*R0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ + t0 = c & M; c >>= 26; c += u0 * R1; + VERIFY_BITS(t0, 26); + VERIFY_BITS(c, 37); + /* [d u0 t9 0 0 0 0 0 0 0 c-u0*R1 t0-u0*R0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ + /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ + + c += (uint64_t)(a[0]*2) * a[1]; + VERIFY_BITS(c, 62); + /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p10 p9 0 0 0 0 0 0 0 p1 p0] */ + d += (uint64_t)(a[2]*2) * a[9] + + (uint64_t)(a[3]*2) * a[8] + + (uint64_t)(a[4]*2) * a[7] + + (uint64_t)(a[5]*2) * a[6]; + VERIFY_BITS(d, 63); + /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ + u1 = d & M; d >>= 26; c += u1 * R0; + VERIFY_BITS(u1, 26); + VERIFY_BITS(d, 37); + VERIFY_BITS(c, 63); + /* [d u1 0 t9 0 0 0 0 0 0 0 c-u1*R0 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ + t1 = c & M; c >>= 26; c += u1 * R1; + VERIFY_BITS(t1, 26); + VERIFY_BITS(c, 38); + /* [d u1 0 t9 0 0 0 0 0 0 c-u1*R1 t1-u1*R0 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ + /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ + + c += (uint64_t)(a[0]*2) * a[2] + + (uint64_t)a[1] * a[1]; + VERIFY_BITS(c, 62); + /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + d += (uint64_t)(a[3]*2) * a[9] + + (uint64_t)(a[4]*2) * a[8] + + (uint64_t)(a[5]*2) * a[7] + + (uint64_t)a[6] * a[6]; + VERIFY_BITS(d, 63); + /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + u2 = d & M; d >>= 26; c += u2 * R0; + VERIFY_BITS(u2, 26); + VERIFY_BITS(d, 37); + VERIFY_BITS(c, 63); + /* [d u2 0 0 t9 0 0 0 0 0 0 c-u2*R0 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + t2 = c & M; c >>= 26; c += u2 * R1; + VERIFY_BITS(t2, 26); + VERIFY_BITS(c, 38); + /* [d u2 0 0 t9 0 0 0 0 0 c-u2*R1 t2-u2*R0 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ + + c += (uint64_t)(a[0]*2) * a[3] + + (uint64_t)(a[1]*2) * a[2]; + VERIFY_BITS(c, 63); + /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + d += (uint64_t)(a[4]*2) * a[9] + + (uint64_t)(a[5]*2) * a[8] + + (uint64_t)(a[6]*2) * a[7]; + VERIFY_BITS(d, 63); + /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + u3 = d & M; d >>= 26; c += u3 * R0; + VERIFY_BITS(u3, 26); + VERIFY_BITS(d, 37); + /* VERIFY_BITS(c, 64); */ + /* [d u3 0 0 0 t9 0 0 0 0 0 c-u3*R0 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + t3 = c & M; c >>= 26; c += u3 * R1; + VERIFY_BITS(t3, 26); + VERIFY_BITS(c, 39); + /* [d u3 0 0 0 t9 0 0 0 0 c-u3*R1 t3-u3*R0 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ + + c += (uint64_t)(a[0]*2) * a[4] + + (uint64_t)(a[1]*2) * a[3] + + (uint64_t)a[2] * a[2]; + VERIFY_BITS(c, 63); + /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + d += (uint64_t)(a[5]*2) * a[9] + + (uint64_t)(a[6]*2) * a[8] + + (uint64_t)a[7] * a[7]; + VERIFY_BITS(d, 62); + /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + u4 = d & M; d >>= 26; c += u4 * R0; + VERIFY_BITS(u4, 26); + VERIFY_BITS(d, 36); + /* VERIFY_BITS(c, 64); */ + /* [d u4 0 0 0 0 t9 0 0 0 0 c-u4*R0 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + t4 = c & M; c >>= 26; c += u4 * R1; + VERIFY_BITS(t4, 26); + VERIFY_BITS(c, 39); + /* [d u4 0 0 0 0 t9 0 0 0 c-u4*R1 t4-u4*R0 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ + + c += (uint64_t)(a[0]*2) * a[5] + + (uint64_t)(a[1]*2) * a[4] + + (uint64_t)(a[2]*2) * a[3]; + VERIFY_BITS(c, 63); + /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + d += (uint64_t)(a[6]*2) * a[9] + + (uint64_t)(a[7]*2) * a[8]; + VERIFY_BITS(d, 62); + /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + u5 = d & M; d >>= 26; c += u5 * R0; + VERIFY_BITS(u5, 26); + VERIFY_BITS(d, 36); + /* VERIFY_BITS(c, 64); */ + /* [d u5 0 0 0 0 0 t9 0 0 0 c-u5*R0 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + t5 = c & M; c >>= 26; c += u5 * R1; + VERIFY_BITS(t5, 26); + VERIFY_BITS(c, 39); + /* [d u5 0 0 0 0 0 t9 0 0 c-u5*R1 t5-u5*R0 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ + + c += (uint64_t)(a[0]*2) * a[6] + + (uint64_t)(a[1]*2) * a[5] + + (uint64_t)(a[2]*2) * a[4] + + (uint64_t)a[3] * a[3]; + VERIFY_BITS(c, 63); + /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + d += (uint64_t)(a[7]*2) * a[9] + + (uint64_t)a[8] * a[8]; + VERIFY_BITS(d, 61); + /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + u6 = d & M; d >>= 26; c += u6 * R0; + VERIFY_BITS(u6, 26); + VERIFY_BITS(d, 35); + /* VERIFY_BITS(c, 64); */ + /* [d u6 0 0 0 0 0 0 t9 0 0 c-u6*R0 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + t6 = c & M; c >>= 26; c += u6 * R1; + VERIFY_BITS(t6, 26); + VERIFY_BITS(c, 39); + /* [d u6 0 0 0 0 0 0 t9 0 c-u6*R1 t6-u6*R0 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ + + c += (uint64_t)(a[0]*2) * a[7] + + (uint64_t)(a[1]*2) * a[6] + + (uint64_t)(a[2]*2) * a[5] + + (uint64_t)(a[3]*2) * a[4]; + /* VERIFY_BITS(c, 64); */ + VERIFY_CHECK(c <= 0x8000007C00000007ULL); + /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + d += (uint64_t)(a[8]*2) * a[9]; + VERIFY_BITS(d, 58); + /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + u7 = d & M; d >>= 26; c += u7 * R0; + VERIFY_BITS(u7, 26); + VERIFY_BITS(d, 32); + /* VERIFY_BITS(c, 64); */ + VERIFY_CHECK(c <= 0x800001703FFFC2F7ULL); + /* [d u7 0 0 0 0 0 0 0 t9 0 c-u7*R0 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + t7 = c & M; c >>= 26; c += u7 * R1; + VERIFY_BITS(t7, 26); + VERIFY_BITS(c, 38); + /* [d u7 0 0 0 0 0 0 0 t9 c-u7*R1 t7-u7*R0 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ + + c += (uint64_t)(a[0]*2) * a[8] + + (uint64_t)(a[1]*2) * a[7] + + (uint64_t)(a[2]*2) * a[6] + + (uint64_t)(a[3]*2) * a[5] + + (uint64_t)a[4] * a[4]; + /* VERIFY_BITS(c, 64); */ + VERIFY_CHECK(c <= 0x9000007B80000008ULL); + /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + d += (uint64_t)a[9] * a[9]; + VERIFY_BITS(d, 57); + /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + u8 = d & M; d >>= 26; c += u8 * R0; + VERIFY_BITS(u8, 26); + VERIFY_BITS(d, 31); + /* VERIFY_BITS(c, 64); */ + VERIFY_CHECK(c <= 0x9000016FBFFFC2F8ULL); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 t4 t3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + + r[3] = t3; + VERIFY_BITS(r[3], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 t4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[4] = t4; + VERIFY_BITS(r[4], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[5] = t5; + VERIFY_BITS(r[5], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[6] = t6; + VERIFY_BITS(r[6], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[7] = t7; + VERIFY_BITS(r[7], 26); + /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + + r[8] = c & M; c >>= 26; c += u8 * R1; + VERIFY_BITS(r[8], 26); + VERIFY_BITS(c, 39); + /* [d u8 0 0 0 0 0 0 0 0 t9+c-u8*R1 r8-u8*R0 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 0 0 0 t9+c r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + c += d * R0 + t9; + VERIFY_BITS(c, 45); + /* [d 0 0 0 0 0 0 0 0 0 c-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[9] = c & (M >> 4); c >>= 22; c += d * (R1 << 4); + VERIFY_BITS(r[9], 22); + VERIFY_BITS(c, 46); + /* [d 0 0 0 0 0 0 0 0 r9+((c-d*R1<<4)<<22)-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [d 0 0 0 0 0 0 0 -d*R1 r9+(c<<22)-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + + d = c * (R0 >> 4) + t0; + VERIFY_BITS(d, 56); + /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1 d-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[0] = d & M; d >>= 26; + VERIFY_BITS(r[0], 26); + VERIFY_BITS(d, 30); + /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1+d r0-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + d += c * (R1 >> 4) + t1; + VERIFY_BITS(d, 53); + VERIFY_CHECK(d <= 0x10000003FFFFBFULL); + /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 d-c*R1>>4 r0-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + /* [r9 r8 r7 r6 r5 r4 r3 t2 d r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[1] = d & M; d >>= 26; + VERIFY_BITS(r[1], 26); + VERIFY_BITS(d, 27); + VERIFY_CHECK(d <= 0x4000000ULL); + /* [r9 r8 r7 r6 r5 r4 r3 t2+d r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + d += t2; + VERIFY_BITS(d, 27); + /* [r9 r8 r7 r6 r5 r4 r3 d r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[2] = d; + VERIFY_BITS(r[2], 27); + /* [r9 r8 r7 r6 r5 r4 r3 r2 r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ +} + + +static void secp256k1_fe_mul(secp256k1_fe *r, const secp256k1_fe *a, const secp256k1_fe * SECP256K1_RESTRICT b) { +#ifdef VERIFY + VERIFY_CHECK(a->magnitude <= 8); + VERIFY_CHECK(b->magnitude <= 8); + secp256k1_fe_verify(a); + secp256k1_fe_verify(b); + VERIFY_CHECK(r != b); +#endif + secp256k1_fe_mul_inner(r->n, a->n, b->n); +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +static void secp256k1_fe_sqr(secp256k1_fe *r, const secp256k1_fe *a) { +#ifdef VERIFY + VERIFY_CHECK(a->magnitude <= 8); + secp256k1_fe_verify(a); +#endif + secp256k1_fe_sqr_inner(r->n, a->n); +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +static SECP256K1_INLINE void secp256k1_fe_cmov(secp256k1_fe *r, const secp256k1_fe *a, int flag) { + uint32_t mask0, mask1; + mask0 = flag + ~((uint32_t)0); + mask1 = ~mask0; + r->n[0] = (r->n[0] & mask0) | (a->n[0] & mask1); + r->n[1] = (r->n[1] & mask0) | (a->n[1] & mask1); + r->n[2] = (r->n[2] & mask0) | (a->n[2] & mask1); + r->n[3] = (r->n[3] & mask0) | (a->n[3] & mask1); + r->n[4] = (r->n[4] & mask0) | (a->n[4] & mask1); + r->n[5] = (r->n[5] & mask0) | (a->n[5] & mask1); + r->n[6] = (r->n[6] & mask0) | (a->n[6] & mask1); + r->n[7] = (r->n[7] & mask0) | (a->n[7] & mask1); + r->n[8] = (r->n[8] & mask0) | (a->n[8] & mask1); + r->n[9] = (r->n[9] & mask0) | (a->n[9] & mask1); +#ifdef VERIFY + if (a->magnitude > r->magnitude) { + r->magnitude = a->magnitude; + } + r->normalized &= a->normalized; +#endif +} + +static SECP256K1_INLINE void secp256k1_fe_storage_cmov(secp256k1_fe_storage *r, const secp256k1_fe_storage *a, int flag) { + uint32_t mask0, mask1; + mask0 = flag + ~((uint32_t)0); + mask1 = ~mask0; + r->n[0] = (r->n[0] & mask0) | (a->n[0] & mask1); + r->n[1] = (r->n[1] & mask0) | (a->n[1] & mask1); + r->n[2] = (r->n[2] & mask0) | (a->n[2] & mask1); + r->n[3] = (r->n[3] & mask0) | (a->n[3] & mask1); + r->n[4] = (r->n[4] & mask0) | (a->n[4] & mask1); + r->n[5] = (r->n[5] & mask0) | (a->n[5] & mask1); + r->n[6] = (r->n[6] & mask0) | (a->n[6] & mask1); + r->n[7] = (r->n[7] & mask0) | (a->n[7] & mask1); +} + +static void secp256k1_fe_to_storage(secp256k1_fe_storage *r, const secp256k1_fe *a) { +#ifdef VERIFY + VERIFY_CHECK(a->normalized); +#endif + r->n[0] = a->n[0] | a->n[1] << 26; + r->n[1] = a->n[1] >> 6 | a->n[2] << 20; + r->n[2] = a->n[2] >> 12 | a->n[3] << 14; + r->n[3] = a->n[3] >> 18 | a->n[4] << 8; + r->n[4] = a->n[4] >> 24 | a->n[5] << 2 | a->n[6] << 28; + r->n[5] = a->n[6] >> 4 | a->n[7] << 22; + r->n[6] = a->n[7] >> 10 | a->n[8] << 16; + r->n[7] = a->n[8] >> 16 | a->n[9] << 10; +} + +static SECP256K1_INLINE void secp256k1_fe_from_storage(secp256k1_fe *r, const secp256k1_fe_storage *a) { + r->n[0] = a->n[0] & 0x3FFFFFFUL; + r->n[1] = a->n[0] >> 26 | ((a->n[1] << 6) & 0x3FFFFFFUL); + r->n[2] = a->n[1] >> 20 | ((a->n[2] << 12) & 0x3FFFFFFUL); + r->n[3] = a->n[2] >> 14 | ((a->n[3] << 18) & 0x3FFFFFFUL); + r->n[4] = a->n[3] >> 8 | ((a->n[4] << 24) & 0x3FFFFFFUL); + r->n[5] = (a->n[4] >> 2) & 0x3FFFFFFUL; + r->n[6] = a->n[4] >> 28 | ((a->n[5] << 4) & 0x3FFFFFFUL); + r->n[7] = a->n[5] >> 22 | ((a->n[6] << 10) & 0x3FFFFFFUL); + r->n[8] = a->n[6] >> 16 | ((a->n[7] << 16) & 0x3FFFFFFUL); + r->n[9] = a->n[7] >> 10; +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; +#endif +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/field_5x52.h b/crypto/secp256k1/libsecp256k1/src/field_5x52.h new file mode 100644 index 000000000..8e69a560d --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/field_5x52.h @@ -0,0 +1,47 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_FIELD_REPR_ +#define _SECP256K1_FIELD_REPR_ + +#include + +typedef struct { + /* X = sum(i=0..4, elem[i]*2^52) mod n */ + uint64_t n[5]; +#ifdef VERIFY + int magnitude; + int normalized; +#endif +} secp256k1_fe; + +/* Unpacks a constant into a overlapping multi-limbed FE element. */ +#define SECP256K1_FE_CONST_INNER(d7, d6, d5, d4, d3, d2, d1, d0) { \ + (d0) | (((uint64_t)(d1) & 0xFFFFFUL) << 32), \ + ((uint64_t)(d1) >> 20) | (((uint64_t)(d2)) << 12) | (((uint64_t)(d3) & 0xFFUL) << 44), \ + ((uint64_t)(d3) >> 8) | (((uint64_t)(d4) & 0xFFFFFFFUL) << 24), \ + ((uint64_t)(d4) >> 28) | (((uint64_t)(d5)) << 4) | (((uint64_t)(d6) & 0xFFFFUL) << 36), \ + ((uint64_t)(d6) >> 16) | (((uint64_t)(d7)) << 16) \ +} + +#ifdef VERIFY +#define SECP256K1_FE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {SECP256K1_FE_CONST_INNER((d7), (d6), (d5), (d4), (d3), (d2), (d1), (d0)), 1, 1} +#else +#define SECP256K1_FE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {SECP256K1_FE_CONST_INNER((d7), (d6), (d5), (d4), (d3), (d2), (d1), (d0))} +#endif + +typedef struct { + uint64_t n[4]; +} secp256k1_fe_storage; + +#define SECP256K1_FE_STORAGE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{ \ + (d0) | (((uint64_t)(d1)) << 32), \ + (d2) | (((uint64_t)(d3)) << 32), \ + (d4) | (((uint64_t)(d5)) << 32), \ + (d6) | (((uint64_t)(d7)) << 32) \ +}} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/field_5x52_asm_impl.h b/crypto/secp256k1/libsecp256k1/src/field_5x52_asm_impl.h new file mode 100644 index 000000000..98cc004bf --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/field_5x52_asm_impl.h @@ -0,0 +1,502 @@ +/********************************************************************** + * Copyright (c) 2013-2014 Diederik Huys, Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +/** + * Changelog: + * - March 2013, Diederik Huys: original version + * - November 2014, Pieter Wuille: updated to use Peter Dettman's parallel multiplication algorithm + * - December 2014, Pieter Wuille: converted from YASM to GCC inline assembly + */ + +#ifndef _SECP256K1_FIELD_INNER5X52_IMPL_H_ +#define _SECP256K1_FIELD_INNER5X52_IMPL_H_ + +SECP256K1_INLINE static void secp256k1_fe_mul_inner(uint64_t *r, const uint64_t *a, const uint64_t * SECP256K1_RESTRICT b) { +/** + * Registers: rdx:rax = multiplication accumulator + * r9:r8 = c + * r15:rcx = d + * r10-r14 = a0-a4 + * rbx = b + * rdi = r + * rsi = a / t? + */ + uint64_t tmp1, tmp2, tmp3; +__asm__ __volatile__( + "movq 0(%%rsi),%%r10\n" + "movq 8(%%rsi),%%r11\n" + "movq 16(%%rsi),%%r12\n" + "movq 24(%%rsi),%%r13\n" + "movq 32(%%rsi),%%r14\n" + + /* d += a3 * b0 */ + "movq 0(%%rbx),%%rax\n" + "mulq %%r13\n" + "movq %%rax,%%rcx\n" + "movq %%rdx,%%r15\n" + /* d += a2 * b1 */ + "movq 8(%%rbx),%%rax\n" + "mulq %%r12\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a1 * b2 */ + "movq 16(%%rbx),%%rax\n" + "mulq %%r11\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d = a0 * b3 */ + "movq 24(%%rbx),%%rax\n" + "mulq %%r10\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* c = a4 * b4 */ + "movq 32(%%rbx),%%rax\n" + "mulq %%r14\n" + "movq %%rax,%%r8\n" + "movq %%rdx,%%r9\n" + /* d += (c & M) * R */ + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* c >>= 52 (%%r8 only) */ + "shrdq $52,%%r9,%%r8\n" + /* t3 (tmp1) = d & M */ + "movq %%rcx,%%rsi\n" + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rsi\n" + "movq %%rsi,%q1\n" + /* d >>= 52 */ + "shrdq $52,%%r15,%%rcx\n" + "xorq %%r15,%%r15\n" + /* d += a4 * b0 */ + "movq 0(%%rbx),%%rax\n" + "mulq %%r14\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a3 * b1 */ + "movq 8(%%rbx),%%rax\n" + "mulq %%r13\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a2 * b2 */ + "movq 16(%%rbx),%%rax\n" + "mulq %%r12\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a1 * b3 */ + "movq 24(%%rbx),%%rax\n" + "mulq %%r11\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a0 * b4 */ + "movq 32(%%rbx),%%rax\n" + "mulq %%r10\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += c * R */ + "movq %%r8,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* t4 = d & M (%%rsi) */ + "movq %%rcx,%%rsi\n" + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rsi\n" + /* d >>= 52 */ + "shrdq $52,%%r15,%%rcx\n" + "xorq %%r15,%%r15\n" + /* tx = t4 >> 48 (tmp3) */ + "movq %%rsi,%%rax\n" + "shrq $48,%%rax\n" + "movq %%rax,%q3\n" + /* t4 &= (M >> 4) (tmp2) */ + "movq $0xffffffffffff,%%rax\n" + "andq %%rax,%%rsi\n" + "movq %%rsi,%q2\n" + /* c = a0 * b0 */ + "movq 0(%%rbx),%%rax\n" + "mulq %%r10\n" + "movq %%rax,%%r8\n" + "movq %%rdx,%%r9\n" + /* d += a4 * b1 */ + "movq 8(%%rbx),%%rax\n" + "mulq %%r14\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a3 * b2 */ + "movq 16(%%rbx),%%rax\n" + "mulq %%r13\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a2 * b3 */ + "movq 24(%%rbx),%%rax\n" + "mulq %%r12\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a1 * b4 */ + "movq 32(%%rbx),%%rax\n" + "mulq %%r11\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* u0 = d & M (%%rsi) */ + "movq %%rcx,%%rsi\n" + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rsi\n" + /* d >>= 52 */ + "shrdq $52,%%r15,%%rcx\n" + "xorq %%r15,%%r15\n" + /* u0 = (u0 << 4) | tx (%%rsi) */ + "shlq $4,%%rsi\n" + "movq %q3,%%rax\n" + "orq %%rax,%%rsi\n" + /* c += u0 * (R >> 4) */ + "movq $0x1000003d1,%%rax\n" + "mulq %%rsi\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* r[0] = c & M */ + "movq %%r8,%%rax\n" + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rax\n" + "movq %%rax,0(%%rdi)\n" + /* c >>= 52 */ + "shrdq $52,%%r9,%%r8\n" + "xorq %%r9,%%r9\n" + /* c += a1 * b0 */ + "movq 0(%%rbx),%%rax\n" + "mulq %%r11\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* c += a0 * b1 */ + "movq 8(%%rbx),%%rax\n" + "mulq %%r10\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* d += a4 * b2 */ + "movq 16(%%rbx),%%rax\n" + "mulq %%r14\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a3 * b3 */ + "movq 24(%%rbx),%%rax\n" + "mulq %%r13\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a2 * b4 */ + "movq 32(%%rbx),%%rax\n" + "mulq %%r12\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* c += (d & M) * R */ + "movq %%rcx,%%rax\n" + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* d >>= 52 */ + "shrdq $52,%%r15,%%rcx\n" + "xorq %%r15,%%r15\n" + /* r[1] = c & M */ + "movq %%r8,%%rax\n" + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rax\n" + "movq %%rax,8(%%rdi)\n" + /* c >>= 52 */ + "shrdq $52,%%r9,%%r8\n" + "xorq %%r9,%%r9\n" + /* c += a2 * b0 */ + "movq 0(%%rbx),%%rax\n" + "mulq %%r12\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* c += a1 * b1 */ + "movq 8(%%rbx),%%rax\n" + "mulq %%r11\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* c += a0 * b2 (last use of %%r10 = a0) */ + "movq 16(%%rbx),%%rax\n" + "mulq %%r10\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* fetch t3 (%%r10, overwrites a0), t4 (%%rsi) */ + "movq %q2,%%rsi\n" + "movq %q1,%%r10\n" + /* d += a4 * b3 */ + "movq 24(%%rbx),%%rax\n" + "mulq %%r14\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* d += a3 * b4 */ + "movq 32(%%rbx),%%rax\n" + "mulq %%r13\n" + "addq %%rax,%%rcx\n" + "adcq %%rdx,%%r15\n" + /* c += (d & M) * R */ + "movq %%rcx,%%rax\n" + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* d >>= 52 (%%rcx only) */ + "shrdq $52,%%r15,%%rcx\n" + /* r[2] = c & M */ + "movq %%r8,%%rax\n" + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rax\n" + "movq %%rax,16(%%rdi)\n" + /* c >>= 52 */ + "shrdq $52,%%r9,%%r8\n" + "xorq %%r9,%%r9\n" + /* c += t3 */ + "addq %%r10,%%r8\n" + /* c += d * R */ + "movq %%rcx,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* r[3] = c & M */ + "movq %%r8,%%rax\n" + "movq $0xfffffffffffff,%%rdx\n" + "andq %%rdx,%%rax\n" + "movq %%rax,24(%%rdi)\n" + /* c >>= 52 (%%r8 only) */ + "shrdq $52,%%r9,%%r8\n" + /* c += t4 (%%r8 only) */ + "addq %%rsi,%%r8\n" + /* r[4] = c */ + "movq %%r8,32(%%rdi)\n" +: "+S"(a), "=m"(tmp1), "=m"(tmp2), "=m"(tmp3) +: "b"(b), "D"(r) +: "%rax", "%rcx", "%rdx", "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", "cc", "memory" +); +} + +SECP256K1_INLINE static void secp256k1_fe_sqr_inner(uint64_t *r, const uint64_t *a) { +/** + * Registers: rdx:rax = multiplication accumulator + * r9:r8 = c + * rcx:rbx = d + * r10-r14 = a0-a4 + * r15 = M (0xfffffffffffff) + * rdi = r + * rsi = a / t? + */ + uint64_t tmp1, tmp2, tmp3; +__asm__ __volatile__( + "movq 0(%%rsi),%%r10\n" + "movq 8(%%rsi),%%r11\n" + "movq 16(%%rsi),%%r12\n" + "movq 24(%%rsi),%%r13\n" + "movq 32(%%rsi),%%r14\n" + "movq $0xfffffffffffff,%%r15\n" + + /* d = (a0*2) * a3 */ + "leaq (%%r10,%%r10,1),%%rax\n" + "mulq %%r13\n" + "movq %%rax,%%rbx\n" + "movq %%rdx,%%rcx\n" + /* d += (a1*2) * a2 */ + "leaq (%%r11,%%r11,1),%%rax\n" + "mulq %%r12\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* c = a4 * a4 */ + "movq %%r14,%%rax\n" + "mulq %%r14\n" + "movq %%rax,%%r8\n" + "movq %%rdx,%%r9\n" + /* d += (c & M) * R */ + "andq %%r15,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* c >>= 52 (%%r8 only) */ + "shrdq $52,%%r9,%%r8\n" + /* t3 (tmp1) = d & M */ + "movq %%rbx,%%rsi\n" + "andq %%r15,%%rsi\n" + "movq %%rsi,%q1\n" + /* d >>= 52 */ + "shrdq $52,%%rcx,%%rbx\n" + "xorq %%rcx,%%rcx\n" + /* a4 *= 2 */ + "addq %%r14,%%r14\n" + /* d += a0 * a4 */ + "movq %%r10,%%rax\n" + "mulq %%r14\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* d+= (a1*2) * a3 */ + "leaq (%%r11,%%r11,1),%%rax\n" + "mulq %%r13\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* d += a2 * a2 */ + "movq %%r12,%%rax\n" + "mulq %%r12\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* d += c * R */ + "movq %%r8,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* t4 = d & M (%%rsi) */ + "movq %%rbx,%%rsi\n" + "andq %%r15,%%rsi\n" + /* d >>= 52 */ + "shrdq $52,%%rcx,%%rbx\n" + "xorq %%rcx,%%rcx\n" + /* tx = t4 >> 48 (tmp3) */ + "movq %%rsi,%%rax\n" + "shrq $48,%%rax\n" + "movq %%rax,%q3\n" + /* t4 &= (M >> 4) (tmp2) */ + "movq $0xffffffffffff,%%rax\n" + "andq %%rax,%%rsi\n" + "movq %%rsi,%q2\n" + /* c = a0 * a0 */ + "movq %%r10,%%rax\n" + "mulq %%r10\n" + "movq %%rax,%%r8\n" + "movq %%rdx,%%r9\n" + /* d += a1 * a4 */ + "movq %%r11,%%rax\n" + "mulq %%r14\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* d += (a2*2) * a3 */ + "leaq (%%r12,%%r12,1),%%rax\n" + "mulq %%r13\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* u0 = d & M (%%rsi) */ + "movq %%rbx,%%rsi\n" + "andq %%r15,%%rsi\n" + /* d >>= 52 */ + "shrdq $52,%%rcx,%%rbx\n" + "xorq %%rcx,%%rcx\n" + /* u0 = (u0 << 4) | tx (%%rsi) */ + "shlq $4,%%rsi\n" + "movq %q3,%%rax\n" + "orq %%rax,%%rsi\n" + /* c += u0 * (R >> 4) */ + "movq $0x1000003d1,%%rax\n" + "mulq %%rsi\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* r[0] = c & M */ + "movq %%r8,%%rax\n" + "andq %%r15,%%rax\n" + "movq %%rax,0(%%rdi)\n" + /* c >>= 52 */ + "shrdq $52,%%r9,%%r8\n" + "xorq %%r9,%%r9\n" + /* a0 *= 2 */ + "addq %%r10,%%r10\n" + /* c += a0 * a1 */ + "movq %%r10,%%rax\n" + "mulq %%r11\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* d += a2 * a4 */ + "movq %%r12,%%rax\n" + "mulq %%r14\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* d += a3 * a3 */ + "movq %%r13,%%rax\n" + "mulq %%r13\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* c += (d & M) * R */ + "movq %%rbx,%%rax\n" + "andq %%r15,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* d >>= 52 */ + "shrdq $52,%%rcx,%%rbx\n" + "xorq %%rcx,%%rcx\n" + /* r[1] = c & M */ + "movq %%r8,%%rax\n" + "andq %%r15,%%rax\n" + "movq %%rax,8(%%rdi)\n" + /* c >>= 52 */ + "shrdq $52,%%r9,%%r8\n" + "xorq %%r9,%%r9\n" + /* c += a0 * a2 (last use of %%r10) */ + "movq %%r10,%%rax\n" + "mulq %%r12\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* fetch t3 (%%r10, overwrites a0),t4 (%%rsi) */ + "movq %q2,%%rsi\n" + "movq %q1,%%r10\n" + /* c += a1 * a1 */ + "movq %%r11,%%rax\n" + "mulq %%r11\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* d += a3 * a4 */ + "movq %%r13,%%rax\n" + "mulq %%r14\n" + "addq %%rax,%%rbx\n" + "adcq %%rdx,%%rcx\n" + /* c += (d & M) * R */ + "movq %%rbx,%%rax\n" + "andq %%r15,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* d >>= 52 (%%rbx only) */ + "shrdq $52,%%rcx,%%rbx\n" + /* r[2] = c & M */ + "movq %%r8,%%rax\n" + "andq %%r15,%%rax\n" + "movq %%rax,16(%%rdi)\n" + /* c >>= 52 */ + "shrdq $52,%%r9,%%r8\n" + "xorq %%r9,%%r9\n" + /* c += t3 */ + "addq %%r10,%%r8\n" + /* c += d * R */ + "movq %%rbx,%%rax\n" + "movq $0x1000003d10,%%rdx\n" + "mulq %%rdx\n" + "addq %%rax,%%r8\n" + "adcq %%rdx,%%r9\n" + /* r[3] = c & M */ + "movq %%r8,%%rax\n" + "andq %%r15,%%rax\n" + "movq %%rax,24(%%rdi)\n" + /* c >>= 52 (%%r8 only) */ + "shrdq $52,%%r9,%%r8\n" + /* c += t4 (%%r8 only) */ + "addq %%rsi,%%r8\n" + /* r[4] = c */ + "movq %%r8,32(%%rdi)\n" +: "+S"(a), "=m"(tmp1), "=m"(tmp2), "=m"(tmp3) +: "D"(r) +: "%rax", "%rbx", "%rcx", "%rdx", "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", "cc", "memory" +); +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/field_5x52_impl.h b/crypto/secp256k1/libsecp256k1/src/field_5x52_impl.h new file mode 100644 index 000000000..b31e24ab8 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/field_5x52_impl.h @@ -0,0 +1,456 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_FIELD_REPR_IMPL_H_ +#define _SECP256K1_FIELD_REPR_IMPL_H_ + +#if defined HAVE_CONFIG_H +#include "libsecp256k1-config.h" +#endif + +#include +#include "util.h" +#include "num.h" +#include "field.h" + +#if defined(USE_ASM_X86_64) +#include "field_5x52_asm_impl.h" +#else +#include "field_5x52_int128_impl.h" +#endif + +/** Implements arithmetic modulo FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE FFFFFC2F, + * represented as 5 uint64_t's in base 2^52. The values are allowed to contain >52 each. In particular, + * each FieldElem has a 'magnitude' associated with it. Internally, a magnitude M means each element + * is at most M*(2^53-1), except the most significant one, which is limited to M*(2^49-1). All operations + * accept any input with magnitude at most M, and have different rules for propagating magnitude to their + * output. + */ + +#ifdef VERIFY +static void secp256k1_fe_verify(const secp256k1_fe *a) { + const uint64_t *d = a->n; + int m = a->normalized ? 1 : 2 * a->magnitude, r = 1; + /* secp256k1 'p' value defined in "Standards for Efficient Cryptography" (SEC2) 2.7.1. */ + r &= (d[0] <= 0xFFFFFFFFFFFFFULL * m); + r &= (d[1] <= 0xFFFFFFFFFFFFFULL * m); + r &= (d[2] <= 0xFFFFFFFFFFFFFULL * m); + r &= (d[3] <= 0xFFFFFFFFFFFFFULL * m); + r &= (d[4] <= 0x0FFFFFFFFFFFFULL * m); + r &= (a->magnitude >= 0); + r &= (a->magnitude <= 2048); + if (a->normalized) { + r &= (a->magnitude <= 1); + if (r && (d[4] == 0x0FFFFFFFFFFFFULL) && ((d[3] & d[2] & d[1]) == 0xFFFFFFFFFFFFFULL)) { + r &= (d[0] < 0xFFFFEFFFFFC2FULL); + } + } + VERIFY_CHECK(r == 1); +} +#else +static void secp256k1_fe_verify(const secp256k1_fe *a) { + (void)a; +} +#endif + +static void secp256k1_fe_normalize(secp256k1_fe *r) { + uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4]; + + /* Reduce t4 at the start so there will be at most a single carry from the first pass */ + uint64_t m; + uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x1000003D1ULL; + t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; + t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; m = t1; + t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; m &= t2; + t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; m &= t3; + + /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t4 >> 49 == 0); + + /* At most a single final reduction is needed; check if the value is >= the field characteristic */ + x = (t4 >> 48) | ((t4 == 0x0FFFFFFFFFFFFULL) & (m == 0xFFFFFFFFFFFFFULL) + & (t0 >= 0xFFFFEFFFFFC2FULL)); + + /* Apply the final reduction (for constant-time behaviour, we do it always) */ + t0 += x * 0x1000003D1ULL; + t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; + t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; + t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; + t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; + + /* If t4 didn't carry to bit 48 already, then it should have after any final reduction */ + VERIFY_CHECK(t4 >> 48 == x); + + /* Mask off the possible multiple of 2^256 from the final reduction */ + t4 &= 0x0FFFFFFFFFFFFULL; + + r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4; + +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; + secp256k1_fe_verify(r); +#endif +} + +static void secp256k1_fe_normalize_weak(secp256k1_fe *r) { + uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4]; + + /* Reduce t4 at the start so there will be at most a single carry from the first pass */ + uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x1000003D1ULL; + t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; + t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; + t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; + t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; + + /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t4 >> 49 == 0); + + r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4; + +#ifdef VERIFY + r->magnitude = 1; + secp256k1_fe_verify(r); +#endif +} + +static void secp256k1_fe_normalize_var(secp256k1_fe *r) { + uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4]; + + /* Reduce t4 at the start so there will be at most a single carry from the first pass */ + uint64_t m; + uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x1000003D1ULL; + t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; + t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; m = t1; + t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; m &= t2; + t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; m &= t3; + + /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t4 >> 49 == 0); + + /* At most a single final reduction is needed; check if the value is >= the field characteristic */ + x = (t4 >> 48) | ((t4 == 0x0FFFFFFFFFFFFULL) & (m == 0xFFFFFFFFFFFFFULL) + & (t0 >= 0xFFFFEFFFFFC2FULL)); + + if (x) { + t0 += 0x1000003D1ULL; + t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; + t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; + t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; + t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; + + /* If t4 didn't carry to bit 48 already, then it should have after any final reduction */ + VERIFY_CHECK(t4 >> 48 == x); + + /* Mask off the possible multiple of 2^256 from the final reduction */ + t4 &= 0x0FFFFFFFFFFFFULL; + } + + r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4; + +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; + secp256k1_fe_verify(r); +#endif +} + +static int secp256k1_fe_normalizes_to_zero(secp256k1_fe *r) { + uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4]; + + /* z0 tracks a possible raw value of 0, z1 tracks a possible raw value of P */ + uint64_t z0, z1; + + /* Reduce t4 at the start so there will be at most a single carry from the first pass */ + uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x1000003D1ULL; + t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; z0 = t0; z1 = t0 ^ 0x1000003D0ULL; + t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; z0 |= t1; z1 &= t1; + t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; z0 |= t2; z1 &= t2; + t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; z0 |= t3; z1 &= t3; + z0 |= t4; z1 &= t4 ^ 0xF000000000000ULL; + + /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t4 >> 49 == 0); + + return (z0 == 0) | (z1 == 0xFFFFFFFFFFFFFULL); +} + +static int secp256k1_fe_normalizes_to_zero_var(secp256k1_fe *r) { + uint64_t t0, t1, t2, t3, t4; + uint64_t z0, z1; + uint64_t x; + + t0 = r->n[0]; + t4 = r->n[4]; + + /* Reduce t4 at the start so there will be at most a single carry from the first pass */ + x = t4 >> 48; + + /* The first pass ensures the magnitude is 1, ... */ + t0 += x * 0x1000003D1ULL; + + /* z0 tracks a possible raw value of 0, z1 tracks a possible raw value of P */ + z0 = t0 & 0xFFFFFFFFFFFFFULL; + z1 = z0 ^ 0x1000003D0ULL; + + /* Fast return path should catch the majority of cases */ + if ((z0 != 0ULL) & (z1 != 0xFFFFFFFFFFFFFULL)) { + return 0; + } + + t1 = r->n[1]; + t2 = r->n[2]; + t3 = r->n[3]; + + t4 &= 0x0FFFFFFFFFFFFULL; + + t1 += (t0 >> 52); + t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; z0 |= t1; z1 &= t1; + t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; z0 |= t2; z1 &= t2; + t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; z0 |= t3; z1 &= t3; + z0 |= t4; z1 &= t4 ^ 0xF000000000000ULL; + + /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */ + VERIFY_CHECK(t4 >> 49 == 0); + + return (z0 == 0) | (z1 == 0xFFFFFFFFFFFFFULL); +} + +SECP256K1_INLINE static void secp256k1_fe_set_int(secp256k1_fe *r, int a) { + r->n[0] = a; + r->n[1] = r->n[2] = r->n[3] = r->n[4] = 0; +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; + secp256k1_fe_verify(r); +#endif +} + +SECP256K1_INLINE static int secp256k1_fe_is_zero(const secp256k1_fe *a) { + const uint64_t *t = a->n; +#ifdef VERIFY + VERIFY_CHECK(a->normalized); + secp256k1_fe_verify(a); +#endif + return (t[0] | t[1] | t[2] | t[3] | t[4]) == 0; +} + +SECP256K1_INLINE static int secp256k1_fe_is_odd(const secp256k1_fe *a) { +#ifdef VERIFY + VERIFY_CHECK(a->normalized); + secp256k1_fe_verify(a); +#endif + return a->n[0] & 1; +} + +SECP256K1_INLINE static void secp256k1_fe_clear(secp256k1_fe *a) { + int i; +#ifdef VERIFY + a->magnitude = 0; + a->normalized = 1; +#endif + for (i=0; i<5; i++) { + a->n[i] = 0; + } +} + +static int secp256k1_fe_cmp_var(const secp256k1_fe *a, const secp256k1_fe *b) { + int i; +#ifdef VERIFY + VERIFY_CHECK(a->normalized); + VERIFY_CHECK(b->normalized); + secp256k1_fe_verify(a); + secp256k1_fe_verify(b); +#endif + for (i = 4; i >= 0; i--) { + if (a->n[i] > b->n[i]) { + return 1; + } + if (a->n[i] < b->n[i]) { + return -1; + } + } + return 0; +} + +static int secp256k1_fe_set_b32(secp256k1_fe *r, const unsigned char *a) { + int i; + r->n[0] = r->n[1] = r->n[2] = r->n[3] = r->n[4] = 0; + for (i=0; i<32; i++) { + int j; + for (j=0; j<2; j++) { + int limb = (8*i+4*j)/52; + int shift = (8*i+4*j)%52; + r->n[limb] |= (uint64_t)((a[31-i] >> (4*j)) & 0xF) << shift; + } + } + if (r->n[4] == 0x0FFFFFFFFFFFFULL && (r->n[3] & r->n[2] & r->n[1]) == 0xFFFFFFFFFFFFFULL && r->n[0] >= 0xFFFFEFFFFFC2FULL) { + return 0; + } +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; + secp256k1_fe_verify(r); +#endif + return 1; +} + +/** Convert a field element to a 32-byte big endian value. Requires the input to be normalized */ +static void secp256k1_fe_get_b32(unsigned char *r, const secp256k1_fe *a) { + int i; +#ifdef VERIFY + VERIFY_CHECK(a->normalized); + secp256k1_fe_verify(a); +#endif + for (i=0; i<32; i++) { + int j; + int c = 0; + for (j=0; j<2; j++) { + int limb = (8*i+4*j)/52; + int shift = (8*i+4*j)%52; + c |= ((a->n[limb] >> shift) & 0xF) << (4 * j); + } + r[31-i] = c; + } +} + +SECP256K1_INLINE static void secp256k1_fe_negate(secp256k1_fe *r, const secp256k1_fe *a, int m) { +#ifdef VERIFY + VERIFY_CHECK(a->magnitude <= m); + secp256k1_fe_verify(a); +#endif + r->n[0] = 0xFFFFEFFFFFC2FULL * 2 * (m + 1) - a->n[0]; + r->n[1] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[1]; + r->n[2] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[2]; + r->n[3] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[3]; + r->n[4] = 0x0FFFFFFFFFFFFULL * 2 * (m + 1) - a->n[4]; +#ifdef VERIFY + r->magnitude = m + 1; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +SECP256K1_INLINE static void secp256k1_fe_mul_int(secp256k1_fe *r, int a) { + r->n[0] *= a; + r->n[1] *= a; + r->n[2] *= a; + r->n[3] *= a; + r->n[4] *= a; +#ifdef VERIFY + r->magnitude *= a; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +SECP256K1_INLINE static void secp256k1_fe_add(secp256k1_fe *r, const secp256k1_fe *a) { +#ifdef VERIFY + secp256k1_fe_verify(a); +#endif + r->n[0] += a->n[0]; + r->n[1] += a->n[1]; + r->n[2] += a->n[2]; + r->n[3] += a->n[3]; + r->n[4] += a->n[4]; +#ifdef VERIFY + r->magnitude += a->magnitude; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +static void secp256k1_fe_mul(secp256k1_fe *r, const secp256k1_fe *a, const secp256k1_fe * SECP256K1_RESTRICT b) { +#ifdef VERIFY + VERIFY_CHECK(a->magnitude <= 8); + VERIFY_CHECK(b->magnitude <= 8); + secp256k1_fe_verify(a); + secp256k1_fe_verify(b); + VERIFY_CHECK(r != b); +#endif + secp256k1_fe_mul_inner(r->n, a->n, b->n); +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +static void secp256k1_fe_sqr(secp256k1_fe *r, const secp256k1_fe *a) { +#ifdef VERIFY + VERIFY_CHECK(a->magnitude <= 8); + secp256k1_fe_verify(a); +#endif + secp256k1_fe_sqr_inner(r->n, a->n); +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 0; + secp256k1_fe_verify(r); +#endif +} + +static SECP256K1_INLINE void secp256k1_fe_cmov(secp256k1_fe *r, const secp256k1_fe *a, int flag) { + uint64_t mask0, mask1; + mask0 = flag + ~((uint64_t)0); + mask1 = ~mask0; + r->n[0] = (r->n[0] & mask0) | (a->n[0] & mask1); + r->n[1] = (r->n[1] & mask0) | (a->n[1] & mask1); + r->n[2] = (r->n[2] & mask0) | (a->n[2] & mask1); + r->n[3] = (r->n[3] & mask0) | (a->n[3] & mask1); + r->n[4] = (r->n[4] & mask0) | (a->n[4] & mask1); +#ifdef VERIFY + if (a->magnitude > r->magnitude) { + r->magnitude = a->magnitude; + } + r->normalized &= a->normalized; +#endif +} + +static SECP256K1_INLINE void secp256k1_fe_storage_cmov(secp256k1_fe_storage *r, const secp256k1_fe_storage *a, int flag) { + uint64_t mask0, mask1; + mask0 = flag + ~((uint64_t)0); + mask1 = ~mask0; + r->n[0] = (r->n[0] & mask0) | (a->n[0] & mask1); + r->n[1] = (r->n[1] & mask0) | (a->n[1] & mask1); + r->n[2] = (r->n[2] & mask0) | (a->n[2] & mask1); + r->n[3] = (r->n[3] & mask0) | (a->n[3] & mask1); +} + +static void secp256k1_fe_to_storage(secp256k1_fe_storage *r, const secp256k1_fe *a) { +#ifdef VERIFY + VERIFY_CHECK(a->normalized); +#endif + r->n[0] = a->n[0] | a->n[1] << 52; + r->n[1] = a->n[1] >> 12 | a->n[2] << 40; + r->n[2] = a->n[2] >> 24 | a->n[3] << 28; + r->n[3] = a->n[3] >> 36 | a->n[4] << 16; +} + +static SECP256K1_INLINE void secp256k1_fe_from_storage(secp256k1_fe *r, const secp256k1_fe_storage *a) { + r->n[0] = a->n[0] & 0xFFFFFFFFFFFFFULL; + r->n[1] = a->n[0] >> 52 | ((a->n[1] << 12) & 0xFFFFFFFFFFFFFULL); + r->n[2] = a->n[1] >> 40 | ((a->n[2] << 24) & 0xFFFFFFFFFFFFFULL); + r->n[3] = a->n[2] >> 28 | ((a->n[3] << 36) & 0xFFFFFFFFFFFFFULL); + r->n[4] = a->n[3] >> 16; +#ifdef VERIFY + r->magnitude = 1; + r->normalized = 1; +#endif +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/field_5x52_int128_impl.h b/crypto/secp256k1/libsecp256k1/src/field_5x52_int128_impl.h new file mode 100644 index 000000000..9280bb5ea --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/field_5x52_int128_impl.h @@ -0,0 +1,277 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_FIELD_INNER5X52_IMPL_H_ +#define _SECP256K1_FIELD_INNER5X52_IMPL_H_ + +#include + +#ifdef VERIFY +#define VERIFY_BITS(x, n) VERIFY_CHECK(((x) >> (n)) == 0) +#else +#define VERIFY_BITS(x, n) do { } while(0) +#endif + +SECP256K1_INLINE static void secp256k1_fe_mul_inner(uint64_t *r, const uint64_t *a, const uint64_t * SECP256K1_RESTRICT b) { + uint128_t c, d; + uint64_t t3, t4, tx, u0; + uint64_t a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4]; + const uint64_t M = 0xFFFFFFFFFFFFFULL, R = 0x1000003D10ULL; + + VERIFY_BITS(a[0], 56); + VERIFY_BITS(a[1], 56); + VERIFY_BITS(a[2], 56); + VERIFY_BITS(a[3], 56); + VERIFY_BITS(a[4], 52); + VERIFY_BITS(b[0], 56); + VERIFY_BITS(b[1], 56); + VERIFY_BITS(b[2], 56); + VERIFY_BITS(b[3], 56); + VERIFY_BITS(b[4], 52); + VERIFY_CHECK(r != b); + + /* [... a b c] is a shorthand for ... + a<<104 + b<<52 + c<<0 mod n. + * px is a shorthand for sum(a[i]*b[x-i], i=0..x). + * Note that [x 0 0 0 0 0] = [x*R]. + */ + + d = (uint128_t)a0 * b[3] + + (uint128_t)a1 * b[2] + + (uint128_t)a2 * b[1] + + (uint128_t)a3 * b[0]; + VERIFY_BITS(d, 114); + /* [d 0 0 0] = [p3 0 0 0] */ + c = (uint128_t)a4 * b[4]; + VERIFY_BITS(c, 112); + /* [c 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */ + d += (c & M) * R; c >>= 52; + VERIFY_BITS(d, 115); + VERIFY_BITS(c, 60); + /* [c 0 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */ + t3 = d & M; d >>= 52; + VERIFY_BITS(t3, 52); + VERIFY_BITS(d, 63); + /* [c 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */ + + d += (uint128_t)a0 * b[4] + + (uint128_t)a1 * b[3] + + (uint128_t)a2 * b[2] + + (uint128_t)a3 * b[1] + + (uint128_t)a4 * b[0]; + VERIFY_BITS(d, 115); + /* [c 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ + d += c * R; + VERIFY_BITS(d, 116); + /* [d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ + t4 = d & M; d >>= 52; + VERIFY_BITS(t4, 52); + VERIFY_BITS(d, 64); + /* [d t4 t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ + tx = (t4 >> 48); t4 &= (M >> 4); + VERIFY_BITS(tx, 4); + VERIFY_BITS(t4, 48); + /* [d t4+(tx<<48) t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ + + c = (uint128_t)a0 * b[0]; + VERIFY_BITS(c, 112); + /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 0 p4 p3 0 0 p0] */ + d += (uint128_t)a1 * b[4] + + (uint128_t)a2 * b[3] + + (uint128_t)a3 * b[2] + + (uint128_t)a4 * b[1]; + VERIFY_BITS(d, 115); + /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + u0 = d & M; d >>= 52; + VERIFY_BITS(u0, 52); + VERIFY_BITS(d, 63); + /* [d u0 t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + /* [d 0 t4+(tx<<48)+(u0<<52) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + u0 = (u0 << 4) | tx; + VERIFY_BITS(u0, 56); + /* [d 0 t4+(u0<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + c += (uint128_t)u0 * (R >> 4); + VERIFY_BITS(c, 115); + /* [d 0 t4 t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + r[0] = c & M; c >>= 52; + VERIFY_BITS(r[0], 52); + VERIFY_BITS(c, 61); + /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 0 p0] */ + + c += (uint128_t)a0 * b[1] + + (uint128_t)a1 * b[0]; + VERIFY_BITS(c, 114); + /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 p1 p0] */ + d += (uint128_t)a2 * b[4] + + (uint128_t)a3 * b[3] + + (uint128_t)a4 * b[2]; + VERIFY_BITS(d, 114); + /* [d 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */ + c += (d & M) * R; d >>= 52; + VERIFY_BITS(c, 115); + VERIFY_BITS(d, 62); + /* [d 0 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */ + r[1] = c & M; c >>= 52; + VERIFY_BITS(r[1], 52); + VERIFY_BITS(c, 63); + /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */ + + c += (uint128_t)a0 * b[2] + + (uint128_t)a1 * b[1] + + (uint128_t)a2 * b[0]; + VERIFY_BITS(c, 114); + /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 p2 p1 p0] */ + d += (uint128_t)a3 * b[4] + + (uint128_t)a4 * b[3]; + VERIFY_BITS(d, 114); + /* [d 0 0 t4 t3 c t1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + c += (d & M) * R; d >>= 52; + VERIFY_BITS(c, 115); + VERIFY_BITS(d, 62); + /* [d 0 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + + /* [d 0 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[2] = c & M; c >>= 52; + VERIFY_BITS(r[2], 52); + VERIFY_BITS(c, 63); + /* [d 0 0 0 t4 t3+c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + c += d * R + t3;; + VERIFY_BITS(c, 100); + /* [t4 c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[3] = c & M; c >>= 52; + VERIFY_BITS(r[3], 52); + VERIFY_BITS(c, 48); + /* [t4+c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + c += t4; + VERIFY_BITS(c, 49); + /* [c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[4] = c; + VERIFY_BITS(r[4], 49); + /* [r4 r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ +} + +SECP256K1_INLINE static void secp256k1_fe_sqr_inner(uint64_t *r, const uint64_t *a) { + uint128_t c, d; + uint64_t a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4]; + int64_t t3, t4, tx, u0; + const uint64_t M = 0xFFFFFFFFFFFFFULL, R = 0x1000003D10ULL; + + VERIFY_BITS(a[0], 56); + VERIFY_BITS(a[1], 56); + VERIFY_BITS(a[2], 56); + VERIFY_BITS(a[3], 56); + VERIFY_BITS(a[4], 52); + + /** [... a b c] is a shorthand for ... + a<<104 + b<<52 + c<<0 mod n. + * px is a shorthand for sum(a[i]*a[x-i], i=0..x). + * Note that [x 0 0 0 0 0] = [x*R]. + */ + + d = (uint128_t)(a0*2) * a3 + + (uint128_t)(a1*2) * a2; + VERIFY_BITS(d, 114); + /* [d 0 0 0] = [p3 0 0 0] */ + c = (uint128_t)a4 * a4; + VERIFY_BITS(c, 112); + /* [c 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */ + d += (c & M) * R; c >>= 52; + VERIFY_BITS(d, 115); + VERIFY_BITS(c, 60); + /* [c 0 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */ + t3 = d & M; d >>= 52; + VERIFY_BITS(t3, 52); + VERIFY_BITS(d, 63); + /* [c 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */ + + a4 *= 2; + d += (uint128_t)a0 * a4 + + (uint128_t)(a1*2) * a3 + + (uint128_t)a2 * a2; + VERIFY_BITS(d, 115); + /* [c 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ + d += c * R; + VERIFY_BITS(d, 116); + /* [d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ + t4 = d & M; d >>= 52; + VERIFY_BITS(t4, 52); + VERIFY_BITS(d, 64); + /* [d t4 t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ + tx = (t4 >> 48); t4 &= (M >> 4); + VERIFY_BITS(tx, 4); + VERIFY_BITS(t4, 48); + /* [d t4+(tx<<48) t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ + + c = (uint128_t)a0 * a0; + VERIFY_BITS(c, 112); + /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 0 p4 p3 0 0 p0] */ + d += (uint128_t)a1 * a4 + + (uint128_t)(a2*2) * a3; + VERIFY_BITS(d, 114); + /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + u0 = d & M; d >>= 52; + VERIFY_BITS(u0, 52); + VERIFY_BITS(d, 62); + /* [d u0 t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + /* [d 0 t4+(tx<<48)+(u0<<52) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + u0 = (u0 << 4) | tx; + VERIFY_BITS(u0, 56); + /* [d 0 t4+(u0<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + c += (uint128_t)u0 * (R >> 4); + VERIFY_BITS(c, 113); + /* [d 0 t4 t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ + r[0] = c & M; c >>= 52; + VERIFY_BITS(r[0], 52); + VERIFY_BITS(c, 61); + /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 0 p0] */ + + a0 *= 2; + c += (uint128_t)a0 * a1; + VERIFY_BITS(c, 114); + /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 p1 p0] */ + d += (uint128_t)a2 * a4 + + (uint128_t)a3 * a3; + VERIFY_BITS(d, 114); + /* [d 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */ + c += (d & M) * R; d >>= 52; + VERIFY_BITS(c, 115); + VERIFY_BITS(d, 62); + /* [d 0 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */ + r[1] = c & M; c >>= 52; + VERIFY_BITS(r[1], 52); + VERIFY_BITS(c, 63); + /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */ + + c += (uint128_t)a0 * a2 + + (uint128_t)a1 * a1; + VERIFY_BITS(c, 114); + /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 p2 p1 p0] */ + d += (uint128_t)a3 * a4; + VERIFY_BITS(d, 114); + /* [d 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + c += (d & M) * R; d >>= 52; + VERIFY_BITS(c, 115); + VERIFY_BITS(d, 62); + /* [d 0 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[2] = c & M; c >>= 52; + VERIFY_BITS(r[2], 52); + VERIFY_BITS(c, 63); + /* [d 0 0 0 t4 t3+c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + + c += d * R + t3;; + VERIFY_BITS(c, 100); + /* [t4 c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[3] = c & M; c >>= 52; + VERIFY_BITS(r[3], 52); + VERIFY_BITS(c, 48); + /* [t4+c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + c += t4; + VERIFY_BITS(c, 49); + /* [c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ + r[4] = c; + VERIFY_BITS(r[4], 49); + /* [r4 r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/field_impl.h b/crypto/secp256k1/libsecp256k1/src/field_impl.h new file mode 100644 index 000000000..551a6243e --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/field_impl.h @@ -0,0 +1,271 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_FIELD_IMPL_H_ +#define _SECP256K1_FIELD_IMPL_H_ + +#if defined HAVE_CONFIG_H +#include "libsecp256k1-config.h" +#endif + +#include "util.h" + +#if defined(USE_FIELD_10X26) +#include "field_10x26_impl.h" +#elif defined(USE_FIELD_5X52) +#include "field_5x52_impl.h" +#else +#error "Please select field implementation" +#endif + +SECP256K1_INLINE static int secp256k1_fe_equal_var(const secp256k1_fe *a, const secp256k1_fe *b) { + secp256k1_fe na; + secp256k1_fe_negate(&na, a, 1); + secp256k1_fe_add(&na, b); + return secp256k1_fe_normalizes_to_zero_var(&na); +} + +static int secp256k1_fe_sqrt_var(secp256k1_fe *r, const secp256k1_fe *a) { + secp256k1_fe x2, x3, x6, x9, x11, x22, x44, x88, x176, x220, x223, t1; + int j; + + /** The binary representation of (p + 1)/4 has 3 blocks of 1s, with lengths in + * { 2, 22, 223 }. Use an addition chain to calculate 2^n - 1 for each block: + * 1, [2], 3, 6, 9, 11, [22], 44, 88, 176, 220, [223] + */ + + secp256k1_fe_sqr(&x2, a); + secp256k1_fe_mul(&x2, &x2, a); + + secp256k1_fe_sqr(&x3, &x2); + secp256k1_fe_mul(&x3, &x3, a); + + x6 = x3; + for (j=0; j<3; j++) { + secp256k1_fe_sqr(&x6, &x6); + } + secp256k1_fe_mul(&x6, &x6, &x3); + + x9 = x6; + for (j=0; j<3; j++) { + secp256k1_fe_sqr(&x9, &x9); + } + secp256k1_fe_mul(&x9, &x9, &x3); + + x11 = x9; + for (j=0; j<2; j++) { + secp256k1_fe_sqr(&x11, &x11); + } + secp256k1_fe_mul(&x11, &x11, &x2); + + x22 = x11; + for (j=0; j<11; j++) { + secp256k1_fe_sqr(&x22, &x22); + } + secp256k1_fe_mul(&x22, &x22, &x11); + + x44 = x22; + for (j=0; j<22; j++) { + secp256k1_fe_sqr(&x44, &x44); + } + secp256k1_fe_mul(&x44, &x44, &x22); + + x88 = x44; + for (j=0; j<44; j++) { + secp256k1_fe_sqr(&x88, &x88); + } + secp256k1_fe_mul(&x88, &x88, &x44); + + x176 = x88; + for (j=0; j<88; j++) { + secp256k1_fe_sqr(&x176, &x176); + } + secp256k1_fe_mul(&x176, &x176, &x88); + + x220 = x176; + for (j=0; j<44; j++) { + secp256k1_fe_sqr(&x220, &x220); + } + secp256k1_fe_mul(&x220, &x220, &x44); + + x223 = x220; + for (j=0; j<3; j++) { + secp256k1_fe_sqr(&x223, &x223); + } + secp256k1_fe_mul(&x223, &x223, &x3); + + /* The final result is then assembled using a sliding window over the blocks. */ + + t1 = x223; + for (j=0; j<23; j++) { + secp256k1_fe_sqr(&t1, &t1); + } + secp256k1_fe_mul(&t1, &t1, &x22); + for (j=0; j<6; j++) { + secp256k1_fe_sqr(&t1, &t1); + } + secp256k1_fe_mul(&t1, &t1, &x2); + secp256k1_fe_sqr(&t1, &t1); + secp256k1_fe_sqr(r, &t1); + + /* Check that a square root was actually calculated */ + + secp256k1_fe_sqr(&t1, r); + return secp256k1_fe_equal_var(&t1, a); +} + +static void secp256k1_fe_inv(secp256k1_fe *r, const secp256k1_fe *a) { + secp256k1_fe x2, x3, x6, x9, x11, x22, x44, x88, x176, x220, x223, t1; + int j; + + /** The binary representation of (p - 2) has 5 blocks of 1s, with lengths in + * { 1, 2, 22, 223 }. Use an addition chain to calculate 2^n - 1 for each block: + * [1], [2], 3, 6, 9, 11, [22], 44, 88, 176, 220, [223] + */ + + secp256k1_fe_sqr(&x2, a); + secp256k1_fe_mul(&x2, &x2, a); + + secp256k1_fe_sqr(&x3, &x2); + secp256k1_fe_mul(&x3, &x3, a); + + x6 = x3; + for (j=0; j<3; j++) { + secp256k1_fe_sqr(&x6, &x6); + } + secp256k1_fe_mul(&x6, &x6, &x3); + + x9 = x6; + for (j=0; j<3; j++) { + secp256k1_fe_sqr(&x9, &x9); + } + secp256k1_fe_mul(&x9, &x9, &x3); + + x11 = x9; + for (j=0; j<2; j++) { + secp256k1_fe_sqr(&x11, &x11); + } + secp256k1_fe_mul(&x11, &x11, &x2); + + x22 = x11; + for (j=0; j<11; j++) { + secp256k1_fe_sqr(&x22, &x22); + } + secp256k1_fe_mul(&x22, &x22, &x11); + + x44 = x22; + for (j=0; j<22; j++) { + secp256k1_fe_sqr(&x44, &x44); + } + secp256k1_fe_mul(&x44, &x44, &x22); + + x88 = x44; + for (j=0; j<44; j++) { + secp256k1_fe_sqr(&x88, &x88); + } + secp256k1_fe_mul(&x88, &x88, &x44); + + x176 = x88; + for (j=0; j<88; j++) { + secp256k1_fe_sqr(&x176, &x176); + } + secp256k1_fe_mul(&x176, &x176, &x88); + + x220 = x176; + for (j=0; j<44; j++) { + secp256k1_fe_sqr(&x220, &x220); + } + secp256k1_fe_mul(&x220, &x220, &x44); + + x223 = x220; + for (j=0; j<3; j++) { + secp256k1_fe_sqr(&x223, &x223); + } + secp256k1_fe_mul(&x223, &x223, &x3); + + /* The final result is then assembled using a sliding window over the blocks. */ + + t1 = x223; + for (j=0; j<23; j++) { + secp256k1_fe_sqr(&t1, &t1); + } + secp256k1_fe_mul(&t1, &t1, &x22); + for (j=0; j<5; j++) { + secp256k1_fe_sqr(&t1, &t1); + } + secp256k1_fe_mul(&t1, &t1, a); + for (j=0; j<3; j++) { + secp256k1_fe_sqr(&t1, &t1); + } + secp256k1_fe_mul(&t1, &t1, &x2); + for (j=0; j<2; j++) { + secp256k1_fe_sqr(&t1, &t1); + } + secp256k1_fe_mul(r, a, &t1); +} + +static void secp256k1_fe_inv_var(secp256k1_fe *r, const secp256k1_fe *a) { +#if defined(USE_FIELD_INV_BUILTIN) + secp256k1_fe_inv(r, a); +#elif defined(USE_FIELD_INV_NUM) + secp256k1_num n, m; + static const secp256k1_fe negone = SECP256K1_FE_CONST( + 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFFUL, + 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFEUL, 0xFFFFFC2EUL + ); + /* secp256k1 field prime, value p defined in "Standards for Efficient Cryptography" (SEC2) 2.7.1. */ + static const unsigned char prime[32] = { + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFC,0x2F + }; + unsigned char b[32]; + secp256k1_fe c = *a; + secp256k1_fe_normalize_var(&c); + secp256k1_fe_get_b32(b, &c); + secp256k1_num_set_bin(&n, b, 32); + secp256k1_num_set_bin(&m, prime, 32); + secp256k1_num_mod_inverse(&n, &n, &m); + secp256k1_num_get_bin(b, 32, &n); + VERIFY_CHECK(secp256k1_fe_set_b32(r, b)); + /* Verify the result is the (unique) valid inverse using non-GMP code. */ + secp256k1_fe_mul(&c, &c, r); + secp256k1_fe_add(&c, &negone); + CHECK(secp256k1_fe_normalizes_to_zero_var(&c)); +#else +#error "Please select field inverse implementation" +#endif +} + +static void secp256k1_fe_inv_all_var(size_t len, secp256k1_fe *r, const secp256k1_fe *a) { + secp256k1_fe u; + size_t i; + if (len < 1) { + return; + } + + VERIFY_CHECK((r + len <= a) || (a + len <= r)); + + r[0] = a[0]; + + i = 0; + while (++i < len) { + secp256k1_fe_mul(&r[i], &r[i - 1], &a[i]); + } + + secp256k1_fe_inv_var(&u, &r[--i]); + + while (i > 0) { + size_t j = i--; + secp256k1_fe_mul(&r[j], &r[i], &u); + secp256k1_fe_mul(&u, &u, &a[j]); + } + + r[0] = u; +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/gen_context.c b/crypto/secp256k1/libsecp256k1/src/gen_context.c new file mode 100644 index 000000000..1835fd491 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/gen_context.c @@ -0,0 +1,74 @@ +/********************************************************************** + * Copyright (c) 2013, 2014, 2015 Thomas Daede, Cory Fields * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#define USE_BASIC_CONFIG 1 + +#include "basic-config.h" +#include "include/secp256k1.h" +#include "field_impl.h" +#include "scalar_impl.h" +#include "group_impl.h" +#include "ecmult_gen_impl.h" + +static void default_error_callback_fn(const char* str, void* data) { + (void)data; + fprintf(stderr, "[libsecp256k1] internal consistency check failed: %s\n", str); + abort(); +} + +static const secp256k1_callback default_error_callback = { + default_error_callback_fn, + NULL +}; + +int main(int argc, char **argv) { + secp256k1_ecmult_gen_context ctx; + int inner; + int outer; + FILE* fp; + + (void)argc; + (void)argv; + + fp = fopen("src/ecmult_static_context.h","w"); + if (fp == NULL) { + fprintf(stderr, "Could not open src/ecmult_static_context.h for writing!\n"); + return -1; + } + + fprintf(fp, "#ifndef _SECP256K1_ECMULT_STATIC_CONTEXT_\n"); + fprintf(fp, "#define _SECP256K1_ECMULT_STATIC_CONTEXT_\n"); + fprintf(fp, "#include \"group.h\"\n"); + fprintf(fp, "#define SC SECP256K1_GE_STORAGE_CONST\n"); + fprintf(fp, "static const secp256k1_ge_storage secp256k1_ecmult_static_context[64][16] = {\n"); + + secp256k1_ecmult_gen_context_init(&ctx); + secp256k1_ecmult_gen_context_build(&ctx, &default_error_callback); + for(outer = 0; outer != 64; outer++) { + fprintf(fp,"{\n"); + for(inner = 0; inner != 16; inner++) { + fprintf(fp," SC(%uu, %uu, %uu, %uu, %uu, %uu, %uu, %uu, %uu, %uu, %uu, %uu, %uu, %uu, %uu, %uu)", SECP256K1_GE_STORAGE_CONST_GET((*ctx.prec)[outer][inner])); + if (inner != 15) { + fprintf(fp,",\n"); + } else { + fprintf(fp,"\n"); + } + } + if (outer != 63) { + fprintf(fp,"},\n"); + } else { + fprintf(fp,"}\n"); + } + } + fprintf(fp,"};\n"); + secp256k1_ecmult_gen_context_clear(&ctx); + + fprintf(fp, "#undef SC\n"); + fprintf(fp, "#endif\n"); + fclose(fp); + + return 0; +} diff --git a/crypto/secp256k1/libsecp256k1/src/group.h b/crypto/secp256k1/libsecp256k1/src/group.h new file mode 100644 index 000000000..89b079d5c --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/group.h @@ -0,0 +1,141 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_GROUP_ +#define _SECP256K1_GROUP_ + +#include "num.h" +#include "field.h" + +/** A group element of the secp256k1 curve, in affine coordinates. */ +typedef struct { + secp256k1_fe x; + secp256k1_fe y; + int infinity; /* whether this represents the point at infinity */ +} secp256k1_ge; + +#define SECP256K1_GE_CONST(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {SECP256K1_FE_CONST((a),(b),(c),(d),(e),(f),(g),(h)), SECP256K1_FE_CONST((i),(j),(k),(l),(m),(n),(o),(p)), 0} +#define SECP256K1_GE_CONST_INFINITY {SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 0), SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 0), 1} + +/** A group element of the secp256k1 curve, in jacobian coordinates. */ +typedef struct { + secp256k1_fe x; /* actual X: x/z^2 */ + secp256k1_fe y; /* actual Y: y/z^3 */ + secp256k1_fe z; + int infinity; /* whether this represents the point at infinity */ +} secp256k1_gej; + +#define SECP256K1_GEJ_CONST(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {SECP256K1_FE_CONST((a),(b),(c),(d),(e),(f),(g),(h)), SECP256K1_FE_CONST((i),(j),(k),(l),(m),(n),(o),(p)), SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 1), 0} +#define SECP256K1_GEJ_CONST_INFINITY {SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 0), SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 0), SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 0), 1} + +typedef struct { + secp256k1_fe_storage x; + secp256k1_fe_storage y; +} secp256k1_ge_storage; + +#define SECP256K1_GE_STORAGE_CONST(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {SECP256K1_FE_STORAGE_CONST((a),(b),(c),(d),(e),(f),(g),(h)), SECP256K1_FE_STORAGE_CONST((i),(j),(k),(l),(m),(n),(o),(p))} + +#define SECP256K1_GE_STORAGE_CONST_GET(t) SECP256K1_FE_STORAGE_CONST_GET(t.x), SECP256K1_FE_STORAGE_CONST_GET(t.y) + +/** Set a group element equal to the point at infinity */ +static void secp256k1_ge_set_infinity(secp256k1_ge *r); + +/** Set a group element equal to the point with given X and Y coordinates */ +static void secp256k1_ge_set_xy(secp256k1_ge *r, const secp256k1_fe *x, const secp256k1_fe *y); + +/** Set a group element (affine) equal to the point with the given X coordinate, and given oddness + * for Y. Return value indicates whether the result is valid. */ +static int secp256k1_ge_set_xo_var(secp256k1_ge *r, const secp256k1_fe *x, int odd); + +/** Check whether a group element is the point at infinity. */ +static int secp256k1_ge_is_infinity(const secp256k1_ge *a); + +/** Check whether a group element is valid (i.e., on the curve). */ +static int secp256k1_ge_is_valid_var(const secp256k1_ge *a); + +static void secp256k1_ge_neg(secp256k1_ge *r, const secp256k1_ge *a); + +/** Set a group element equal to another which is given in jacobian coordinates */ +static void secp256k1_ge_set_gej(secp256k1_ge *r, secp256k1_gej *a); + +/** Set a batch of group elements equal to the inputs given in jacobian coordinates */ +static void secp256k1_ge_set_all_gej_var(size_t len, secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_callback *cb); + +/** Set a batch of group elements equal to the inputs given in jacobian + * coordinates (with known z-ratios). zr must contain the known z-ratios such + * that mul(a[i].z, zr[i+1]) == a[i+1].z. zr[0] is ignored. */ +static void secp256k1_ge_set_table_gej_var(size_t len, secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zr); + +/** Bring a batch inputs given in jacobian coordinates (with known z-ratios) to + * the same global z "denominator". zr must contain the known z-ratios such + * that mul(a[i].z, zr[i+1]) == a[i+1].z. zr[0] is ignored. The x and y + * coordinates of the result are stored in r, the common z coordinate is + * stored in globalz. */ +static void secp256k1_ge_globalz_set_table_gej(size_t len, secp256k1_ge *r, secp256k1_fe *globalz, const secp256k1_gej *a, const secp256k1_fe *zr); + +/** Set a group element (jacobian) equal to the point at infinity. */ +static void secp256k1_gej_set_infinity(secp256k1_gej *r); + +/** Set a group element (jacobian) equal to the point with given X and Y coordinates. */ +static void secp256k1_gej_set_xy(secp256k1_gej *r, const secp256k1_fe *x, const secp256k1_fe *y); + +/** Set a group element (jacobian) equal to another which is given in affine coordinates. */ +static void secp256k1_gej_set_ge(secp256k1_gej *r, const secp256k1_ge *a); + +/** Compare the X coordinate of a group element (jacobian). */ +static int secp256k1_gej_eq_x_var(const secp256k1_fe *x, const secp256k1_gej *a); + +/** Set r equal to the inverse of a (i.e., mirrored around the X axis) */ +static void secp256k1_gej_neg(secp256k1_gej *r, const secp256k1_gej *a); + +/** Check whether a group element is the point at infinity. */ +static int secp256k1_gej_is_infinity(const secp256k1_gej *a); + +/** Set r equal to the double of a. If rzr is not-NULL, r->z = a->z * *rzr (where infinity means an implicit z = 0). + * a may not be zero. Constant time. */ +static void secp256k1_gej_double_nonzero(secp256k1_gej *r, const secp256k1_gej *a, secp256k1_fe *rzr); + +/** Set r equal to the double of a. If rzr is not-NULL, r->z = a->z * *rzr (where infinity means an implicit z = 0). */ +static void secp256k1_gej_double_var(secp256k1_gej *r, const secp256k1_gej *a, secp256k1_fe *rzr); + +/** Set r equal to the sum of a and b. If rzr is non-NULL, r->z = a->z * *rzr (a cannot be infinity in that case). */ +static void secp256k1_gej_add_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_gej *b, secp256k1_fe *rzr); + +/** Set r equal to the sum of a and b (with b given in affine coordinates, and not infinity). */ +static void secp256k1_gej_add_ge(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b); + +/** Set r equal to the sum of a and b (with b given in affine coordinates). This is more efficient + than secp256k1_gej_add_var. It is identical to secp256k1_gej_add_ge but without constant-time + guarantee, and b is allowed to be infinity. If rzr is non-NULL, r->z = a->z * *rzr (a cannot be infinity in that case). */ +static void secp256k1_gej_add_ge_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, secp256k1_fe *rzr); + +/** Set r equal to the sum of a and b (with the inverse of b's Z coordinate passed as bzinv). */ +static void secp256k1_gej_add_zinv_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, const secp256k1_fe *bzinv); + +#ifdef USE_ENDOMORPHISM +/** Set r to be equal to lambda times a, where lambda is chosen in a way such that this is very fast. */ +static void secp256k1_ge_mul_lambda(secp256k1_ge *r, const secp256k1_ge *a); +#endif + +/** Clear a secp256k1_gej to prevent leaking sensitive information. */ +static void secp256k1_gej_clear(secp256k1_gej *r); + +/** Clear a secp256k1_ge to prevent leaking sensitive information. */ +static void secp256k1_ge_clear(secp256k1_ge *r); + +/** Convert a group element to the storage type. */ +static void secp256k1_ge_to_storage(secp256k1_ge_storage *r, const secp256k1_ge *a); + +/** Convert a group element back from the storage type. */ +static void secp256k1_ge_from_storage(secp256k1_ge *r, const secp256k1_ge_storage *a); + +/** If flag is true, set *r equal to *a; otherwise leave it. Constant-time. */ +static void secp256k1_ge_storage_cmov(secp256k1_ge_storage *r, const secp256k1_ge_storage *a, int flag); + +/** Rescale a jacobian point by b which must be non-zero. Constant-time. */ +static void secp256k1_gej_rescale(secp256k1_gej *r, const secp256k1_fe *b); + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/group_impl.h b/crypto/secp256k1/libsecp256k1/src/group_impl.h new file mode 100644 index 000000000..fe0a35929 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/group_impl.h @@ -0,0 +1,632 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_GROUP_IMPL_H_ +#define _SECP256K1_GROUP_IMPL_H_ + +#include + +#include "num.h" +#include "field.h" +#include "group.h" + +/** Generator for secp256k1, value 'g' defined in + * "Standards for Efficient Cryptography" (SEC2) 2.7.1. + */ +static const secp256k1_ge secp256k1_ge_const_g = SECP256K1_GE_CONST( + 0x79BE667EUL, 0xF9DCBBACUL, 0x55A06295UL, 0xCE870B07UL, + 0x029BFCDBUL, 0x2DCE28D9UL, 0x59F2815BUL, 0x16F81798UL, + 0x483ADA77UL, 0x26A3C465UL, 0x5DA4FBFCUL, 0x0E1108A8UL, + 0xFD17B448UL, 0xA6855419UL, 0x9C47D08FUL, 0xFB10D4B8UL +); + +static void secp256k1_ge_set_gej_zinv(secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zi) { + secp256k1_fe zi2; + secp256k1_fe zi3; + secp256k1_fe_sqr(&zi2, zi); + secp256k1_fe_mul(&zi3, &zi2, zi); + secp256k1_fe_mul(&r->x, &a->x, &zi2); + secp256k1_fe_mul(&r->y, &a->y, &zi3); + r->infinity = a->infinity; +} + +static void secp256k1_ge_set_infinity(secp256k1_ge *r) { + r->infinity = 1; +} + +static void secp256k1_ge_set_xy(secp256k1_ge *r, const secp256k1_fe *x, const secp256k1_fe *y) { + r->infinity = 0; + r->x = *x; + r->y = *y; +} + +static int secp256k1_ge_is_infinity(const secp256k1_ge *a) { + return a->infinity; +} + +static void secp256k1_ge_neg(secp256k1_ge *r, const secp256k1_ge *a) { + *r = *a; + secp256k1_fe_normalize_weak(&r->y); + secp256k1_fe_negate(&r->y, &r->y, 1); +} + +static void secp256k1_ge_set_gej(secp256k1_ge *r, secp256k1_gej *a) { + secp256k1_fe z2, z3; + r->infinity = a->infinity; + secp256k1_fe_inv(&a->z, &a->z); + secp256k1_fe_sqr(&z2, &a->z); + secp256k1_fe_mul(&z3, &a->z, &z2); + secp256k1_fe_mul(&a->x, &a->x, &z2); + secp256k1_fe_mul(&a->y, &a->y, &z3); + secp256k1_fe_set_int(&a->z, 1); + r->x = a->x; + r->y = a->y; +} + +static void secp256k1_ge_set_gej_var(secp256k1_ge *r, secp256k1_gej *a) { + secp256k1_fe z2, z3; + r->infinity = a->infinity; + if (a->infinity) { + return; + } + secp256k1_fe_inv_var(&a->z, &a->z); + secp256k1_fe_sqr(&z2, &a->z); + secp256k1_fe_mul(&z3, &a->z, &z2); + secp256k1_fe_mul(&a->x, &a->x, &z2); + secp256k1_fe_mul(&a->y, &a->y, &z3); + secp256k1_fe_set_int(&a->z, 1); + r->x = a->x; + r->y = a->y; +} + +static void secp256k1_ge_set_all_gej_var(size_t len, secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_callback *cb) { + secp256k1_fe *az; + secp256k1_fe *azi; + size_t i; + size_t count = 0; + az = (secp256k1_fe *)checked_malloc(cb, sizeof(secp256k1_fe) * len); + for (i = 0; i < len; i++) { + if (!a[i].infinity) { + az[count++] = a[i].z; + } + } + + azi = (secp256k1_fe *)checked_malloc(cb, sizeof(secp256k1_fe) * count); + secp256k1_fe_inv_all_var(count, azi, az); + free(az); + + count = 0; + for (i = 0; i < len; i++) { + r[i].infinity = a[i].infinity; + if (!a[i].infinity) { + secp256k1_ge_set_gej_zinv(&r[i], &a[i], &azi[count++]); + } + } + free(azi); +} + +static void secp256k1_ge_set_table_gej_var(size_t len, secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zr) { + size_t i = len - 1; + secp256k1_fe zi; + + if (len > 0) { + /* Compute the inverse of the last z coordinate, and use it to compute the last affine output. */ + secp256k1_fe_inv(&zi, &a[i].z); + secp256k1_ge_set_gej_zinv(&r[i], &a[i], &zi); + + /* Work out way backwards, using the z-ratios to scale the x/y values. */ + while (i > 0) { + secp256k1_fe_mul(&zi, &zi, &zr[i]); + i--; + secp256k1_ge_set_gej_zinv(&r[i], &a[i], &zi); + } + } +} + +static void secp256k1_ge_globalz_set_table_gej(size_t len, secp256k1_ge *r, secp256k1_fe *globalz, const secp256k1_gej *a, const secp256k1_fe *zr) { + size_t i = len - 1; + secp256k1_fe zs; + + if (len > 0) { + /* The z of the final point gives us the "global Z" for the table. */ + r[i].x = a[i].x; + r[i].y = a[i].y; + *globalz = a[i].z; + r[i].infinity = 0; + zs = zr[i]; + + /* Work our way backwards, using the z-ratios to scale the x/y values. */ + while (i > 0) { + if (i != len - 1) { + secp256k1_fe_mul(&zs, &zs, &zr[i]); + } + i--; + secp256k1_ge_set_gej_zinv(&r[i], &a[i], &zs); + } + } +} + +static void secp256k1_gej_set_infinity(secp256k1_gej *r) { + r->infinity = 1; + secp256k1_fe_set_int(&r->x, 0); + secp256k1_fe_set_int(&r->y, 0); + secp256k1_fe_set_int(&r->z, 0); +} + +static void secp256k1_gej_set_xy(secp256k1_gej *r, const secp256k1_fe *x, const secp256k1_fe *y) { + r->infinity = 0; + r->x = *x; + r->y = *y; + secp256k1_fe_set_int(&r->z, 1); +} + +static void secp256k1_gej_clear(secp256k1_gej *r) { + r->infinity = 0; + secp256k1_fe_clear(&r->x); + secp256k1_fe_clear(&r->y); + secp256k1_fe_clear(&r->z); +} + +static void secp256k1_ge_clear(secp256k1_ge *r) { + r->infinity = 0; + secp256k1_fe_clear(&r->x); + secp256k1_fe_clear(&r->y); +} + +static int secp256k1_ge_set_xo_var(secp256k1_ge *r, const secp256k1_fe *x, int odd) { + secp256k1_fe x2, x3, c; + r->x = *x; + secp256k1_fe_sqr(&x2, x); + secp256k1_fe_mul(&x3, x, &x2); + r->infinity = 0; + secp256k1_fe_set_int(&c, 7); + secp256k1_fe_add(&c, &x3); + if (!secp256k1_fe_sqrt_var(&r->y, &c)) { + return 0; + } + secp256k1_fe_normalize_var(&r->y); + if (secp256k1_fe_is_odd(&r->y) != odd) { + secp256k1_fe_negate(&r->y, &r->y, 1); + } + return 1; +} + +static void secp256k1_gej_set_ge(secp256k1_gej *r, const secp256k1_ge *a) { + r->infinity = a->infinity; + r->x = a->x; + r->y = a->y; + secp256k1_fe_set_int(&r->z, 1); +} + +static int secp256k1_gej_eq_x_var(const secp256k1_fe *x, const secp256k1_gej *a) { + secp256k1_fe r, r2; + VERIFY_CHECK(!a->infinity); + secp256k1_fe_sqr(&r, &a->z); secp256k1_fe_mul(&r, &r, x); + r2 = a->x; secp256k1_fe_normalize_weak(&r2); + return secp256k1_fe_equal_var(&r, &r2); +} + +static void secp256k1_gej_neg(secp256k1_gej *r, const secp256k1_gej *a) { + r->infinity = a->infinity; + r->x = a->x; + r->y = a->y; + r->z = a->z; + secp256k1_fe_normalize_weak(&r->y); + secp256k1_fe_negate(&r->y, &r->y, 1); +} + +static int secp256k1_gej_is_infinity(const secp256k1_gej *a) { + return a->infinity; +} + +static int secp256k1_gej_is_valid_var(const secp256k1_gej *a) { + secp256k1_fe y2, x3, z2, z6; + if (a->infinity) { + return 0; + } + /** y^2 = x^3 + 7 + * (Y/Z^3)^2 = (X/Z^2)^3 + 7 + * Y^2 / Z^6 = X^3 / Z^6 + 7 + * Y^2 = X^3 + 7*Z^6 + */ + secp256k1_fe_sqr(&y2, &a->y); + secp256k1_fe_sqr(&x3, &a->x); secp256k1_fe_mul(&x3, &x3, &a->x); + secp256k1_fe_sqr(&z2, &a->z); + secp256k1_fe_sqr(&z6, &z2); secp256k1_fe_mul(&z6, &z6, &z2); + secp256k1_fe_mul_int(&z6, 7); + secp256k1_fe_add(&x3, &z6); + secp256k1_fe_normalize_weak(&x3); + return secp256k1_fe_equal_var(&y2, &x3); +} + +static int secp256k1_ge_is_valid_var(const secp256k1_ge *a) { + secp256k1_fe y2, x3, c; + if (a->infinity) { + return 0; + } + /* y^2 = x^3 + 7 */ + secp256k1_fe_sqr(&y2, &a->y); + secp256k1_fe_sqr(&x3, &a->x); secp256k1_fe_mul(&x3, &x3, &a->x); + secp256k1_fe_set_int(&c, 7); + secp256k1_fe_add(&x3, &c); + secp256k1_fe_normalize_weak(&x3); + return secp256k1_fe_equal_var(&y2, &x3); +} + +static void secp256k1_gej_double_var(secp256k1_gej *r, const secp256k1_gej *a, secp256k1_fe *rzr) { + /* Operations: 3 mul, 4 sqr, 0 normalize, 12 mul_int/add/negate */ + secp256k1_fe t1,t2,t3,t4; + /** For secp256k1, 2Q is infinity if and only if Q is infinity. This is because if 2Q = infinity, + * Q must equal -Q, or that Q.y == -(Q.y), or Q.y is 0. For a point on y^2 = x^3 + 7 to have + * y=0, x^3 must be -7 mod p. However, -7 has no cube root mod p. + */ + r->infinity = a->infinity; + if (r->infinity) { + if (rzr != NULL) { + secp256k1_fe_set_int(rzr, 1); + } + return; + } + + if (rzr != NULL) { + *rzr = a->y; + secp256k1_fe_normalize_weak(rzr); + secp256k1_fe_mul_int(rzr, 2); + } + + secp256k1_fe_mul(&r->z, &a->z, &a->y); + secp256k1_fe_mul_int(&r->z, 2); /* Z' = 2*Y*Z (2) */ + secp256k1_fe_sqr(&t1, &a->x); + secp256k1_fe_mul_int(&t1, 3); /* T1 = 3*X^2 (3) */ + secp256k1_fe_sqr(&t2, &t1); /* T2 = 9*X^4 (1) */ + secp256k1_fe_sqr(&t3, &a->y); + secp256k1_fe_mul_int(&t3, 2); /* T3 = 2*Y^2 (2) */ + secp256k1_fe_sqr(&t4, &t3); + secp256k1_fe_mul_int(&t4, 2); /* T4 = 8*Y^4 (2) */ + secp256k1_fe_mul(&t3, &t3, &a->x); /* T3 = 2*X*Y^2 (1) */ + r->x = t3; + secp256k1_fe_mul_int(&r->x, 4); /* X' = 8*X*Y^2 (4) */ + secp256k1_fe_negate(&r->x, &r->x, 4); /* X' = -8*X*Y^2 (5) */ + secp256k1_fe_add(&r->x, &t2); /* X' = 9*X^4 - 8*X*Y^2 (6) */ + secp256k1_fe_negate(&t2, &t2, 1); /* T2 = -9*X^4 (2) */ + secp256k1_fe_mul_int(&t3, 6); /* T3 = 12*X*Y^2 (6) */ + secp256k1_fe_add(&t3, &t2); /* T3 = 12*X*Y^2 - 9*X^4 (8) */ + secp256k1_fe_mul(&r->y, &t1, &t3); /* Y' = 36*X^3*Y^2 - 27*X^6 (1) */ + secp256k1_fe_negate(&t2, &t4, 2); /* T2 = -8*Y^4 (3) */ + secp256k1_fe_add(&r->y, &t2); /* Y' = 36*X^3*Y^2 - 27*X^6 - 8*Y^4 (4) */ +} + +static SECP256K1_INLINE void secp256k1_gej_double_nonzero(secp256k1_gej *r, const secp256k1_gej *a, secp256k1_fe *rzr) { + VERIFY_CHECK(!secp256k1_gej_is_infinity(a)); + secp256k1_gej_double_var(r, a, rzr); +} + +static void secp256k1_gej_add_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_gej *b, secp256k1_fe *rzr) { + /* Operations: 12 mul, 4 sqr, 2 normalize, 12 mul_int/add/negate */ + secp256k1_fe z22, z12, u1, u2, s1, s2, h, i, i2, h2, h3, t; + + if (a->infinity) { + VERIFY_CHECK(rzr == NULL); + *r = *b; + return; + } + + if (b->infinity) { + if (rzr != NULL) { + secp256k1_fe_set_int(rzr, 1); + } + *r = *a; + return; + } + + r->infinity = 0; + secp256k1_fe_sqr(&z22, &b->z); + secp256k1_fe_sqr(&z12, &a->z); + secp256k1_fe_mul(&u1, &a->x, &z22); + secp256k1_fe_mul(&u2, &b->x, &z12); + secp256k1_fe_mul(&s1, &a->y, &z22); secp256k1_fe_mul(&s1, &s1, &b->z); + secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &a->z); + secp256k1_fe_negate(&h, &u1, 1); secp256k1_fe_add(&h, &u2); + secp256k1_fe_negate(&i, &s1, 1); secp256k1_fe_add(&i, &s2); + if (secp256k1_fe_normalizes_to_zero_var(&h)) { + if (secp256k1_fe_normalizes_to_zero_var(&i)) { + secp256k1_gej_double_var(r, a, rzr); + } else { + if (rzr != NULL) { + secp256k1_fe_set_int(rzr, 0); + } + r->infinity = 1; + } + return; + } + secp256k1_fe_sqr(&i2, &i); + secp256k1_fe_sqr(&h2, &h); + secp256k1_fe_mul(&h3, &h, &h2); + secp256k1_fe_mul(&h, &h, &b->z); + if (rzr != NULL) { + *rzr = h; + } + secp256k1_fe_mul(&r->z, &a->z, &h); + secp256k1_fe_mul(&t, &u1, &h2); + r->x = t; secp256k1_fe_mul_int(&r->x, 2); secp256k1_fe_add(&r->x, &h3); secp256k1_fe_negate(&r->x, &r->x, 3); secp256k1_fe_add(&r->x, &i2); + secp256k1_fe_negate(&r->y, &r->x, 5); secp256k1_fe_add(&r->y, &t); secp256k1_fe_mul(&r->y, &r->y, &i); + secp256k1_fe_mul(&h3, &h3, &s1); secp256k1_fe_negate(&h3, &h3, 1); + secp256k1_fe_add(&r->y, &h3); +} + +static void secp256k1_gej_add_ge_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, secp256k1_fe *rzr) { + /* 8 mul, 3 sqr, 4 normalize, 12 mul_int/add/negate */ + secp256k1_fe z12, u1, u2, s1, s2, h, i, i2, h2, h3, t; + if (a->infinity) { + VERIFY_CHECK(rzr == NULL); + secp256k1_gej_set_ge(r, b); + return; + } + if (b->infinity) { + if (rzr != NULL) { + secp256k1_fe_set_int(rzr, 1); + } + *r = *a; + return; + } + r->infinity = 0; + + secp256k1_fe_sqr(&z12, &a->z); + u1 = a->x; secp256k1_fe_normalize_weak(&u1); + secp256k1_fe_mul(&u2, &b->x, &z12); + s1 = a->y; secp256k1_fe_normalize_weak(&s1); + secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &a->z); + secp256k1_fe_negate(&h, &u1, 1); secp256k1_fe_add(&h, &u2); + secp256k1_fe_negate(&i, &s1, 1); secp256k1_fe_add(&i, &s2); + if (secp256k1_fe_normalizes_to_zero_var(&h)) { + if (secp256k1_fe_normalizes_to_zero_var(&i)) { + secp256k1_gej_double_var(r, a, rzr); + } else { + if (rzr != NULL) { + secp256k1_fe_set_int(rzr, 0); + } + r->infinity = 1; + } + return; + } + secp256k1_fe_sqr(&i2, &i); + secp256k1_fe_sqr(&h2, &h); + secp256k1_fe_mul(&h3, &h, &h2); + if (rzr != NULL) { + *rzr = h; + } + secp256k1_fe_mul(&r->z, &a->z, &h); + secp256k1_fe_mul(&t, &u1, &h2); + r->x = t; secp256k1_fe_mul_int(&r->x, 2); secp256k1_fe_add(&r->x, &h3); secp256k1_fe_negate(&r->x, &r->x, 3); secp256k1_fe_add(&r->x, &i2); + secp256k1_fe_negate(&r->y, &r->x, 5); secp256k1_fe_add(&r->y, &t); secp256k1_fe_mul(&r->y, &r->y, &i); + secp256k1_fe_mul(&h3, &h3, &s1); secp256k1_fe_negate(&h3, &h3, 1); + secp256k1_fe_add(&r->y, &h3); +} + +static void secp256k1_gej_add_zinv_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, const secp256k1_fe *bzinv) { + /* 9 mul, 3 sqr, 4 normalize, 12 mul_int/add/negate */ + secp256k1_fe az, z12, u1, u2, s1, s2, h, i, i2, h2, h3, t; + + if (b->infinity) { + *r = *a; + return; + } + if (a->infinity) { + secp256k1_fe bzinv2, bzinv3; + r->infinity = b->infinity; + secp256k1_fe_sqr(&bzinv2, bzinv); + secp256k1_fe_mul(&bzinv3, &bzinv2, bzinv); + secp256k1_fe_mul(&r->x, &b->x, &bzinv2); + secp256k1_fe_mul(&r->y, &b->y, &bzinv3); + secp256k1_fe_set_int(&r->z, 1); + return; + } + r->infinity = 0; + + /** We need to calculate (rx,ry,rz) = (ax,ay,az) + (bx,by,1/bzinv). Due to + * secp256k1's isomorphism we can multiply the Z coordinates on both sides + * by bzinv, and get: (rx,ry,rz*bzinv) = (ax,ay,az*bzinv) + (bx,by,1). + * This means that (rx,ry,rz) can be calculated as + * (ax,ay,az*bzinv) + (bx,by,1), when not applying the bzinv factor to rz. + * The variable az below holds the modified Z coordinate for a, which is used + * for the computation of rx and ry, but not for rz. + */ + secp256k1_fe_mul(&az, &a->z, bzinv); + + secp256k1_fe_sqr(&z12, &az); + u1 = a->x; secp256k1_fe_normalize_weak(&u1); + secp256k1_fe_mul(&u2, &b->x, &z12); + s1 = a->y; secp256k1_fe_normalize_weak(&s1); + secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &az); + secp256k1_fe_negate(&h, &u1, 1); secp256k1_fe_add(&h, &u2); + secp256k1_fe_negate(&i, &s1, 1); secp256k1_fe_add(&i, &s2); + if (secp256k1_fe_normalizes_to_zero_var(&h)) { + if (secp256k1_fe_normalizes_to_zero_var(&i)) { + secp256k1_gej_double_var(r, a, NULL); + } else { + r->infinity = 1; + } + return; + } + secp256k1_fe_sqr(&i2, &i); + secp256k1_fe_sqr(&h2, &h); + secp256k1_fe_mul(&h3, &h, &h2); + r->z = a->z; secp256k1_fe_mul(&r->z, &r->z, &h); + secp256k1_fe_mul(&t, &u1, &h2); + r->x = t; secp256k1_fe_mul_int(&r->x, 2); secp256k1_fe_add(&r->x, &h3); secp256k1_fe_negate(&r->x, &r->x, 3); secp256k1_fe_add(&r->x, &i2); + secp256k1_fe_negate(&r->y, &r->x, 5); secp256k1_fe_add(&r->y, &t); secp256k1_fe_mul(&r->y, &r->y, &i); + secp256k1_fe_mul(&h3, &h3, &s1); secp256k1_fe_negate(&h3, &h3, 1); + secp256k1_fe_add(&r->y, &h3); +} + + +static void secp256k1_gej_add_ge(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b) { + /* Operations: 7 mul, 5 sqr, 4 normalize, 21 mul_int/add/negate/cmov */ + static const secp256k1_fe fe_1 = SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 1); + secp256k1_fe zz, u1, u2, s1, s2, t, tt, m, n, q, rr; + secp256k1_fe m_alt, rr_alt; + int infinity, degenerate; + VERIFY_CHECK(!b->infinity); + VERIFY_CHECK(a->infinity == 0 || a->infinity == 1); + + /** In: + * Eric Brier and Marc Joye, Weierstrass Elliptic Curves and Side-Channel Attacks. + * In D. Naccache and P. Paillier, Eds., Public Key Cryptography, vol. 2274 of Lecture Notes in Computer Science, pages 335-345. Springer-Verlag, 2002. + * we find as solution for a unified addition/doubling formula: + * lambda = ((x1 + x2)^2 - x1 * x2 + a) / (y1 + y2), with a = 0 for secp256k1's curve equation. + * x3 = lambda^2 - (x1 + x2) + * 2*y3 = lambda * (x1 + x2 - 2 * x3) - (y1 + y2). + * + * Substituting x_i = Xi / Zi^2 and yi = Yi / Zi^3, for i=1,2,3, gives: + * U1 = X1*Z2^2, U2 = X2*Z1^2 + * S1 = Y1*Z2^3, S2 = Y2*Z1^3 + * Z = Z1*Z2 + * T = U1+U2 + * M = S1+S2 + * Q = T*M^2 + * R = T^2-U1*U2 + * X3 = 4*(R^2-Q) + * Y3 = 4*(R*(3*Q-2*R^2)-M^4) + * Z3 = 2*M*Z + * (Note that the paper uses xi = Xi / Zi and yi = Yi / Zi instead.) + * + * This formula has the benefit of being the same for both addition + * of distinct points and doubling. However, it breaks down in the + * case that either point is infinity, or that y1 = -y2. We handle + * these cases in the following ways: + * + * - If b is infinity we simply bail by means of a VERIFY_CHECK. + * + * - If a is infinity, we detect this, and at the end of the + * computation replace the result (which will be meaningless, + * but we compute to be constant-time) with b.x : b.y : 1. + * + * - If a = -b, we have y1 = -y2, which is a degenerate case. + * But here the answer is infinity, so we simply set the + * infinity flag of the result, overriding the computed values + * without even needing to cmov. + * + * - If y1 = -y2 but x1 != x2, which does occur thanks to certain + * properties of our curve (specifically, 1 has nontrivial cube + * roots in our field, and the curve equation has no x coefficient) + * then the answer is not infinity but also not given by the above + * equation. In this case, we cmov in place an alternate expression + * for lambda. Specifically (y1 - y2)/(x1 - x2). Where both these + * expressions for lambda are defined, they are equal, and can be + * obtained from each other by multiplication by (y1 + y2)/(y1 + y2) + * then substitution of x^3 + 7 for y^2 (using the curve equation). + * For all pairs of nonzero points (a, b) at least one is defined, + * so this covers everything. + */ + + secp256k1_fe_sqr(&zz, &a->z); /* z = Z1^2 */ + u1 = a->x; secp256k1_fe_normalize_weak(&u1); /* u1 = U1 = X1*Z2^2 (1) */ + secp256k1_fe_mul(&u2, &b->x, &zz); /* u2 = U2 = X2*Z1^2 (1) */ + s1 = a->y; secp256k1_fe_normalize_weak(&s1); /* s1 = S1 = Y1*Z2^3 (1) */ + secp256k1_fe_mul(&s2, &b->y, &zz); /* s2 = Y2*Z1^2 (1) */ + secp256k1_fe_mul(&s2, &s2, &a->z); /* s2 = S2 = Y2*Z1^3 (1) */ + t = u1; secp256k1_fe_add(&t, &u2); /* t = T = U1+U2 (2) */ + m = s1; secp256k1_fe_add(&m, &s2); /* m = M = S1+S2 (2) */ + secp256k1_fe_sqr(&rr, &t); /* rr = T^2 (1) */ + secp256k1_fe_negate(&m_alt, &u2, 1); /* Malt = -X2*Z1^2 */ + secp256k1_fe_mul(&tt, &u1, &m_alt); /* tt = -U1*U2 (2) */ + secp256k1_fe_add(&rr, &tt); /* rr = R = T^2-U1*U2 (3) */ + /** If lambda = R/M = 0/0 we have a problem (except in the "trivial" + * case that Z = z1z2 = 0, and this is special-cased later on). */ + degenerate = secp256k1_fe_normalizes_to_zero(&m) & + secp256k1_fe_normalizes_to_zero(&rr); + /* This only occurs when y1 == -y2 and x1^3 == x2^3, but x1 != x2. + * This means either x1 == beta*x2 or beta*x1 == x2, where beta is + * a nontrivial cube root of one. In either case, an alternate + * non-indeterminate expression for lambda is (y1 - y2)/(x1 - x2), + * so we set R/M equal to this. */ + rr_alt = s1; + secp256k1_fe_mul_int(&rr_alt, 2); /* rr = Y1*Z2^3 - Y2*Z1^3 (2) */ + secp256k1_fe_add(&m_alt, &u1); /* Malt = X1*Z2^2 - X2*Z1^2 */ + + secp256k1_fe_cmov(&rr_alt, &rr, !degenerate); + secp256k1_fe_cmov(&m_alt, &m, !degenerate); + /* Now Ralt / Malt = lambda and is guaranteed not to be 0/0. + * From here on out Ralt and Malt represent the numerator + * and denominator of lambda; R and M represent the explicit + * expressions x1^2 + x2^2 + x1x2 and y1 + y2. */ + secp256k1_fe_sqr(&n, &m_alt); /* n = Malt^2 (1) */ + secp256k1_fe_mul(&q, &n, &t); /* q = Q = T*Malt^2 (1) */ + /* These two lines use the observation that either M == Malt or M == 0, + * so M^3 * Malt is either Malt^4 (which is computed by squaring), or + * zero (which is "computed" by cmov). So the cost is one squaring + * versus two multiplications. */ + secp256k1_fe_sqr(&n, &n); + secp256k1_fe_cmov(&n, &m, degenerate); /* n = M^3 * Malt (2) */ + secp256k1_fe_sqr(&t, &rr_alt); /* t = Ralt^2 (1) */ + secp256k1_fe_mul(&r->z, &a->z, &m_alt); /* r->z = Malt*Z (1) */ + infinity = secp256k1_fe_normalizes_to_zero(&r->z) * (1 - a->infinity); + secp256k1_fe_mul_int(&r->z, 2); /* r->z = Z3 = 2*Malt*Z (2) */ + secp256k1_fe_negate(&q, &q, 1); /* q = -Q (2) */ + secp256k1_fe_add(&t, &q); /* t = Ralt^2-Q (3) */ + secp256k1_fe_normalize_weak(&t); + r->x = t; /* r->x = Ralt^2-Q (1) */ + secp256k1_fe_mul_int(&t, 2); /* t = 2*x3 (2) */ + secp256k1_fe_add(&t, &q); /* t = 2*x3 - Q: (4) */ + secp256k1_fe_mul(&t, &t, &rr_alt); /* t = Ralt*(2*x3 - Q) (1) */ + secp256k1_fe_add(&t, &n); /* t = Ralt*(2*x3 - Q) + M^3*Malt (3) */ + secp256k1_fe_negate(&r->y, &t, 3); /* r->y = Ralt*(Q - 2x3) - M^3*Malt (4) */ + secp256k1_fe_normalize_weak(&r->y); + secp256k1_fe_mul_int(&r->x, 4); /* r->x = X3 = 4*(Ralt^2-Q) */ + secp256k1_fe_mul_int(&r->y, 4); /* r->y = Y3 = 4*Ralt*(Q - 2x3) - 4*M^3*Malt (4) */ + + /** In case a->infinity == 1, replace r with (b->x, b->y, 1). */ + secp256k1_fe_cmov(&r->x, &b->x, a->infinity); + secp256k1_fe_cmov(&r->y, &b->y, a->infinity); + secp256k1_fe_cmov(&r->z, &fe_1, a->infinity); + r->infinity = infinity; +} + +static void secp256k1_gej_rescale(secp256k1_gej *r, const secp256k1_fe *s) { + /* Operations: 4 mul, 1 sqr */ + secp256k1_fe zz; + VERIFY_CHECK(!secp256k1_fe_is_zero(s)); + secp256k1_fe_sqr(&zz, s); + secp256k1_fe_mul(&r->x, &r->x, &zz); /* r->x *= s^2 */ + secp256k1_fe_mul(&r->y, &r->y, &zz); + secp256k1_fe_mul(&r->y, &r->y, s); /* r->y *= s^3 */ + secp256k1_fe_mul(&r->z, &r->z, s); /* r->z *= s */ +} + +static void secp256k1_ge_to_storage(secp256k1_ge_storage *r, const secp256k1_ge *a) { + secp256k1_fe x, y; + VERIFY_CHECK(!a->infinity); + x = a->x; + secp256k1_fe_normalize(&x); + y = a->y; + secp256k1_fe_normalize(&y); + secp256k1_fe_to_storage(&r->x, &x); + secp256k1_fe_to_storage(&r->y, &y); +} + +static void secp256k1_ge_from_storage(secp256k1_ge *r, const secp256k1_ge_storage *a) { + secp256k1_fe_from_storage(&r->x, &a->x); + secp256k1_fe_from_storage(&r->y, &a->y); + r->infinity = 0; +} + +static SECP256K1_INLINE void secp256k1_ge_storage_cmov(secp256k1_ge_storage *r, const secp256k1_ge_storage *a, int flag) { + secp256k1_fe_storage_cmov(&r->x, &a->x, flag); + secp256k1_fe_storage_cmov(&r->y, &a->y, flag); +} + +#ifdef USE_ENDOMORPHISM +static void secp256k1_ge_mul_lambda(secp256k1_ge *r, const secp256k1_ge *a) { + static const secp256k1_fe beta = SECP256K1_FE_CONST( + 0x7ae96a2bul, 0x657c0710ul, 0x6e64479eul, 0xac3434e9ul, + 0x9cf04975ul, 0x12f58995ul, 0xc1396c28ul, 0x719501eeul + ); + *r = *a; + secp256k1_fe_mul(&r->x, &r->x, &beta); +} +#endif + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/hash.h b/crypto/secp256k1/libsecp256k1/src/hash.h new file mode 100644 index 000000000..0ff01e63f --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/hash.h @@ -0,0 +1,41 @@ +/********************************************************************** + * Copyright (c) 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_HASH_ +#define _SECP256K1_HASH_ + +#include +#include + +typedef struct { + uint32_t s[32]; + uint32_t buf[16]; /* In big endian */ + size_t bytes; +} secp256k1_sha256_t; + +static void secp256k1_sha256_initialize(secp256k1_sha256_t *hash); +static void secp256k1_sha256_write(secp256k1_sha256_t *hash, const unsigned char *data, size_t size); +static void secp256k1_sha256_finalize(secp256k1_sha256_t *hash, unsigned char *out32); + +typedef struct { + secp256k1_sha256_t inner, outer; +} secp256k1_hmac_sha256_t; + +static void secp256k1_hmac_sha256_initialize(secp256k1_hmac_sha256_t *hash, const unsigned char *key, size_t size); +static void secp256k1_hmac_sha256_write(secp256k1_hmac_sha256_t *hash, const unsigned char *data, size_t size); +static void secp256k1_hmac_sha256_finalize(secp256k1_hmac_sha256_t *hash, unsigned char *out32); + +typedef struct { + unsigned char v[32]; + unsigned char k[32]; + int retry; +} secp256k1_rfc6979_hmac_sha256_t; + +static void secp256k1_rfc6979_hmac_sha256_initialize(secp256k1_rfc6979_hmac_sha256_t *rng, const unsigned char *key, size_t keylen); +static void secp256k1_rfc6979_hmac_sha256_generate(secp256k1_rfc6979_hmac_sha256_t *rng, unsigned char *out, size_t outlen); +static void secp256k1_rfc6979_hmac_sha256_finalize(secp256k1_rfc6979_hmac_sha256_t *rng); + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/hash_impl.h b/crypto/secp256k1/libsecp256k1/src/hash_impl.h new file mode 100644 index 000000000..ae55df6d8 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/hash_impl.h @@ -0,0 +1,283 @@ +/********************************************************************** + * Copyright (c) 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_HASH_IMPL_H_ +#define _SECP256K1_HASH_IMPL_H_ + +#include "hash.h" + +#include +#include +#include + +#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z)))) +#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y)))) +#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10)) +#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7)) +#define sigma0(x) (((x) >> 7 | (x) << 25) ^ ((x) >> 18 | (x) << 14) ^ ((x) >> 3)) +#define sigma1(x) (((x) >> 17 | (x) << 15) ^ ((x) >> 19 | (x) << 13) ^ ((x) >> 10)) + +#define Round(a,b,c,d,e,f,g,h,k,w) do { \ + uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \ + uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \ + (d) += t1; \ + (h) = t1 + t2; \ +} while(0) + +#ifdef WORDS_BIGENDIAN +#define BE32(x) (x) +#else +#define BE32(p) ((((p) & 0xFF) << 24) | (((p) & 0xFF00) << 8) | (((p) & 0xFF0000) >> 8) | (((p) & 0xFF000000) >> 24)) +#endif + +static void secp256k1_sha256_initialize(secp256k1_sha256_t *hash) { + hash->s[0] = 0x6a09e667ul; + hash->s[1] = 0xbb67ae85ul; + hash->s[2] = 0x3c6ef372ul; + hash->s[3] = 0xa54ff53aul; + hash->s[4] = 0x510e527ful; + hash->s[5] = 0x9b05688cul; + hash->s[6] = 0x1f83d9abul; + hash->s[7] = 0x5be0cd19ul; + hash->bytes = 0; +} + +/** Perform one SHA-256 transformation, processing 16 big endian 32-bit words. */ +static void secp256k1_sha256_transform(uint32_t* s, const uint32_t* chunk) { + uint32_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4], f = s[5], g = s[6], h = s[7]; + uint32_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15; + + Round(a, b, c, d, e, f, g, h, 0x428a2f98, w0 = BE32(chunk[0])); + Round(h, a, b, c, d, e, f, g, 0x71374491, w1 = BE32(chunk[1])); + Round(g, h, a, b, c, d, e, f, 0xb5c0fbcf, w2 = BE32(chunk[2])); + Round(f, g, h, a, b, c, d, e, 0xe9b5dba5, w3 = BE32(chunk[3])); + Round(e, f, g, h, a, b, c, d, 0x3956c25b, w4 = BE32(chunk[4])); + Round(d, e, f, g, h, a, b, c, 0x59f111f1, w5 = BE32(chunk[5])); + Round(c, d, e, f, g, h, a, b, 0x923f82a4, w6 = BE32(chunk[6])); + Round(b, c, d, e, f, g, h, a, 0xab1c5ed5, w7 = BE32(chunk[7])); + Round(a, b, c, d, e, f, g, h, 0xd807aa98, w8 = BE32(chunk[8])); + Round(h, a, b, c, d, e, f, g, 0x12835b01, w9 = BE32(chunk[9])); + Round(g, h, a, b, c, d, e, f, 0x243185be, w10 = BE32(chunk[10])); + Round(f, g, h, a, b, c, d, e, 0x550c7dc3, w11 = BE32(chunk[11])); + Round(e, f, g, h, a, b, c, d, 0x72be5d74, w12 = BE32(chunk[12])); + Round(d, e, f, g, h, a, b, c, 0x80deb1fe, w13 = BE32(chunk[13])); + Round(c, d, e, f, g, h, a, b, 0x9bdc06a7, w14 = BE32(chunk[14])); + Round(b, c, d, e, f, g, h, a, 0xc19bf174, w15 = BE32(chunk[15])); + + Round(a, b, c, d, e, f, g, h, 0xe49b69c1, w0 += sigma1(w14) + w9 + sigma0(w1)); + Round(h, a, b, c, d, e, f, g, 0xefbe4786, w1 += sigma1(w15) + w10 + sigma0(w2)); + Round(g, h, a, b, c, d, e, f, 0x0fc19dc6, w2 += sigma1(w0) + w11 + sigma0(w3)); + Round(f, g, h, a, b, c, d, e, 0x240ca1cc, w3 += sigma1(w1) + w12 + sigma0(w4)); + Round(e, f, g, h, a, b, c, d, 0x2de92c6f, w4 += sigma1(w2) + w13 + sigma0(w5)); + Round(d, e, f, g, h, a, b, c, 0x4a7484aa, w5 += sigma1(w3) + w14 + sigma0(w6)); + Round(c, d, e, f, g, h, a, b, 0x5cb0a9dc, w6 += sigma1(w4) + w15 + sigma0(w7)); + Round(b, c, d, e, f, g, h, a, 0x76f988da, w7 += sigma1(w5) + w0 + sigma0(w8)); + Round(a, b, c, d, e, f, g, h, 0x983e5152, w8 += sigma1(w6) + w1 + sigma0(w9)); + Round(h, a, b, c, d, e, f, g, 0xa831c66d, w9 += sigma1(w7) + w2 + sigma0(w10)); + Round(g, h, a, b, c, d, e, f, 0xb00327c8, w10 += sigma1(w8) + w3 + sigma0(w11)); + Round(f, g, h, a, b, c, d, e, 0xbf597fc7, w11 += sigma1(w9) + w4 + sigma0(w12)); + Round(e, f, g, h, a, b, c, d, 0xc6e00bf3, w12 += sigma1(w10) + w5 + sigma0(w13)); + Round(d, e, f, g, h, a, b, c, 0xd5a79147, w13 += sigma1(w11) + w6 + sigma0(w14)); + Round(c, d, e, f, g, h, a, b, 0x06ca6351, w14 += sigma1(w12) + w7 + sigma0(w15)); + Round(b, c, d, e, f, g, h, a, 0x14292967, w15 += sigma1(w13) + w8 + sigma0(w0)); + + Round(a, b, c, d, e, f, g, h, 0x27b70a85, w0 += sigma1(w14) + w9 + sigma0(w1)); + Round(h, a, b, c, d, e, f, g, 0x2e1b2138, w1 += sigma1(w15) + w10 + sigma0(w2)); + Round(g, h, a, b, c, d, e, f, 0x4d2c6dfc, w2 += sigma1(w0) + w11 + sigma0(w3)); + Round(f, g, h, a, b, c, d, e, 0x53380d13, w3 += sigma1(w1) + w12 + sigma0(w4)); + Round(e, f, g, h, a, b, c, d, 0x650a7354, w4 += sigma1(w2) + w13 + sigma0(w5)); + Round(d, e, f, g, h, a, b, c, 0x766a0abb, w5 += sigma1(w3) + w14 + sigma0(w6)); + Round(c, d, e, f, g, h, a, b, 0x81c2c92e, w6 += sigma1(w4) + w15 + sigma0(w7)); + Round(b, c, d, e, f, g, h, a, 0x92722c85, w7 += sigma1(w5) + w0 + sigma0(w8)); + Round(a, b, c, d, e, f, g, h, 0xa2bfe8a1, w8 += sigma1(w6) + w1 + sigma0(w9)); + Round(h, a, b, c, d, e, f, g, 0xa81a664b, w9 += sigma1(w7) + w2 + sigma0(w10)); + Round(g, h, a, b, c, d, e, f, 0xc24b8b70, w10 += sigma1(w8) + w3 + sigma0(w11)); + Round(f, g, h, a, b, c, d, e, 0xc76c51a3, w11 += sigma1(w9) + w4 + sigma0(w12)); + Round(e, f, g, h, a, b, c, d, 0xd192e819, w12 += sigma1(w10) + w5 + sigma0(w13)); + Round(d, e, f, g, h, a, b, c, 0xd6990624, w13 += sigma1(w11) + w6 + sigma0(w14)); + Round(c, d, e, f, g, h, a, b, 0xf40e3585, w14 += sigma1(w12) + w7 + sigma0(w15)); + Round(b, c, d, e, f, g, h, a, 0x106aa070, w15 += sigma1(w13) + w8 + sigma0(w0)); + + Round(a, b, c, d, e, f, g, h, 0x19a4c116, w0 += sigma1(w14) + w9 + sigma0(w1)); + Round(h, a, b, c, d, e, f, g, 0x1e376c08, w1 += sigma1(w15) + w10 + sigma0(w2)); + Round(g, h, a, b, c, d, e, f, 0x2748774c, w2 += sigma1(w0) + w11 + sigma0(w3)); + Round(f, g, h, a, b, c, d, e, 0x34b0bcb5, w3 += sigma1(w1) + w12 + sigma0(w4)); + Round(e, f, g, h, a, b, c, d, 0x391c0cb3, w4 += sigma1(w2) + w13 + sigma0(w5)); + Round(d, e, f, g, h, a, b, c, 0x4ed8aa4a, w5 += sigma1(w3) + w14 + sigma0(w6)); + Round(c, d, e, f, g, h, a, b, 0x5b9cca4f, w6 += sigma1(w4) + w15 + sigma0(w7)); + Round(b, c, d, e, f, g, h, a, 0x682e6ff3, w7 += sigma1(w5) + w0 + sigma0(w8)); + Round(a, b, c, d, e, f, g, h, 0x748f82ee, w8 += sigma1(w6) + w1 + sigma0(w9)); + Round(h, a, b, c, d, e, f, g, 0x78a5636f, w9 += sigma1(w7) + w2 + sigma0(w10)); + Round(g, h, a, b, c, d, e, f, 0x84c87814, w10 += sigma1(w8) + w3 + sigma0(w11)); + Round(f, g, h, a, b, c, d, e, 0x8cc70208, w11 += sigma1(w9) + w4 + sigma0(w12)); + Round(e, f, g, h, a, b, c, d, 0x90befffa, w12 += sigma1(w10) + w5 + sigma0(w13)); + Round(d, e, f, g, h, a, b, c, 0xa4506ceb, w13 += sigma1(w11) + w6 + sigma0(w14)); + Round(c, d, e, f, g, h, a, b, 0xbef9a3f7, w14 + sigma1(w12) + w7 + sigma0(w15)); + Round(b, c, d, e, f, g, h, a, 0xc67178f2, w15 + sigma1(w13) + w8 + sigma0(w0)); + + s[0] += a; + s[1] += b; + s[2] += c; + s[3] += d; + s[4] += e; + s[5] += f; + s[6] += g; + s[7] += h; +} + +static void secp256k1_sha256_write(secp256k1_sha256_t *hash, const unsigned char *data, size_t len) { + size_t bufsize = hash->bytes & 0x3F; + hash->bytes += len; + while (bufsize + len >= 64) { + /* Fill the buffer, and process it. */ + memcpy(((unsigned char*)hash->buf) + bufsize, data, 64 - bufsize); + data += 64 - bufsize; + len -= 64 - bufsize; + secp256k1_sha256_transform(hash->s, hash->buf); + bufsize = 0; + } + if (len) { + /* Fill the buffer with what remains. */ + memcpy(((unsigned char*)hash->buf) + bufsize, data, len); + } +} + +static void secp256k1_sha256_finalize(secp256k1_sha256_t *hash, unsigned char *out32) { + static const unsigned char pad[64] = {0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + uint32_t sizedesc[2]; + uint32_t out[8]; + int i = 0; + sizedesc[0] = BE32(hash->bytes >> 29); + sizedesc[1] = BE32(hash->bytes << 3); + secp256k1_sha256_write(hash, pad, 1 + ((119 - (hash->bytes % 64)) % 64)); + secp256k1_sha256_write(hash, (const unsigned char*)sizedesc, 8); + for (i = 0; i < 8; i++) { + out[i] = BE32(hash->s[i]); + hash->s[i] = 0; + } + memcpy(out32, (const unsigned char*)out, 32); +} + +static void secp256k1_hmac_sha256_initialize(secp256k1_hmac_sha256_t *hash, const unsigned char *key, size_t keylen) { + int n; + unsigned char rkey[64]; + if (keylen <= 64) { + memcpy(rkey, key, keylen); + memset(rkey + keylen, 0, 64 - keylen); + } else { + secp256k1_sha256_t sha256; + secp256k1_sha256_initialize(&sha256); + secp256k1_sha256_write(&sha256, key, keylen); + secp256k1_sha256_finalize(&sha256, rkey); + memset(rkey + 32, 0, 32); + } + + secp256k1_sha256_initialize(&hash->outer); + for (n = 0; n < 64; n++) { + rkey[n] ^= 0x5c; + } + secp256k1_sha256_write(&hash->outer, rkey, 64); + + secp256k1_sha256_initialize(&hash->inner); + for (n = 0; n < 64; n++) { + rkey[n] ^= 0x5c ^ 0x36; + } + secp256k1_sha256_write(&hash->inner, rkey, 64); + memset(rkey, 0, 64); +} + +static void secp256k1_hmac_sha256_write(secp256k1_hmac_sha256_t *hash, const unsigned char *data, size_t size) { + secp256k1_sha256_write(&hash->inner, data, size); +} + +static void secp256k1_hmac_sha256_finalize(secp256k1_hmac_sha256_t *hash, unsigned char *out32) { + unsigned char temp[32]; + secp256k1_sha256_finalize(&hash->inner, temp); + secp256k1_sha256_write(&hash->outer, temp, 32); + memset(temp, 0, 32); + secp256k1_sha256_finalize(&hash->outer, out32); +} + + +static void secp256k1_rfc6979_hmac_sha256_initialize(secp256k1_rfc6979_hmac_sha256_t *rng, const unsigned char *key, size_t keylen) { + secp256k1_hmac_sha256_t hmac; + static const unsigned char zero[1] = {0x00}; + static const unsigned char one[1] = {0x01}; + + memset(rng->v, 0x01, 32); /* RFC6979 3.2.b. */ + memset(rng->k, 0x00, 32); /* RFC6979 3.2.c. */ + + /* RFC6979 3.2.d. */ + secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); + secp256k1_hmac_sha256_write(&hmac, rng->v, 32); + secp256k1_hmac_sha256_write(&hmac, zero, 1); + secp256k1_hmac_sha256_write(&hmac, key, keylen); + secp256k1_hmac_sha256_finalize(&hmac, rng->k); + secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); + secp256k1_hmac_sha256_write(&hmac, rng->v, 32); + secp256k1_hmac_sha256_finalize(&hmac, rng->v); + + /* RFC6979 3.2.f. */ + secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); + secp256k1_hmac_sha256_write(&hmac, rng->v, 32); + secp256k1_hmac_sha256_write(&hmac, one, 1); + secp256k1_hmac_sha256_write(&hmac, key, keylen); + secp256k1_hmac_sha256_finalize(&hmac, rng->k); + secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); + secp256k1_hmac_sha256_write(&hmac, rng->v, 32); + secp256k1_hmac_sha256_finalize(&hmac, rng->v); + rng->retry = 0; +} + +static void secp256k1_rfc6979_hmac_sha256_generate(secp256k1_rfc6979_hmac_sha256_t *rng, unsigned char *out, size_t outlen) { + /* RFC6979 3.2.h. */ + static const unsigned char zero[1] = {0x00}; + if (rng->retry) { + secp256k1_hmac_sha256_t hmac; + secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); + secp256k1_hmac_sha256_write(&hmac, rng->v, 32); + secp256k1_hmac_sha256_write(&hmac, zero, 1); + secp256k1_hmac_sha256_finalize(&hmac, rng->k); + secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); + secp256k1_hmac_sha256_write(&hmac, rng->v, 32); + secp256k1_hmac_sha256_finalize(&hmac, rng->v); + } + + while (outlen > 0) { + secp256k1_hmac_sha256_t hmac; + int now = outlen; + secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); + secp256k1_hmac_sha256_write(&hmac, rng->v, 32); + secp256k1_hmac_sha256_finalize(&hmac, rng->v); + if (now > 32) { + now = 32; + } + memcpy(out, rng->v, now); + out += now; + outlen -= now; + } + + rng->retry = 1; +} + +static void secp256k1_rfc6979_hmac_sha256_finalize(secp256k1_rfc6979_hmac_sha256_t *rng) { + memset(rng->k, 0, 32); + memset(rng->v, 0, 32); + rng->retry = 0; +} + + +#undef Round +#undef sigma0 +#undef sigma1 +#undef Sigma0 +#undef Sigma1 +#undef Ch +#undef Maj +#undef ReadBE32 +#undef WriteBE32 + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/java/org/bitcoin/NativeSecp256k1.java b/crypto/secp256k1/libsecp256k1/src/java/org/bitcoin/NativeSecp256k1.java new file mode 100644 index 000000000..90a498eaa --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/java/org/bitcoin/NativeSecp256k1.java @@ -0,0 +1,60 @@ +package org.bitcoin; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +import com.google.common.base.Preconditions; + + +/** + * This class holds native methods to handle ECDSA verification. + * You can find an example library that can be used for this at + * https://github.com/sipa/secp256k1 + */ +public class NativeSecp256k1 { + public static final boolean enabled; + static { + boolean isEnabled = true; + try { + System.loadLibrary("javasecp256k1"); + } catch (UnsatisfiedLinkError e) { + isEnabled = false; + } + enabled = isEnabled; + } + + private static ThreadLocal nativeECDSABuffer = new ThreadLocal(); + /** + * Verifies the given secp256k1 signature in native code. + * Calling when enabled == false is undefined (probably library not loaded) + * + * @param data The data which was signed, must be exactly 32 bytes + * @param signature The signature + * @param pub The public key which did the signing + */ + public static boolean verify(byte[] data, byte[] signature, byte[] pub) { + Preconditions.checkArgument(data.length == 32 && signature.length <= 520 && pub.length <= 520); + + ByteBuffer byteBuff = nativeECDSABuffer.get(); + if (byteBuff == null) { + byteBuff = ByteBuffer.allocateDirect(32 + 8 + 520 + 520); + byteBuff.order(ByteOrder.nativeOrder()); + nativeECDSABuffer.set(byteBuff); + } + byteBuff.rewind(); + byteBuff.put(data); + byteBuff.putInt(signature.length); + byteBuff.putInt(pub.length); + byteBuff.put(signature); + byteBuff.put(pub); + return secp256k1_ecdsa_verify(byteBuff) == 1; + } + + /** + * @param byteBuff signature format is byte[32] data, + * native-endian int signatureLength, native-endian int pubkeyLength, + * byte[signatureLength] signature, byte[pubkeyLength] pub + * @returns 1 for valid signature, anything else for invalid + */ + private static native int secp256k1_ecdsa_verify(ByteBuffer byteBuff); +} diff --git a/crypto/secp256k1/libsecp256k1/src/java/org_bitcoin_NativeSecp256k1.c b/crypto/secp256k1/libsecp256k1/src/java/org_bitcoin_NativeSecp256k1.c new file mode 100644 index 000000000..bb4cd7072 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/java/org_bitcoin_NativeSecp256k1.c @@ -0,0 +1,23 @@ +#include "org_bitcoin_NativeSecp256k1.h" +#include "include/secp256k1.h" + +JNIEXPORT jint JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdsa_1verify + (JNIEnv* env, jclass classObject, jobject byteBufferObject) +{ + unsigned char* data = (unsigned char*) (*env)->GetDirectBufferAddress(env, byteBufferObject); + int sigLen = *((int*)(data + 32)); + int pubLen = *((int*)(data + 32 + 4)); + + return secp256k1_ecdsa_verify(data, 32, data+32+8, sigLen, data+32+8+sigLen, pubLen); +} + +static void __javasecp256k1_attach(void) __attribute__((constructor)); +static void __javasecp256k1_detach(void) __attribute__((destructor)); + +static void __javasecp256k1_attach(void) { + secp256k1_start(SECP256K1_START_VERIFY); +} + +static void __javasecp256k1_detach(void) { + secp256k1_stop(); +} diff --git a/crypto/secp256k1/libsecp256k1/src/java/org_bitcoin_NativeSecp256k1.h b/crypto/secp256k1/libsecp256k1/src/java/org_bitcoin_NativeSecp256k1.h new file mode 100644 index 000000000..d7fb004fa --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/java/org_bitcoin_NativeSecp256k1.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_bitcoin_NativeSecp256k1 */ + +#ifndef _Included_org_bitcoin_NativeSecp256k1 +#define _Included_org_bitcoin_NativeSecp256k1 +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_bitcoin_NativeSecp256k1 + * Method: secp256k1_ecdsa_verify + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdsa_1verify + (JNIEnv *, jclass, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/modules/ecdh/Makefile.am.include b/crypto/secp256k1/libsecp256k1/src/modules/ecdh/Makefile.am.include new file mode 100644 index 000000000..8ef3aff92 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/modules/ecdh/Makefile.am.include @@ -0,0 +1,9 @@ +include_HEADERS += include/secp256k1_ecdh.h +noinst_HEADERS += src/modules/ecdh/main_impl.h +noinst_HEADERS += src/modules/ecdh/tests_impl.h +if USE_BENCHMARK +noinst_PROGRAMS += bench_ecdh +bench_ecdh_SOURCES = src/bench_ecdh.c +bench_ecdh_LDADD = libsecp256k1.la $(SECP_LIBS) +bench_ecdh_LDFLAGS = -static +endif diff --git a/crypto/secp256k1/libsecp256k1/src/modules/ecdh/main_impl.h b/crypto/secp256k1/libsecp256k1/src/modules/ecdh/main_impl.h new file mode 100644 index 000000000..c23e4f82f --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/modules/ecdh/main_impl.h @@ -0,0 +1,54 @@ +/********************************************************************** + * Copyright (c) 2015 Andrew Poelstra * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_MODULE_ECDH_MAIN_ +#define _SECP256K1_MODULE_ECDH_MAIN_ + +#include "include/secp256k1_ecdh.h" +#include "ecmult_const_impl.h" + +int secp256k1_ecdh(const secp256k1_context* ctx, unsigned char *result, const secp256k1_pubkey *point, const unsigned char *scalar) { + int ret = 0; + int overflow = 0; + secp256k1_gej res; + secp256k1_ge pt; + secp256k1_scalar s; + ARG_CHECK(result != NULL); + ARG_CHECK(point != NULL); + ARG_CHECK(scalar != NULL); + (void)ctx; + + secp256k1_pubkey_load(ctx, &pt, point); + secp256k1_scalar_set_b32(&s, scalar, &overflow); + if (overflow || secp256k1_scalar_is_zero(&s)) { + ret = 0; + } else { + unsigned char x[32]; + unsigned char y[1]; + secp256k1_sha256_t sha; + + secp256k1_ecmult_const(&res, &pt, &s); + secp256k1_ge_set_gej(&pt, &res); + /* Compute a hash of the point in compressed form + * Note we cannot use secp256k1_eckey_pubkey_serialize here since it does not + * expect its output to be secret and has a timing sidechannel. */ + secp256k1_fe_normalize(&pt.x); + secp256k1_fe_normalize(&pt.y); + secp256k1_fe_get_b32(x, &pt.x); + y[0] = 0x02 | secp256k1_fe_is_odd(&pt.y); + + secp256k1_sha256_initialize(&sha); + secp256k1_sha256_write(&sha, y, sizeof(y)); + secp256k1_sha256_write(&sha, x, sizeof(x)); + secp256k1_sha256_finalize(&sha, result); + ret = 1; + } + + secp256k1_scalar_clear(&s); + return ret; +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/modules/ecdh/tests_impl.h b/crypto/secp256k1/libsecp256k1/src/modules/ecdh/tests_impl.h new file mode 100644 index 000000000..7badc9033 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/modules/ecdh/tests_impl.h @@ -0,0 +1,75 @@ +/********************************************************************** + * Copyright (c) 2015 Andrew Poelstra * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_MODULE_ECDH_TESTS_ +#define _SECP256K1_MODULE_ECDH_TESTS_ + +void test_ecdh_generator_basepoint(void) { + unsigned char s_one[32] = { 0 }; + secp256k1_pubkey point[2]; + int i; + + s_one[31] = 1; + /* Check against pubkey creation when the basepoint is the generator */ + for (i = 0; i < 100; ++i) { + secp256k1_sha256_t sha; + unsigned char s_b32[32]; + unsigned char output_ecdh[32]; + unsigned char output_ser[32]; + unsigned char point_ser[33]; + size_t point_ser_len = sizeof(point_ser); + secp256k1_scalar s; + + random_scalar_order(&s); + secp256k1_scalar_get_b32(s_b32, &s); + + /* compute using ECDH function */ + CHECK(secp256k1_ec_pubkey_create(ctx, &point[0], s_one) == 1); + CHECK(secp256k1_ecdh(ctx, output_ecdh, &point[0], s_b32) == 1); + /* compute "explicitly" */ + CHECK(secp256k1_ec_pubkey_create(ctx, &point[1], s_b32) == 1); + CHECK(secp256k1_ec_pubkey_serialize(ctx, point_ser, &point_ser_len, &point[1], SECP256K1_EC_COMPRESSED) == 1); + CHECK(point_ser_len == sizeof(point_ser)); + secp256k1_sha256_initialize(&sha); + secp256k1_sha256_write(&sha, point_ser, point_ser_len); + secp256k1_sha256_finalize(&sha, output_ser); + /* compare */ + CHECK(memcmp(output_ecdh, output_ser, sizeof(output_ser)) == 0); + } +} + +void test_bad_scalar(void) { + unsigned char s_zero[32] = { 0 }; + unsigned char s_overflow[32] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, + 0xba, 0xae, 0xdc, 0xe6, 0xaf, 0x48, 0xa0, 0x3b, + 0xbf, 0xd2, 0x5e, 0x8c, 0xd0, 0x36, 0x41, 0x41 + }; + unsigned char s_rand[32] = { 0 }; + unsigned char output[32]; + secp256k1_scalar rand; + secp256k1_pubkey point; + + /* Create random point */ + random_scalar_order(&rand); + secp256k1_scalar_get_b32(s_rand, &rand); + CHECK(secp256k1_ec_pubkey_create(ctx, &point, s_rand) == 1); + + /* Try to multiply it by bad values */ + CHECK(secp256k1_ecdh(ctx, output, &point, s_zero) == 0); + CHECK(secp256k1_ecdh(ctx, output, &point, s_overflow) == 0); + /* ...and a good one */ + s_overflow[31] -= 1; + CHECK(secp256k1_ecdh(ctx, output, &point, s_overflow) == 1); +} + +void run_ecdh_tests(void) { + test_ecdh_generator_basepoint(); + test_bad_scalar(); +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/modules/recovery/Makefile.am.include b/crypto/secp256k1/libsecp256k1/src/modules/recovery/Makefile.am.include new file mode 100644 index 000000000..754469eeb --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/modules/recovery/Makefile.am.include @@ -0,0 +1,9 @@ +include_HEADERS += include/secp256k1_recovery.h +noinst_HEADERS += src/modules/recovery/main_impl.h +noinst_HEADERS += src/modules/recovery/tests_impl.h +if USE_BENCHMARK +noinst_PROGRAMS += bench_recover +bench_recover_SOURCES = src/bench_recover.c +bench_recover_LDADD = libsecp256k1.la $(SECP_LIBS) +bench_recover_LDFLAGS = -static +endif diff --git a/crypto/secp256k1/libsecp256k1/src/modules/recovery/main_impl.h b/crypto/secp256k1/libsecp256k1/src/modules/recovery/main_impl.h new file mode 100644 index 000000000..75b695894 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/modules/recovery/main_impl.h @@ -0,0 +1,156 @@ +/********************************************************************** + * Copyright (c) 2013-2015 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_MODULE_RECOVERY_MAIN_ +#define _SECP256K1_MODULE_RECOVERY_MAIN_ + +#include "include/secp256k1_recovery.h" + +static void secp256k1_ecdsa_recoverable_signature_load(const secp256k1_context* ctx, secp256k1_scalar* r, secp256k1_scalar* s, int* recid, const secp256k1_ecdsa_recoverable_signature* sig) { + (void)ctx; + if (sizeof(secp256k1_scalar) == 32) { + /* When the secp256k1_scalar type is exactly 32 byte, use its + * representation inside secp256k1_ecdsa_signature, as conversion is very fast. + * Note that secp256k1_ecdsa_signature_save must use the same representation. */ + memcpy(r, &sig->data[0], 32); + memcpy(s, &sig->data[32], 32); + } else { + secp256k1_scalar_set_b32(r, &sig->data[0], NULL); + secp256k1_scalar_set_b32(s, &sig->data[32], NULL); + } + *recid = sig->data[64]; +} + +static void secp256k1_ecdsa_recoverable_signature_save(secp256k1_ecdsa_recoverable_signature* sig, const secp256k1_scalar* r, const secp256k1_scalar* s, int recid) { + if (sizeof(secp256k1_scalar) == 32) { + memcpy(&sig->data[0], r, 32); + memcpy(&sig->data[32], s, 32); + } else { + secp256k1_scalar_get_b32(&sig->data[0], r); + secp256k1_scalar_get_b32(&sig->data[32], s); + } + sig->data[64] = recid; +} + +int secp256k1_ecdsa_recoverable_signature_parse_compact(const secp256k1_context* ctx, secp256k1_ecdsa_recoverable_signature* sig, const unsigned char *input64, int recid) { + secp256k1_scalar r, s; + int ret = 1; + int overflow = 0; + + (void)ctx; + ARG_CHECK(sig != NULL); + ARG_CHECK(input64 != NULL); + ARG_CHECK(recid >= 0 && recid <= 3); + + secp256k1_scalar_set_b32(&r, &input64[0], &overflow); + ret &= !overflow; + secp256k1_scalar_set_b32(&s, &input64[32], &overflow); + ret &= !overflow; + if (ret) { + secp256k1_ecdsa_recoverable_signature_save(sig, &r, &s, recid); + } else { + memset(sig, 0, sizeof(*sig)); + } + return ret; +} + +int secp256k1_ecdsa_recoverable_signature_serialize_compact(const secp256k1_context* ctx, unsigned char *output64, int *recid, const secp256k1_ecdsa_recoverable_signature* sig) { + secp256k1_scalar r, s; + + (void)ctx; + ARG_CHECK(output64 != NULL); + ARG_CHECK(sig != NULL); + + secp256k1_ecdsa_recoverable_signature_load(ctx, &r, &s, recid, sig); + secp256k1_scalar_get_b32(&output64[0], &r); + secp256k1_scalar_get_b32(&output64[32], &s); + return 1; +} + +int secp256k1_ecdsa_recoverable_signature_convert(const secp256k1_context* ctx, secp256k1_ecdsa_signature* sig, const secp256k1_ecdsa_recoverable_signature* sigin) { + secp256k1_scalar r, s; + int recid; + + (void)ctx; + ARG_CHECK(sig != NULL); + ARG_CHECK(sigin != NULL); + + secp256k1_ecdsa_recoverable_signature_load(ctx, &r, &s, &recid, sigin); + secp256k1_ecdsa_signature_save(sig, &r, &s); + return 1; +} + +int secp256k1_ecdsa_sign_recoverable(const secp256k1_context* ctx, secp256k1_ecdsa_recoverable_signature *signature, const unsigned char *msg32, const unsigned char *seckey, secp256k1_nonce_function noncefp, const void* noncedata) { + secp256k1_scalar r, s; + secp256k1_scalar sec, non, msg; + int recid; + int ret = 0; + int overflow = 0; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx)); + ARG_CHECK(msg32 != NULL); + ARG_CHECK(signature != NULL); + ARG_CHECK(seckey != NULL); + if (noncefp == NULL) { + noncefp = secp256k1_nonce_function_default; + } + + secp256k1_scalar_set_b32(&sec, seckey, &overflow); + /* Fail if the secret key is invalid. */ + if (!overflow && !secp256k1_scalar_is_zero(&sec)) { + unsigned int count = 0; + secp256k1_scalar_set_b32(&msg, msg32, NULL); + while (1) { + unsigned char nonce32[32]; + ret = noncefp(nonce32, seckey, msg32, NULL, (void*)noncedata, count); + if (!ret) { + break; + } + secp256k1_scalar_set_b32(&non, nonce32, &overflow); + memset(nonce32, 0, 32); + if (!secp256k1_scalar_is_zero(&non) && !overflow) { + if (secp256k1_ecdsa_sig_sign(&ctx->ecmult_gen_ctx, &r, &s, &sec, &msg, &non, &recid)) { + break; + } + } + count++; + } + secp256k1_scalar_clear(&msg); + secp256k1_scalar_clear(&non); + secp256k1_scalar_clear(&sec); + } + if (ret) { + secp256k1_ecdsa_recoverable_signature_save(signature, &r, &s, recid); + } else { + memset(signature, 0, sizeof(*signature)); + } + return ret; +} + +int secp256k1_ecdsa_recover(const secp256k1_context* ctx, secp256k1_pubkey *pubkey, const secp256k1_ecdsa_recoverable_signature *signature, const unsigned char *msg32) { + secp256k1_ge q; + secp256k1_scalar r, s; + secp256k1_scalar m; + int recid; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_context_is_built(&ctx->ecmult_ctx)); + ARG_CHECK(msg32 != NULL); + ARG_CHECK(signature != NULL); + ARG_CHECK(pubkey != NULL); + + secp256k1_ecdsa_recoverable_signature_load(ctx, &r, &s, &recid, signature); + ARG_CHECK(recid >= 0 && recid < 4); + secp256k1_scalar_set_b32(&m, msg32, NULL); + if (secp256k1_ecdsa_sig_recover(&ctx->ecmult_ctx, &r, &s, &q, &m, recid)) { + secp256k1_pubkey_save(pubkey, &q); + return 1; + } else { + memset(pubkey, 0, sizeof(*pubkey)); + return 0; + } +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/modules/recovery/tests_impl.h b/crypto/secp256k1/libsecp256k1/src/modules/recovery/tests_impl.h new file mode 100644 index 000000000..5a78fae92 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/modules/recovery/tests_impl.h @@ -0,0 +1,249 @@ +/********************************************************************** + * Copyright (c) 2013-2015 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_MODULE_RECOVERY_TESTS_ +#define _SECP256K1_MODULE_RECOVERY_TESTS_ + +void test_ecdsa_recovery_end_to_end(void) { + unsigned char extra[32] = {0x00}; + unsigned char privkey[32]; + unsigned char message[32]; + secp256k1_ecdsa_signature signature[5]; + secp256k1_ecdsa_recoverable_signature rsignature[5]; + unsigned char sig[74]; + secp256k1_pubkey pubkey; + secp256k1_pubkey recpubkey; + int recid = 0; + + /* Generate a random key and message. */ + { + secp256k1_scalar msg, key; + random_scalar_order_test(&msg); + random_scalar_order_test(&key); + secp256k1_scalar_get_b32(privkey, &key); + secp256k1_scalar_get_b32(message, &msg); + } + + /* Construct and verify corresponding public key. */ + CHECK(secp256k1_ec_seckey_verify(ctx, privkey) == 1); + CHECK(secp256k1_ec_pubkey_create(ctx, &pubkey, privkey) == 1); + + /* Serialize/parse compact and verify/recover. */ + extra[0] = 0; + CHECK(secp256k1_ecdsa_sign_recoverable(ctx, &rsignature[0], message, privkey, NULL, NULL) == 1); + CHECK(secp256k1_ecdsa_sign_recoverable(ctx, &rsignature[4], message, privkey, NULL, NULL) == 1); + CHECK(secp256k1_ecdsa_sign_recoverable(ctx, &rsignature[1], message, privkey, NULL, extra) == 1); + extra[31] = 1; + CHECK(secp256k1_ecdsa_sign_recoverable(ctx, &rsignature[2], message, privkey, NULL, extra) == 1); + extra[31] = 0; + extra[0] = 1; + CHECK(secp256k1_ecdsa_sign_recoverable(ctx, &rsignature[3], message, privkey, NULL, extra) == 1); + CHECK(secp256k1_ecdsa_recoverable_signature_serialize_compact(ctx, sig, &recid, &rsignature[4]) == 1); + CHECK(secp256k1_ecdsa_recoverable_signature_convert(ctx, &signature[4], &rsignature[4]) == 1); + CHECK(secp256k1_ecdsa_verify(ctx, &signature[4], message, &pubkey) == 1); + memset(&rsignature[4], 0, sizeof(rsignature[4])); + CHECK(secp256k1_ecdsa_recoverable_signature_parse_compact(ctx, &rsignature[4], sig, recid) == 1); + CHECK(secp256k1_ecdsa_recoverable_signature_convert(ctx, &signature[4], &rsignature[4]) == 1); + CHECK(secp256k1_ecdsa_verify(ctx, &signature[4], message, &pubkey) == 1); + /* Parse compact (with recovery id) and recover. */ + CHECK(secp256k1_ecdsa_recoverable_signature_parse_compact(ctx, &rsignature[4], sig, recid) == 1); + CHECK(secp256k1_ecdsa_recover(ctx, &recpubkey, &rsignature[4], message) == 1); + CHECK(memcmp(&pubkey, &recpubkey, sizeof(pubkey)) == 0); + /* Serialize/destroy/parse signature and verify again. */ + CHECK(secp256k1_ecdsa_recoverable_signature_serialize_compact(ctx, sig, &recid, &rsignature[4]) == 1); + sig[secp256k1_rand32() % 64] += 1 + (secp256k1_rand32() % 255); + CHECK(secp256k1_ecdsa_recoverable_signature_parse_compact(ctx, &rsignature[4], sig, recid) == 1); + CHECK(secp256k1_ecdsa_recoverable_signature_convert(ctx, &signature[4], &rsignature[4]) == 1); + CHECK(secp256k1_ecdsa_verify(ctx, &signature[4], message, &pubkey) == 0); + /* Recover again */ + CHECK(secp256k1_ecdsa_recover(ctx, &recpubkey, &rsignature[4], message) == 0 || + memcmp(&pubkey, &recpubkey, sizeof(pubkey)) != 0); +} + +/* Tests several edge cases. */ +void test_ecdsa_recovery_edge_cases(void) { + const unsigned char msg32[32] = { + 'T', 'h', 'i', 's', ' ', 'i', 's', ' ', + 'a', ' ', 'v', 'e', 'r', 'y', ' ', 's', + 'e', 'c', 'r', 'e', 't', ' ', 'm', 'e', + 's', 's', 'a', 'g', 'e', '.', '.', '.' + }; + const unsigned char sig64[64] = { + /* Generated by signing the above message with nonce 'This is the nonce we will use...' + * and secret key 0 (which is not valid), resulting in recid 0. */ + 0x67, 0xCB, 0x28, 0x5F, 0x9C, 0xD1, 0x94, 0xE8, + 0x40, 0xD6, 0x29, 0x39, 0x7A, 0xF5, 0x56, 0x96, + 0x62, 0xFD, 0xE4, 0x46, 0x49, 0x99, 0x59, 0x63, + 0x17, 0x9A, 0x7D, 0xD1, 0x7B, 0xD2, 0x35, 0x32, + 0x4B, 0x1B, 0x7D, 0xF3, 0x4C, 0xE1, 0xF6, 0x8E, + 0x69, 0x4F, 0xF6, 0xF1, 0x1A, 0xC7, 0x51, 0xDD, + 0x7D, 0xD7, 0x3E, 0x38, 0x7E, 0xE4, 0xFC, 0x86, + 0x6E, 0x1B, 0xE8, 0xEC, 0xC7, 0xDD, 0x95, 0x57 + }; + secp256k1_pubkey pubkey; + /* signature (r,s) = (4,4), which can be recovered with all 4 recids. */ + const unsigned char sigb64[64] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + }; + secp256k1_pubkey pubkeyb; + secp256k1_ecdsa_recoverable_signature rsig; + secp256k1_ecdsa_signature sig; + int recid; + + CHECK(secp256k1_ecdsa_recoverable_signature_parse_compact(ctx, &rsig, sig64, 0)); + CHECK(!secp256k1_ecdsa_recover(ctx, &pubkey, &rsig, msg32)); + CHECK(secp256k1_ecdsa_recoverable_signature_parse_compact(ctx, &rsig, sig64, 1)); + CHECK(secp256k1_ecdsa_recover(ctx, &pubkey, &rsig, msg32)); + CHECK(secp256k1_ecdsa_recoverable_signature_parse_compact(ctx, &rsig, sig64, 2)); + CHECK(!secp256k1_ecdsa_recover(ctx, &pubkey, &rsig, msg32)); + CHECK(secp256k1_ecdsa_recoverable_signature_parse_compact(ctx, &rsig, sig64, 3)); + CHECK(!secp256k1_ecdsa_recover(ctx, &pubkey, &rsig, msg32)); + + for (recid = 0; recid < 4; recid++) { + int i; + int recid2; + /* (4,4) encoded in DER. */ + unsigned char sigbder[8] = {0x30, 0x06, 0x02, 0x01, 0x04, 0x02, 0x01, 0x04}; + unsigned char sigcder_zr[7] = {0x30, 0x05, 0x02, 0x00, 0x02, 0x01, 0x01}; + unsigned char sigcder_zs[7] = {0x30, 0x05, 0x02, 0x01, 0x01, 0x02, 0x00}; + unsigned char sigbderalt1[39] = { + 0x30, 0x25, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0x04, + }; + unsigned char sigbderalt2[39] = { + 0x30, 0x25, 0x02, 0x01, 0x04, 0x02, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + }; + unsigned char sigbderalt3[40] = { + 0x30, 0x26, 0x02, 0x21, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0x04, + }; + unsigned char sigbderalt4[40] = { + 0x30, 0x26, 0x02, 0x01, 0x04, 0x02, 0x21, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + }; + /* (order + r,4) encoded in DER. */ + unsigned char sigbderlong[40] = { + 0x30, 0x26, 0x02, 0x21, 0x00, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBA, 0xAE, 0xDC, + 0xE6, 0xAF, 0x48, 0xA0, 0x3B, 0xBF, 0xD2, 0x5E, + 0x8C, 0xD0, 0x36, 0x41, 0x45, 0x02, 0x01, 0x04 + }; + CHECK(secp256k1_ecdsa_recoverable_signature_parse_compact(ctx, &rsig, sigb64, recid) == 1); + CHECK(secp256k1_ecdsa_recover(ctx, &pubkeyb, &rsig, msg32) == 1); + CHECK(secp256k1_ecdsa_signature_parse_der(ctx, &sig, sigbder, sizeof(sigbder)) == 1); + CHECK(secp256k1_ecdsa_verify(ctx, &sig, msg32, &pubkeyb) == 1); + for (recid2 = 0; recid2 < 4; recid2++) { + secp256k1_pubkey pubkey2b; + CHECK(secp256k1_ecdsa_recoverable_signature_parse_compact(ctx, &rsig, sigb64, recid2) == 1); + CHECK(secp256k1_ecdsa_recover(ctx, &pubkey2b, &rsig, msg32) == 1); + /* Verifying with (order + r,4) should always fail. */ + CHECK(secp256k1_ecdsa_signature_parse_der(ctx, &sig, sigbderlong, sizeof(sigbderlong)) == 0); + } + /* DER parsing tests. */ + /* Zero length r/s. */ + CHECK(secp256k1_ecdsa_signature_parse_der(ctx, &sig, sigcder_zr, sizeof(sigcder_zr)) == 0); + CHECK(secp256k1_ecdsa_signature_parse_der(ctx, &sig, sigcder_zs, sizeof(sigcder_zs)) == 0); + /* Leading zeros. */ + CHECK(secp256k1_ecdsa_signature_parse_der(ctx, &sig, sigbderalt1, sizeof(sigbderalt1)) == 1); + CHECK(secp256k1_ecdsa_verify(ctx, &sig, msg32, &pubkeyb) == 1); + CHECK(secp256k1_ecdsa_signature_parse_der(ctx, &sig, sigbderalt2, sizeof(sigbderalt2)) == 1); + CHECK(secp256k1_ecdsa_verify(ctx, &sig, msg32, &pubkeyb) == 1); + CHECK(secp256k1_ecdsa_signature_parse_der(ctx, &sig, sigbderalt3, sizeof(sigbderalt3)) == 1); + CHECK(secp256k1_ecdsa_verify(ctx, &sig, msg32, &pubkeyb) == 1); + CHECK(secp256k1_ecdsa_signature_parse_der(ctx, &sig, sigbderalt4, sizeof(sigbderalt4)) == 1); + CHECK(secp256k1_ecdsa_verify(ctx, &sig, msg32, &pubkeyb) == 1); + sigbderalt3[4] = 1; + CHECK(secp256k1_ecdsa_signature_parse_der(ctx, &sig, sigbderalt3, sizeof(sigbderalt3)) == 0); + sigbderalt4[7] = 1; + CHECK(secp256k1_ecdsa_signature_parse_der(ctx, &sig, sigbderalt4, sizeof(sigbderalt4)) == 0); + /* Damage signature. */ + sigbder[7]++; + CHECK(secp256k1_ecdsa_signature_parse_der(ctx, &sig, sigbder, sizeof(sigbder)) == 1); + CHECK(secp256k1_ecdsa_verify(ctx, &sig, msg32, &pubkeyb) == 0); + sigbder[7]--; + CHECK(secp256k1_ecdsa_signature_parse_der(ctx, &sig, sigbder, 6) == 0); + CHECK(secp256k1_ecdsa_signature_parse_der(ctx, &sig, sigbder, sizeof(sigbder) - 1) == 0); + for(i = 0; i < 8; i++) { + int c; + unsigned char orig = sigbder[i]; + /*Try every single-byte change.*/ + for (c = 0; c < 256; c++) { + if (c == orig ) { + continue; + } + sigbder[i] = c; + CHECK(secp256k1_ecdsa_signature_parse_der(ctx, &sig, sigbder, sizeof(sigbder)) == 0 || secp256k1_ecdsa_verify(ctx, &sig, msg32, &pubkeyb) == 0); + } + sigbder[i] = orig; + } + } + + /* Test r/s equal to zero */ + { + /* (1,1) encoded in DER. */ + unsigned char sigcder[8] = {0x30, 0x06, 0x02, 0x01, 0x01, 0x02, 0x01, 0x01}; + unsigned char sigc64[64] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + }; + secp256k1_pubkey pubkeyc; + CHECK(secp256k1_ecdsa_recoverable_signature_parse_compact(ctx, &rsig, sigc64, 0) == 1); + CHECK(secp256k1_ecdsa_recover(ctx, &pubkeyc, &rsig, msg32) == 1); + CHECK(secp256k1_ecdsa_signature_parse_der(ctx, &sig, sigcder, sizeof(sigcder)) == 1); + CHECK(secp256k1_ecdsa_verify(ctx, &sig, msg32, &pubkeyc) == 1); + sigcder[4] = 0; + sigc64[31] = 0; + CHECK(secp256k1_ecdsa_recoverable_signature_parse_compact(ctx, &rsig, sigc64, 0) == 1); + CHECK(secp256k1_ecdsa_recover(ctx, &pubkeyb, &rsig, msg32) == 0); + CHECK(secp256k1_ecdsa_signature_parse_der(ctx, &sig, sigcder, sizeof(sigcder)) == 1); + CHECK(secp256k1_ecdsa_verify(ctx, &sig, msg32, &pubkeyc) == 0); + sigcder[4] = 1; + sigcder[7] = 0; + sigc64[31] = 1; + sigc64[63] = 0; + CHECK(secp256k1_ecdsa_recoverable_signature_parse_compact(ctx, &rsig, sigc64, 0) == 1); + CHECK(secp256k1_ecdsa_recover(ctx, &pubkeyb, &rsig, msg32) == 0); + CHECK(secp256k1_ecdsa_signature_parse_der(ctx, &sig, sigcder, sizeof(sigcder)) == 1); + CHECK(secp256k1_ecdsa_verify(ctx, &sig, msg32, &pubkeyc) == 0); + } +} + +void run_recovery_tests(void) { + int i; + for (i = 0; i < 64*count; i++) { + test_ecdsa_recovery_end_to_end(); + } + test_ecdsa_recovery_edge_cases(); +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/modules/schnorr/Makefile.am.include b/crypto/secp256k1/libsecp256k1/src/modules/schnorr/Makefile.am.include new file mode 100644 index 000000000..bad4cb7c5 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/modules/schnorr/Makefile.am.include @@ -0,0 +1,11 @@ +include_HEADERS += include/secp256k1_schnorr.h +noinst_HEADERS += src/modules/schnorr/main_impl.h +noinst_HEADERS += src/modules/schnorr/schnorr.h +noinst_HEADERS += src/modules/schnorr/schnorr_impl.h +noinst_HEADERS += src/modules/schnorr/tests_impl.h +if USE_BENCHMARK +noinst_PROGRAMS += bench_schnorr_verify +bench_schnorr_verify_SOURCES = src/bench_schnorr_verify.c +bench_schnorr_verify_LDADD = libsecp256k1.la $(SECP_LIBS) +bench_schnorr_verify_LDFLAGS = -static +endif diff --git a/crypto/secp256k1/libsecp256k1/src/modules/schnorr/main_impl.h b/crypto/secp256k1/libsecp256k1/src/modules/schnorr/main_impl.h new file mode 100644 index 000000000..c10fd259f --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/modules/schnorr/main_impl.h @@ -0,0 +1,164 @@ +/********************************************************************** + * Copyright (c) 2014-2015 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_MODULE_SCHNORR_MAIN +#define SECP256K1_MODULE_SCHNORR_MAIN + +#include "include/secp256k1_schnorr.h" +#include "modules/schnorr/schnorr_impl.h" + +static void secp256k1_schnorr_msghash_sha256(unsigned char *h32, const unsigned char *r32, const unsigned char *msg32) { + secp256k1_sha256_t sha; + secp256k1_sha256_initialize(&sha); + secp256k1_sha256_write(&sha, r32, 32); + secp256k1_sha256_write(&sha, msg32, 32); + secp256k1_sha256_finalize(&sha, h32); +} + +static const unsigned char secp256k1_schnorr_algo16[17] = "Schnorr+SHA256 "; + +int secp256k1_schnorr_sign(const secp256k1_context* ctx, unsigned char *sig64, const unsigned char *msg32, const unsigned char *seckey, secp256k1_nonce_function noncefp, const void* noncedata) { + secp256k1_scalar sec, non; + int ret = 0; + int overflow = 0; + unsigned int count = 0; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx)); + ARG_CHECK(msg32 != NULL); + ARG_CHECK(sig64 != NULL); + ARG_CHECK(seckey != NULL); + if (noncefp == NULL) { + noncefp = secp256k1_nonce_function_default; + } + + secp256k1_scalar_set_b32(&sec, seckey, NULL); + while (1) { + unsigned char nonce32[32]; + ret = noncefp(nonce32, msg32, seckey, secp256k1_schnorr_algo16, (void*)noncedata, count); + if (!ret) { + break; + } + secp256k1_scalar_set_b32(&non, nonce32, &overflow); + memset(nonce32, 0, 32); + if (!secp256k1_scalar_is_zero(&non) && !overflow) { + if (secp256k1_schnorr_sig_sign(&ctx->ecmult_gen_ctx, sig64, &sec, &non, NULL, secp256k1_schnorr_msghash_sha256, msg32)) { + break; + } + } + count++; + } + if (!ret) { + memset(sig64, 0, 64); + } + secp256k1_scalar_clear(&non); + secp256k1_scalar_clear(&sec); + return ret; +} + +int secp256k1_schnorr_verify(const secp256k1_context* ctx, const unsigned char *sig64, const unsigned char *msg32, const secp256k1_pubkey *pubkey) { + secp256k1_ge q; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_context_is_built(&ctx->ecmult_ctx)); + ARG_CHECK(msg32 != NULL); + ARG_CHECK(sig64 != NULL); + ARG_CHECK(pubkey != NULL); + + secp256k1_pubkey_load(ctx, &q, pubkey); + return secp256k1_schnorr_sig_verify(&ctx->ecmult_ctx, sig64, &q, secp256k1_schnorr_msghash_sha256, msg32); +} + +int secp256k1_schnorr_recover(const secp256k1_context* ctx, secp256k1_pubkey *pubkey, const unsigned char *sig64, const unsigned char *msg32) { + secp256k1_ge q; + + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_context_is_built(&ctx->ecmult_ctx)); + ARG_CHECK(msg32 != NULL); + ARG_CHECK(sig64 != NULL); + ARG_CHECK(pubkey != NULL); + + if (secp256k1_schnorr_sig_recover(&ctx->ecmult_ctx, sig64, &q, secp256k1_schnorr_msghash_sha256, msg32)) { + secp256k1_pubkey_save(pubkey, &q); + return 1; + } else { + memset(pubkey, 0, sizeof(*pubkey)); + return 0; + } +} + +int secp256k1_schnorr_generate_nonce_pair(const secp256k1_context* ctx, secp256k1_pubkey *pubnonce, unsigned char *privnonce32, const unsigned char *sec32, const unsigned char *msg32, secp256k1_nonce_function noncefp, const void* noncedata) { + int count = 0; + int ret = 1; + secp256k1_gej Qj; + secp256k1_ge Q; + secp256k1_scalar sec; + + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx)); + ARG_CHECK(msg32 != NULL); + ARG_CHECK(sec32 != NULL); + ARG_CHECK(pubnonce != NULL); + ARG_CHECK(privnonce32 != NULL); + + if (noncefp == NULL) { + noncefp = secp256k1_nonce_function_default; + } + + do { + int overflow; + ret = noncefp(privnonce32, sec32, msg32, secp256k1_schnorr_algo16, (void*)noncedata, count++); + if (!ret) { + break; + } + secp256k1_scalar_set_b32(&sec, privnonce32, &overflow); + if (overflow || secp256k1_scalar_is_zero(&sec)) { + continue; + } + secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &Qj, &sec); + secp256k1_ge_set_gej(&Q, &Qj); + + secp256k1_pubkey_save(pubnonce, &Q); + break; + } while(1); + + secp256k1_scalar_clear(&sec); + if (!ret) { + memset(pubnonce, 0, sizeof(*pubnonce)); + } + return ret; +} + +int secp256k1_schnorr_partial_sign(const secp256k1_context* ctx, unsigned char *sig64, const unsigned char *msg32, const unsigned char *sec32, const secp256k1_pubkey *pubnonce_others, const unsigned char *secnonce32) { + int overflow = 0; + secp256k1_scalar sec, non; + secp256k1_ge pubnon; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx)); + ARG_CHECK(msg32 != NULL); + ARG_CHECK(sig64 != NULL); + ARG_CHECK(sec32 != NULL); + ARG_CHECK(secnonce32 != NULL); + ARG_CHECK(pubnonce_others != NULL); + + secp256k1_scalar_set_b32(&sec, sec32, &overflow); + if (overflow || secp256k1_scalar_is_zero(&sec)) { + return -1; + } + secp256k1_scalar_set_b32(&non, secnonce32, &overflow); + if (overflow || secp256k1_scalar_is_zero(&non)) { + return -1; + } + secp256k1_pubkey_load(ctx, &pubnon, pubnonce_others); + return secp256k1_schnorr_sig_sign(&ctx->ecmult_gen_ctx, sig64, &sec, &non, &pubnon, secp256k1_schnorr_msghash_sha256, msg32); +} + +int secp256k1_schnorr_partial_combine(const secp256k1_context* ctx, unsigned char *sig64, const unsigned char * const *sig64sin, int n) { + ARG_CHECK(sig64 != NULL); + ARG_CHECK(n >= 1); + ARG_CHECK(sig64sin != NULL); + return secp256k1_schnorr_sig_combine(sig64, n, sig64sin); +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/modules/schnorr/schnorr.h b/crypto/secp256k1/libsecp256k1/src/modules/schnorr/schnorr.h new file mode 100644 index 000000000..d227433d4 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/modules/schnorr/schnorr.h @@ -0,0 +1,20 @@ +/*********************************************************************** + * Copyright (c) 2014-2015 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php. * + ***********************************************************************/ + +#ifndef _SECP256K1_MODULE_SCHNORR_H_ +#define _SECP256K1_MODULE_SCHNORR_H_ + +#include "scalar.h" +#include "group.h" + +typedef void (*secp256k1_schnorr_msghash)(unsigned char *h32, const unsigned char *r32, const unsigned char *msg32); + +static int secp256k1_schnorr_sig_sign(const secp256k1_ecmult_gen_context* ctx, unsigned char *sig64, const secp256k1_scalar *key, const secp256k1_scalar *nonce, const secp256k1_ge *pubnonce, secp256k1_schnorr_msghash hash, const unsigned char *msg32); +static int secp256k1_schnorr_sig_verify(const secp256k1_ecmult_context* ctx, const unsigned char *sig64, const secp256k1_ge *pubkey, secp256k1_schnorr_msghash hash, const unsigned char *msg32); +static int secp256k1_schnorr_sig_recover(const secp256k1_ecmult_context* ctx, const unsigned char *sig64, secp256k1_ge *pubkey, secp256k1_schnorr_msghash hash, const unsigned char *msg32); +static int secp256k1_schnorr_sig_combine(unsigned char *sig64, int n, const unsigned char * const *sig64ins); + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/modules/schnorr/schnorr_impl.h b/crypto/secp256k1/libsecp256k1/src/modules/schnorr/schnorr_impl.h new file mode 100644 index 000000000..ed70390bb --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/modules/schnorr/schnorr_impl.h @@ -0,0 +1,207 @@ +/*********************************************************************** + * Copyright (c) 2014-2015 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php. * + ***********************************************************************/ + +#ifndef _SECP256K1_SCHNORR_IMPL_H_ +#define _SECP256K1_SCHNORR_IMPL_H_ + +#include + +#include "schnorr.h" +#include "num.h" +#include "field.h" +#include "group.h" +#include "ecmult.h" +#include "ecmult_gen.h" + +/** + * Custom Schnorr-based signature scheme. They support multiparty signing, public key + * recovery and batch validation. + * + * Rationale for verifying R's y coordinate: + * In order to support batch validation and public key recovery, the full R point must + * be known to verifiers, rather than just its x coordinate. In order to not risk + * being more strict in batch validation than normal validation, validators must be + * required to reject signatures with incorrect y coordinate. This is only possible + * by including a (relatively slow) field inverse, or a field square root. However, + * batch validation offers potentially much higher benefits than this cost. + * + * Rationale for having an implicit y coordinate oddness: + * If we commit to having the full R point known to verifiers, there are two mechanism. + * Either include its oddness in the signature, or give it an implicit fixed value. + * As the R y coordinate can be flipped by a simple negation of the nonce, we choose the + * latter, as it comes with nearly zero impact on signing or validation performance, and + * saves a byte in the signature. + * + * Signing: + * Inputs: 32-byte message m, 32-byte scalar key x (!=0), 32-byte scalar nonce k (!=0) + * + * Compute point R = k * G. Reject nonce if R's y coordinate is odd (or negate nonce). + * Compute 32-byte r, the serialization of R's x coordinate. + * Compute scalar h = Hash(r || m). Reject nonce if h == 0 or h >= order. + * Compute scalar s = k - h * x. + * The signature is (r, s). + * + * + * Verification: + * Inputs: 32-byte message m, public key point Q, signature: (32-byte r, scalar s) + * + * Signature is invalid if s >= order. + * Signature is invalid if r >= p. + * Compute scalar h = Hash(r || m). Signature is invalid if h == 0 or h >= order. + * Option 1 (faster for single verification): + * Compute point R = h * Q + s * G. Signature is invalid if R is infinity or R's y coordinate is odd. + * Signature is valid if the serialization of R's x coordinate equals r. + * Option 2 (allows batch validation and pubkey recovery): + * Decompress x coordinate r into point R, with odd y coordinate. Fail if R is not on the curve. + * Signature is valid if R + h * Q + s * G == 0. + */ + +static int secp256k1_schnorr_sig_sign(const secp256k1_ecmult_gen_context* ctx, unsigned char *sig64, const secp256k1_scalar *key, const secp256k1_scalar *nonce, const secp256k1_ge *pubnonce, secp256k1_schnorr_msghash hash, const unsigned char *msg32) { + secp256k1_gej Rj; + secp256k1_ge Ra; + unsigned char h32[32]; + secp256k1_scalar h, s; + int overflow; + secp256k1_scalar n; + + if (secp256k1_scalar_is_zero(key) || secp256k1_scalar_is_zero(nonce)) { + return 0; + } + n = *nonce; + + secp256k1_ecmult_gen(ctx, &Rj, &n); + if (pubnonce != NULL) { + secp256k1_gej_add_ge(&Rj, &Rj, pubnonce); + } + secp256k1_ge_set_gej(&Ra, &Rj); + secp256k1_fe_normalize(&Ra.y); + if (secp256k1_fe_is_odd(&Ra.y)) { + /* R's y coordinate is odd, which is not allowed (see rationale above). + Force it to be even by negating the nonce. Note that this even works + for multiparty signing, as the R point is known to all participants, + which can all decide to flip the sign in unison, resulting in the + overall R point to be negated too. */ + secp256k1_scalar_negate(&n, &n); + } + secp256k1_fe_normalize(&Ra.x); + secp256k1_fe_get_b32(sig64, &Ra.x); + hash(h32, sig64, msg32); + overflow = 0; + secp256k1_scalar_set_b32(&h, h32, &overflow); + if (overflow || secp256k1_scalar_is_zero(&h)) { + secp256k1_scalar_clear(&n); + return 0; + } + secp256k1_scalar_mul(&s, &h, key); + secp256k1_scalar_negate(&s, &s); + secp256k1_scalar_add(&s, &s, &n); + secp256k1_scalar_clear(&n); + secp256k1_scalar_get_b32(sig64 + 32, &s); + return 1; +} + +static int secp256k1_schnorr_sig_verify(const secp256k1_ecmult_context* ctx, const unsigned char *sig64, const secp256k1_ge *pubkey, secp256k1_schnorr_msghash hash, const unsigned char *msg32) { + secp256k1_gej Qj, Rj; + secp256k1_ge Ra; + secp256k1_fe Rx; + secp256k1_scalar h, s; + unsigned char hh[32]; + int overflow; + + if (secp256k1_ge_is_infinity(pubkey)) { + return 0; + } + hash(hh, sig64, msg32); + overflow = 0; + secp256k1_scalar_set_b32(&h, hh, &overflow); + if (overflow || secp256k1_scalar_is_zero(&h)) { + return 0; + } + overflow = 0; + secp256k1_scalar_set_b32(&s, sig64 + 32, &overflow); + if (overflow) { + return 0; + } + if (!secp256k1_fe_set_b32(&Rx, sig64)) { + return 0; + } + secp256k1_gej_set_ge(&Qj, pubkey); + secp256k1_ecmult(ctx, &Rj, &Qj, &h, &s); + if (secp256k1_gej_is_infinity(&Rj)) { + return 0; + } + secp256k1_ge_set_gej_var(&Ra, &Rj); + secp256k1_fe_normalize_var(&Ra.y); + if (secp256k1_fe_is_odd(&Ra.y)) { + return 0; + } + return secp256k1_fe_equal_var(&Rx, &Ra.x); +} + +static int secp256k1_schnorr_sig_recover(const secp256k1_ecmult_context* ctx, const unsigned char *sig64, secp256k1_ge *pubkey, secp256k1_schnorr_msghash hash, const unsigned char *msg32) { + secp256k1_gej Qj, Rj; + secp256k1_ge Ra; + secp256k1_fe Rx; + secp256k1_scalar h, s; + unsigned char hh[32]; + int overflow; + + hash(hh, sig64, msg32); + overflow = 0; + secp256k1_scalar_set_b32(&h, hh, &overflow); + if (overflow || secp256k1_scalar_is_zero(&h)) { + return 0; + } + overflow = 0; + secp256k1_scalar_set_b32(&s, sig64 + 32, &overflow); + if (overflow) { + return 0; + } + if (!secp256k1_fe_set_b32(&Rx, sig64)) { + return 0; + } + if (!secp256k1_ge_set_xo_var(&Ra, &Rx, 0)) { + return 0; + } + secp256k1_gej_set_ge(&Rj, &Ra); + secp256k1_scalar_inverse_var(&h, &h); + secp256k1_scalar_negate(&s, &s); + secp256k1_scalar_mul(&s, &s, &h); + secp256k1_ecmult(ctx, &Qj, &Rj, &h, &s); + if (secp256k1_gej_is_infinity(&Qj)) { + return 0; + } + secp256k1_ge_set_gej(pubkey, &Qj); + return 1; +} + +static int secp256k1_schnorr_sig_combine(unsigned char *sig64, int n, const unsigned char * const *sig64ins) { + secp256k1_scalar s = SECP256K1_SCALAR_CONST(0, 0, 0, 0, 0, 0, 0, 0); + int i; + for (i = 0; i < n; i++) { + secp256k1_scalar si; + int overflow; + secp256k1_scalar_set_b32(&si, sig64ins[i] + 32, &overflow); + if (overflow) { + return -1; + } + if (i) { + if (memcmp(sig64ins[i - 1], sig64ins[i], 32) != 0) { + return -1; + } + } + secp256k1_scalar_add(&s, &s, &si); + } + if (secp256k1_scalar_is_zero(&s)) { + return 0; + } + memcpy(sig64, sig64ins[0], 32); + secp256k1_scalar_get_b32(sig64 + 32, &s); + secp256k1_scalar_clear(&s); + return 1; +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/modules/schnorr/tests_impl.h b/crypto/secp256k1/libsecp256k1/src/modules/schnorr/tests_impl.h new file mode 100644 index 000000000..79737f748 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/modules/schnorr/tests_impl.h @@ -0,0 +1,175 @@ +/********************************************************************** + * Copyright (c) 2014-2015 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_MODULE_SCHNORR_TESTS +#define SECP256K1_MODULE_SCHNORR_TESTS + +#include "include/secp256k1_schnorr.h" + +void test_schnorr_end_to_end(void) { + unsigned char privkey[32]; + unsigned char message[32]; + unsigned char schnorr_signature[64]; + secp256k1_pubkey pubkey, recpubkey; + + /* Generate a random key and message. */ + { + secp256k1_scalar key; + random_scalar_order_test(&key); + secp256k1_scalar_get_b32(privkey, &key); + secp256k1_rand256_test(message); + } + + /* Construct and verify corresponding public key. */ + CHECK(secp256k1_ec_seckey_verify(ctx, privkey) == 1); + CHECK(secp256k1_ec_pubkey_create(ctx, &pubkey, privkey) == 1); + + /* Schnorr sign. */ + CHECK(secp256k1_schnorr_sign(ctx, schnorr_signature, message, privkey, NULL, NULL) == 1); + CHECK(secp256k1_schnorr_verify(ctx, schnorr_signature, message, &pubkey) == 1); + CHECK(secp256k1_schnorr_recover(ctx, &recpubkey, schnorr_signature, message) == 1); + CHECK(memcmp(&pubkey, &recpubkey, sizeof(pubkey)) == 0); + /* Destroy signature and verify again. */ + schnorr_signature[secp256k1_rand32() % 64] += 1 + (secp256k1_rand32() % 255); + CHECK(secp256k1_schnorr_verify(ctx, schnorr_signature, message, &pubkey) == 0); + CHECK(secp256k1_schnorr_recover(ctx, &recpubkey, schnorr_signature, message) != 1 || + memcmp(&pubkey, &recpubkey, sizeof(pubkey)) != 0); +} + +/** Horribly broken hash function. Do not use for anything but tests. */ +void test_schnorr_hash(unsigned char *h32, const unsigned char *r32, const unsigned char *msg32) { + int i; + for (i = 0; i < 32; i++) { + h32[i] = r32[i] ^ msg32[i]; + } +} + +void test_schnorr_sign_verify(void) { + unsigned char msg32[32]; + unsigned char sig64[3][64]; + secp256k1_gej pubkeyj[3]; + secp256k1_ge pubkey[3]; + secp256k1_scalar nonce[3], key[3]; + int i = 0; + int k; + + secp256k1_rand256_test(msg32); + + for (k = 0; k < 3; k++) { + random_scalar_order_test(&key[k]); + + do { + random_scalar_order_test(&nonce[k]); + if (secp256k1_schnorr_sig_sign(&ctx->ecmult_gen_ctx, sig64[k], &key[k], &nonce[k], NULL, &test_schnorr_hash, msg32)) { + break; + } + } while(1); + + secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &pubkeyj[k], &key[k]); + secp256k1_ge_set_gej_var(&pubkey[k], &pubkeyj[k]); + CHECK(secp256k1_schnorr_sig_verify(&ctx->ecmult_ctx, sig64[k], &pubkey[k], &test_schnorr_hash, msg32)); + + for (i = 0; i < 4; i++) { + int pos = secp256k1_rand32() % 64; + int mod = 1 + (secp256k1_rand32() % 255); + sig64[k][pos] ^= mod; + CHECK(secp256k1_schnorr_sig_verify(&ctx->ecmult_ctx, sig64[k], &pubkey[k], &test_schnorr_hash, msg32) == 0); + sig64[k][pos] ^= mod; + } + } +} + +void test_schnorr_threshold(void) { + unsigned char msg[32]; + unsigned char sec[5][32]; + secp256k1_pubkey pub[5]; + unsigned char nonce[5][32]; + secp256k1_pubkey pubnonce[5]; + unsigned char sig[5][64]; + const unsigned char* sigs[5]; + unsigned char allsig[64]; + const secp256k1_pubkey* pubs[5]; + secp256k1_pubkey allpub; + int n, i; + int damage; + int ret = 0; + + damage = (secp256k1_rand32() % 2) ? (1 + (secp256k1_rand32() % 4)) : 0; + secp256k1_rand256_test(msg); + n = 2 + (secp256k1_rand32() % 4); + for (i = 0; i < n; i++) { + do { + secp256k1_rand256_test(sec[i]); + } while (!secp256k1_ec_seckey_verify(ctx, sec[i])); + CHECK(secp256k1_ec_pubkey_create(ctx, &pub[i], sec[i])); + CHECK(secp256k1_schnorr_generate_nonce_pair(ctx, &pubnonce[i], nonce[i], msg, sec[i], NULL, NULL)); + pubs[i] = &pub[i]; + } + if (damage == 1) { + nonce[secp256k1_rand32() % n][secp256k1_rand32() % 32] ^= 1 + (secp256k1_rand32() % 255); + } else if (damage == 2) { + sec[secp256k1_rand32() % n][secp256k1_rand32() % 32] ^= 1 + (secp256k1_rand32() % 255); + } + for (i = 0; i < n; i++) { + secp256k1_pubkey allpubnonce; + const secp256k1_pubkey *pubnonces[4]; + int j; + for (j = 0; j < i; j++) { + pubnonces[j] = &pubnonce[j]; + } + for (j = i + 1; j < n; j++) { + pubnonces[j - 1] = &pubnonce[j]; + } + CHECK(secp256k1_ec_pubkey_combine(ctx, &allpubnonce, pubnonces, n - 1)); + ret |= (secp256k1_schnorr_partial_sign(ctx, sig[i], msg, sec[i], &allpubnonce, nonce[i]) != 1) * 1; + sigs[i] = sig[i]; + } + if (damage == 3) { + sig[secp256k1_rand32() % n][secp256k1_rand32() % 64] ^= 1 + (secp256k1_rand32() % 255); + } + ret |= (secp256k1_ec_pubkey_combine(ctx, &allpub, pubs, n) != 1) * 2; + if ((ret & 1) == 0) { + ret |= (secp256k1_schnorr_partial_combine(ctx, allsig, sigs, n) != 1) * 4; + } + if (damage == 4) { + allsig[secp256k1_rand32() % 32] ^= 1 + (secp256k1_rand32() % 255); + } + if ((ret & 7) == 0) { + ret |= (secp256k1_schnorr_verify(ctx, allsig, msg, &allpub) != 1) * 8; + } + CHECK((ret == 0) == (damage == 0)); +} + +void test_schnorr_recovery(void) { + unsigned char msg32[32]; + unsigned char sig64[64]; + secp256k1_ge Q; + + secp256k1_rand256_test(msg32); + secp256k1_rand256_test(sig64); + secp256k1_rand256_test(sig64 + 32); + if (secp256k1_schnorr_sig_recover(&ctx->ecmult_ctx, sig64, &Q, &test_schnorr_hash, msg32) == 1) { + CHECK(secp256k1_schnorr_sig_verify(&ctx->ecmult_ctx, sig64, &Q, &test_schnorr_hash, msg32) == 1); + } +} + +void run_schnorr_tests(void) { + int i; + for (i = 0; i < 32*count; i++) { + test_schnorr_end_to_end(); + } + for (i = 0; i < 32 * count; i++) { + test_schnorr_sign_verify(); + } + for (i = 0; i < 16 * count; i++) { + test_schnorr_recovery(); + } + for (i = 0; i < 10 * count; i++) { + test_schnorr_threshold(); + } +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/num.h b/crypto/secp256k1/libsecp256k1/src/num.h new file mode 100644 index 000000000..ebfa71eb4 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/num.h @@ -0,0 +1,68 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_NUM_ +#define _SECP256K1_NUM_ + +#ifndef USE_NUM_NONE + +#if defined HAVE_CONFIG_H +#include "libsecp256k1-config.h" +#endif + +#if defined(USE_NUM_GMP) +#include "num_gmp.h" +#else +#error "Please select num implementation" +#endif + +/** Copy a number. */ +static void secp256k1_num_copy(secp256k1_num *r, const secp256k1_num *a); + +/** Convert a number's absolute value to a binary big-endian string. + * There must be enough place. */ +static void secp256k1_num_get_bin(unsigned char *r, unsigned int rlen, const secp256k1_num *a); + +/** Set a number to the value of a binary big-endian string. */ +static void secp256k1_num_set_bin(secp256k1_num *r, const unsigned char *a, unsigned int alen); + +/** Compute a modular inverse. The input must be less than the modulus. */ +static void secp256k1_num_mod_inverse(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *m); + +/** Compare the absolute value of two numbers. */ +static int secp256k1_num_cmp(const secp256k1_num *a, const secp256k1_num *b); + +/** Test whether two number are equal (including sign). */ +static int secp256k1_num_eq(const secp256k1_num *a, const secp256k1_num *b); + +/** Add two (signed) numbers. */ +static void secp256k1_num_add(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b); + +/** Subtract two (signed) numbers. */ +static void secp256k1_num_sub(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b); + +/** Multiply two (signed) numbers. */ +static void secp256k1_num_mul(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b); + +/** Replace a number by its remainder modulo m. M's sign is ignored. The result is a number between 0 and m-1, + even if r was negative. */ +static void secp256k1_num_mod(secp256k1_num *r, const secp256k1_num *m); + +/** Right-shift the passed number by bits bits. */ +static void secp256k1_num_shift(secp256k1_num *r, int bits); + +/** Check whether a number is zero. */ +static int secp256k1_num_is_zero(const secp256k1_num *a); + +/** Check whether a number is strictly negative. */ +static int secp256k1_num_is_neg(const secp256k1_num *a); + +/** Change a number's sign. */ +static void secp256k1_num_negate(secp256k1_num *r); + +#endif + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/num_gmp.h b/crypto/secp256k1/libsecp256k1/src/num_gmp.h new file mode 100644 index 000000000..7dd813088 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/num_gmp.h @@ -0,0 +1,20 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_NUM_REPR_ +#define _SECP256K1_NUM_REPR_ + +#include + +#define NUM_LIMBS ((256+GMP_NUMB_BITS-1)/GMP_NUMB_BITS) + +typedef struct { + mp_limb_t data[2*NUM_LIMBS]; + int neg; + int limbs; +} secp256k1_num; + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/num_gmp_impl.h b/crypto/secp256k1/libsecp256k1/src/num_gmp_impl.h new file mode 100644 index 000000000..f43e7a56c --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/num_gmp_impl.h @@ -0,0 +1,260 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_NUM_REPR_IMPL_H_ +#define _SECP256K1_NUM_REPR_IMPL_H_ + +#include +#include +#include + +#include "util.h" +#include "num.h" + +#ifdef VERIFY +static void secp256k1_num_sanity(const secp256k1_num *a) { + VERIFY_CHECK(a->limbs == 1 || (a->limbs > 1 && a->data[a->limbs-1] != 0)); +} +#else +#define secp256k1_num_sanity(a) do { } while(0) +#endif + +static void secp256k1_num_copy(secp256k1_num *r, const secp256k1_num *a) { + *r = *a; +} + +static void secp256k1_num_get_bin(unsigned char *r, unsigned int rlen, const secp256k1_num *a) { + unsigned char tmp[65]; + int len = 0; + int shift = 0; + if (a->limbs>1 || a->data[0] != 0) { + len = mpn_get_str(tmp, 256, (mp_limb_t*)a->data, a->limbs); + } + while (shift < len && tmp[shift] == 0) shift++; + VERIFY_CHECK(len-shift <= (int)rlen); + memset(r, 0, rlen - len + shift); + if (len > shift) { + memcpy(r + rlen - len + shift, tmp + shift, len - shift); + } + memset(tmp, 0, sizeof(tmp)); +} + +static void secp256k1_num_set_bin(secp256k1_num *r, const unsigned char *a, unsigned int alen) { + int len; + VERIFY_CHECK(alen > 0); + VERIFY_CHECK(alen <= 64); + len = mpn_set_str(r->data, a, alen, 256); + if (len == 0) { + r->data[0] = 0; + len = 1; + } + VERIFY_CHECK(len <= NUM_LIMBS*2); + r->limbs = len; + r->neg = 0; + while (r->limbs > 1 && r->data[r->limbs-1]==0) { + r->limbs--; + } +} + +static void secp256k1_num_add_abs(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b) { + mp_limb_t c = mpn_add(r->data, a->data, a->limbs, b->data, b->limbs); + r->limbs = a->limbs; + if (c != 0) { + VERIFY_CHECK(r->limbs < 2*NUM_LIMBS); + r->data[r->limbs++] = c; + } +} + +static void secp256k1_num_sub_abs(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b) { + mp_limb_t c = mpn_sub(r->data, a->data, a->limbs, b->data, b->limbs); + VERIFY_CHECK(c == 0); + r->limbs = a->limbs; + while (r->limbs > 1 && r->data[r->limbs-1]==0) { + r->limbs--; + } +} + +static void secp256k1_num_mod(secp256k1_num *r, const secp256k1_num *m) { + secp256k1_num_sanity(r); + secp256k1_num_sanity(m); + + if (r->limbs >= m->limbs) { + mp_limb_t t[2*NUM_LIMBS]; + mpn_tdiv_qr(t, r->data, 0, r->data, r->limbs, m->data, m->limbs); + memset(t, 0, sizeof(t)); + r->limbs = m->limbs; + while (r->limbs > 1 && r->data[r->limbs-1]==0) { + r->limbs--; + } + } + + if (r->neg && (r->limbs > 1 || r->data[0] != 0)) { + secp256k1_num_sub_abs(r, m, r); + r->neg = 0; + } +} + +static void secp256k1_num_mod_inverse(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *m) { + int i; + mp_limb_t g[NUM_LIMBS+1]; + mp_limb_t u[NUM_LIMBS+1]; + mp_limb_t v[NUM_LIMBS+1]; + mp_size_t sn; + mp_size_t gn; + secp256k1_num_sanity(a); + secp256k1_num_sanity(m); + + /** mpn_gcdext computes: (G,S) = gcdext(U,V), where + * * G = gcd(U,V) + * * G = U*S + V*T + * * U has equal or more limbs than V, and V has no padding + * If we set U to be (a padded version of) a, and V = m: + * G = a*S + m*T + * G = a*S mod m + * Assuming G=1: + * S = 1/a mod m + */ + VERIFY_CHECK(m->limbs <= NUM_LIMBS); + VERIFY_CHECK(m->data[m->limbs-1] != 0); + for (i = 0; i < m->limbs; i++) { + u[i] = (i < a->limbs) ? a->data[i] : 0; + v[i] = m->data[i]; + } + sn = NUM_LIMBS+1; + gn = mpn_gcdext(g, r->data, &sn, u, m->limbs, v, m->limbs); + VERIFY_CHECK(gn == 1); + VERIFY_CHECK(g[0] == 1); + r->neg = a->neg ^ m->neg; + if (sn < 0) { + mpn_sub(r->data, m->data, m->limbs, r->data, -sn); + r->limbs = m->limbs; + while (r->limbs > 1 && r->data[r->limbs-1]==0) { + r->limbs--; + } + } else { + r->limbs = sn; + } + memset(g, 0, sizeof(g)); + memset(u, 0, sizeof(u)); + memset(v, 0, sizeof(v)); +} + +static int secp256k1_num_is_zero(const secp256k1_num *a) { + return (a->limbs == 1 && a->data[0] == 0); +} + +static int secp256k1_num_is_neg(const secp256k1_num *a) { + return (a->limbs > 1 || a->data[0] != 0) && a->neg; +} + +static int secp256k1_num_cmp(const secp256k1_num *a, const secp256k1_num *b) { + if (a->limbs > b->limbs) { + return 1; + } + if (a->limbs < b->limbs) { + return -1; + } + return mpn_cmp(a->data, b->data, a->limbs); +} + +static int secp256k1_num_eq(const secp256k1_num *a, const secp256k1_num *b) { + if (a->limbs > b->limbs) { + return 0; + } + if (a->limbs < b->limbs) { + return 0; + } + if ((a->neg && !secp256k1_num_is_zero(a)) != (b->neg && !secp256k1_num_is_zero(b))) { + return 0; + } + return mpn_cmp(a->data, b->data, a->limbs) == 0; +} + +static void secp256k1_num_subadd(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b, int bneg) { + if (!(b->neg ^ bneg ^ a->neg)) { /* a and b have the same sign */ + r->neg = a->neg; + if (a->limbs >= b->limbs) { + secp256k1_num_add_abs(r, a, b); + } else { + secp256k1_num_add_abs(r, b, a); + } + } else { + if (secp256k1_num_cmp(a, b) > 0) { + r->neg = a->neg; + secp256k1_num_sub_abs(r, a, b); + } else { + r->neg = b->neg ^ bneg; + secp256k1_num_sub_abs(r, b, a); + } + } +} + +static void secp256k1_num_add(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b) { + secp256k1_num_sanity(a); + secp256k1_num_sanity(b); + secp256k1_num_subadd(r, a, b, 0); +} + +static void secp256k1_num_sub(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b) { + secp256k1_num_sanity(a); + secp256k1_num_sanity(b); + secp256k1_num_subadd(r, a, b, 1); +} + +static void secp256k1_num_mul(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b) { + mp_limb_t tmp[2*NUM_LIMBS+1]; + secp256k1_num_sanity(a); + secp256k1_num_sanity(b); + + VERIFY_CHECK(a->limbs + b->limbs <= 2*NUM_LIMBS+1); + if ((a->limbs==1 && a->data[0]==0) || (b->limbs==1 && b->data[0]==0)) { + r->limbs = 1; + r->neg = 0; + r->data[0] = 0; + return; + } + if (a->limbs >= b->limbs) { + mpn_mul(tmp, a->data, a->limbs, b->data, b->limbs); + } else { + mpn_mul(tmp, b->data, b->limbs, a->data, a->limbs); + } + r->limbs = a->limbs + b->limbs; + if (r->limbs > 1 && tmp[r->limbs - 1]==0) { + r->limbs--; + } + VERIFY_CHECK(r->limbs <= 2*NUM_LIMBS); + mpn_copyi(r->data, tmp, r->limbs); + r->neg = a->neg ^ b->neg; + memset(tmp, 0, sizeof(tmp)); +} + +static void secp256k1_num_shift(secp256k1_num *r, int bits) { + if (bits % GMP_NUMB_BITS) { + /* Shift within limbs. */ + mpn_rshift(r->data, r->data, r->limbs, bits % GMP_NUMB_BITS); + } + if (bits >= GMP_NUMB_BITS) { + int i; + /* Shift full limbs. */ + for (i = 0; i < r->limbs; i++) { + int index = i + (bits / GMP_NUMB_BITS); + if (index < r->limbs && index < 2*NUM_LIMBS) { + r->data[i] = r->data[index]; + } else { + r->data[i] = 0; + } + } + } + while (r->limbs>1 && r->data[r->limbs-1]==0) { + r->limbs--; + } +} + +static void secp256k1_num_negate(secp256k1_num *r) { + r->neg ^= 1; +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/num_impl.h b/crypto/secp256k1/libsecp256k1/src/num_impl.h new file mode 100644 index 000000000..0b0e3a072 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/num_impl.h @@ -0,0 +1,24 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_NUM_IMPL_H_ +#define _SECP256K1_NUM_IMPL_H_ + +#if defined HAVE_CONFIG_H +#include "libsecp256k1-config.h" +#endif + +#include "num.h" + +#if defined(USE_NUM_GMP) +#include "num_gmp_impl.h" +#elif defined(USE_NUM_NONE) +/* Nothing. */ +#else +#error "Please select num implementation" +#endif + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/scalar.h b/crypto/secp256k1/libsecp256k1/src/scalar.h new file mode 100644 index 000000000..b590ccd6d --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/scalar.h @@ -0,0 +1,104 @@ +/********************************************************************** + * Copyright (c) 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_SCALAR_ +#define _SECP256K1_SCALAR_ + +#include "num.h" + +#if defined HAVE_CONFIG_H +#include "libsecp256k1-config.h" +#endif + +#if defined(USE_SCALAR_4X64) +#include "scalar_4x64.h" +#elif defined(USE_SCALAR_8X32) +#include "scalar_8x32.h" +#else +#error "Please select scalar implementation" +#endif + +/** Clear a scalar to prevent the leak of sensitive data. */ +static void secp256k1_scalar_clear(secp256k1_scalar *r); + +/** Access bits from a scalar. All requested bits must belong to the same 32-bit limb. */ +static unsigned int secp256k1_scalar_get_bits(const secp256k1_scalar *a, unsigned int offset, unsigned int count); + +/** Access bits from a scalar. Not constant time. */ +static unsigned int secp256k1_scalar_get_bits_var(const secp256k1_scalar *a, unsigned int offset, unsigned int count); + +/** Set a scalar from a big endian byte array. */ +static void secp256k1_scalar_set_b32(secp256k1_scalar *r, const unsigned char *bin, int *overflow); + +/** Set a scalar to an unsigned integer. */ +static void secp256k1_scalar_set_int(secp256k1_scalar *r, unsigned int v); + +/** Convert a scalar to a byte array. */ +static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar* a); + +/** Add two scalars together (modulo the group order). Returns whether it overflowed. */ +static int secp256k1_scalar_add(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b); + +/** Conditionally add a power of two to a scalar. The result is not allowed to overflow. */ +static void secp256k1_scalar_cadd_bit(secp256k1_scalar *r, unsigned int bit, int flag); + +/** Multiply two scalars (modulo the group order). */ +static void secp256k1_scalar_mul(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b); + +/** Shift a scalar right by some amount strictly between 0 and 16, returning + * the low bits that were shifted off */ +static int secp256k1_scalar_shr_int(secp256k1_scalar *r, int n); + +/** Compute the square of a scalar (modulo the group order). */ +static void secp256k1_scalar_sqr(secp256k1_scalar *r, const secp256k1_scalar *a); + +/** Compute the inverse of a scalar (modulo the group order). */ +static void secp256k1_scalar_inverse(secp256k1_scalar *r, const secp256k1_scalar *a); + +/** Compute the inverse of a scalar (modulo the group order), without constant-time guarantee. */ +static void secp256k1_scalar_inverse_var(secp256k1_scalar *r, const secp256k1_scalar *a); + +/** Compute the complement of a scalar (modulo the group order). */ +static void secp256k1_scalar_negate(secp256k1_scalar *r, const secp256k1_scalar *a); + +/** Check whether a scalar equals zero. */ +static int secp256k1_scalar_is_zero(const secp256k1_scalar *a); + +/** Check whether a scalar equals one. */ +static int secp256k1_scalar_is_one(const secp256k1_scalar *a); + +/** Check whether a scalar, considered as an nonnegative integer, is even. */ +static int secp256k1_scalar_is_even(const secp256k1_scalar *a); + +/** Check whether a scalar is higher than the group order divided by 2. */ +static int secp256k1_scalar_is_high(const secp256k1_scalar *a); + +/** Conditionally negate a number, in constant time. + * Returns -1 if the number was negated, 1 otherwise */ +static int secp256k1_scalar_cond_negate(secp256k1_scalar *a, int flag); + +#ifndef USE_NUM_NONE +/** Convert a scalar to a number. */ +static void secp256k1_scalar_get_num(secp256k1_num *r, const secp256k1_scalar *a); + +/** Get the order of the group as a number. */ +static void secp256k1_scalar_order_get_num(secp256k1_num *r); +#endif + +/** Compare two scalars. */ +static int secp256k1_scalar_eq(const secp256k1_scalar *a, const secp256k1_scalar *b); + +#ifdef USE_ENDOMORPHISM +/** Find r1 and r2 such that r1+r2*2^128 = a. */ +static void secp256k1_scalar_split_128(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a); +/** Find r1 and r2 such that r1+r2*lambda = a, and r1 and r2 are maximum 128 bits long (see secp256k1_gej_mul_lambda). */ +static void secp256k1_scalar_split_lambda(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a); +#endif + +/** Multiply a and b (without taking the modulus!), divide by 2**shift, and round to the nearest integer. Shift must be at least 256. */ +static void secp256k1_scalar_mul_shift_var(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b, unsigned int shift); + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/scalar_4x64.h b/crypto/secp256k1/libsecp256k1/src/scalar_4x64.h new file mode 100644 index 000000000..cff406038 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/scalar_4x64.h @@ -0,0 +1,19 @@ +/********************************************************************** + * Copyright (c) 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_SCALAR_REPR_ +#define _SECP256K1_SCALAR_REPR_ + +#include + +/** A scalar modulo the group order of the secp256k1 curve. */ +typedef struct { + uint64_t d[4]; +} secp256k1_scalar; + +#define SECP256K1_SCALAR_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{((uint64_t)(d1)) << 32 | (d0), ((uint64_t)(d3)) << 32 | (d2), ((uint64_t)(d5)) << 32 | (d4), ((uint64_t)(d7)) << 32 | (d6)}} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/scalar_4x64_impl.h b/crypto/secp256k1/libsecp256k1/src/scalar_4x64_impl.h new file mode 100644 index 000000000..cbec34d71 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/scalar_4x64_impl.h @@ -0,0 +1,947 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_SCALAR_REPR_IMPL_H_ +#define _SECP256K1_SCALAR_REPR_IMPL_H_ + +/* Limbs of the secp256k1 order. */ +#define SECP256K1_N_0 ((uint64_t)0xBFD25E8CD0364141ULL) +#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL) +#define SECP256K1_N_2 ((uint64_t)0xFFFFFFFFFFFFFFFEULL) +#define SECP256K1_N_3 ((uint64_t)0xFFFFFFFFFFFFFFFFULL) + +/* Limbs of 2^256 minus the secp256k1 order. */ +#define SECP256K1_N_C_0 (~SECP256K1_N_0 + 1) +#define SECP256K1_N_C_1 (~SECP256K1_N_1) +#define SECP256K1_N_C_2 (1) + +/* Limbs of half the secp256k1 order. */ +#define SECP256K1_N_H_0 ((uint64_t)0xDFE92F46681B20A0ULL) +#define SECP256K1_N_H_1 ((uint64_t)0x5D576E7357A4501DULL) +#define SECP256K1_N_H_2 ((uint64_t)0xFFFFFFFFFFFFFFFFULL) +#define SECP256K1_N_H_3 ((uint64_t)0x7FFFFFFFFFFFFFFFULL) + +SECP256K1_INLINE static void secp256k1_scalar_clear(secp256k1_scalar *r) { + r->d[0] = 0; + r->d[1] = 0; + r->d[2] = 0; + r->d[3] = 0; +} + +SECP256K1_INLINE static void secp256k1_scalar_set_int(secp256k1_scalar *r, unsigned int v) { + r->d[0] = v; + r->d[1] = 0; + r->d[2] = 0; + r->d[3] = 0; +} + +SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits(const secp256k1_scalar *a, unsigned int offset, unsigned int count) { + VERIFY_CHECK((offset + count - 1) >> 6 == offset >> 6); + return (a->d[offset >> 6] >> (offset & 0x3F)) & ((((uint64_t)1) << count) - 1); +} + +SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits_var(const secp256k1_scalar *a, unsigned int offset, unsigned int count) { + VERIFY_CHECK(count < 32); + VERIFY_CHECK(offset + count <= 256); + if ((offset + count - 1) >> 6 == offset >> 6) { + return secp256k1_scalar_get_bits(a, offset, count); + } else { + VERIFY_CHECK((offset >> 6) + 1 < 4); + return ((a->d[offset >> 6] >> (offset & 0x3F)) | (a->d[(offset >> 6) + 1] << (64 - (offset & 0x3F)))) & ((((uint64_t)1) << count) - 1); + } +} + +SECP256K1_INLINE static int secp256k1_scalar_check_overflow(const secp256k1_scalar *a) { + int yes = 0; + int no = 0; + no |= (a->d[3] < SECP256K1_N_3); /* No need for a > check. */ + no |= (a->d[2] < SECP256K1_N_2); + yes |= (a->d[2] > SECP256K1_N_2) & ~no; + no |= (a->d[1] < SECP256K1_N_1); + yes |= (a->d[1] > SECP256K1_N_1) & ~no; + yes |= (a->d[0] >= SECP256K1_N_0) & ~no; + return yes; +} + +SECP256K1_INLINE static int secp256k1_scalar_reduce(secp256k1_scalar *r, unsigned int overflow) { + uint128_t t; + VERIFY_CHECK(overflow <= 1); + t = (uint128_t)r->d[0] + overflow * SECP256K1_N_C_0; + r->d[0] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + t += (uint128_t)r->d[1] + overflow * SECP256K1_N_C_1; + r->d[1] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + t += (uint128_t)r->d[2] + overflow * SECP256K1_N_C_2; + r->d[2] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + t += (uint64_t)r->d[3]; + r->d[3] = t & 0xFFFFFFFFFFFFFFFFULL; + return overflow; +} + +static int secp256k1_scalar_add(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) { + int overflow; + uint128_t t = (uint128_t)a->d[0] + b->d[0]; + r->d[0] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + t += (uint128_t)a->d[1] + b->d[1]; + r->d[1] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + t += (uint128_t)a->d[2] + b->d[2]; + r->d[2] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + t += (uint128_t)a->d[3] + b->d[3]; + r->d[3] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + overflow = t + secp256k1_scalar_check_overflow(r); + VERIFY_CHECK(overflow == 0 || overflow == 1); + secp256k1_scalar_reduce(r, overflow); + return overflow; +} + +static void secp256k1_scalar_cadd_bit(secp256k1_scalar *r, unsigned int bit, int flag) { + uint128_t t; + VERIFY_CHECK(bit < 256); + bit += ((uint32_t) flag - 1) & 0x100; /* forcing (bit >> 6) > 3 makes this a noop */ + t = (uint128_t)r->d[0] + (((uint64_t)((bit >> 6) == 0)) << (bit & 0x3F)); + r->d[0] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + t += (uint128_t)r->d[1] + (((uint64_t)((bit >> 6) == 1)) << (bit & 0x3F)); + r->d[1] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + t += (uint128_t)r->d[2] + (((uint64_t)((bit >> 6) == 2)) << (bit & 0x3F)); + r->d[2] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; + t += (uint128_t)r->d[3] + (((uint64_t)((bit >> 6) == 3)) << (bit & 0x3F)); + r->d[3] = t & 0xFFFFFFFFFFFFFFFFULL; +#ifdef VERIFY + VERIFY_CHECK((t >> 64) == 0); + VERIFY_CHECK(secp256k1_scalar_check_overflow(r) == 0); +#endif +} + +static void secp256k1_scalar_set_b32(secp256k1_scalar *r, const unsigned char *b32, int *overflow) { + int over; + r->d[0] = (uint64_t)b32[31] | (uint64_t)b32[30] << 8 | (uint64_t)b32[29] << 16 | (uint64_t)b32[28] << 24 | (uint64_t)b32[27] << 32 | (uint64_t)b32[26] << 40 | (uint64_t)b32[25] << 48 | (uint64_t)b32[24] << 56; + r->d[1] = (uint64_t)b32[23] | (uint64_t)b32[22] << 8 | (uint64_t)b32[21] << 16 | (uint64_t)b32[20] << 24 | (uint64_t)b32[19] << 32 | (uint64_t)b32[18] << 40 | (uint64_t)b32[17] << 48 | (uint64_t)b32[16] << 56; + r->d[2] = (uint64_t)b32[15] | (uint64_t)b32[14] << 8 | (uint64_t)b32[13] << 16 | (uint64_t)b32[12] << 24 | (uint64_t)b32[11] << 32 | (uint64_t)b32[10] << 40 | (uint64_t)b32[9] << 48 | (uint64_t)b32[8] << 56; + r->d[3] = (uint64_t)b32[7] | (uint64_t)b32[6] << 8 | (uint64_t)b32[5] << 16 | (uint64_t)b32[4] << 24 | (uint64_t)b32[3] << 32 | (uint64_t)b32[2] << 40 | (uint64_t)b32[1] << 48 | (uint64_t)b32[0] << 56; + over = secp256k1_scalar_reduce(r, secp256k1_scalar_check_overflow(r)); + if (overflow) { + *overflow = over; + } +} + +static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar* a) { + bin[0] = a->d[3] >> 56; bin[1] = a->d[3] >> 48; bin[2] = a->d[3] >> 40; bin[3] = a->d[3] >> 32; bin[4] = a->d[3] >> 24; bin[5] = a->d[3] >> 16; bin[6] = a->d[3] >> 8; bin[7] = a->d[3]; + bin[8] = a->d[2] >> 56; bin[9] = a->d[2] >> 48; bin[10] = a->d[2] >> 40; bin[11] = a->d[2] >> 32; bin[12] = a->d[2] >> 24; bin[13] = a->d[2] >> 16; bin[14] = a->d[2] >> 8; bin[15] = a->d[2]; + bin[16] = a->d[1] >> 56; bin[17] = a->d[1] >> 48; bin[18] = a->d[1] >> 40; bin[19] = a->d[1] >> 32; bin[20] = a->d[1] >> 24; bin[21] = a->d[1] >> 16; bin[22] = a->d[1] >> 8; bin[23] = a->d[1]; + bin[24] = a->d[0] >> 56; bin[25] = a->d[0] >> 48; bin[26] = a->d[0] >> 40; bin[27] = a->d[0] >> 32; bin[28] = a->d[0] >> 24; bin[29] = a->d[0] >> 16; bin[30] = a->d[0] >> 8; bin[31] = a->d[0]; +} + +SECP256K1_INLINE static int secp256k1_scalar_is_zero(const secp256k1_scalar *a) { + return (a->d[0] | a->d[1] | a->d[2] | a->d[3]) == 0; +} + +static void secp256k1_scalar_negate(secp256k1_scalar *r, const secp256k1_scalar *a) { + uint64_t nonzero = 0xFFFFFFFFFFFFFFFFULL * (secp256k1_scalar_is_zero(a) == 0); + uint128_t t = (uint128_t)(~a->d[0]) + SECP256K1_N_0 + 1; + r->d[0] = t & nonzero; t >>= 64; + t += (uint128_t)(~a->d[1]) + SECP256K1_N_1; + r->d[1] = t & nonzero; t >>= 64; + t += (uint128_t)(~a->d[2]) + SECP256K1_N_2; + r->d[2] = t & nonzero; t >>= 64; + t += (uint128_t)(~a->d[3]) + SECP256K1_N_3; + r->d[3] = t & nonzero; +} + +SECP256K1_INLINE static int secp256k1_scalar_is_one(const secp256k1_scalar *a) { + return ((a->d[0] ^ 1) | a->d[1] | a->d[2] | a->d[3]) == 0; +} + +static int secp256k1_scalar_is_high(const secp256k1_scalar *a) { + int yes = 0; + int no = 0; + no |= (a->d[3] < SECP256K1_N_H_3); + yes |= (a->d[3] > SECP256K1_N_H_3) & ~no; + no |= (a->d[2] < SECP256K1_N_H_2) & ~yes; /* No need for a > check. */ + no |= (a->d[1] < SECP256K1_N_H_1) & ~yes; + yes |= (a->d[1] > SECP256K1_N_H_1) & ~no; + yes |= (a->d[0] > SECP256K1_N_H_0) & ~no; + return yes; +} + +static int secp256k1_scalar_cond_negate(secp256k1_scalar *r, int flag) { + /* If we are flag = 0, mask = 00...00 and this is a no-op; + * if we are flag = 1, mask = 11...11 and this is identical to secp256k1_scalar_negate */ + uint64_t mask = !flag - 1; + uint64_t nonzero = (secp256k1_scalar_is_zero(r) != 0) - 1; + uint128_t t = (uint128_t)(r->d[0] ^ mask) + ((SECP256K1_N_0 + 1) & mask); + r->d[0] = t & nonzero; t >>= 64; + t += (uint128_t)(r->d[1] ^ mask) + (SECP256K1_N_1 & mask); + r->d[1] = t & nonzero; t >>= 64; + t += (uint128_t)(r->d[2] ^ mask) + (SECP256K1_N_2 & mask); + r->d[2] = t & nonzero; t >>= 64; + t += (uint128_t)(r->d[3] ^ mask) + (SECP256K1_N_3 & mask); + r->d[3] = t & nonzero; + return 2 * (mask == 0) - 1; +} + +/* Inspired by the macros in OpenSSL's crypto/bn/asm/x86_64-gcc.c. */ + +/** Add a*b to the number defined by (c0,c1,c2). c2 must never overflow. */ +#define muladd(a,b) { \ + uint64_t tl, th; \ + { \ + uint128_t t = (uint128_t)a * b; \ + th = t >> 64; /* at most 0xFFFFFFFFFFFFFFFE */ \ + tl = t; \ + } \ + c0 += tl; /* overflow is handled on the next line */ \ + th += (c0 < tl) ? 1 : 0; /* at most 0xFFFFFFFFFFFFFFFF */ \ + c1 += th; /* overflow is handled on the next line */ \ + c2 += (c1 < th) ? 1 : 0; /* never overflows by contract (verified in the next line) */ \ + VERIFY_CHECK((c1 >= th) || (c2 != 0)); \ +} + +/** Add a*b to the number defined by (c0,c1). c1 must never overflow. */ +#define muladd_fast(a,b) { \ + uint64_t tl, th; \ + { \ + uint128_t t = (uint128_t)a * b; \ + th = t >> 64; /* at most 0xFFFFFFFFFFFFFFFE */ \ + tl = t; \ + } \ + c0 += tl; /* overflow is handled on the next line */ \ + th += (c0 < tl) ? 1 : 0; /* at most 0xFFFFFFFFFFFFFFFF */ \ + c1 += th; /* never overflows by contract (verified in the next line) */ \ + VERIFY_CHECK(c1 >= th); \ +} + +/** Add 2*a*b to the number defined by (c0,c1,c2). c2 must never overflow. */ +#define muladd2(a,b) { \ + uint64_t tl, th, th2, tl2; \ + { \ + uint128_t t = (uint128_t)a * b; \ + th = t >> 64; /* at most 0xFFFFFFFFFFFFFFFE */ \ + tl = t; \ + } \ + th2 = th + th; /* at most 0xFFFFFFFFFFFFFFFE (in case th was 0x7FFFFFFFFFFFFFFF) */ \ + c2 += (th2 < th) ? 1 : 0; /* never overflows by contract (verified the next line) */ \ + VERIFY_CHECK((th2 >= th) || (c2 != 0)); \ + tl2 = tl + tl; /* at most 0xFFFFFFFFFFFFFFFE (in case the lowest 63 bits of tl were 0x7FFFFFFFFFFFFFFF) */ \ + th2 += (tl2 < tl) ? 1 : 0; /* at most 0xFFFFFFFFFFFFFFFF */ \ + c0 += tl2; /* overflow is handled on the next line */ \ + th2 += (c0 < tl2) ? 1 : 0; /* second overflow is handled on the next line */ \ + c2 += (c0 < tl2) & (th2 == 0); /* never overflows by contract (verified the next line) */ \ + VERIFY_CHECK((c0 >= tl2) || (th2 != 0) || (c2 != 0)); \ + c1 += th2; /* overflow is handled on the next line */ \ + c2 += (c1 < th2) ? 1 : 0; /* never overflows by contract (verified the next line) */ \ + VERIFY_CHECK((c1 >= th2) || (c2 != 0)); \ +} + +/** Add a to the number defined by (c0,c1,c2). c2 must never overflow. */ +#define sumadd(a) { \ + unsigned int over; \ + c0 += (a); /* overflow is handled on the next line */ \ + over = (c0 < (a)) ? 1 : 0; \ + c1 += over; /* overflow is handled on the next line */ \ + c2 += (c1 < over) ? 1 : 0; /* never overflows by contract */ \ +} + +/** Add a to the number defined by (c0,c1). c1 must never overflow, c2 must be zero. */ +#define sumadd_fast(a) { \ + c0 += (a); /* overflow is handled on the next line */ \ + c1 += (c0 < (a)) ? 1 : 0; /* never overflows by contract (verified the next line) */ \ + VERIFY_CHECK((c1 != 0) | (c0 >= (a))); \ + VERIFY_CHECK(c2 == 0); \ +} + +/** Extract the lowest 64 bits of (c0,c1,c2) into n, and left shift the number 64 bits. */ +#define extract(n) { \ + (n) = c0; \ + c0 = c1; \ + c1 = c2; \ + c2 = 0; \ +} + +/** Extract the lowest 64 bits of (c0,c1,c2) into n, and left shift the number 64 bits. c2 is required to be zero. */ +#define extract_fast(n) { \ + (n) = c0; \ + c0 = c1; \ + c1 = 0; \ + VERIFY_CHECK(c2 == 0); \ +} + +static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l) { +#ifdef USE_ASM_X86_64 + /* Reduce 512 bits into 385. */ + uint64_t m0, m1, m2, m3, m4, m5, m6; + uint64_t p0, p1, p2, p3, p4; + uint64_t c; + + __asm__ __volatile__( + /* Preload. */ + "movq 32(%%rsi), %%r11\n" + "movq 40(%%rsi), %%r12\n" + "movq 48(%%rsi), %%r13\n" + "movq 56(%%rsi), %%r14\n" + /* Initialize r8,r9,r10 */ + "movq 0(%%rsi), %%r8\n" + "movq $0, %%r9\n" + "movq $0, %%r10\n" + /* (r8,r9) += n0 * c0 */ + "movq %8, %%rax\n" + "mulq %%r11\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + /* extract m0 */ + "movq %%r8, %q0\n" + "movq $0, %%r8\n" + /* (r9,r10) += l1 */ + "addq 8(%%rsi), %%r9\n" + "adcq $0, %%r10\n" + /* (r9,r10,r8) += n1 * c0 */ + "movq %8, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* (r9,r10,r8) += n0 * c1 */ + "movq %9, %%rax\n" + "mulq %%r11\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* extract m1 */ + "movq %%r9, %q1\n" + "movq $0, %%r9\n" + /* (r10,r8,r9) += l2 */ + "addq 16(%%rsi), %%r10\n" + "adcq $0, %%r8\n" + "adcq $0, %%r9\n" + /* (r10,r8,r9) += n2 * c0 */ + "movq %8, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* (r10,r8,r9) += n1 * c1 */ + "movq %9, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* (r10,r8,r9) += n0 */ + "addq %%r11, %%r10\n" + "adcq $0, %%r8\n" + "adcq $0, %%r9\n" + /* extract m2 */ + "movq %%r10, %q2\n" + "movq $0, %%r10\n" + /* (r8,r9,r10) += l3 */ + "addq 24(%%rsi), %%r8\n" + "adcq $0, %%r9\n" + "adcq $0, %%r10\n" + /* (r8,r9,r10) += n3 * c0 */ + "movq %8, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* (r8,r9,r10) += n2 * c1 */ + "movq %9, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* (r8,r9,r10) += n1 */ + "addq %%r12, %%r8\n" + "adcq $0, %%r9\n" + "adcq $0, %%r10\n" + /* extract m3 */ + "movq %%r8, %q3\n" + "movq $0, %%r8\n" + /* (r9,r10,r8) += n3 * c1 */ + "movq %9, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* (r9,r10,r8) += n2 */ + "addq %%r13, %%r9\n" + "adcq $0, %%r10\n" + "adcq $0, %%r8\n" + /* extract m4 */ + "movq %%r9, %q4\n" + /* (r10,r8) += n3 */ + "addq %%r14, %%r10\n" + "adcq $0, %%r8\n" + /* extract m5 */ + "movq %%r10, %q5\n" + /* extract m6 */ + "movq %%r8, %q6\n" + : "=g"(m0), "=g"(m1), "=g"(m2), "=g"(m3), "=g"(m4), "=g"(m5), "=g"(m6) + : "S"(l), "n"(SECP256K1_N_C_0), "n"(SECP256K1_N_C_1) + : "rax", "rdx", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "cc"); + + /* Reduce 385 bits into 258. */ + __asm__ __volatile__( + /* Preload */ + "movq %q9, %%r11\n" + "movq %q10, %%r12\n" + "movq %q11, %%r13\n" + /* Initialize (r8,r9,r10) */ + "movq %q5, %%r8\n" + "movq $0, %%r9\n" + "movq $0, %%r10\n" + /* (r8,r9) += m4 * c0 */ + "movq %12, %%rax\n" + "mulq %%r11\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + /* extract p0 */ + "movq %%r8, %q0\n" + "movq $0, %%r8\n" + /* (r9,r10) += m1 */ + "addq %q6, %%r9\n" + "adcq $0, %%r10\n" + /* (r9,r10,r8) += m5 * c0 */ + "movq %12, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* (r9,r10,r8) += m4 * c1 */ + "movq %13, %%rax\n" + "mulq %%r11\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* extract p1 */ + "movq %%r9, %q1\n" + "movq $0, %%r9\n" + /* (r10,r8,r9) += m2 */ + "addq %q7, %%r10\n" + "adcq $0, %%r8\n" + "adcq $0, %%r9\n" + /* (r10,r8,r9) += m6 * c0 */ + "movq %12, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* (r10,r8,r9) += m5 * c1 */ + "movq %13, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* (r10,r8,r9) += m4 */ + "addq %%r11, %%r10\n" + "adcq $0, %%r8\n" + "adcq $0, %%r9\n" + /* extract p2 */ + "movq %%r10, %q2\n" + /* (r8,r9) += m3 */ + "addq %q8, %%r8\n" + "adcq $0, %%r9\n" + /* (r8,r9) += m6 * c1 */ + "movq %13, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + /* (r8,r9) += m5 */ + "addq %%r12, %%r8\n" + "adcq $0, %%r9\n" + /* extract p3 */ + "movq %%r8, %q3\n" + /* (r9) += m6 */ + "addq %%r13, %%r9\n" + /* extract p4 */ + "movq %%r9, %q4\n" + : "=&g"(p0), "=&g"(p1), "=&g"(p2), "=g"(p3), "=g"(p4) + : "g"(m0), "g"(m1), "g"(m2), "g"(m3), "g"(m4), "g"(m5), "g"(m6), "n"(SECP256K1_N_C_0), "n"(SECP256K1_N_C_1) + : "rax", "rdx", "r8", "r9", "r10", "r11", "r12", "r13", "cc"); + + /* Reduce 258 bits into 256. */ + __asm__ __volatile__( + /* Preload */ + "movq %q5, %%r10\n" + /* (rax,rdx) = p4 * c0 */ + "movq %7, %%rax\n" + "mulq %%r10\n" + /* (rax,rdx) += p0 */ + "addq %q1, %%rax\n" + "adcq $0, %%rdx\n" + /* extract r0 */ + "movq %%rax, 0(%q6)\n" + /* Move to (r8,r9) */ + "movq %%rdx, %%r8\n" + "movq $0, %%r9\n" + /* (r8,r9) += p1 */ + "addq %q2, %%r8\n" + "adcq $0, %%r9\n" + /* (r8,r9) += p4 * c1 */ + "movq %8, %%rax\n" + "mulq %%r10\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + /* Extract r1 */ + "movq %%r8, 8(%q6)\n" + "movq $0, %%r8\n" + /* (r9,r8) += p4 */ + "addq %%r10, %%r9\n" + "adcq $0, %%r8\n" + /* (r9,r8) += p2 */ + "addq %q3, %%r9\n" + "adcq $0, %%r8\n" + /* Extract r2 */ + "movq %%r9, 16(%q6)\n" + "movq $0, %%r9\n" + /* (r8,r9) += p3 */ + "addq %q4, %%r8\n" + "adcq $0, %%r9\n" + /* Extract r3 */ + "movq %%r8, 24(%q6)\n" + /* Extract c */ + "movq %%r9, %q0\n" + : "=g"(c) + : "g"(p0), "g"(p1), "g"(p2), "g"(p3), "g"(p4), "D"(r), "n"(SECP256K1_N_C_0), "n"(SECP256K1_N_C_1) + : "rax", "rdx", "r8", "r9", "r10", "cc", "memory"); +#else + uint128_t c; + uint64_t c0, c1, c2; + uint64_t n0 = l[4], n1 = l[5], n2 = l[6], n3 = l[7]; + uint64_t m0, m1, m2, m3, m4, m5; + uint32_t m6; + uint64_t p0, p1, p2, p3; + uint32_t p4; + + /* Reduce 512 bits into 385. */ + /* m[0..6] = l[0..3] + n[0..3] * SECP256K1_N_C. */ + c0 = l[0]; c1 = 0; c2 = 0; + muladd_fast(n0, SECP256K1_N_C_0); + extract_fast(m0); + sumadd_fast(l[1]); + muladd(n1, SECP256K1_N_C_0); + muladd(n0, SECP256K1_N_C_1); + extract(m1); + sumadd(l[2]); + muladd(n2, SECP256K1_N_C_0); + muladd(n1, SECP256K1_N_C_1); + sumadd(n0); + extract(m2); + sumadd(l[3]); + muladd(n3, SECP256K1_N_C_0); + muladd(n2, SECP256K1_N_C_1); + sumadd(n1); + extract(m3); + muladd(n3, SECP256K1_N_C_1); + sumadd(n2); + extract(m4); + sumadd_fast(n3); + extract_fast(m5); + VERIFY_CHECK(c0 <= 1); + m6 = c0; + + /* Reduce 385 bits into 258. */ + /* p[0..4] = m[0..3] + m[4..6] * SECP256K1_N_C. */ + c0 = m0; c1 = 0; c2 = 0; + muladd_fast(m4, SECP256K1_N_C_0); + extract_fast(p0); + sumadd_fast(m1); + muladd(m5, SECP256K1_N_C_0); + muladd(m4, SECP256K1_N_C_1); + extract(p1); + sumadd(m2); + muladd(m6, SECP256K1_N_C_0); + muladd(m5, SECP256K1_N_C_1); + sumadd(m4); + extract(p2); + sumadd_fast(m3); + muladd_fast(m6, SECP256K1_N_C_1); + sumadd_fast(m5); + extract_fast(p3); + p4 = c0 + m6; + VERIFY_CHECK(p4 <= 2); + + /* Reduce 258 bits into 256. */ + /* r[0..3] = p[0..3] + p[4] * SECP256K1_N_C. */ + c = p0 + (uint128_t)SECP256K1_N_C_0 * p4; + r->d[0] = c & 0xFFFFFFFFFFFFFFFFULL; c >>= 64; + c += p1 + (uint128_t)SECP256K1_N_C_1 * p4; + r->d[1] = c & 0xFFFFFFFFFFFFFFFFULL; c >>= 64; + c += p2 + (uint128_t)p4; + r->d[2] = c & 0xFFFFFFFFFFFFFFFFULL; c >>= 64; + c += p3; + r->d[3] = c & 0xFFFFFFFFFFFFFFFFULL; c >>= 64; +#endif + + /* Final reduction of r. */ + secp256k1_scalar_reduce(r, c + secp256k1_scalar_check_overflow(r)); +} + +static void secp256k1_scalar_mul_512(uint64_t l[8], const secp256k1_scalar *a, const secp256k1_scalar *b) { +#ifdef USE_ASM_X86_64 + const uint64_t *pb = b->d; + __asm__ __volatile__( + /* Preload */ + "movq 0(%%rdi), %%r15\n" + "movq 8(%%rdi), %%rbx\n" + "movq 16(%%rdi), %%rcx\n" + "movq 0(%%rdx), %%r11\n" + "movq 8(%%rdx), %%r12\n" + "movq 16(%%rdx), %%r13\n" + "movq 24(%%rdx), %%r14\n" + /* (rax,rdx) = a0 * b0 */ + "movq %%r15, %%rax\n" + "mulq %%r11\n" + /* Extract l0 */ + "movq %%rax, 0(%%rsi)\n" + /* (r8,r9,r10) = (rdx) */ + "movq %%rdx, %%r8\n" + "xorq %%r9, %%r9\n" + "xorq %%r10, %%r10\n" + /* (r8,r9,r10) += a0 * b1 */ + "movq %%r15, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* (r8,r9,r10) += a1 * b0 */ + "movq %%rbx, %%rax\n" + "mulq %%r11\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* Extract l1 */ + "movq %%r8, 8(%%rsi)\n" + "xorq %%r8, %%r8\n" + /* (r9,r10,r8) += a0 * b2 */ + "movq %%r15, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* (r9,r10,r8) += a1 * b1 */ + "movq %%rbx, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* (r9,r10,r8) += a2 * b0 */ + "movq %%rcx, %%rax\n" + "mulq %%r11\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* Extract l2 */ + "movq %%r9, 16(%%rsi)\n" + "xorq %%r9, %%r9\n" + /* (r10,r8,r9) += a0 * b3 */ + "movq %%r15, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* Preload a3 */ + "movq 24(%%rdi), %%r15\n" + /* (r10,r8,r9) += a1 * b2 */ + "movq %%rbx, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* (r10,r8,r9) += a2 * b1 */ + "movq %%rcx, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* (r10,r8,r9) += a3 * b0 */ + "movq %%r15, %%rax\n" + "mulq %%r11\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* Extract l3 */ + "movq %%r10, 24(%%rsi)\n" + "xorq %%r10, %%r10\n" + /* (r8,r9,r10) += a1 * b3 */ + "movq %%rbx, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* (r8,r9,r10) += a2 * b2 */ + "movq %%rcx, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* (r8,r9,r10) += a3 * b1 */ + "movq %%r15, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* Extract l4 */ + "movq %%r8, 32(%%rsi)\n" + "xorq %%r8, %%r8\n" + /* (r9,r10,r8) += a2 * b3 */ + "movq %%rcx, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* (r9,r10,r8) += a3 * b2 */ + "movq %%r15, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* Extract l5 */ + "movq %%r9, 40(%%rsi)\n" + /* (r10,r8) += a3 * b3 */ + "movq %%r15, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + /* Extract l6 */ + "movq %%r10, 48(%%rsi)\n" + /* Extract l7 */ + "movq %%r8, 56(%%rsi)\n" + : "+d"(pb) + : "S"(l), "D"(a->d) + : "rax", "rbx", "rcx", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "cc", "memory"); +#else + /* 160 bit accumulator. */ + uint64_t c0 = 0, c1 = 0; + uint32_t c2 = 0; + + /* l[0..7] = a[0..3] * b[0..3]. */ + muladd_fast(a->d[0], b->d[0]); + extract_fast(l[0]); + muladd(a->d[0], b->d[1]); + muladd(a->d[1], b->d[0]); + extract(l[1]); + muladd(a->d[0], b->d[2]); + muladd(a->d[1], b->d[1]); + muladd(a->d[2], b->d[0]); + extract(l[2]); + muladd(a->d[0], b->d[3]); + muladd(a->d[1], b->d[2]); + muladd(a->d[2], b->d[1]); + muladd(a->d[3], b->d[0]); + extract(l[3]); + muladd(a->d[1], b->d[3]); + muladd(a->d[2], b->d[2]); + muladd(a->d[3], b->d[1]); + extract(l[4]); + muladd(a->d[2], b->d[3]); + muladd(a->d[3], b->d[2]); + extract(l[5]); + muladd_fast(a->d[3], b->d[3]); + extract_fast(l[6]); + VERIFY_CHECK(c1 == 0); + l[7] = c0; +#endif +} + +static void secp256k1_scalar_sqr_512(uint64_t l[8], const secp256k1_scalar *a) { +#ifdef USE_ASM_X86_64 + __asm__ __volatile__( + /* Preload */ + "movq 0(%%rdi), %%r11\n" + "movq 8(%%rdi), %%r12\n" + "movq 16(%%rdi), %%r13\n" + "movq 24(%%rdi), %%r14\n" + /* (rax,rdx) = a0 * a0 */ + "movq %%r11, %%rax\n" + "mulq %%r11\n" + /* Extract l0 */ + "movq %%rax, 0(%%rsi)\n" + /* (r8,r9,r10) = (rdx,0) */ + "movq %%rdx, %%r8\n" + "xorq %%r9, %%r9\n" + "xorq %%r10, %%r10\n" + /* (r8,r9,r10) += 2 * a0 * a1 */ + "movq %%r11, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* Extract l1 */ + "movq %%r8, 8(%%rsi)\n" + "xorq %%r8, %%r8\n" + /* (r9,r10,r8) += 2 * a0 * a2 */ + "movq %%r11, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* (r9,r10,r8) += a1 * a1 */ + "movq %%r12, %%rax\n" + "mulq %%r12\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* Extract l2 */ + "movq %%r9, 16(%%rsi)\n" + "xorq %%r9, %%r9\n" + /* (r10,r8,r9) += 2 * a0 * a3 */ + "movq %%r11, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* (r10,r8,r9) += 2 * a1 * a2 */ + "movq %%r12, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + "adcq $0, %%r9\n" + /* Extract l3 */ + "movq %%r10, 24(%%rsi)\n" + "xorq %%r10, %%r10\n" + /* (r8,r9,r10) += 2 * a1 * a3 */ + "movq %%r12, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* (r8,r9,r10) += a2 * a2 */ + "movq %%r13, %%rax\n" + "mulq %%r13\n" + "addq %%rax, %%r8\n" + "adcq %%rdx, %%r9\n" + "adcq $0, %%r10\n" + /* Extract l4 */ + "movq %%r8, 32(%%rsi)\n" + "xorq %%r8, %%r8\n" + /* (r9,r10,r8) += 2 * a2 * a3 */ + "movq %%r13, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + "addq %%rax, %%r9\n" + "adcq %%rdx, %%r10\n" + "adcq $0, %%r8\n" + /* Extract l5 */ + "movq %%r9, 40(%%rsi)\n" + /* (r10,r8) += a3 * a3 */ + "movq %%r14, %%rax\n" + "mulq %%r14\n" + "addq %%rax, %%r10\n" + "adcq %%rdx, %%r8\n" + /* Extract l6 */ + "movq %%r10, 48(%%rsi)\n" + /* Extract l7 */ + "movq %%r8, 56(%%rsi)\n" + : + : "S"(l), "D"(a->d) + : "rax", "rdx", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "cc", "memory"); +#else + /* 160 bit accumulator. */ + uint64_t c0 = 0, c1 = 0; + uint32_t c2 = 0; + + /* l[0..7] = a[0..3] * b[0..3]. */ + muladd_fast(a->d[0], a->d[0]); + extract_fast(l[0]); + muladd2(a->d[0], a->d[1]); + extract(l[1]); + muladd2(a->d[0], a->d[2]); + muladd(a->d[1], a->d[1]); + extract(l[2]); + muladd2(a->d[0], a->d[3]); + muladd2(a->d[1], a->d[2]); + extract(l[3]); + muladd2(a->d[1], a->d[3]); + muladd(a->d[2], a->d[2]); + extract(l[4]); + muladd2(a->d[2], a->d[3]); + extract(l[5]); + muladd_fast(a->d[3], a->d[3]); + extract_fast(l[6]); + VERIFY_CHECK(c1 == 0); + l[7] = c0; +#endif +} + +#undef sumadd +#undef sumadd_fast +#undef muladd +#undef muladd_fast +#undef muladd2 +#undef extract +#undef extract_fast + +static void secp256k1_scalar_mul(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) { + uint64_t l[8]; + secp256k1_scalar_mul_512(l, a, b); + secp256k1_scalar_reduce_512(r, l); +} + +static int secp256k1_scalar_shr_int(secp256k1_scalar *r, int n) { + int ret; + VERIFY_CHECK(n > 0); + VERIFY_CHECK(n < 16); + ret = r->d[0] & ((1 << n) - 1); + r->d[0] = (r->d[0] >> n) + (r->d[1] << (64 - n)); + r->d[1] = (r->d[1] >> n) + (r->d[2] << (64 - n)); + r->d[2] = (r->d[2] >> n) + (r->d[3] << (64 - n)); + r->d[3] = (r->d[3] >> n); + return ret; +} + +static void secp256k1_scalar_sqr(secp256k1_scalar *r, const secp256k1_scalar *a) { + uint64_t l[8]; + secp256k1_scalar_sqr_512(l, a); + secp256k1_scalar_reduce_512(r, l); +} + +static void secp256k1_scalar_split_128(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a) { + r1->d[0] = a->d[0]; + r1->d[1] = a->d[1]; + r1->d[2] = 0; + r1->d[3] = 0; + r2->d[0] = a->d[2]; + r2->d[1] = a->d[3]; + r2->d[2] = 0; + r2->d[3] = 0; +} + +SECP256K1_INLINE static int secp256k1_scalar_eq(const secp256k1_scalar *a, const secp256k1_scalar *b) { + return ((a->d[0] ^ b->d[0]) | (a->d[1] ^ b->d[1]) | (a->d[2] ^ b->d[2]) | (a->d[3] ^ b->d[3])) == 0; +} + +SECP256K1_INLINE static void secp256k1_scalar_mul_shift_var(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b, unsigned int shift) { + uint64_t l[8]; + unsigned int shiftlimbs; + unsigned int shiftlow; + unsigned int shifthigh; + VERIFY_CHECK(shift >= 256); + secp256k1_scalar_mul_512(l, a, b); + shiftlimbs = shift >> 6; + shiftlow = shift & 0x3F; + shifthigh = 64 - shiftlow; + r->d[0] = shift < 512 ? (l[0 + shiftlimbs] >> shiftlow | (shift < 448 && shiftlow ? (l[1 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[1] = shift < 448 ? (l[1 + shiftlimbs] >> shiftlow | (shift < 384 && shiftlow ? (l[2 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[2] = shift < 384 ? (l[2 + shiftlimbs] >> shiftlow | (shift < 320 && shiftlow ? (l[3 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[3] = shift < 320 ? (l[3 + shiftlimbs] >> shiftlow) : 0; + secp256k1_scalar_cadd_bit(r, 0, (l[(shift - 1) >> 6] >> ((shift - 1) & 0x3f)) & 1); +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/scalar_8x32.h b/crypto/secp256k1/libsecp256k1/src/scalar_8x32.h new file mode 100644 index 000000000..1319664f6 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/scalar_8x32.h @@ -0,0 +1,19 @@ +/********************************************************************** + * Copyright (c) 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_SCALAR_REPR_ +#define _SECP256K1_SCALAR_REPR_ + +#include + +/** A scalar modulo the group order of the secp256k1 curve. */ +typedef struct { + uint32_t d[8]; +} secp256k1_scalar; + +#define SECP256K1_SCALAR_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{(d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7)}} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/scalar_8x32_impl.h b/crypto/secp256k1/libsecp256k1/src/scalar_8x32_impl.h new file mode 100644 index 000000000..aae4f35c0 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/scalar_8x32_impl.h @@ -0,0 +1,721 @@ +/********************************************************************** + * Copyright (c) 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_SCALAR_REPR_IMPL_H_ +#define _SECP256K1_SCALAR_REPR_IMPL_H_ + +/* Limbs of the secp256k1 order. */ +#define SECP256K1_N_0 ((uint32_t)0xD0364141UL) +#define SECP256K1_N_1 ((uint32_t)0xBFD25E8CUL) +#define SECP256K1_N_2 ((uint32_t)0xAF48A03BUL) +#define SECP256K1_N_3 ((uint32_t)0xBAAEDCE6UL) +#define SECP256K1_N_4 ((uint32_t)0xFFFFFFFEUL) +#define SECP256K1_N_5 ((uint32_t)0xFFFFFFFFUL) +#define SECP256K1_N_6 ((uint32_t)0xFFFFFFFFUL) +#define SECP256K1_N_7 ((uint32_t)0xFFFFFFFFUL) + +/* Limbs of 2^256 minus the secp256k1 order. */ +#define SECP256K1_N_C_0 (~SECP256K1_N_0 + 1) +#define SECP256K1_N_C_1 (~SECP256K1_N_1) +#define SECP256K1_N_C_2 (~SECP256K1_N_2) +#define SECP256K1_N_C_3 (~SECP256K1_N_3) +#define SECP256K1_N_C_4 (1) + +/* Limbs of half the secp256k1 order. */ +#define SECP256K1_N_H_0 ((uint32_t)0x681B20A0UL) +#define SECP256K1_N_H_1 ((uint32_t)0xDFE92F46UL) +#define SECP256K1_N_H_2 ((uint32_t)0x57A4501DUL) +#define SECP256K1_N_H_3 ((uint32_t)0x5D576E73UL) +#define SECP256K1_N_H_4 ((uint32_t)0xFFFFFFFFUL) +#define SECP256K1_N_H_5 ((uint32_t)0xFFFFFFFFUL) +#define SECP256K1_N_H_6 ((uint32_t)0xFFFFFFFFUL) +#define SECP256K1_N_H_7 ((uint32_t)0x7FFFFFFFUL) + +SECP256K1_INLINE static void secp256k1_scalar_clear(secp256k1_scalar *r) { + r->d[0] = 0; + r->d[1] = 0; + r->d[2] = 0; + r->d[3] = 0; + r->d[4] = 0; + r->d[5] = 0; + r->d[6] = 0; + r->d[7] = 0; +} + +SECP256K1_INLINE static void secp256k1_scalar_set_int(secp256k1_scalar *r, unsigned int v) { + r->d[0] = v; + r->d[1] = 0; + r->d[2] = 0; + r->d[3] = 0; + r->d[4] = 0; + r->d[5] = 0; + r->d[6] = 0; + r->d[7] = 0; +} + +SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits(const secp256k1_scalar *a, unsigned int offset, unsigned int count) { + VERIFY_CHECK((offset + count - 1) >> 5 == offset >> 5); + return (a->d[offset >> 5] >> (offset & 0x1F)) & ((1 << count) - 1); +} + +SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits_var(const secp256k1_scalar *a, unsigned int offset, unsigned int count) { + VERIFY_CHECK(count < 32); + VERIFY_CHECK(offset + count <= 256); + if ((offset + count - 1) >> 5 == offset >> 5) { + return secp256k1_scalar_get_bits(a, offset, count); + } else { + VERIFY_CHECK((offset >> 5) + 1 < 8); + return ((a->d[offset >> 5] >> (offset & 0x1F)) | (a->d[(offset >> 5) + 1] << (32 - (offset & 0x1F)))) & ((((uint32_t)1) << count) - 1); + } +} + +SECP256K1_INLINE static int secp256k1_scalar_check_overflow(const secp256k1_scalar *a) { + int yes = 0; + int no = 0; + no |= (a->d[7] < SECP256K1_N_7); /* No need for a > check. */ + no |= (a->d[6] < SECP256K1_N_6); /* No need for a > check. */ + no |= (a->d[5] < SECP256K1_N_5); /* No need for a > check. */ + no |= (a->d[4] < SECP256K1_N_4); + yes |= (a->d[4] > SECP256K1_N_4) & ~no; + no |= (a->d[3] < SECP256K1_N_3) & ~yes; + yes |= (a->d[3] > SECP256K1_N_3) & ~no; + no |= (a->d[2] < SECP256K1_N_2) & ~yes; + yes |= (a->d[2] > SECP256K1_N_2) & ~no; + no |= (a->d[1] < SECP256K1_N_1) & ~yes; + yes |= (a->d[1] > SECP256K1_N_1) & ~no; + yes |= (a->d[0] >= SECP256K1_N_0) & ~no; + return yes; +} + +SECP256K1_INLINE static int secp256k1_scalar_reduce(secp256k1_scalar *r, uint32_t overflow) { + uint64_t t; + VERIFY_CHECK(overflow <= 1); + t = (uint64_t)r->d[0] + overflow * SECP256K1_N_C_0; + r->d[0] = t & 0xFFFFFFFFUL; t >>= 32; + t += (uint64_t)r->d[1] + overflow * SECP256K1_N_C_1; + r->d[1] = t & 0xFFFFFFFFUL; t >>= 32; + t += (uint64_t)r->d[2] + overflow * SECP256K1_N_C_2; + r->d[2] = t & 0xFFFFFFFFUL; t >>= 32; + t += (uint64_t)r->d[3] + overflow * SECP256K1_N_C_3; + r->d[3] = t & 0xFFFFFFFFUL; t >>= 32; + t += (uint64_t)r->d[4] + overflow * SECP256K1_N_C_4; + r->d[4] = t & 0xFFFFFFFFUL; t >>= 32; + t += (uint64_t)r->d[5]; + r->d[5] = t & 0xFFFFFFFFUL; t >>= 32; + t += (uint64_t)r->d[6]; + r->d[6] = t & 0xFFFFFFFFUL; t >>= 32; + t += (uint64_t)r->d[7]; + r->d[7] = t & 0xFFFFFFFFUL; + return overflow; +} + +static int secp256k1_scalar_add(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) { + int overflow; + uint64_t t = (uint64_t)a->d[0] + b->d[0]; + r->d[0] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)a->d[1] + b->d[1]; + r->d[1] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)a->d[2] + b->d[2]; + r->d[2] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)a->d[3] + b->d[3]; + r->d[3] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)a->d[4] + b->d[4]; + r->d[4] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)a->d[5] + b->d[5]; + r->d[5] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)a->d[6] + b->d[6]; + r->d[6] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)a->d[7] + b->d[7]; + r->d[7] = t & 0xFFFFFFFFULL; t >>= 32; + overflow = t + secp256k1_scalar_check_overflow(r); + VERIFY_CHECK(overflow == 0 || overflow == 1); + secp256k1_scalar_reduce(r, overflow); + return overflow; +} + +static void secp256k1_scalar_cadd_bit(secp256k1_scalar *r, unsigned int bit, int flag) { + uint64_t t; + VERIFY_CHECK(bit < 256); + bit += ((uint32_t) flag - 1) & 0x100; /* forcing (bit >> 5) > 7 makes this a noop */ + t = (uint64_t)r->d[0] + (((uint32_t)((bit >> 5) == 0)) << (bit & 0x1F)); + r->d[0] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)r->d[1] + (((uint32_t)((bit >> 5) == 1)) << (bit & 0x1F)); + r->d[1] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)r->d[2] + (((uint32_t)((bit >> 5) == 2)) << (bit & 0x1F)); + r->d[2] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)r->d[3] + (((uint32_t)((bit >> 5) == 3)) << (bit & 0x1F)); + r->d[3] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)r->d[4] + (((uint32_t)((bit >> 5) == 4)) << (bit & 0x1F)); + r->d[4] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)r->d[5] + (((uint32_t)((bit >> 5) == 5)) << (bit & 0x1F)); + r->d[5] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)r->d[6] + (((uint32_t)((bit >> 5) == 6)) << (bit & 0x1F)); + r->d[6] = t & 0xFFFFFFFFULL; t >>= 32; + t += (uint64_t)r->d[7] + (((uint32_t)((bit >> 5) == 7)) << (bit & 0x1F)); + r->d[7] = t & 0xFFFFFFFFULL; +#ifdef VERIFY + VERIFY_CHECK((t >> 32) == 0); + VERIFY_CHECK(secp256k1_scalar_check_overflow(r) == 0); +#endif +} + +static void secp256k1_scalar_set_b32(secp256k1_scalar *r, const unsigned char *b32, int *overflow) { + int over; + r->d[0] = (uint32_t)b32[31] | (uint32_t)b32[30] << 8 | (uint32_t)b32[29] << 16 | (uint32_t)b32[28] << 24; + r->d[1] = (uint32_t)b32[27] | (uint32_t)b32[26] << 8 | (uint32_t)b32[25] << 16 | (uint32_t)b32[24] << 24; + r->d[2] = (uint32_t)b32[23] | (uint32_t)b32[22] << 8 | (uint32_t)b32[21] << 16 | (uint32_t)b32[20] << 24; + r->d[3] = (uint32_t)b32[19] | (uint32_t)b32[18] << 8 | (uint32_t)b32[17] << 16 | (uint32_t)b32[16] << 24; + r->d[4] = (uint32_t)b32[15] | (uint32_t)b32[14] << 8 | (uint32_t)b32[13] << 16 | (uint32_t)b32[12] << 24; + r->d[5] = (uint32_t)b32[11] | (uint32_t)b32[10] << 8 | (uint32_t)b32[9] << 16 | (uint32_t)b32[8] << 24; + r->d[6] = (uint32_t)b32[7] | (uint32_t)b32[6] << 8 | (uint32_t)b32[5] << 16 | (uint32_t)b32[4] << 24; + r->d[7] = (uint32_t)b32[3] | (uint32_t)b32[2] << 8 | (uint32_t)b32[1] << 16 | (uint32_t)b32[0] << 24; + over = secp256k1_scalar_reduce(r, secp256k1_scalar_check_overflow(r)); + if (overflow) { + *overflow = over; + } +} + +static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar* a) { + bin[0] = a->d[7] >> 24; bin[1] = a->d[7] >> 16; bin[2] = a->d[7] >> 8; bin[3] = a->d[7]; + bin[4] = a->d[6] >> 24; bin[5] = a->d[6] >> 16; bin[6] = a->d[6] >> 8; bin[7] = a->d[6]; + bin[8] = a->d[5] >> 24; bin[9] = a->d[5] >> 16; bin[10] = a->d[5] >> 8; bin[11] = a->d[5]; + bin[12] = a->d[4] >> 24; bin[13] = a->d[4] >> 16; bin[14] = a->d[4] >> 8; bin[15] = a->d[4]; + bin[16] = a->d[3] >> 24; bin[17] = a->d[3] >> 16; bin[18] = a->d[3] >> 8; bin[19] = a->d[3]; + bin[20] = a->d[2] >> 24; bin[21] = a->d[2] >> 16; bin[22] = a->d[2] >> 8; bin[23] = a->d[2]; + bin[24] = a->d[1] >> 24; bin[25] = a->d[1] >> 16; bin[26] = a->d[1] >> 8; bin[27] = a->d[1]; + bin[28] = a->d[0] >> 24; bin[29] = a->d[0] >> 16; bin[30] = a->d[0] >> 8; bin[31] = a->d[0]; +} + +SECP256K1_INLINE static int secp256k1_scalar_is_zero(const secp256k1_scalar *a) { + return (a->d[0] | a->d[1] | a->d[2] | a->d[3] | a->d[4] | a->d[5] | a->d[6] | a->d[7]) == 0; +} + +static void secp256k1_scalar_negate(secp256k1_scalar *r, const secp256k1_scalar *a) { + uint32_t nonzero = 0xFFFFFFFFUL * (secp256k1_scalar_is_zero(a) == 0); + uint64_t t = (uint64_t)(~a->d[0]) + SECP256K1_N_0 + 1; + r->d[0] = t & nonzero; t >>= 32; + t += (uint64_t)(~a->d[1]) + SECP256K1_N_1; + r->d[1] = t & nonzero; t >>= 32; + t += (uint64_t)(~a->d[2]) + SECP256K1_N_2; + r->d[2] = t & nonzero; t >>= 32; + t += (uint64_t)(~a->d[3]) + SECP256K1_N_3; + r->d[3] = t & nonzero; t >>= 32; + t += (uint64_t)(~a->d[4]) + SECP256K1_N_4; + r->d[4] = t & nonzero; t >>= 32; + t += (uint64_t)(~a->d[5]) + SECP256K1_N_5; + r->d[5] = t & nonzero; t >>= 32; + t += (uint64_t)(~a->d[6]) + SECP256K1_N_6; + r->d[6] = t & nonzero; t >>= 32; + t += (uint64_t)(~a->d[7]) + SECP256K1_N_7; + r->d[7] = t & nonzero; +} + +SECP256K1_INLINE static int secp256k1_scalar_is_one(const secp256k1_scalar *a) { + return ((a->d[0] ^ 1) | a->d[1] | a->d[2] | a->d[3] | a->d[4] | a->d[5] | a->d[6] | a->d[7]) == 0; +} + +static int secp256k1_scalar_is_high(const secp256k1_scalar *a) { + int yes = 0; + int no = 0; + no |= (a->d[7] < SECP256K1_N_H_7); + yes |= (a->d[7] > SECP256K1_N_H_7) & ~no; + no |= (a->d[6] < SECP256K1_N_H_6) & ~yes; /* No need for a > check. */ + no |= (a->d[5] < SECP256K1_N_H_5) & ~yes; /* No need for a > check. */ + no |= (a->d[4] < SECP256K1_N_H_4) & ~yes; /* No need for a > check. */ + no |= (a->d[3] < SECP256K1_N_H_3) & ~yes; + yes |= (a->d[3] > SECP256K1_N_H_3) & ~no; + no |= (a->d[2] < SECP256K1_N_H_2) & ~yes; + yes |= (a->d[2] > SECP256K1_N_H_2) & ~no; + no |= (a->d[1] < SECP256K1_N_H_1) & ~yes; + yes |= (a->d[1] > SECP256K1_N_H_1) & ~no; + yes |= (a->d[0] > SECP256K1_N_H_0) & ~no; + return yes; +} + +static int secp256k1_scalar_cond_negate(secp256k1_scalar *r, int flag) { + /* If we are flag = 0, mask = 00...00 and this is a no-op; + * if we are flag = 1, mask = 11...11 and this is identical to secp256k1_scalar_negate */ + uint32_t mask = !flag - 1; + uint32_t nonzero = 0xFFFFFFFFUL * (secp256k1_scalar_is_zero(r) == 0); + uint64_t t = (uint64_t)(r->d[0] ^ mask) + ((SECP256K1_N_0 + 1) & mask); + r->d[0] = t & nonzero; t >>= 32; + t += (uint64_t)(r->d[1] ^ mask) + (SECP256K1_N_1 & mask); + r->d[1] = t & nonzero; t >>= 32; + t += (uint64_t)(r->d[2] ^ mask) + (SECP256K1_N_2 & mask); + r->d[2] = t & nonzero; t >>= 32; + t += (uint64_t)(r->d[3] ^ mask) + (SECP256K1_N_3 & mask); + r->d[3] = t & nonzero; t >>= 32; + t += (uint64_t)(r->d[4] ^ mask) + (SECP256K1_N_4 & mask); + r->d[4] = t & nonzero; t >>= 32; + t += (uint64_t)(r->d[5] ^ mask) + (SECP256K1_N_5 & mask); + r->d[5] = t & nonzero; t >>= 32; + t += (uint64_t)(r->d[6] ^ mask) + (SECP256K1_N_6 & mask); + r->d[6] = t & nonzero; t >>= 32; + t += (uint64_t)(r->d[7] ^ mask) + (SECP256K1_N_7 & mask); + r->d[7] = t & nonzero; + return 2 * (mask == 0) - 1; +} + + +/* Inspired by the macros in OpenSSL's crypto/bn/asm/x86_64-gcc.c. */ + +/** Add a*b to the number defined by (c0,c1,c2). c2 must never overflow. */ +#define muladd(a,b) { \ + uint32_t tl, th; \ + { \ + uint64_t t = (uint64_t)a * b; \ + th = t >> 32; /* at most 0xFFFFFFFE */ \ + tl = t; \ + } \ + c0 += tl; /* overflow is handled on the next line */ \ + th += (c0 < tl) ? 1 : 0; /* at most 0xFFFFFFFF */ \ + c1 += th; /* overflow is handled on the next line */ \ + c2 += (c1 < th) ? 1 : 0; /* never overflows by contract (verified in the next line) */ \ + VERIFY_CHECK((c1 >= th) || (c2 != 0)); \ +} + +/** Add a*b to the number defined by (c0,c1). c1 must never overflow. */ +#define muladd_fast(a,b) { \ + uint32_t tl, th; \ + { \ + uint64_t t = (uint64_t)a * b; \ + th = t >> 32; /* at most 0xFFFFFFFE */ \ + tl = t; \ + } \ + c0 += tl; /* overflow is handled on the next line */ \ + th += (c0 < tl) ? 1 : 0; /* at most 0xFFFFFFFF */ \ + c1 += th; /* never overflows by contract (verified in the next line) */ \ + VERIFY_CHECK(c1 >= th); \ +} + +/** Add 2*a*b to the number defined by (c0,c1,c2). c2 must never overflow. */ +#define muladd2(a,b) { \ + uint32_t tl, th, th2, tl2; \ + { \ + uint64_t t = (uint64_t)a * b; \ + th = t >> 32; /* at most 0xFFFFFFFE */ \ + tl = t; \ + } \ + th2 = th + th; /* at most 0xFFFFFFFE (in case th was 0x7FFFFFFF) */ \ + c2 += (th2 < th) ? 1 : 0; /* never overflows by contract (verified the next line) */ \ + VERIFY_CHECK((th2 >= th) || (c2 != 0)); \ + tl2 = tl + tl; /* at most 0xFFFFFFFE (in case the lowest 63 bits of tl were 0x7FFFFFFF) */ \ + th2 += (tl2 < tl) ? 1 : 0; /* at most 0xFFFFFFFF */ \ + c0 += tl2; /* overflow is handled on the next line */ \ + th2 += (c0 < tl2) ? 1 : 0; /* second overflow is handled on the next line */ \ + c2 += (c0 < tl2) & (th2 == 0); /* never overflows by contract (verified the next line) */ \ + VERIFY_CHECK((c0 >= tl2) || (th2 != 0) || (c2 != 0)); \ + c1 += th2; /* overflow is handled on the next line */ \ + c2 += (c1 < th2) ? 1 : 0; /* never overflows by contract (verified the next line) */ \ + VERIFY_CHECK((c1 >= th2) || (c2 != 0)); \ +} + +/** Add a to the number defined by (c0,c1,c2). c2 must never overflow. */ +#define sumadd(a) { \ + unsigned int over; \ + c0 += (a); /* overflow is handled on the next line */ \ + over = (c0 < (a)) ? 1 : 0; \ + c1 += over; /* overflow is handled on the next line */ \ + c2 += (c1 < over) ? 1 : 0; /* never overflows by contract */ \ +} + +/** Add a to the number defined by (c0,c1). c1 must never overflow, c2 must be zero. */ +#define sumadd_fast(a) { \ + c0 += (a); /* overflow is handled on the next line */ \ + c1 += (c0 < (a)) ? 1 : 0; /* never overflows by contract (verified the next line) */ \ + VERIFY_CHECK((c1 != 0) | (c0 >= (a))); \ + VERIFY_CHECK(c2 == 0); \ +} + +/** Extract the lowest 32 bits of (c0,c1,c2) into n, and left shift the number 32 bits. */ +#define extract(n) { \ + (n) = c0; \ + c0 = c1; \ + c1 = c2; \ + c2 = 0; \ +} + +/** Extract the lowest 32 bits of (c0,c1,c2) into n, and left shift the number 32 bits. c2 is required to be zero. */ +#define extract_fast(n) { \ + (n) = c0; \ + c0 = c1; \ + c1 = 0; \ + VERIFY_CHECK(c2 == 0); \ +} + +static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint32_t *l) { + uint64_t c; + uint32_t n0 = l[8], n1 = l[9], n2 = l[10], n3 = l[11], n4 = l[12], n5 = l[13], n6 = l[14], n7 = l[15]; + uint32_t m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12; + uint32_t p0, p1, p2, p3, p4, p5, p6, p7, p8; + + /* 96 bit accumulator. */ + uint32_t c0, c1, c2; + + /* Reduce 512 bits into 385. */ + /* m[0..12] = l[0..7] + n[0..7] * SECP256K1_N_C. */ + c0 = l[0]; c1 = 0; c2 = 0; + muladd_fast(n0, SECP256K1_N_C_0); + extract_fast(m0); + sumadd_fast(l[1]); + muladd(n1, SECP256K1_N_C_0); + muladd(n0, SECP256K1_N_C_1); + extract(m1); + sumadd(l[2]); + muladd(n2, SECP256K1_N_C_0); + muladd(n1, SECP256K1_N_C_1); + muladd(n0, SECP256K1_N_C_2); + extract(m2); + sumadd(l[3]); + muladd(n3, SECP256K1_N_C_0); + muladd(n2, SECP256K1_N_C_1); + muladd(n1, SECP256K1_N_C_2); + muladd(n0, SECP256K1_N_C_3); + extract(m3); + sumadd(l[4]); + muladd(n4, SECP256K1_N_C_0); + muladd(n3, SECP256K1_N_C_1); + muladd(n2, SECP256K1_N_C_2); + muladd(n1, SECP256K1_N_C_3); + sumadd(n0); + extract(m4); + sumadd(l[5]); + muladd(n5, SECP256K1_N_C_0); + muladd(n4, SECP256K1_N_C_1); + muladd(n3, SECP256K1_N_C_2); + muladd(n2, SECP256K1_N_C_3); + sumadd(n1); + extract(m5); + sumadd(l[6]); + muladd(n6, SECP256K1_N_C_0); + muladd(n5, SECP256K1_N_C_1); + muladd(n4, SECP256K1_N_C_2); + muladd(n3, SECP256K1_N_C_3); + sumadd(n2); + extract(m6); + sumadd(l[7]); + muladd(n7, SECP256K1_N_C_0); + muladd(n6, SECP256K1_N_C_1); + muladd(n5, SECP256K1_N_C_2); + muladd(n4, SECP256K1_N_C_3); + sumadd(n3); + extract(m7); + muladd(n7, SECP256K1_N_C_1); + muladd(n6, SECP256K1_N_C_2); + muladd(n5, SECP256K1_N_C_3); + sumadd(n4); + extract(m8); + muladd(n7, SECP256K1_N_C_2); + muladd(n6, SECP256K1_N_C_3); + sumadd(n5); + extract(m9); + muladd(n7, SECP256K1_N_C_3); + sumadd(n6); + extract(m10); + sumadd_fast(n7); + extract_fast(m11); + VERIFY_CHECK(c0 <= 1); + m12 = c0; + + /* Reduce 385 bits into 258. */ + /* p[0..8] = m[0..7] + m[8..12] * SECP256K1_N_C. */ + c0 = m0; c1 = 0; c2 = 0; + muladd_fast(m8, SECP256K1_N_C_0); + extract_fast(p0); + sumadd_fast(m1); + muladd(m9, SECP256K1_N_C_0); + muladd(m8, SECP256K1_N_C_1); + extract(p1); + sumadd(m2); + muladd(m10, SECP256K1_N_C_0); + muladd(m9, SECP256K1_N_C_1); + muladd(m8, SECP256K1_N_C_2); + extract(p2); + sumadd(m3); + muladd(m11, SECP256K1_N_C_0); + muladd(m10, SECP256K1_N_C_1); + muladd(m9, SECP256K1_N_C_2); + muladd(m8, SECP256K1_N_C_3); + extract(p3); + sumadd(m4); + muladd(m12, SECP256K1_N_C_0); + muladd(m11, SECP256K1_N_C_1); + muladd(m10, SECP256K1_N_C_2); + muladd(m9, SECP256K1_N_C_3); + sumadd(m8); + extract(p4); + sumadd(m5); + muladd(m12, SECP256K1_N_C_1); + muladd(m11, SECP256K1_N_C_2); + muladd(m10, SECP256K1_N_C_3); + sumadd(m9); + extract(p5); + sumadd(m6); + muladd(m12, SECP256K1_N_C_2); + muladd(m11, SECP256K1_N_C_3); + sumadd(m10); + extract(p6); + sumadd_fast(m7); + muladd_fast(m12, SECP256K1_N_C_3); + sumadd_fast(m11); + extract_fast(p7); + p8 = c0 + m12; + VERIFY_CHECK(p8 <= 2); + + /* Reduce 258 bits into 256. */ + /* r[0..7] = p[0..7] + p[8] * SECP256K1_N_C. */ + c = p0 + (uint64_t)SECP256K1_N_C_0 * p8; + r->d[0] = c & 0xFFFFFFFFUL; c >>= 32; + c += p1 + (uint64_t)SECP256K1_N_C_1 * p8; + r->d[1] = c & 0xFFFFFFFFUL; c >>= 32; + c += p2 + (uint64_t)SECP256K1_N_C_2 * p8; + r->d[2] = c & 0xFFFFFFFFUL; c >>= 32; + c += p3 + (uint64_t)SECP256K1_N_C_3 * p8; + r->d[3] = c & 0xFFFFFFFFUL; c >>= 32; + c += p4 + (uint64_t)p8; + r->d[4] = c & 0xFFFFFFFFUL; c >>= 32; + c += p5; + r->d[5] = c & 0xFFFFFFFFUL; c >>= 32; + c += p6; + r->d[6] = c & 0xFFFFFFFFUL; c >>= 32; + c += p7; + r->d[7] = c & 0xFFFFFFFFUL; c >>= 32; + + /* Final reduction of r. */ + secp256k1_scalar_reduce(r, c + secp256k1_scalar_check_overflow(r)); +} + +static void secp256k1_scalar_mul_512(uint32_t *l, const secp256k1_scalar *a, const secp256k1_scalar *b) { + /* 96 bit accumulator. */ + uint32_t c0 = 0, c1 = 0, c2 = 0; + + /* l[0..15] = a[0..7] * b[0..7]. */ + muladd_fast(a->d[0], b->d[0]); + extract_fast(l[0]); + muladd(a->d[0], b->d[1]); + muladd(a->d[1], b->d[0]); + extract(l[1]); + muladd(a->d[0], b->d[2]); + muladd(a->d[1], b->d[1]); + muladd(a->d[2], b->d[0]); + extract(l[2]); + muladd(a->d[0], b->d[3]); + muladd(a->d[1], b->d[2]); + muladd(a->d[2], b->d[1]); + muladd(a->d[3], b->d[0]); + extract(l[3]); + muladd(a->d[0], b->d[4]); + muladd(a->d[1], b->d[3]); + muladd(a->d[2], b->d[2]); + muladd(a->d[3], b->d[1]); + muladd(a->d[4], b->d[0]); + extract(l[4]); + muladd(a->d[0], b->d[5]); + muladd(a->d[1], b->d[4]); + muladd(a->d[2], b->d[3]); + muladd(a->d[3], b->d[2]); + muladd(a->d[4], b->d[1]); + muladd(a->d[5], b->d[0]); + extract(l[5]); + muladd(a->d[0], b->d[6]); + muladd(a->d[1], b->d[5]); + muladd(a->d[2], b->d[4]); + muladd(a->d[3], b->d[3]); + muladd(a->d[4], b->d[2]); + muladd(a->d[5], b->d[1]); + muladd(a->d[6], b->d[0]); + extract(l[6]); + muladd(a->d[0], b->d[7]); + muladd(a->d[1], b->d[6]); + muladd(a->d[2], b->d[5]); + muladd(a->d[3], b->d[4]); + muladd(a->d[4], b->d[3]); + muladd(a->d[5], b->d[2]); + muladd(a->d[6], b->d[1]); + muladd(a->d[7], b->d[0]); + extract(l[7]); + muladd(a->d[1], b->d[7]); + muladd(a->d[2], b->d[6]); + muladd(a->d[3], b->d[5]); + muladd(a->d[4], b->d[4]); + muladd(a->d[5], b->d[3]); + muladd(a->d[6], b->d[2]); + muladd(a->d[7], b->d[1]); + extract(l[8]); + muladd(a->d[2], b->d[7]); + muladd(a->d[3], b->d[6]); + muladd(a->d[4], b->d[5]); + muladd(a->d[5], b->d[4]); + muladd(a->d[6], b->d[3]); + muladd(a->d[7], b->d[2]); + extract(l[9]); + muladd(a->d[3], b->d[7]); + muladd(a->d[4], b->d[6]); + muladd(a->d[5], b->d[5]); + muladd(a->d[6], b->d[4]); + muladd(a->d[7], b->d[3]); + extract(l[10]); + muladd(a->d[4], b->d[7]); + muladd(a->d[5], b->d[6]); + muladd(a->d[6], b->d[5]); + muladd(a->d[7], b->d[4]); + extract(l[11]); + muladd(a->d[5], b->d[7]); + muladd(a->d[6], b->d[6]); + muladd(a->d[7], b->d[5]); + extract(l[12]); + muladd(a->d[6], b->d[7]); + muladd(a->d[7], b->d[6]); + extract(l[13]); + muladd_fast(a->d[7], b->d[7]); + extract_fast(l[14]); + VERIFY_CHECK(c1 == 0); + l[15] = c0; +} + +static void secp256k1_scalar_sqr_512(uint32_t *l, const secp256k1_scalar *a) { + /* 96 bit accumulator. */ + uint32_t c0 = 0, c1 = 0, c2 = 0; + + /* l[0..15] = a[0..7]^2. */ + muladd_fast(a->d[0], a->d[0]); + extract_fast(l[0]); + muladd2(a->d[0], a->d[1]); + extract(l[1]); + muladd2(a->d[0], a->d[2]); + muladd(a->d[1], a->d[1]); + extract(l[2]); + muladd2(a->d[0], a->d[3]); + muladd2(a->d[1], a->d[2]); + extract(l[3]); + muladd2(a->d[0], a->d[4]); + muladd2(a->d[1], a->d[3]); + muladd(a->d[2], a->d[2]); + extract(l[4]); + muladd2(a->d[0], a->d[5]); + muladd2(a->d[1], a->d[4]); + muladd2(a->d[2], a->d[3]); + extract(l[5]); + muladd2(a->d[0], a->d[6]); + muladd2(a->d[1], a->d[5]); + muladd2(a->d[2], a->d[4]); + muladd(a->d[3], a->d[3]); + extract(l[6]); + muladd2(a->d[0], a->d[7]); + muladd2(a->d[1], a->d[6]); + muladd2(a->d[2], a->d[5]); + muladd2(a->d[3], a->d[4]); + extract(l[7]); + muladd2(a->d[1], a->d[7]); + muladd2(a->d[2], a->d[6]); + muladd2(a->d[3], a->d[5]); + muladd(a->d[4], a->d[4]); + extract(l[8]); + muladd2(a->d[2], a->d[7]); + muladd2(a->d[3], a->d[6]); + muladd2(a->d[4], a->d[5]); + extract(l[9]); + muladd2(a->d[3], a->d[7]); + muladd2(a->d[4], a->d[6]); + muladd(a->d[5], a->d[5]); + extract(l[10]); + muladd2(a->d[4], a->d[7]); + muladd2(a->d[5], a->d[6]); + extract(l[11]); + muladd2(a->d[5], a->d[7]); + muladd(a->d[6], a->d[6]); + extract(l[12]); + muladd2(a->d[6], a->d[7]); + extract(l[13]); + muladd_fast(a->d[7], a->d[7]); + extract_fast(l[14]); + VERIFY_CHECK(c1 == 0); + l[15] = c0; +} + +#undef sumadd +#undef sumadd_fast +#undef muladd +#undef muladd_fast +#undef muladd2 +#undef extract +#undef extract_fast + +static void secp256k1_scalar_mul(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) { + uint32_t l[16]; + secp256k1_scalar_mul_512(l, a, b); + secp256k1_scalar_reduce_512(r, l); +} + +static int secp256k1_scalar_shr_int(secp256k1_scalar *r, int n) { + int ret; + VERIFY_CHECK(n > 0); + VERIFY_CHECK(n < 16); + ret = r->d[0] & ((1 << n) - 1); + r->d[0] = (r->d[0] >> n) + (r->d[1] << (32 - n)); + r->d[1] = (r->d[1] >> n) + (r->d[2] << (32 - n)); + r->d[2] = (r->d[2] >> n) + (r->d[3] << (32 - n)); + r->d[3] = (r->d[3] >> n) + (r->d[4] << (32 - n)); + r->d[4] = (r->d[4] >> n) + (r->d[5] << (32 - n)); + r->d[5] = (r->d[5] >> n) + (r->d[6] << (32 - n)); + r->d[6] = (r->d[6] >> n) + (r->d[7] << (32 - n)); + r->d[7] = (r->d[7] >> n); + return ret; +} + +static void secp256k1_scalar_sqr(secp256k1_scalar *r, const secp256k1_scalar *a) { + uint32_t l[16]; + secp256k1_scalar_sqr_512(l, a); + secp256k1_scalar_reduce_512(r, l); +} + +#ifdef USE_ENDOMORPHISM +static void secp256k1_scalar_split_128(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a) { + r1->d[0] = a->d[0]; + r1->d[1] = a->d[1]; + r1->d[2] = a->d[2]; + r1->d[3] = a->d[3]; + r1->d[4] = 0; + r1->d[5] = 0; + r1->d[6] = 0; + r1->d[7] = 0; + r2->d[0] = a->d[4]; + r2->d[1] = a->d[5]; + r2->d[2] = a->d[6]; + r2->d[3] = a->d[7]; + r2->d[4] = 0; + r2->d[5] = 0; + r2->d[6] = 0; + r2->d[7] = 0; +} +#endif + +SECP256K1_INLINE static int secp256k1_scalar_eq(const secp256k1_scalar *a, const secp256k1_scalar *b) { + return ((a->d[0] ^ b->d[0]) | (a->d[1] ^ b->d[1]) | (a->d[2] ^ b->d[2]) | (a->d[3] ^ b->d[3]) | (a->d[4] ^ b->d[4]) | (a->d[5] ^ b->d[5]) | (a->d[6] ^ b->d[6]) | (a->d[7] ^ b->d[7])) == 0; +} + +SECP256K1_INLINE static void secp256k1_scalar_mul_shift_var(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b, unsigned int shift) { + uint32_t l[16]; + unsigned int shiftlimbs; + unsigned int shiftlow; + unsigned int shifthigh; + VERIFY_CHECK(shift >= 256); + secp256k1_scalar_mul_512(l, a, b); + shiftlimbs = shift >> 5; + shiftlow = shift & 0x1F; + shifthigh = 32 - shiftlow; + r->d[0] = shift < 512 ? (l[0 + shiftlimbs] >> shiftlow | (shift < 480 && shiftlow ? (l[1 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[1] = shift < 480 ? (l[1 + shiftlimbs] >> shiftlow | (shift < 448 && shiftlow ? (l[2 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[2] = shift < 448 ? (l[2 + shiftlimbs] >> shiftlow | (shift < 416 && shiftlow ? (l[3 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[3] = shift < 416 ? (l[3 + shiftlimbs] >> shiftlow | (shift < 384 && shiftlow ? (l[4 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[4] = shift < 384 ? (l[4 + shiftlimbs] >> shiftlow | (shift < 352 && shiftlow ? (l[5 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[5] = shift < 352 ? (l[5 + shiftlimbs] >> shiftlow | (shift < 320 && shiftlow ? (l[6 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[6] = shift < 320 ? (l[6 + shiftlimbs] >> shiftlow | (shift < 288 && shiftlow ? (l[7 + shiftlimbs] << shifthigh) : 0)) : 0; + r->d[7] = shift < 288 ? (l[7 + shiftlimbs] >> shiftlow) : 0; + secp256k1_scalar_cadd_bit(r, 0, (l[(shift - 1) >> 5] >> ((shift - 1) & 0x1f)) & 1); +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/scalar_impl.h b/crypto/secp256k1/libsecp256k1/src/scalar_impl.h new file mode 100644 index 000000000..88ea97de8 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/scalar_impl.h @@ -0,0 +1,337 @@ +/********************************************************************** + * Copyright (c) 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_SCALAR_IMPL_H_ +#define _SECP256K1_SCALAR_IMPL_H_ + +#include + +#include "group.h" +#include "scalar.h" + +#if defined HAVE_CONFIG_H +#include "libsecp256k1-config.h" +#endif + +#if defined(USE_SCALAR_4X64) +#include "scalar_4x64_impl.h" +#elif defined(USE_SCALAR_8X32) +#include "scalar_8x32_impl.h" +#else +#error "Please select scalar implementation" +#endif + +#ifndef USE_NUM_NONE +static void secp256k1_scalar_get_num(secp256k1_num *r, const secp256k1_scalar *a) { + unsigned char c[32]; + secp256k1_scalar_get_b32(c, a); + secp256k1_num_set_bin(r, c, 32); +} + +/** secp256k1 curve order, see secp256k1_ecdsa_const_order_as_fe in ecdsa_impl.h */ +static void secp256k1_scalar_order_get_num(secp256k1_num *r) { + static const unsigned char order[32] = { + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE, + 0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B, + 0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x41 + }; + secp256k1_num_set_bin(r, order, 32); +} +#endif + +static void secp256k1_scalar_inverse(secp256k1_scalar *r, const secp256k1_scalar *x) { + secp256k1_scalar *t; + int i; + /* First compute x ^ (2^N - 1) for some values of N. */ + secp256k1_scalar x2, x3, x4, x6, x7, x8, x15, x30, x60, x120, x127; + + secp256k1_scalar_sqr(&x2, x); + secp256k1_scalar_mul(&x2, &x2, x); + + secp256k1_scalar_sqr(&x3, &x2); + secp256k1_scalar_mul(&x3, &x3, x); + + secp256k1_scalar_sqr(&x4, &x3); + secp256k1_scalar_mul(&x4, &x4, x); + + secp256k1_scalar_sqr(&x6, &x4); + secp256k1_scalar_sqr(&x6, &x6); + secp256k1_scalar_mul(&x6, &x6, &x2); + + secp256k1_scalar_sqr(&x7, &x6); + secp256k1_scalar_mul(&x7, &x7, x); + + secp256k1_scalar_sqr(&x8, &x7); + secp256k1_scalar_mul(&x8, &x8, x); + + secp256k1_scalar_sqr(&x15, &x8); + for (i = 0; i < 6; i++) { + secp256k1_scalar_sqr(&x15, &x15); + } + secp256k1_scalar_mul(&x15, &x15, &x7); + + secp256k1_scalar_sqr(&x30, &x15); + for (i = 0; i < 14; i++) { + secp256k1_scalar_sqr(&x30, &x30); + } + secp256k1_scalar_mul(&x30, &x30, &x15); + + secp256k1_scalar_sqr(&x60, &x30); + for (i = 0; i < 29; i++) { + secp256k1_scalar_sqr(&x60, &x60); + } + secp256k1_scalar_mul(&x60, &x60, &x30); + + secp256k1_scalar_sqr(&x120, &x60); + for (i = 0; i < 59; i++) { + secp256k1_scalar_sqr(&x120, &x120); + } + secp256k1_scalar_mul(&x120, &x120, &x60); + + secp256k1_scalar_sqr(&x127, &x120); + for (i = 0; i < 6; i++) { + secp256k1_scalar_sqr(&x127, &x127); + } + secp256k1_scalar_mul(&x127, &x127, &x7); + + /* Then accumulate the final result (t starts at x127). */ + t = &x127; + for (i = 0; i < 2; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, x); /* 1 */ + for (i = 0; i < 4; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x3); /* 111 */ + for (i = 0; i < 2; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, x); /* 1 */ + for (i = 0; i < 2; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, x); /* 1 */ + for (i = 0; i < 2; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, x); /* 1 */ + for (i = 0; i < 4; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x3); /* 111 */ + for (i = 0; i < 3; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x2); /* 11 */ + for (i = 0; i < 4; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x3); /* 111 */ + for (i = 0; i < 5; i++) { /* 00 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x3); /* 111 */ + for (i = 0; i < 4; i++) { /* 00 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x2); /* 11 */ + for (i = 0; i < 2; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, x); /* 1 */ + for (i = 0; i < 2; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, x); /* 1 */ + for (i = 0; i < 5; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x4); /* 1111 */ + for (i = 0; i < 2; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, x); /* 1 */ + for (i = 0; i < 3; i++) { /* 00 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, x); /* 1 */ + for (i = 0; i < 4; i++) { /* 000 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, x); /* 1 */ + for (i = 0; i < 2; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, x); /* 1 */ + for (i = 0; i < 10; i++) { /* 0000000 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x3); /* 111 */ + for (i = 0; i < 4; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x3); /* 111 */ + for (i = 0; i < 9; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x8); /* 11111111 */ + for (i = 0; i < 2; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, x); /* 1 */ + for (i = 0; i < 3; i++) { /* 00 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, x); /* 1 */ + for (i = 0; i < 3; i++) { /* 00 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, x); /* 1 */ + for (i = 0; i < 5; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x4); /* 1111 */ + for (i = 0; i < 2; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, x); /* 1 */ + for (i = 0; i < 5; i++) { /* 000 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x2); /* 11 */ + for (i = 0; i < 4; i++) { /* 00 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x2); /* 11 */ + for (i = 0; i < 2; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, x); /* 1 */ + for (i = 0; i < 8; i++) { /* 000000 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x2); /* 11 */ + for (i = 0; i < 3; i++) { /* 0 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, &x2); /* 11 */ + for (i = 0; i < 3; i++) { /* 00 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, x); /* 1 */ + for (i = 0; i < 6; i++) { /* 00000 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(t, t, x); /* 1 */ + for (i = 0; i < 8; i++) { /* 00 */ + secp256k1_scalar_sqr(t, t); + } + secp256k1_scalar_mul(r, t, &x6); /* 111111 */ +} + +SECP256K1_INLINE static int secp256k1_scalar_is_even(const secp256k1_scalar *a) { + /* d[0] is present and is the lowest word for all representations */ + return !(a->d[0] & 1); +} + +static void secp256k1_scalar_inverse_var(secp256k1_scalar *r, const secp256k1_scalar *x) { +#if defined(USE_SCALAR_INV_BUILTIN) + secp256k1_scalar_inverse(r, x); +#elif defined(USE_SCALAR_INV_NUM) + unsigned char b[32]; + secp256k1_num n, m; + secp256k1_scalar t = *x; + secp256k1_scalar_get_b32(b, &t); + secp256k1_num_set_bin(&n, b, 32); + secp256k1_scalar_order_get_num(&m); + secp256k1_num_mod_inverse(&n, &n, &m); + secp256k1_num_get_bin(b, 32, &n); + secp256k1_scalar_set_b32(r, b, NULL); + /* Verify that the inverse was computed correctly, without GMP code. */ + secp256k1_scalar_mul(&t, &t, r); + CHECK(secp256k1_scalar_is_one(&t)); +#else +#error "Please select scalar inverse implementation" +#endif +} + +#ifdef USE_ENDOMORPHISM +/** + * The Secp256k1 curve has an endomorphism, where lambda * (x, y) = (beta * x, y), where + * lambda is {0x53,0x63,0xad,0x4c,0xc0,0x5c,0x30,0xe0,0xa5,0x26,0x1c,0x02,0x88,0x12,0x64,0x5a, + * 0x12,0x2e,0x22,0xea,0x20,0x81,0x66,0x78,0xdf,0x02,0x96,0x7c,0x1b,0x23,0xbd,0x72} + * + * "Guide to Elliptic Curve Cryptography" (Hankerson, Menezes, Vanstone) gives an algorithm + * (algorithm 3.74) to find k1 and k2 given k, such that k1 + k2 * lambda == k mod n, and k1 + * and k2 have a small size. + * It relies on constants a1, b1, a2, b2. These constants for the value of lambda above are: + * + * - a1 = {0x30,0x86,0xd2,0x21,0xa7,0xd4,0x6b,0xcd,0xe8,0x6c,0x90,0xe4,0x92,0x84,0xeb,0x15} + * - b1 = -{0xe4,0x43,0x7e,0xd6,0x01,0x0e,0x88,0x28,0x6f,0x54,0x7f,0xa9,0x0a,0xbf,0xe4,0xc3} + * - a2 = {0x01,0x14,0xca,0x50,0xf7,0xa8,0xe2,0xf3,0xf6,0x57,0xc1,0x10,0x8d,0x9d,0x44,0xcf,0xd8} + * - b2 = {0x30,0x86,0xd2,0x21,0xa7,0xd4,0x6b,0xcd,0xe8,0x6c,0x90,0xe4,0x92,0x84,0xeb,0x15} + * + * The algorithm then computes c1 = round(b1 * k / n) and c2 = round(b2 * k / n), and gives + * k1 = k - (c1*a1 + c2*a2) and k2 = -(c1*b1 + c2*b2). Instead, we use modular arithmetic, and + * compute k1 as k - k2 * lambda, avoiding the need for constants a1 and a2. + * + * g1, g2 are precomputed constants used to replace division with a rounded multiplication + * when decomposing the scalar for an endomorphism-based point multiplication. + * + * The possibility of using precomputed estimates is mentioned in "Guide to Elliptic Curve + * Cryptography" (Hankerson, Menezes, Vanstone) in section 3.5. + * + * The derivation is described in the paper "Efficient Software Implementation of Public-Key + * Cryptography on Sensor Networks Using the MSP430X Microcontroller" (Gouvea, Oliveira, Lopez), + * Section 4.3 (here we use a somewhat higher-precision estimate): + * d = a1*b2 - b1*a2 + * g1 = round((2^272)*b2/d) + * g2 = round((2^272)*b1/d) + * + * (Note that 'd' is also equal to the curve order here because [a1,b1] and [a2,b2] are found + * as outputs of the Extended Euclidean Algorithm on inputs 'order' and 'lambda'). + * + * The function below splits a in r1 and r2, such that r1 + lambda * r2 == a (mod order). + */ + +static void secp256k1_scalar_split_lambda(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a) { + secp256k1_scalar c1, c2; + static const secp256k1_scalar minus_lambda = SECP256K1_SCALAR_CONST( + 0xAC9C52B3UL, 0x3FA3CF1FUL, 0x5AD9E3FDUL, 0x77ED9BA4UL, + 0xA880B9FCUL, 0x8EC739C2UL, 0xE0CFC810UL, 0xB51283CFUL + ); + static const secp256k1_scalar minus_b1 = SECP256K1_SCALAR_CONST( + 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, + 0xE4437ED6UL, 0x010E8828UL, 0x6F547FA9UL, 0x0ABFE4C3UL + ); + static const secp256k1_scalar minus_b2 = SECP256K1_SCALAR_CONST( + 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFEUL, + 0x8A280AC5UL, 0x0774346DUL, 0xD765CDA8UL, 0x3DB1562CUL + ); + static const secp256k1_scalar g1 = SECP256K1_SCALAR_CONST( + 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00003086UL, + 0xD221A7D4UL, 0x6BCDE86CUL, 0x90E49284UL, 0xEB153DABUL + ); + static const secp256k1_scalar g2 = SECP256K1_SCALAR_CONST( + 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x0000E443UL, + 0x7ED6010EUL, 0x88286F54UL, 0x7FA90ABFUL, 0xE4C42212UL + ); + VERIFY_CHECK(r1 != a); + VERIFY_CHECK(r2 != a); + /* these _var calls are constant time since the shift amount is constant */ + secp256k1_scalar_mul_shift_var(&c1, a, &g1, 272); + secp256k1_scalar_mul_shift_var(&c2, a, &g2, 272); + secp256k1_scalar_mul(&c1, &c1, &minus_b1); + secp256k1_scalar_mul(&c2, &c2, &minus_b2); + secp256k1_scalar_add(r2, &c1, &c2); + secp256k1_scalar_mul(r1, r2, &minus_lambda); + secp256k1_scalar_add(r1, r1, a); +} +#endif + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/secp256k1.c b/crypto/secp256k1/libsecp256k1/src/secp256k1.c new file mode 100644 index 000000000..203f880af --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/secp256k1.c @@ -0,0 +1,513 @@ +/********************************************************************** + * Copyright (c) 2013-2015 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#define SECP256K1_BUILD (1) + +#include "include/secp256k1.h" + +#include "util.h" +#include "num_impl.h" +#include "field_impl.h" +#include "scalar_impl.h" +#include "group_impl.h" +#include "ecmult_impl.h" +#include "ecmult_const_impl.h" +#include "ecmult_gen_impl.h" +#include "ecdsa_impl.h" +#include "eckey_impl.h" +#include "hash_impl.h" + +#define ARG_CHECK(cond) do { \ + if (EXPECT(!(cond), 0)) { \ + secp256k1_callback_call(&ctx->illegal_callback, #cond); \ + return 0; \ + } \ +} while(0) + +static void default_illegal_callback_fn(const char* str, void* data) { + (void)data; + fprintf(stderr, "[libsecp256k1] illegal argument: %s\n", str); + abort(); +} + +static const secp256k1_callback default_illegal_callback = { + default_illegal_callback_fn, + NULL +}; + +static void default_error_callback_fn(const char* str, void* data) { + (void)data; + fprintf(stderr, "[libsecp256k1] internal consistency check failed: %s\n", str); + abort(); +} + +static const secp256k1_callback default_error_callback = { + default_error_callback_fn, + NULL +}; + + +struct secp256k1_context_struct { + secp256k1_ecmult_context ecmult_ctx; + secp256k1_ecmult_gen_context ecmult_gen_ctx; + secp256k1_callback illegal_callback; + secp256k1_callback error_callback; +}; + +secp256k1_context* secp256k1_context_create(unsigned int flags) { + secp256k1_context* ret = (secp256k1_context*)checked_malloc(&default_error_callback, sizeof(secp256k1_context)); + ret->illegal_callback = default_illegal_callback; + ret->error_callback = default_error_callback; + + secp256k1_ecmult_context_init(&ret->ecmult_ctx); + secp256k1_ecmult_gen_context_init(&ret->ecmult_gen_ctx); + + if (flags & SECP256K1_CONTEXT_SIGN) { + secp256k1_ecmult_gen_context_build(&ret->ecmult_gen_ctx, &ret->error_callback); + } + if (flags & SECP256K1_CONTEXT_VERIFY) { + secp256k1_ecmult_context_build(&ret->ecmult_ctx, &ret->error_callback); + } + + return ret; +} + +secp256k1_context* secp256k1_context_clone(const secp256k1_context* ctx) { + secp256k1_context* ret = (secp256k1_context*)checked_malloc(&ctx->error_callback, sizeof(secp256k1_context)); + ret->illegal_callback = ctx->illegal_callback; + ret->error_callback = ctx->error_callback; + secp256k1_ecmult_context_clone(&ret->ecmult_ctx, &ctx->ecmult_ctx, &ctx->error_callback); + secp256k1_ecmult_gen_context_clone(&ret->ecmult_gen_ctx, &ctx->ecmult_gen_ctx, &ctx->error_callback); + return ret; +} + +void secp256k1_context_destroy(secp256k1_context* ctx) { + if (ctx != NULL) { + secp256k1_ecmult_context_clear(&ctx->ecmult_ctx); + secp256k1_ecmult_gen_context_clear(&ctx->ecmult_gen_ctx); + + free(ctx); + } +} + +void secp256k1_context_set_illegal_callback(secp256k1_context* ctx, void (*fun)(const char* message, void* data), const void* data) { + if (fun == NULL) { + fun = default_illegal_callback_fn; + } + ctx->illegal_callback.fn = fun; + ctx->illegal_callback.data = data; +} + +void secp256k1_context_set_error_callback(secp256k1_context* ctx, void (*fun)(const char* message, void* data), const void* data) { + if (fun == NULL) { + fun = default_error_callback_fn; + } + ctx->error_callback.fn = fun; + ctx->error_callback.data = data; +} + +static int secp256k1_pubkey_load(const secp256k1_context* ctx, secp256k1_ge* ge, const secp256k1_pubkey* pubkey) { + if (sizeof(secp256k1_ge_storage) == 64) { + /* When the secp256k1_ge_storage type is exactly 64 byte, use its + * representation inside secp256k1_pubkey, as conversion is very fast. + * Note that secp256k1_pubkey_save must use the same representation. */ + secp256k1_ge_storage s; + memcpy(&s, &pubkey->data[0], 64); + secp256k1_ge_from_storage(ge, &s); + } else { + /* Otherwise, fall back to 32-byte big endian for X and Y. */ + secp256k1_fe x, y; + secp256k1_fe_set_b32(&x, pubkey->data); + secp256k1_fe_set_b32(&y, pubkey->data + 32); + secp256k1_ge_set_xy(ge, &x, &y); + } + ARG_CHECK(!secp256k1_fe_is_zero(&ge->x)); + return 1; +} + +static void secp256k1_pubkey_save(secp256k1_pubkey* pubkey, secp256k1_ge* ge) { + if (sizeof(secp256k1_ge_storage) == 64) { + secp256k1_ge_storage s; + secp256k1_ge_to_storage(&s, ge); + memcpy(&pubkey->data[0], &s, 64); + } else { + VERIFY_CHECK(!secp256k1_ge_is_infinity(ge)); + secp256k1_fe_normalize_var(&ge->x); + secp256k1_fe_normalize_var(&ge->y); + secp256k1_fe_get_b32(pubkey->data, &ge->x); + secp256k1_fe_get_b32(pubkey->data + 32, &ge->y); + } +} + +int secp256k1_ec_pubkey_parse(const secp256k1_context* ctx, secp256k1_pubkey* pubkey, const unsigned char *input, size_t inputlen) { + secp256k1_ge Q; + + (void)ctx; + if (!secp256k1_eckey_pubkey_parse(&Q, input, inputlen)) { + memset(pubkey, 0, sizeof(*pubkey)); + return 0; + } + secp256k1_pubkey_save(pubkey, &Q); + secp256k1_ge_clear(&Q); + return 1; +} + +int secp256k1_ec_pubkey_serialize(const secp256k1_context* ctx, unsigned char *output, size_t *outputlen, const secp256k1_pubkey* pubkey, unsigned int flags) { + secp256k1_ge Q; + + (void)ctx; + return (secp256k1_pubkey_load(ctx, &Q, pubkey) && + secp256k1_eckey_pubkey_serialize(&Q, output, outputlen, flags)); +} + +static void secp256k1_ecdsa_signature_load(const secp256k1_context* ctx, secp256k1_scalar* r, secp256k1_scalar* s, const secp256k1_ecdsa_signature* sig) { + (void)ctx; + if (sizeof(secp256k1_scalar) == 32) { + /* When the secp256k1_scalar type is exactly 32 byte, use its + * representation inside secp256k1_ecdsa_signature, as conversion is very fast. + * Note that secp256k1_ecdsa_signature_save must use the same representation. */ + memcpy(r, &sig->data[0], 32); + memcpy(s, &sig->data[32], 32); + } else { + secp256k1_scalar_set_b32(r, &sig->data[0], NULL); + secp256k1_scalar_set_b32(s, &sig->data[32], NULL); + } +} + +static void secp256k1_ecdsa_signature_save(secp256k1_ecdsa_signature* sig, const secp256k1_scalar* r, const secp256k1_scalar* s) { + if (sizeof(secp256k1_scalar) == 32) { + memcpy(&sig->data[0], r, 32); + memcpy(&sig->data[32], s, 32); + } else { + secp256k1_scalar_get_b32(&sig->data[0], r); + secp256k1_scalar_get_b32(&sig->data[32], s); + } +} + +int secp256k1_ecdsa_signature_parse_der(const secp256k1_context* ctx, secp256k1_ecdsa_signature* sig, const unsigned char *input, size_t inputlen) { + secp256k1_scalar r, s; + + (void)ctx; + ARG_CHECK(sig != NULL); + ARG_CHECK(input != NULL); + + if (secp256k1_ecdsa_sig_parse(&r, &s, input, inputlen)) { + secp256k1_ecdsa_signature_save(sig, &r, &s); + return 1; + } else { + memset(sig, 0, sizeof(*sig)); + return 0; + } +} + +int secp256k1_ecdsa_signature_serialize_der(const secp256k1_context* ctx, unsigned char *output, size_t *outputlen, const secp256k1_ecdsa_signature* sig) { + secp256k1_scalar r, s; + + (void)ctx; + ARG_CHECK(output != NULL); + ARG_CHECK(outputlen != NULL); + ARG_CHECK(sig != NULL); + + secp256k1_ecdsa_signature_load(ctx, &r, &s, sig); + return secp256k1_ecdsa_sig_serialize(output, outputlen, &r, &s); +} + +int secp256k1_ecdsa_verify(const secp256k1_context* ctx, const secp256k1_ecdsa_signature *sig, const unsigned char *msg32, const secp256k1_pubkey *pubkey) { + secp256k1_ge q; + secp256k1_scalar r, s; + secp256k1_scalar m; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_context_is_built(&ctx->ecmult_ctx)); + ARG_CHECK(msg32 != NULL); + ARG_CHECK(sig != NULL); + ARG_CHECK(pubkey != NULL); + + secp256k1_scalar_set_b32(&m, msg32, NULL); + secp256k1_ecdsa_signature_load(ctx, &r, &s, sig); + return (secp256k1_pubkey_load(ctx, &q, pubkey) && + secp256k1_ecdsa_sig_verify(&ctx->ecmult_ctx, &r, &s, &q, &m)); +} + +static int nonce_function_rfc6979(unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, const unsigned char *algo16, void *data, unsigned int counter) { + unsigned char keydata[112]; + int keylen = 64; + secp256k1_rfc6979_hmac_sha256_t rng; + unsigned int i; + /* We feed a byte array to the PRNG as input, consisting of: + * - the private key (32 bytes) and message (32 bytes), see RFC 6979 3.2d. + * - optionally 32 extra bytes of data, see RFC 6979 3.6 Additional Data. + * - optionally 16 extra bytes with the algorithm name (the extra data bytes + * are set to zeroes when not present, while the algorithm name is). + */ + memcpy(keydata, key32, 32); + memcpy(keydata + 32, msg32, 32); + if (data != NULL) { + memcpy(keydata + 64, data, 32); + keylen = 96; + } + if (algo16 != NULL) { + memset(keydata + keylen, 0, 96 - keylen); + memcpy(keydata + 96, algo16, 16); + keylen = 112; + } + secp256k1_rfc6979_hmac_sha256_initialize(&rng, keydata, keylen); + memset(keydata, 0, sizeof(keydata)); + for (i = 0; i <= counter; i++) { + secp256k1_rfc6979_hmac_sha256_generate(&rng, nonce32, 32); + } + secp256k1_rfc6979_hmac_sha256_finalize(&rng); + return 1; +} + +const secp256k1_nonce_function secp256k1_nonce_function_rfc6979 = nonce_function_rfc6979; +const secp256k1_nonce_function secp256k1_nonce_function_default = nonce_function_rfc6979; + +int secp256k1_ecdsa_sign(const secp256k1_context* ctx, secp256k1_ecdsa_signature *signature, const unsigned char *msg32, const unsigned char *seckey, secp256k1_nonce_function noncefp, const void* noncedata) { + secp256k1_scalar r, s; + secp256k1_scalar sec, non, msg; + int ret = 0; + int overflow = 0; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx)); + ARG_CHECK(msg32 != NULL); + ARG_CHECK(signature != NULL); + ARG_CHECK(seckey != NULL); + if (noncefp == NULL) { + noncefp = secp256k1_nonce_function_default; + } + + secp256k1_scalar_set_b32(&sec, seckey, &overflow); + /* Fail if the secret key is invalid. */ + if (!overflow && !secp256k1_scalar_is_zero(&sec)) { + unsigned int count = 0; + secp256k1_scalar_set_b32(&msg, msg32, NULL); + while (1) { + unsigned char nonce32[32]; + ret = noncefp(nonce32, msg32, seckey, NULL, (void*)noncedata, count); + if (!ret) { + break; + } + secp256k1_scalar_set_b32(&non, nonce32, &overflow); + memset(nonce32, 0, 32); + if (!overflow && !secp256k1_scalar_is_zero(&non)) { + if (secp256k1_ecdsa_sig_sign(&ctx->ecmult_gen_ctx, &r, &s, &sec, &msg, &non, NULL)) { + break; + } + } + count++; + } + secp256k1_scalar_clear(&msg); + secp256k1_scalar_clear(&non); + secp256k1_scalar_clear(&sec); + } + if (ret) { + secp256k1_ecdsa_signature_save(signature, &r, &s); + } else { + memset(signature, 0, sizeof(*signature)); + } + return ret; +} + +int secp256k1_ec_seckey_verify(const secp256k1_context* ctx, const unsigned char *seckey) { + secp256k1_scalar sec; + int ret; + int overflow; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(seckey != NULL); + (void)ctx; + + secp256k1_scalar_set_b32(&sec, seckey, &overflow); + ret = !overflow && !secp256k1_scalar_is_zero(&sec); + secp256k1_scalar_clear(&sec); + return ret; +} + +int secp256k1_ec_pubkey_create(const secp256k1_context* ctx, secp256k1_pubkey *pubkey, const unsigned char *seckey) { + secp256k1_gej pj; + secp256k1_ge p; + secp256k1_scalar sec; + int overflow; + int ret = 0; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx)); + ARG_CHECK(pubkey != NULL); + ARG_CHECK(seckey != NULL); + + secp256k1_scalar_set_b32(&sec, seckey, &overflow); + ret = (!overflow) & (!secp256k1_scalar_is_zero(&sec)); + secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &pj, &sec); + secp256k1_ge_set_gej(&p, &pj); + secp256k1_pubkey_save(pubkey, &p); + secp256k1_scalar_clear(&sec); + if (!ret) { + memset(pubkey, 0, sizeof(*pubkey)); + } + return ret; +} + +int secp256k1_ec_privkey_tweak_add(const secp256k1_context* ctx, unsigned char *seckey, const unsigned char *tweak) { + secp256k1_scalar term; + secp256k1_scalar sec; + int ret = 0; + int overflow = 0; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(seckey != NULL); + ARG_CHECK(tweak != NULL); + (void)ctx; + + secp256k1_scalar_set_b32(&term, tweak, &overflow); + secp256k1_scalar_set_b32(&sec, seckey, NULL); + + ret = !overflow && secp256k1_eckey_privkey_tweak_add(&sec, &term); + if (ret) { + secp256k1_scalar_get_b32(seckey, &sec); + } + + secp256k1_scalar_clear(&sec); + secp256k1_scalar_clear(&term); + return ret; +} + +int secp256k1_ec_pubkey_tweak_add(const secp256k1_context* ctx, secp256k1_pubkey *pubkey, const unsigned char *tweak) { + secp256k1_ge p; + secp256k1_scalar term; + int ret = 0; + int overflow = 0; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_context_is_built(&ctx->ecmult_ctx)); + ARG_CHECK(pubkey != NULL); + ARG_CHECK(tweak != NULL); + + secp256k1_scalar_set_b32(&term, tweak, &overflow); + if (!overflow && secp256k1_pubkey_load(ctx, &p, pubkey)) { + ret = secp256k1_eckey_pubkey_tweak_add(&ctx->ecmult_ctx, &p, &term); + if (ret) { + secp256k1_pubkey_save(pubkey, &p); + } else { + memset(pubkey, 0, sizeof(*pubkey)); + } + } + + return ret; +} + +int secp256k1_ec_privkey_tweak_mul(const secp256k1_context* ctx, unsigned char *seckey, const unsigned char *tweak) { + secp256k1_scalar factor; + secp256k1_scalar sec; + int ret = 0; + int overflow = 0; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(seckey != NULL); + ARG_CHECK(tweak != NULL); + (void)ctx; + + secp256k1_scalar_set_b32(&factor, tweak, &overflow); + secp256k1_scalar_set_b32(&sec, seckey, NULL); + ret = !overflow && secp256k1_eckey_privkey_tweak_mul(&sec, &factor); + if (ret) { + secp256k1_scalar_get_b32(seckey, &sec); + } + + secp256k1_scalar_clear(&sec); + secp256k1_scalar_clear(&factor); + return ret; +} + +int secp256k1_ec_pubkey_tweak_mul(const secp256k1_context* ctx, secp256k1_pubkey *pubkey, const unsigned char *tweak) { + secp256k1_ge p; + secp256k1_scalar factor; + int ret = 0; + int overflow = 0; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_context_is_built(&ctx->ecmult_ctx)); + ARG_CHECK(pubkey != NULL); + ARG_CHECK(tweak != NULL); + + secp256k1_scalar_set_b32(&factor, tweak, &overflow); + if (!overflow && secp256k1_pubkey_load(ctx, &p, pubkey)) { + ret = secp256k1_eckey_pubkey_tweak_mul(&ctx->ecmult_ctx, &p, &factor); + if (ret) { + secp256k1_pubkey_save(pubkey, &p); + } else { + memset(pubkey, 0, sizeof(*pubkey)); + } + } + + return ret; +} + +int secp256k1_ec_privkey_export(const secp256k1_context* ctx, unsigned char *privkey, size_t *privkeylen, const unsigned char *seckey, unsigned int flags) { + secp256k1_scalar key; + int ret = 0; + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(seckey != NULL); + ARG_CHECK(privkey != NULL); + ARG_CHECK(privkeylen != NULL); + ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx)); + + secp256k1_scalar_set_b32(&key, seckey, NULL); + ret = secp256k1_eckey_privkey_serialize(&ctx->ecmult_gen_ctx, privkey, privkeylen, &key, flags); + secp256k1_scalar_clear(&key); + return ret; +} + +int secp256k1_ec_privkey_import(const secp256k1_context* ctx, unsigned char *seckey, const unsigned char *privkey, size_t privkeylen) { + secp256k1_scalar key; + int ret = 0; + ARG_CHECK(seckey != NULL); + ARG_CHECK(privkey != NULL); + (void)ctx; + + ret = secp256k1_eckey_privkey_parse(&key, privkey, privkeylen); + if (ret) { + secp256k1_scalar_get_b32(seckey, &key); + } + secp256k1_scalar_clear(&key); + return ret; +} + +int secp256k1_context_randomize(secp256k1_context* ctx, const unsigned char *seed32) { + VERIFY_CHECK(ctx != NULL); + ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx)); + secp256k1_ecmult_gen_blind(&ctx->ecmult_gen_ctx, seed32); + return 1; +} + +int secp256k1_ec_pubkey_combine(const secp256k1_context* ctx, secp256k1_pubkey *pubnonce, const secp256k1_pubkey * const *pubnonces, int n) { + int i; + secp256k1_gej Qj; + secp256k1_ge Q; + + ARG_CHECK(pubnonce != NULL); + ARG_CHECK(n >= 1); + ARG_CHECK(pubnonces != NULL); + + secp256k1_gej_set_infinity(&Qj); + + for (i = 0; i < n; i++) { + secp256k1_pubkey_load(ctx, &Q, pubnonces[i]); + secp256k1_gej_add_ge(&Qj, &Qj, &Q); + } + if (secp256k1_gej_is_infinity(&Qj)) { + memset(pubnonce, 0, sizeof(*pubnonce)); + return 0; + } + secp256k1_ge_set_gej(&Q, &Qj); + secp256k1_pubkey_save(pubnonce, &Q); + return 1; +} + +#ifdef ENABLE_MODULE_ECDH +# include "modules/ecdh/main_impl.h" +#endif + +#ifdef ENABLE_MODULE_SCHNORR +# include "modules/schnorr/main_impl.h" +#endif + +#ifdef ENABLE_MODULE_RECOVERY +# include "modules/recovery/main_impl.h" +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/testrand.h b/crypto/secp256k1/libsecp256k1/src/testrand.h new file mode 100644 index 000000000..041bb92c4 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/testrand.h @@ -0,0 +1,28 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_TESTRAND_H_ +#define _SECP256K1_TESTRAND_H_ + +#if defined HAVE_CONFIG_H +#include "libsecp256k1-config.h" +#endif + +/* A non-cryptographic RNG used only for test infrastructure. */ + +/** Seed the pseudorandom number generator for testing. */ +SECP256K1_INLINE static void secp256k1_rand_seed(const unsigned char *seed16); + +/** Generate a pseudorandom 32-bit number. */ +static uint32_t secp256k1_rand32(void); + +/** Generate a pseudorandom 32-byte array. */ +static void secp256k1_rand256(unsigned char *b32); + +/** Generate a pseudorandom 32-byte array with long sequences of zero and one bits. */ +static void secp256k1_rand256_test(unsigned char *b32); + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/testrand_impl.h b/crypto/secp256k1/libsecp256k1/src/testrand_impl.h new file mode 100644 index 000000000..7c3554266 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/testrand_impl.h @@ -0,0 +1,60 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_TESTRAND_IMPL_H_ +#define _SECP256K1_TESTRAND_IMPL_H_ + +#include +#include + +#include "testrand.h" +#include "hash.h" + +static secp256k1_rfc6979_hmac_sha256_t secp256k1_test_rng; +static uint32_t secp256k1_test_rng_precomputed[8]; +static int secp256k1_test_rng_precomputed_used = 8; + +SECP256K1_INLINE static void secp256k1_rand_seed(const unsigned char *seed16) { + secp256k1_rfc6979_hmac_sha256_initialize(&secp256k1_test_rng, seed16, 16); +} + +SECP256K1_INLINE static uint32_t secp256k1_rand32(void) { + if (secp256k1_test_rng_precomputed_used == 8) { + secp256k1_rfc6979_hmac_sha256_generate(&secp256k1_test_rng, (unsigned char*)(&secp256k1_test_rng_precomputed[0]), sizeof(secp256k1_test_rng_precomputed)); + secp256k1_test_rng_precomputed_used = 0; + } + return secp256k1_test_rng_precomputed[secp256k1_test_rng_precomputed_used++]; +} + +static void secp256k1_rand256(unsigned char *b32) { + secp256k1_rfc6979_hmac_sha256_generate(&secp256k1_test_rng, b32, 32); +} + +static void secp256k1_rand256_test(unsigned char *b32) { + int bits=0; + uint64_t ent = 0; + int entleft = 0; + memset(b32, 0, 32); + while (bits < 256) { + int now; + uint32_t val; + if (entleft < 12) { + ent |= ((uint64_t)secp256k1_rand32()) << entleft; + entleft += 32; + } + now = 1 + ((ent % 64)*((ent >> 6) % 32)+16)/31; + val = 1 & (ent >> 11); + ent >>= 12; + entleft -= 12; + while (now > 0 && bits < 256) { + b32[bits / 8] |= val << (bits % 8); + now--; + bits++; + } + } +} + +#endif diff --git a/crypto/secp256k1/libsecp256k1/src/tests.c b/crypto/secp256k1/libsecp256k1/src/tests.c new file mode 100644 index 000000000..3366d90fc --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/tests.c @@ -0,0 +1,2357 @@ +/********************************************************************** + * Copyright (c) 2013, 2014, 2015 Pieter Wuille, Gregory Maxwell * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#if defined HAVE_CONFIG_H +#include "libsecp256k1-config.h" +#endif + +#include +#include + +#include + +#include "include/secp256k1.h" +#include "secp256k1.c" +#include "testrand_impl.h" + +#ifdef ENABLE_OPENSSL_TESTS +#include "openssl/bn.h" +#include "openssl/ec.h" +#include "openssl/ecdsa.h" +#include "openssl/obj_mac.h" +#endif + +static int count = 64; +static secp256k1_context *ctx = NULL; + +void random_field_element_test(secp256k1_fe *fe) { + do { + unsigned char b32[32]; + secp256k1_rand256_test(b32); + if (secp256k1_fe_set_b32(fe, b32)) { + break; + } + } while(1); +} + +void random_field_element_magnitude(secp256k1_fe *fe) { + secp256k1_fe zero; + int n = secp256k1_rand32() % 9; + secp256k1_fe_normalize(fe); + if (n == 0) { + return; + } + secp256k1_fe_clear(&zero); + secp256k1_fe_negate(&zero, &zero, 0); + secp256k1_fe_mul_int(&zero, n - 1); + secp256k1_fe_add(fe, &zero); + VERIFY_CHECK(fe->magnitude == n); +} + +void random_group_element_test(secp256k1_ge *ge) { + secp256k1_fe fe; + do { + random_field_element_test(&fe); + if (secp256k1_ge_set_xo_var(ge, &fe, secp256k1_rand32() & 1)) { + secp256k1_fe_normalize(&ge->y); + break; + } + } while(1); +} + +void random_group_element_jacobian_test(secp256k1_gej *gej, const secp256k1_ge *ge) { + secp256k1_fe z2, z3; + do { + random_field_element_test(&gej->z); + if (!secp256k1_fe_is_zero(&gej->z)) { + break; + } + } while(1); + secp256k1_fe_sqr(&z2, &gej->z); + secp256k1_fe_mul(&z3, &z2, &gej->z); + secp256k1_fe_mul(&gej->x, &ge->x, &z2); + secp256k1_fe_mul(&gej->y, &ge->y, &z3); + gej->infinity = ge->infinity; +} + +void random_scalar_order_test(secp256k1_scalar *num) { + do { + unsigned char b32[32]; + int overflow = 0; + secp256k1_rand256_test(b32); + secp256k1_scalar_set_b32(num, b32, &overflow); + if (overflow || secp256k1_scalar_is_zero(num)) { + continue; + } + break; + } while(1); +} + +void random_scalar_order(secp256k1_scalar *num) { + do { + unsigned char b32[32]; + int overflow = 0; + secp256k1_rand256(b32); + secp256k1_scalar_set_b32(num, b32, &overflow); + if (overflow || secp256k1_scalar_is_zero(num)) { + continue; + } + break; + } while(1); +} + +void run_context_tests(void) { + secp256k1_context *none = secp256k1_context_create(0); + secp256k1_context *sign = secp256k1_context_create(SECP256K1_CONTEXT_SIGN); + secp256k1_context *vrfy = secp256k1_context_create(SECP256K1_CONTEXT_VERIFY); + secp256k1_context *both = secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY); + + secp256k1_gej pubj; + secp256k1_ge pub; + secp256k1_scalar msg, key, nonce; + secp256k1_scalar sigr, sigs; + + /*** clone and destroy all of them to make sure cloning was complete ***/ + { + secp256k1_context *ctx_tmp; + + ctx_tmp = none; none = secp256k1_context_clone(none); secp256k1_context_destroy(ctx_tmp); + ctx_tmp = sign; sign = secp256k1_context_clone(sign); secp256k1_context_destroy(ctx_tmp); + ctx_tmp = vrfy; vrfy = secp256k1_context_clone(vrfy); secp256k1_context_destroy(ctx_tmp); + ctx_tmp = both; both = secp256k1_context_clone(both); secp256k1_context_destroy(ctx_tmp); + } + + /*** attempt to use them ***/ + random_scalar_order_test(&msg); + random_scalar_order_test(&key); + secp256k1_ecmult_gen(&both->ecmult_gen_ctx, &pubj, &key); + secp256k1_ge_set_gej(&pub, &pubj); + + /* obtain a working nonce */ + do { + random_scalar_order_test(&nonce); + } while(!secp256k1_ecdsa_sig_sign(&both->ecmult_gen_ctx, &sigr, &sigs, &key, &msg, &nonce, NULL)); + + /* try signing */ + CHECK(secp256k1_ecdsa_sig_sign(&sign->ecmult_gen_ctx, &sigr, &sigs, &key, &msg, &nonce, NULL)); + CHECK(secp256k1_ecdsa_sig_sign(&both->ecmult_gen_ctx, &sigr, &sigs, &key, &msg, &nonce, NULL)); + + /* try verifying */ + CHECK(secp256k1_ecdsa_sig_verify(&vrfy->ecmult_ctx, &sigr, &sigs, &pub, &msg)); + CHECK(secp256k1_ecdsa_sig_verify(&both->ecmult_ctx, &sigr, &sigs, &pub, &msg)); + + /* cleanup */ + secp256k1_context_destroy(none); + secp256k1_context_destroy(sign); + secp256k1_context_destroy(vrfy); + secp256k1_context_destroy(both); +} + +/***** HASH TESTS *****/ + +void run_sha256_tests(void) { + static const char *inputs[8] = { + "", "abc", "message digest", "secure hash algorithm", "SHA256 is considered to be safe", + "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", + "For this sample, this 63-byte string will be used as input data", + "This is exactly 64 bytes long, not counting the terminating byte" + }; + static const unsigned char outputs[8][32] = { + {0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}, + {0xba, 0x78, 0x16, 0xbf, 0x8f, 0x01, 0xcf, 0xea, 0x41, 0x41, 0x40, 0xde, 0x5d, 0xae, 0x22, 0x23, 0xb0, 0x03, 0x61, 0xa3, 0x96, 0x17, 0x7a, 0x9c, 0xb4, 0x10, 0xff, 0x61, 0xf2, 0x00, 0x15, 0xad}, + {0xf7, 0x84, 0x6f, 0x55, 0xcf, 0x23, 0xe1, 0x4e, 0xeb, 0xea, 0xb5, 0xb4, 0xe1, 0x55, 0x0c, 0xad, 0x5b, 0x50, 0x9e, 0x33, 0x48, 0xfb, 0xc4, 0xef, 0xa3, 0xa1, 0x41, 0x3d, 0x39, 0x3c, 0xb6, 0x50}, + {0xf3, 0x0c, 0xeb, 0x2b, 0xb2, 0x82, 0x9e, 0x79, 0xe4, 0xca, 0x97, 0x53, 0xd3, 0x5a, 0x8e, 0xcc, 0x00, 0x26, 0x2d, 0x16, 0x4c, 0xc0, 0x77, 0x08, 0x02, 0x95, 0x38, 0x1c, 0xbd, 0x64, 0x3f, 0x0d}, + {0x68, 0x19, 0xd9, 0x15, 0xc7, 0x3f, 0x4d, 0x1e, 0x77, 0xe4, 0xe1, 0xb5, 0x2d, 0x1f, 0xa0, 0xf9, 0xcf, 0x9b, 0xea, 0xea, 0xd3, 0x93, 0x9f, 0x15, 0x87, 0x4b, 0xd9, 0x88, 0xe2, 0xa2, 0x36, 0x30}, + {0x24, 0x8d, 0x6a, 0x61, 0xd2, 0x06, 0x38, 0xb8, 0xe5, 0xc0, 0x26, 0x93, 0x0c, 0x3e, 0x60, 0x39, 0xa3, 0x3c, 0xe4, 0x59, 0x64, 0xff, 0x21, 0x67, 0xf6, 0xec, 0xed, 0xd4, 0x19, 0xdb, 0x06, 0xc1}, + {0xf0, 0x8a, 0x78, 0xcb, 0xba, 0xee, 0x08, 0x2b, 0x05, 0x2a, 0xe0, 0x70, 0x8f, 0x32, 0xfa, 0x1e, 0x50, 0xc5, 0xc4, 0x21, 0xaa, 0x77, 0x2b, 0xa5, 0xdb, 0xb4, 0x06, 0xa2, 0xea, 0x6b, 0xe3, 0x42}, + {0xab, 0x64, 0xef, 0xf7, 0xe8, 0x8e, 0x2e, 0x46, 0x16, 0x5e, 0x29, 0xf2, 0xbc, 0xe4, 0x18, 0x26, 0xbd, 0x4c, 0x7b, 0x35, 0x52, 0xf6, 0xb3, 0x82, 0xa9, 0xe7, 0xd3, 0xaf, 0x47, 0xc2, 0x45, 0xf8} + }; + int i; + for (i = 0; i < 8; i++) { + unsigned char out[32]; + secp256k1_sha256_t hasher; + secp256k1_sha256_initialize(&hasher); + secp256k1_sha256_write(&hasher, (const unsigned char*)(inputs[i]), strlen(inputs[i])); + secp256k1_sha256_finalize(&hasher, out); + CHECK(memcmp(out, outputs[i], 32) == 0); + if (strlen(inputs[i]) > 0) { + int split = secp256k1_rand32() % strlen(inputs[i]); + secp256k1_sha256_initialize(&hasher); + secp256k1_sha256_write(&hasher, (const unsigned char*)(inputs[i]), split); + secp256k1_sha256_write(&hasher, (const unsigned char*)(inputs[i] + split), strlen(inputs[i]) - split); + secp256k1_sha256_finalize(&hasher, out); + CHECK(memcmp(out, outputs[i], 32) == 0); + } + } +} + +void run_hmac_sha256_tests(void) { + static const char *keys[6] = { + "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", + "\x4a\x65\x66\x65", + "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", + "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19", + "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", + "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" + }; + static const char *inputs[6] = { + "\x48\x69\x20\x54\x68\x65\x72\x65", + "\x77\x68\x61\x74\x20\x64\x6f\x20\x79\x61\x20\x77\x61\x6e\x74\x20\x66\x6f\x72\x20\x6e\x6f\x74\x68\x69\x6e\x67\x3f", + "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd", + "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd", + "\x54\x65\x73\x74\x20\x55\x73\x69\x6e\x67\x20\x4c\x61\x72\x67\x65\x72\x20\x54\x68\x61\x6e\x20\x42\x6c\x6f\x63\x6b\x2d\x53\x69\x7a\x65\x20\x4b\x65\x79\x20\x2d\x20\x48\x61\x73\x68\x20\x4b\x65\x79\x20\x46\x69\x72\x73\x74", + "\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x74\x65\x73\x74\x20\x75\x73\x69\x6e\x67\x20\x61\x20\x6c\x61\x72\x67\x65\x72\x20\x74\x68\x61\x6e\x20\x62\x6c\x6f\x63\x6b\x2d\x73\x69\x7a\x65\x20\x6b\x65\x79\x20\x61\x6e\x64\x20\x61\x20\x6c\x61\x72\x67\x65\x72\x20\x74\x68\x61\x6e\x20\x62\x6c\x6f\x63\x6b\x2d\x73\x69\x7a\x65\x20\x64\x61\x74\x61\x2e\x20\x54\x68\x65\x20\x6b\x65\x79\x20\x6e\x65\x65\x64\x73\x20\x74\x6f\x20\x62\x65\x20\x68\x61\x73\x68\x65\x64\x20\x62\x65\x66\x6f\x72\x65\x20\x62\x65\x69\x6e\x67\x20\x75\x73\x65\x64\x20\x62\x79\x20\x74\x68\x65\x20\x48\x4d\x41\x43\x20\x61\x6c\x67\x6f\x72\x69\x74\x68\x6d\x2e" + }; + static const unsigned char outputs[6][32] = { + {0xb0, 0x34, 0x4c, 0x61, 0xd8, 0xdb, 0x38, 0x53, 0x5c, 0xa8, 0xaf, 0xce, 0xaf, 0x0b, 0xf1, 0x2b, 0x88, 0x1d, 0xc2, 0x00, 0xc9, 0x83, 0x3d, 0xa7, 0x26, 0xe9, 0x37, 0x6c, 0x2e, 0x32, 0xcf, 0xf7}, + {0x5b, 0xdc, 0xc1, 0x46, 0xbf, 0x60, 0x75, 0x4e, 0x6a, 0x04, 0x24, 0x26, 0x08, 0x95, 0x75, 0xc7, 0x5a, 0x00, 0x3f, 0x08, 0x9d, 0x27, 0x39, 0x83, 0x9d, 0xec, 0x58, 0xb9, 0x64, 0xec, 0x38, 0x43}, + {0x77, 0x3e, 0xa9, 0x1e, 0x36, 0x80, 0x0e, 0x46, 0x85, 0x4d, 0xb8, 0xeb, 0xd0, 0x91, 0x81, 0xa7, 0x29, 0x59, 0x09, 0x8b, 0x3e, 0xf8, 0xc1, 0x22, 0xd9, 0x63, 0x55, 0x14, 0xce, 0xd5, 0x65, 0xfe}, + {0x82, 0x55, 0x8a, 0x38, 0x9a, 0x44, 0x3c, 0x0e, 0xa4, 0xcc, 0x81, 0x98, 0x99, 0xf2, 0x08, 0x3a, 0x85, 0xf0, 0xfa, 0xa3, 0xe5, 0x78, 0xf8, 0x07, 0x7a, 0x2e, 0x3f, 0xf4, 0x67, 0x29, 0x66, 0x5b}, + {0x60, 0xe4, 0x31, 0x59, 0x1e, 0xe0, 0xb6, 0x7f, 0x0d, 0x8a, 0x26, 0xaa, 0xcb, 0xf5, 0xb7, 0x7f, 0x8e, 0x0b, 0xc6, 0x21, 0x37, 0x28, 0xc5, 0x14, 0x05, 0x46, 0x04, 0x0f, 0x0e, 0xe3, 0x7f, 0x54}, + {0x9b, 0x09, 0xff, 0xa7, 0x1b, 0x94, 0x2f, 0xcb, 0x27, 0x63, 0x5f, 0xbc, 0xd5, 0xb0, 0xe9, 0x44, 0xbf, 0xdc, 0x63, 0x64, 0x4f, 0x07, 0x13, 0x93, 0x8a, 0x7f, 0x51, 0x53, 0x5c, 0x3a, 0x35, 0xe2} + }; + int i; + for (i = 0; i < 6; i++) { + secp256k1_hmac_sha256_t hasher; + unsigned char out[32]; + secp256k1_hmac_sha256_initialize(&hasher, (const unsigned char*)(keys[i]), strlen(keys[i])); + secp256k1_hmac_sha256_write(&hasher, (const unsigned char*)(inputs[i]), strlen(inputs[i])); + secp256k1_hmac_sha256_finalize(&hasher, out); + CHECK(memcmp(out, outputs[i], 32) == 0); + if (strlen(inputs[i]) > 0) { + int split = secp256k1_rand32() % strlen(inputs[i]); + secp256k1_hmac_sha256_initialize(&hasher, (const unsigned char*)(keys[i]), strlen(keys[i])); + secp256k1_hmac_sha256_write(&hasher, (const unsigned char*)(inputs[i]), split); + secp256k1_hmac_sha256_write(&hasher, (const unsigned char*)(inputs[i] + split), strlen(inputs[i]) - split); + secp256k1_hmac_sha256_finalize(&hasher, out); + CHECK(memcmp(out, outputs[i], 32) == 0); + } + } +} + +void run_rfc6979_hmac_sha256_tests(void) { + static const unsigned char key1[65] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x00, 0x4b, 0xf5, 0x12, 0x2f, 0x34, 0x45, 0x54, 0xc5, 0x3b, 0xde, 0x2e, 0xbb, 0x8c, 0xd2, 0xb7, 0xe3, 0xd1, 0x60, 0x0a, 0xd6, 0x31, 0xc3, 0x85, 0xa5, 0xd7, 0xcc, 0xe2, 0x3c, 0x77, 0x85, 0x45, 0x9a, 0}; + static const unsigned char out1[3][32] = { + {0x4f, 0xe2, 0x95, 0x25, 0xb2, 0x08, 0x68, 0x09, 0x15, 0x9a, 0xcd, 0xf0, 0x50, 0x6e, 0xfb, 0x86, 0xb0, 0xec, 0x93, 0x2c, 0x7b, 0xa4, 0x42, 0x56, 0xab, 0x32, 0x1e, 0x42, 0x1e, 0x67, 0xe9, 0xfb}, + {0x2b, 0xf0, 0xff, 0xf1, 0xd3, 0xc3, 0x78, 0xa2, 0x2d, 0xc5, 0xde, 0x1d, 0x85, 0x65, 0x22, 0x32, 0x5c, 0x65, 0xb5, 0x04, 0x49, 0x1a, 0x0c, 0xbd, 0x01, 0xcb, 0x8f, 0x3a, 0xa6, 0x7f, 0xfd, 0x4a}, + {0xf5, 0x28, 0xb4, 0x10, 0xcb, 0x54, 0x1f, 0x77, 0x00, 0x0d, 0x7a, 0xfb, 0x6c, 0x5b, 0x53, 0xc5, 0xc4, 0x71, 0xea, 0xb4, 0x3e, 0x46, 0x6d, 0x9a, 0xc5, 0x19, 0x0c, 0x39, 0xc8, 0x2f, 0xd8, 0x2e} + }; + + static const unsigned char key2[64] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}; + static const unsigned char out2[3][32] = { + {0x9c, 0x23, 0x6c, 0x16, 0x5b, 0x82, 0xae, 0x0c, 0xd5, 0x90, 0x65, 0x9e, 0x10, 0x0b, 0x6b, 0xab, 0x30, 0x36, 0xe7, 0xba, 0x8b, 0x06, 0x74, 0x9b, 0xaf, 0x69, 0x81, 0xe1, 0x6f, 0x1a, 0x2b, 0x95}, + {0xdf, 0x47, 0x10, 0x61, 0x62, 0x5b, 0xc0, 0xea, 0x14, 0xb6, 0x82, 0xfe, 0xee, 0x2c, 0x9c, 0x02, 0xf2, 0x35, 0xda, 0x04, 0x20, 0x4c, 0x1d, 0x62, 0xa1, 0x53, 0x6c, 0x6e, 0x17, 0xae, 0xd7, 0xa9}, + {0x75, 0x97, 0x88, 0x7c, 0xbd, 0x76, 0x32, 0x1f, 0x32, 0xe3, 0x04, 0x40, 0x67, 0x9a, 0x22, 0xcf, 0x7f, 0x8d, 0x9d, 0x2e, 0xac, 0x39, 0x0e, 0x58, 0x1f, 0xea, 0x09, 0x1c, 0xe2, 0x02, 0xba, 0x94} + }; + + secp256k1_rfc6979_hmac_sha256_t rng; + unsigned char out[32]; + int i; + + secp256k1_rfc6979_hmac_sha256_initialize(&rng, key1, 64); + for (i = 0; i < 3; i++) { + secp256k1_rfc6979_hmac_sha256_generate(&rng, out, 32); + CHECK(memcmp(out, out1[i], 32) == 0); + } + secp256k1_rfc6979_hmac_sha256_finalize(&rng); + + secp256k1_rfc6979_hmac_sha256_initialize(&rng, key1, 65); + for (i = 0; i < 3; i++) { + secp256k1_rfc6979_hmac_sha256_generate(&rng, out, 32); + CHECK(memcmp(out, out1[i], 32) != 0); + } + secp256k1_rfc6979_hmac_sha256_finalize(&rng); + + secp256k1_rfc6979_hmac_sha256_initialize(&rng, key2, 64); + for (i = 0; i < 3; i++) { + secp256k1_rfc6979_hmac_sha256_generate(&rng, out, 32); + CHECK(memcmp(out, out2[i], 32) == 0); + } + secp256k1_rfc6979_hmac_sha256_finalize(&rng); +} + +/***** NUM TESTS *****/ + +#ifndef USE_NUM_NONE +void random_num_negate(secp256k1_num *num) { + if (secp256k1_rand32() & 1) { + secp256k1_num_negate(num); + } +} + +void random_num_order_test(secp256k1_num *num) { + secp256k1_scalar sc; + random_scalar_order_test(&sc); + secp256k1_scalar_get_num(num, &sc); +} + +void random_num_order(secp256k1_num *num) { + secp256k1_scalar sc; + random_scalar_order(&sc); + secp256k1_scalar_get_num(num, &sc); +} + +void test_num_negate(void) { + secp256k1_num n1; + secp256k1_num n2; + random_num_order_test(&n1); /* n1 = R */ + random_num_negate(&n1); + secp256k1_num_copy(&n2, &n1); /* n2 = R */ + secp256k1_num_sub(&n1, &n2, &n1); /* n1 = n2-n1 = 0 */ + CHECK(secp256k1_num_is_zero(&n1)); + secp256k1_num_copy(&n1, &n2); /* n1 = R */ + secp256k1_num_negate(&n1); /* n1 = -R */ + CHECK(!secp256k1_num_is_zero(&n1)); + secp256k1_num_add(&n1, &n2, &n1); /* n1 = n2+n1 = 0 */ + CHECK(secp256k1_num_is_zero(&n1)); + secp256k1_num_copy(&n1, &n2); /* n1 = R */ + secp256k1_num_negate(&n1); /* n1 = -R */ + CHECK(secp256k1_num_is_neg(&n1) != secp256k1_num_is_neg(&n2)); + secp256k1_num_negate(&n1); /* n1 = R */ + CHECK(secp256k1_num_eq(&n1, &n2)); +} + +void test_num_add_sub(void) { + secp256k1_num n1; + secp256k1_num n2; + secp256k1_num n1p2, n2p1, n1m2, n2m1; + int r = secp256k1_rand32(); + random_num_order_test(&n1); /* n1 = R1 */ + if (r & 1) { + random_num_negate(&n1); + } + random_num_order_test(&n2); /* n2 = R2 */ + if (r & 2) { + random_num_negate(&n2); + } + secp256k1_num_add(&n1p2, &n1, &n2); /* n1p2 = R1 + R2 */ + secp256k1_num_add(&n2p1, &n2, &n1); /* n2p1 = R2 + R1 */ + secp256k1_num_sub(&n1m2, &n1, &n2); /* n1m2 = R1 - R2 */ + secp256k1_num_sub(&n2m1, &n2, &n1); /* n2m1 = R2 - R1 */ + CHECK(secp256k1_num_eq(&n1p2, &n2p1)); + CHECK(!secp256k1_num_eq(&n1p2, &n1m2)); + secp256k1_num_negate(&n2m1); /* n2m1 = -R2 + R1 */ + CHECK(secp256k1_num_eq(&n2m1, &n1m2)); + CHECK(!secp256k1_num_eq(&n2m1, &n1)); + secp256k1_num_add(&n2m1, &n2m1, &n2); /* n2m1 = -R2 + R1 + R2 = R1 */ + CHECK(secp256k1_num_eq(&n2m1, &n1)); + CHECK(!secp256k1_num_eq(&n2p1, &n1)); + secp256k1_num_sub(&n2p1, &n2p1, &n2); /* n2p1 = R2 + R1 - R2 = R1 */ + CHECK(secp256k1_num_eq(&n2p1, &n1)); +} + +void run_num_smalltests(void) { + int i; + for (i = 0; i < 100*count; i++) { + test_num_negate(); + test_num_add_sub(); + } +} +#endif + +/***** SCALAR TESTS *****/ + +void scalar_test(void) { + secp256k1_scalar s; + secp256k1_scalar s1; + secp256k1_scalar s2; +#ifndef USE_NUM_NONE + secp256k1_num snum, s1num, s2num; + secp256k1_num order, half_order; +#endif + unsigned char c[32]; + + /* Set 's' to a random scalar, with value 'snum'. */ + random_scalar_order_test(&s); + + /* Set 's1' to a random scalar, with value 's1num'. */ + random_scalar_order_test(&s1); + + /* Set 's2' to a random scalar, with value 'snum2', and byte array representation 'c'. */ + random_scalar_order_test(&s2); + secp256k1_scalar_get_b32(c, &s2); + +#ifndef USE_NUM_NONE + secp256k1_scalar_get_num(&snum, &s); + secp256k1_scalar_get_num(&s1num, &s1); + secp256k1_scalar_get_num(&s2num, &s2); + + secp256k1_scalar_order_get_num(&order); + half_order = order; + secp256k1_num_shift(&half_order, 1); +#endif + + { + int i; + /* Test that fetching groups of 4 bits from a scalar and recursing n(i)=16*n(i-1)+p(i) reconstructs it. */ + secp256k1_scalar n; + secp256k1_scalar_set_int(&n, 0); + for (i = 0; i < 256; i += 4) { + secp256k1_scalar t; + int j; + secp256k1_scalar_set_int(&t, secp256k1_scalar_get_bits(&s, 256 - 4 - i, 4)); + for (j = 0; j < 4; j++) { + secp256k1_scalar_add(&n, &n, &n); + } + secp256k1_scalar_add(&n, &n, &t); + } + CHECK(secp256k1_scalar_eq(&n, &s)); + } + + { + /* Test that fetching groups of randomly-sized bits from a scalar and recursing n(i)=b*n(i-1)+p(i) reconstructs it. */ + secp256k1_scalar n; + int i = 0; + secp256k1_scalar_set_int(&n, 0); + while (i < 256) { + secp256k1_scalar t; + int j; + int now = (secp256k1_rand32() % 15) + 1; + if (now + i > 256) { + now = 256 - i; + } + secp256k1_scalar_set_int(&t, secp256k1_scalar_get_bits_var(&s, 256 - now - i, now)); + for (j = 0; j < now; j++) { + secp256k1_scalar_add(&n, &n, &n); + } + secp256k1_scalar_add(&n, &n, &t); + i += now; + } + CHECK(secp256k1_scalar_eq(&n, &s)); + } + +#ifndef USE_NUM_NONE + { + /* Test that adding the scalars together is equal to adding their numbers together modulo the order. */ + secp256k1_num rnum; + secp256k1_num r2num; + secp256k1_scalar r; + secp256k1_num_add(&rnum, &snum, &s2num); + secp256k1_num_mod(&rnum, &order); + secp256k1_scalar_add(&r, &s, &s2); + secp256k1_scalar_get_num(&r2num, &r); + CHECK(secp256k1_num_eq(&rnum, &r2num)); + } + + { + /* Test that multipying the scalars is equal to multiplying their numbers modulo the order. */ + secp256k1_scalar r; + secp256k1_num r2num; + secp256k1_num rnum; + secp256k1_num_mul(&rnum, &snum, &s2num); + secp256k1_num_mod(&rnum, &order); + secp256k1_scalar_mul(&r, &s, &s2); + secp256k1_scalar_get_num(&r2num, &r); + CHECK(secp256k1_num_eq(&rnum, &r2num)); + /* The result can only be zero if at least one of the factors was zero. */ + CHECK(secp256k1_scalar_is_zero(&r) == (secp256k1_scalar_is_zero(&s) || secp256k1_scalar_is_zero(&s2))); + /* The results can only be equal to one of the factors if that factor was zero, or the other factor was one. */ + CHECK(secp256k1_num_eq(&rnum, &snum) == (secp256k1_scalar_is_zero(&s) || secp256k1_scalar_is_one(&s2))); + CHECK(secp256k1_num_eq(&rnum, &s2num) == (secp256k1_scalar_is_zero(&s2) || secp256k1_scalar_is_one(&s))); + } + + { + secp256k1_scalar neg; + secp256k1_num negnum; + secp256k1_num negnum2; + /* Check that comparison with zero matches comparison with zero on the number. */ + CHECK(secp256k1_num_is_zero(&snum) == secp256k1_scalar_is_zero(&s)); + /* Check that comparison with the half order is equal to testing for high scalar. */ + CHECK(secp256k1_scalar_is_high(&s) == (secp256k1_num_cmp(&snum, &half_order) > 0)); + secp256k1_scalar_negate(&neg, &s); + secp256k1_num_sub(&negnum, &order, &snum); + secp256k1_num_mod(&negnum, &order); + /* Check that comparison with the half order is equal to testing for high scalar after negation. */ + CHECK(secp256k1_scalar_is_high(&neg) == (secp256k1_num_cmp(&negnum, &half_order) > 0)); + /* Negating should change the high property, unless the value was already zero. */ + CHECK((secp256k1_scalar_is_high(&s) == secp256k1_scalar_is_high(&neg)) == secp256k1_scalar_is_zero(&s)); + secp256k1_scalar_get_num(&negnum2, &neg); + /* Negating a scalar should be equal to (order - n) mod order on the number. */ + CHECK(secp256k1_num_eq(&negnum, &negnum2)); + secp256k1_scalar_add(&neg, &neg, &s); + /* Adding a number to its negation should result in zero. */ + CHECK(secp256k1_scalar_is_zero(&neg)); + secp256k1_scalar_negate(&neg, &neg); + /* Negating zero should still result in zero. */ + CHECK(secp256k1_scalar_is_zero(&neg)); + } + + { + /* Test secp256k1_scalar_mul_shift_var. */ + secp256k1_scalar r; + secp256k1_num one; + secp256k1_num rnum; + secp256k1_num rnum2; + unsigned char cone[1] = {0x01}; + unsigned int shift = 256 + (secp256k1_rand32() % 257); + secp256k1_scalar_mul_shift_var(&r, &s1, &s2, shift); + secp256k1_num_mul(&rnum, &s1num, &s2num); + secp256k1_num_shift(&rnum, shift - 1); + secp256k1_num_set_bin(&one, cone, 1); + secp256k1_num_add(&rnum, &rnum, &one); + secp256k1_num_shift(&rnum, 1); + secp256k1_scalar_get_num(&rnum2, &r); + CHECK(secp256k1_num_eq(&rnum, &rnum2)); + } + + { + /* test secp256k1_scalar_shr_int */ + secp256k1_scalar r; + int i; + random_scalar_order_test(&r); + for (i = 0; i < 100; ++i) { + int low; + int shift = 1 + (secp256k1_rand32() % 15); + int expected = r.d[0] % (1 << shift); + low = secp256k1_scalar_shr_int(&r, shift); + CHECK(expected == low); + } + } +#endif + + { + /* Test that scalar inverses are equal to the inverse of their number modulo the order. */ + if (!secp256k1_scalar_is_zero(&s)) { + secp256k1_scalar inv; +#ifndef USE_NUM_NONE + secp256k1_num invnum; + secp256k1_num invnum2; +#endif + secp256k1_scalar_inverse(&inv, &s); +#ifndef USE_NUM_NONE + secp256k1_num_mod_inverse(&invnum, &snum, &order); + secp256k1_scalar_get_num(&invnum2, &inv); + CHECK(secp256k1_num_eq(&invnum, &invnum2)); +#endif + secp256k1_scalar_mul(&inv, &inv, &s); + /* Multiplying a scalar with its inverse must result in one. */ + CHECK(secp256k1_scalar_is_one(&inv)); + secp256k1_scalar_inverse(&inv, &inv); + /* Inverting one must result in one. */ + CHECK(secp256k1_scalar_is_one(&inv)); + } + } + + { + /* Test commutativity of add. */ + secp256k1_scalar r1, r2; + secp256k1_scalar_add(&r1, &s1, &s2); + secp256k1_scalar_add(&r2, &s2, &s1); + CHECK(secp256k1_scalar_eq(&r1, &r2)); + } + + { + secp256k1_scalar r1, r2; + secp256k1_scalar b; + int i; + /* Test add_bit. */ + int bit = secp256k1_rand32() % 256; + secp256k1_scalar_set_int(&b, 1); + CHECK(secp256k1_scalar_is_one(&b)); + for (i = 0; i < bit; i++) { + secp256k1_scalar_add(&b, &b, &b); + } + r1 = s1; + r2 = s1; + if (!secp256k1_scalar_add(&r1, &r1, &b)) { + /* No overflow happened. */ + secp256k1_scalar_cadd_bit(&r2, bit, 1); + CHECK(secp256k1_scalar_eq(&r1, &r2)); + /* cadd is a noop when flag is zero */ + secp256k1_scalar_cadd_bit(&r2, bit, 0); + CHECK(secp256k1_scalar_eq(&r1, &r2)); + } + } + + { + /* Test commutativity of mul. */ + secp256k1_scalar r1, r2; + secp256k1_scalar_mul(&r1, &s1, &s2); + secp256k1_scalar_mul(&r2, &s2, &s1); + CHECK(secp256k1_scalar_eq(&r1, &r2)); + } + + { + /* Test associativity of add. */ + secp256k1_scalar r1, r2; + secp256k1_scalar_add(&r1, &s1, &s2); + secp256k1_scalar_add(&r1, &r1, &s); + secp256k1_scalar_add(&r2, &s2, &s); + secp256k1_scalar_add(&r2, &s1, &r2); + CHECK(secp256k1_scalar_eq(&r1, &r2)); + } + + { + /* Test associativity of mul. */ + secp256k1_scalar r1, r2; + secp256k1_scalar_mul(&r1, &s1, &s2); + secp256k1_scalar_mul(&r1, &r1, &s); + secp256k1_scalar_mul(&r2, &s2, &s); + secp256k1_scalar_mul(&r2, &s1, &r2); + CHECK(secp256k1_scalar_eq(&r1, &r2)); + } + + { + /* Test distributitivity of mul over add. */ + secp256k1_scalar r1, r2, t; + secp256k1_scalar_add(&r1, &s1, &s2); + secp256k1_scalar_mul(&r1, &r1, &s); + secp256k1_scalar_mul(&r2, &s1, &s); + secp256k1_scalar_mul(&t, &s2, &s); + secp256k1_scalar_add(&r2, &r2, &t); + CHECK(secp256k1_scalar_eq(&r1, &r2)); + } + + { + /* Test square. */ + secp256k1_scalar r1, r2; + secp256k1_scalar_sqr(&r1, &s1); + secp256k1_scalar_mul(&r2, &s1, &s1); + CHECK(secp256k1_scalar_eq(&r1, &r2)); + } + + { + /* Test multiplicative identity. */ + secp256k1_scalar r1, v1; + secp256k1_scalar_set_int(&v1,1); + secp256k1_scalar_mul(&r1, &s1, &v1); + CHECK(secp256k1_scalar_eq(&r1, &s1)); + } + + { + /* Test additive identity. */ + secp256k1_scalar r1, v0; + secp256k1_scalar_set_int(&v0,0); + secp256k1_scalar_add(&r1, &s1, &v0); + CHECK(secp256k1_scalar_eq(&r1, &s1)); + } + + { + /* Test zero product property. */ + secp256k1_scalar r1, v0; + secp256k1_scalar_set_int(&v0,0); + secp256k1_scalar_mul(&r1, &s1, &v0); + CHECK(secp256k1_scalar_eq(&r1, &v0)); + } + +} + +void run_scalar_tests(void) { + int i; + for (i = 0; i < 128 * count; i++) { + scalar_test(); + } + + { + /* (-1)+1 should be zero. */ + secp256k1_scalar s, o; + secp256k1_scalar_set_int(&s, 1); + CHECK(secp256k1_scalar_is_one(&s)); + secp256k1_scalar_negate(&o, &s); + secp256k1_scalar_add(&o, &o, &s); + CHECK(secp256k1_scalar_is_zero(&o)); + secp256k1_scalar_negate(&o, &o); + CHECK(secp256k1_scalar_is_zero(&o)); + } + +#ifndef USE_NUM_NONE + { + /* A scalar with value of the curve order should be 0. */ + secp256k1_num order; + secp256k1_scalar zero; + unsigned char bin[32]; + int overflow = 0; + secp256k1_scalar_order_get_num(&order); + secp256k1_num_get_bin(bin, 32, &order); + secp256k1_scalar_set_b32(&zero, bin, &overflow); + CHECK(overflow == 1); + CHECK(secp256k1_scalar_is_zero(&zero)); + } +#endif +} + +/***** FIELD TESTS *****/ + +void random_fe(secp256k1_fe *x) { + unsigned char bin[32]; + do { + secp256k1_rand256(bin); + if (secp256k1_fe_set_b32(x, bin)) { + return; + } + } while(1); +} + +void random_fe_non_zero(secp256k1_fe *nz) { + int tries = 10; + while (--tries >= 0) { + random_fe(nz); + secp256k1_fe_normalize(nz); + if (!secp256k1_fe_is_zero(nz)) { + break; + } + } + /* Infinitesimal probability of spurious failure here */ + CHECK(tries >= 0); +} + +void random_fe_non_square(secp256k1_fe *ns) { + secp256k1_fe r; + random_fe_non_zero(ns); + if (secp256k1_fe_sqrt_var(&r, ns)) { + secp256k1_fe_negate(ns, ns, 1); + } +} + +int check_fe_equal(const secp256k1_fe *a, const secp256k1_fe *b) { + secp256k1_fe an = *a; + secp256k1_fe bn = *b; + secp256k1_fe_normalize_weak(&an); + secp256k1_fe_normalize_var(&bn); + return secp256k1_fe_equal_var(&an, &bn); +} + +int check_fe_inverse(const secp256k1_fe *a, const secp256k1_fe *ai) { + secp256k1_fe x; + secp256k1_fe one = SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 1); + secp256k1_fe_mul(&x, a, ai); + return check_fe_equal(&x, &one); +} + +void run_field_convert(void) { + static const unsigned char b32[32] = { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, + 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x40 + }; + static const secp256k1_fe_storage fes = SECP256K1_FE_STORAGE_CONST( + 0x00010203UL, 0x04050607UL, 0x11121314UL, 0x15161718UL, + 0x22232425UL, 0x26272829UL, 0x33343536UL, 0x37383940UL + ); + static const secp256k1_fe fe = SECP256K1_FE_CONST( + 0x00010203UL, 0x04050607UL, 0x11121314UL, 0x15161718UL, + 0x22232425UL, 0x26272829UL, 0x33343536UL, 0x37383940UL + ); + secp256k1_fe fe2; + unsigned char b322[32]; + secp256k1_fe_storage fes2; + /* Check conversions to fe. */ + CHECK(secp256k1_fe_set_b32(&fe2, b32)); + CHECK(secp256k1_fe_equal_var(&fe, &fe2)); + secp256k1_fe_from_storage(&fe2, &fes); + CHECK(secp256k1_fe_equal_var(&fe, &fe2)); + /* Check conversion from fe. */ + secp256k1_fe_get_b32(b322, &fe); + CHECK(memcmp(b322, b32, 32) == 0); + secp256k1_fe_to_storage(&fes2, &fe); + CHECK(memcmp(&fes2, &fes, sizeof(fes)) == 0); +} + +int fe_memcmp(const secp256k1_fe *a, const secp256k1_fe *b) { + secp256k1_fe t = *b; +#ifdef VERIFY + t.magnitude = a->magnitude; + t.normalized = a->normalized; +#endif + return memcmp(a, &t, sizeof(secp256k1_fe)); +} + +void run_field_misc(void) { + secp256k1_fe x; + secp256k1_fe y; + secp256k1_fe z; + secp256k1_fe q; + secp256k1_fe fe5 = SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 5); + int i, j; + for (i = 0; i < 5*count; i++) { + secp256k1_fe_storage xs, ys, zs; + random_fe(&x); + random_fe_non_zero(&y); + /* Test the fe equality and comparison operations. */ + CHECK(secp256k1_fe_cmp_var(&x, &x) == 0); + CHECK(secp256k1_fe_equal_var(&x, &x)); + z = x; + secp256k1_fe_add(&z,&y); + /* Test fe conditional move; z is not normalized here. */ + q = x; + secp256k1_fe_cmov(&x, &z, 0); + VERIFY_CHECK(!x.normalized && x.magnitude == z.magnitude); + secp256k1_fe_cmov(&x, &x, 1); + CHECK(fe_memcmp(&x, &z) != 0); + CHECK(fe_memcmp(&x, &q) == 0); + secp256k1_fe_cmov(&q, &z, 1); + VERIFY_CHECK(!q.normalized && q.magnitude == z.magnitude); + CHECK(fe_memcmp(&q, &z) == 0); + secp256k1_fe_normalize_var(&x); + secp256k1_fe_normalize_var(&z); + CHECK(!secp256k1_fe_equal_var(&x, &z)); + secp256k1_fe_normalize_var(&q); + secp256k1_fe_cmov(&q, &z, (i&1)); + VERIFY_CHECK(q.normalized && q.magnitude == 1); + for (j = 0; j < 6; j++) { + secp256k1_fe_negate(&z, &z, j+1); + secp256k1_fe_normalize_var(&q); + secp256k1_fe_cmov(&q, &z, (j&1)); + VERIFY_CHECK(!q.normalized && q.magnitude == (j+2)); + } + secp256k1_fe_normalize_var(&z); + /* Test storage conversion and conditional moves. */ + secp256k1_fe_to_storage(&xs, &x); + secp256k1_fe_to_storage(&ys, &y); + secp256k1_fe_to_storage(&zs, &z); + secp256k1_fe_storage_cmov(&zs, &xs, 0); + secp256k1_fe_storage_cmov(&zs, &zs, 1); + CHECK(memcmp(&xs, &zs, sizeof(xs)) != 0); + secp256k1_fe_storage_cmov(&ys, &xs, 1); + CHECK(memcmp(&xs, &ys, sizeof(xs)) == 0); + secp256k1_fe_from_storage(&x, &xs); + secp256k1_fe_from_storage(&y, &ys); + secp256k1_fe_from_storage(&z, &zs); + /* Test that mul_int, mul, and add agree. */ + secp256k1_fe_add(&y, &x); + secp256k1_fe_add(&y, &x); + z = x; + secp256k1_fe_mul_int(&z, 3); + CHECK(check_fe_equal(&y, &z)); + secp256k1_fe_add(&y, &x); + secp256k1_fe_add(&z, &x); + CHECK(check_fe_equal(&z, &y)); + z = x; + secp256k1_fe_mul_int(&z, 5); + secp256k1_fe_mul(&q, &x, &fe5); + CHECK(check_fe_equal(&z, &q)); + secp256k1_fe_negate(&x, &x, 1); + secp256k1_fe_add(&z, &x); + secp256k1_fe_add(&q, &x); + CHECK(check_fe_equal(&y, &z)); + CHECK(check_fe_equal(&q, &y)); + } +} + +void run_field_inv(void) { + secp256k1_fe x, xi, xii; + int i; + for (i = 0; i < 10*count; i++) { + random_fe_non_zero(&x); + secp256k1_fe_inv(&xi, &x); + CHECK(check_fe_inverse(&x, &xi)); + secp256k1_fe_inv(&xii, &xi); + CHECK(check_fe_equal(&x, &xii)); + } +} + +void run_field_inv_var(void) { + secp256k1_fe x, xi, xii; + int i; + for (i = 0; i < 10*count; i++) { + random_fe_non_zero(&x); + secp256k1_fe_inv_var(&xi, &x); + CHECK(check_fe_inverse(&x, &xi)); + secp256k1_fe_inv_var(&xii, &xi); + CHECK(check_fe_equal(&x, &xii)); + } +} + +void run_field_inv_all_var(void) { + secp256k1_fe x[16], xi[16], xii[16]; + int i; + /* Check it's safe to call for 0 elements */ + secp256k1_fe_inv_all_var(0, xi, x); + for (i = 0; i < count; i++) { + size_t j; + size_t len = (secp256k1_rand32() & 15) + 1; + for (j = 0; j < len; j++) { + random_fe_non_zero(&x[j]); + } + secp256k1_fe_inv_all_var(len, xi, x); + for (j = 0; j < len; j++) { + CHECK(check_fe_inverse(&x[j], &xi[j])); + } + secp256k1_fe_inv_all_var(len, xii, xi); + for (j = 0; j < len; j++) { + CHECK(check_fe_equal(&x[j], &xii[j])); + } + } +} + +void run_sqr(void) { + secp256k1_fe x, s; + + { + int i; + secp256k1_fe_set_int(&x, 1); + secp256k1_fe_negate(&x, &x, 1); + + for (i = 1; i <= 512; ++i) { + secp256k1_fe_mul_int(&x, 2); + secp256k1_fe_normalize(&x); + secp256k1_fe_sqr(&s, &x); + } + } +} + +void test_sqrt(const secp256k1_fe *a, const secp256k1_fe *k) { + secp256k1_fe r1, r2; + int v = secp256k1_fe_sqrt_var(&r1, a); + CHECK((v == 0) == (k == NULL)); + + if (k != NULL) { + /* Check that the returned root is +/- the given known answer */ + secp256k1_fe_negate(&r2, &r1, 1); + secp256k1_fe_add(&r1, k); secp256k1_fe_add(&r2, k); + secp256k1_fe_normalize(&r1); secp256k1_fe_normalize(&r2); + CHECK(secp256k1_fe_is_zero(&r1) || secp256k1_fe_is_zero(&r2)); + } +} + +void run_sqrt(void) { + secp256k1_fe ns, x, s, t; + int i; + + /* Check sqrt(0) is 0 */ + secp256k1_fe_set_int(&x, 0); + secp256k1_fe_sqr(&s, &x); + test_sqrt(&s, &x); + + /* Check sqrt of small squares (and their negatives) */ + for (i = 1; i <= 100; i++) { + secp256k1_fe_set_int(&x, i); + secp256k1_fe_sqr(&s, &x); + test_sqrt(&s, &x); + secp256k1_fe_negate(&t, &s, 1); + test_sqrt(&t, NULL); + } + + /* Consistency checks for large random values */ + for (i = 0; i < 10; i++) { + int j; + random_fe_non_square(&ns); + for (j = 0; j < count; j++) { + random_fe(&x); + secp256k1_fe_sqr(&s, &x); + test_sqrt(&s, &x); + secp256k1_fe_negate(&t, &s, 1); + test_sqrt(&t, NULL); + secp256k1_fe_mul(&t, &s, &ns); + test_sqrt(&t, NULL); + } + } +} + +/***** GROUP TESTS *****/ + +void ge_equals_ge(const secp256k1_ge *a, const secp256k1_ge *b) { + CHECK(a->infinity == b->infinity); + if (a->infinity) { + return; + } + CHECK(secp256k1_fe_equal_var(&a->x, &b->x)); + CHECK(secp256k1_fe_equal_var(&a->y, &b->y)); +} + +/* This compares jacobian points including their Z, not just their geometric meaning. */ +int gej_xyz_equals_gej(const secp256k1_gej *a, const secp256k1_gej *b) { + secp256k1_gej a2; + secp256k1_gej b2; + int ret = 1; + ret &= a->infinity == b->infinity; + if (ret && !a->infinity) { + a2 = *a; + b2 = *b; + secp256k1_fe_normalize(&a2.x); + secp256k1_fe_normalize(&a2.y); + secp256k1_fe_normalize(&a2.z); + secp256k1_fe_normalize(&b2.x); + secp256k1_fe_normalize(&b2.y); + secp256k1_fe_normalize(&b2.z); + ret &= secp256k1_fe_cmp_var(&a2.x, &b2.x) == 0; + ret &= secp256k1_fe_cmp_var(&a2.y, &b2.y) == 0; + ret &= secp256k1_fe_cmp_var(&a2.z, &b2.z) == 0; + } + return ret; +} + +void ge_equals_gej(const secp256k1_ge *a, const secp256k1_gej *b) { + secp256k1_fe z2s; + secp256k1_fe u1, u2, s1, s2; + CHECK(a->infinity == b->infinity); + if (a->infinity) { + return; + } + /* Check a.x * b.z^2 == b.x && a.y * b.z^3 == b.y, to avoid inverses. */ + secp256k1_fe_sqr(&z2s, &b->z); + secp256k1_fe_mul(&u1, &a->x, &z2s); + u2 = b->x; secp256k1_fe_normalize_weak(&u2); + secp256k1_fe_mul(&s1, &a->y, &z2s); secp256k1_fe_mul(&s1, &s1, &b->z); + s2 = b->y; secp256k1_fe_normalize_weak(&s2); + CHECK(secp256k1_fe_equal_var(&u1, &u2)); + CHECK(secp256k1_fe_equal_var(&s1, &s2)); +} + +void test_ge(void) { + int i, i1; +#ifdef USE_ENDOMORPHISM + int runs = 6; +#else + int runs = 4; +#endif + /* Points: (infinity, p1, p1, -p1, -p1, p2, p2, -p2, -p2, p3, p3, -p3, -p3, p4, p4, -p4, -p4). + * The second in each pair of identical points uses a random Z coordinate in the Jacobian form. + * All magnitudes are randomized. + * All 17*17 combinations of points are added to eachother, using all applicable methods. + * + * When the endomorphism code is compiled in, p5 = lambda*p1 and p6 = lambda^2*p1 are added as well. + */ + secp256k1_ge *ge = (secp256k1_ge *)malloc(sizeof(secp256k1_ge) * (1 + 4 * runs)); + secp256k1_gej *gej = (secp256k1_gej *)malloc(sizeof(secp256k1_gej) * (1 + 4 * runs)); + secp256k1_fe *zinv = (secp256k1_fe *)malloc(sizeof(secp256k1_fe) * (1 + 4 * runs)); + secp256k1_fe zf; + secp256k1_fe zfi2, zfi3; + + secp256k1_gej_set_infinity(&gej[0]); + secp256k1_ge_clear(&ge[0]); + secp256k1_ge_set_gej_var(&ge[0], &gej[0]); + for (i = 0; i < runs; i++) { + int j; + secp256k1_ge g; + random_group_element_test(&g); +#ifdef USE_ENDOMORPHISM + if (i >= runs - 2) { + secp256k1_ge_mul_lambda(&g, &ge[1]); + } + if (i >= runs - 1) { + secp256k1_ge_mul_lambda(&g, &g); + } +#endif + ge[1 + 4 * i] = g; + ge[2 + 4 * i] = g; + secp256k1_ge_neg(&ge[3 + 4 * i], &g); + secp256k1_ge_neg(&ge[4 + 4 * i], &g); + secp256k1_gej_set_ge(&gej[1 + 4 * i], &ge[1 + 4 * i]); + random_group_element_jacobian_test(&gej[2 + 4 * i], &ge[2 + 4 * i]); + secp256k1_gej_set_ge(&gej[3 + 4 * i], &ge[3 + 4 * i]); + random_group_element_jacobian_test(&gej[4 + 4 * i], &ge[4 + 4 * i]); + for (j = 0; j < 4; j++) { + random_field_element_magnitude(&ge[1 + j + 4 * i].x); + random_field_element_magnitude(&ge[1 + j + 4 * i].y); + random_field_element_magnitude(&gej[1 + j + 4 * i].x); + random_field_element_magnitude(&gej[1 + j + 4 * i].y); + random_field_element_magnitude(&gej[1 + j + 4 * i].z); + } + } + + /* Compute z inverses. */ + { + secp256k1_fe *zs = malloc(sizeof(secp256k1_fe) * (1 + 4 * runs)); + for (i = 0; i < 4 * runs + 1; i++) { + if (i == 0) { + /* The point at infinity does not have a meaningful z inverse. Any should do. */ + do { + random_field_element_test(&zs[i]); + } while(secp256k1_fe_is_zero(&zs[i])); + } else { + zs[i] = gej[i].z; + } + } + secp256k1_fe_inv_all_var(4 * runs + 1, zinv, zs); + free(zs); + } + + /* Generate random zf, and zfi2 = 1/zf^2, zfi3 = 1/zf^3 */ + do { + random_field_element_test(&zf); + } while(secp256k1_fe_is_zero(&zf)); + random_field_element_magnitude(&zf); + secp256k1_fe_inv_var(&zfi3, &zf); + secp256k1_fe_sqr(&zfi2, &zfi3); + secp256k1_fe_mul(&zfi3, &zfi3, &zfi2); + + for (i1 = 0; i1 < 1 + 4 * runs; i1++) { + int i2; + for (i2 = 0; i2 < 1 + 4 * runs; i2++) { + /* Compute reference result using gej + gej (var). */ + secp256k1_gej refj, resj; + secp256k1_ge ref; + secp256k1_fe zr; + secp256k1_gej_add_var(&refj, &gej[i1], &gej[i2], secp256k1_gej_is_infinity(&gej[i1]) ? NULL : &zr); + /* Check Z ratio. */ + if (!secp256k1_gej_is_infinity(&gej[i1]) && !secp256k1_gej_is_infinity(&refj)) { + secp256k1_fe zrz; secp256k1_fe_mul(&zrz, &zr, &gej[i1].z); + CHECK(secp256k1_fe_equal_var(&zrz, &refj.z)); + } + secp256k1_ge_set_gej_var(&ref, &refj); + + /* Test gej + ge with Z ratio result (var). */ + secp256k1_gej_add_ge_var(&resj, &gej[i1], &ge[i2], secp256k1_gej_is_infinity(&gej[i1]) ? NULL : &zr); + ge_equals_gej(&ref, &resj); + if (!secp256k1_gej_is_infinity(&gej[i1]) && !secp256k1_gej_is_infinity(&resj)) { + secp256k1_fe zrz; secp256k1_fe_mul(&zrz, &zr, &gej[i1].z); + CHECK(secp256k1_fe_equal_var(&zrz, &resj.z)); + } + + /* Test gej + ge (var, with additional Z factor). */ + { + secp256k1_ge ge2_zfi = ge[i2]; /* the second term with x and y rescaled for z = 1/zf */ + secp256k1_fe_mul(&ge2_zfi.x, &ge2_zfi.x, &zfi2); + secp256k1_fe_mul(&ge2_zfi.y, &ge2_zfi.y, &zfi3); + random_field_element_magnitude(&ge2_zfi.x); + random_field_element_magnitude(&ge2_zfi.y); + secp256k1_gej_add_zinv_var(&resj, &gej[i1], &ge2_zfi, &zf); + ge_equals_gej(&ref, &resj); + } + + /* Test gej + ge (const). */ + if (i2 != 0) { + /* secp256k1_gej_add_ge does not support its second argument being infinity. */ + secp256k1_gej_add_ge(&resj, &gej[i1], &ge[i2]); + ge_equals_gej(&ref, &resj); + } + + /* Test doubling (var). */ + if ((i1 == 0 && i2 == 0) || ((i1 + 3)/4 == (i2 + 3)/4 && ((i1 + 3)%4)/2 == ((i2 + 3)%4)/2)) { + secp256k1_fe zr2; + /* Normal doubling with Z ratio result. */ + secp256k1_gej_double_var(&resj, &gej[i1], &zr2); + ge_equals_gej(&ref, &resj); + /* Check Z ratio. */ + secp256k1_fe_mul(&zr2, &zr2, &gej[i1].z); + CHECK(secp256k1_fe_equal_var(&zr2, &resj.z)); + /* Normal doubling. */ + secp256k1_gej_double_var(&resj, &gej[i2], NULL); + ge_equals_gej(&ref, &resj); + } + + /* Test adding opposites. */ + if ((i1 == 0 && i2 == 0) || ((i1 + 3)/4 == (i2 + 3)/4 && ((i1 + 3)%4)/2 != ((i2 + 3)%4)/2)) { + CHECK(secp256k1_ge_is_infinity(&ref)); + } + + /* Test adding infinity. */ + if (i1 == 0) { + CHECK(secp256k1_ge_is_infinity(&ge[i1])); + CHECK(secp256k1_gej_is_infinity(&gej[i1])); + ge_equals_gej(&ref, &gej[i2]); + } + if (i2 == 0) { + CHECK(secp256k1_ge_is_infinity(&ge[i2])); + CHECK(secp256k1_gej_is_infinity(&gej[i2])); + ge_equals_gej(&ref, &gej[i1]); + } + } + } + + /* Test adding all points together in random order equals infinity. */ + { + secp256k1_gej sum = SECP256K1_GEJ_CONST_INFINITY; + secp256k1_gej *gej_shuffled = (secp256k1_gej *)malloc((4 * runs + 1) * sizeof(secp256k1_gej)); + for (i = 0; i < 4 * runs + 1; i++) { + gej_shuffled[i] = gej[i]; + } + for (i = 0; i < 4 * runs + 1; i++) { + int swap = i + secp256k1_rand32() % (4 * runs + 1 - i); + if (swap != i) { + secp256k1_gej t = gej_shuffled[i]; + gej_shuffled[i] = gej_shuffled[swap]; + gej_shuffled[swap] = t; + } + } + for (i = 0; i < 4 * runs + 1; i++) { + secp256k1_gej_add_var(&sum, &sum, &gej_shuffled[i], NULL); + } + CHECK(secp256k1_gej_is_infinity(&sum)); + free(gej_shuffled); + } + + /* Test batch gej -> ge conversion with and without known z ratios. */ + { + secp256k1_fe *zr = (secp256k1_fe *)malloc((4 * runs + 1) * sizeof(secp256k1_fe)); + secp256k1_ge *ge_set_table = (secp256k1_ge *)malloc((4 * runs + 1) * sizeof(secp256k1_ge)); + secp256k1_ge *ge_set_all = (secp256k1_ge *)malloc((4 * runs + 1) * sizeof(secp256k1_ge)); + for (i = 0; i < 4 * runs + 1; i++) { + /* Compute gej[i + 1].z / gez[i].z (with gej[n].z taken to be 1). */ + if (i < 4 * runs) { + secp256k1_fe_mul(&zr[i + 1], &zinv[i], &gej[i + 1].z); + } + } + secp256k1_ge_set_table_gej_var(4 * runs + 1, ge_set_table, gej, zr); + secp256k1_ge_set_all_gej_var(4 * runs + 1, ge_set_all, gej, &ctx->error_callback); + for (i = 0; i < 4 * runs + 1; i++) { + secp256k1_fe s; + random_fe_non_zero(&s); + secp256k1_gej_rescale(&gej[i], &s); + ge_equals_gej(&ge_set_table[i], &gej[i]); + ge_equals_gej(&ge_set_all[i], &gej[i]); + } + free(ge_set_table); + free(ge_set_all); + free(zr); + } + + free(ge); + free(gej); + free(zinv); +} + +void test_add_neg_y_diff_x(void) { + /* The point of this test is to check that we can add two points + * whose y-coordinates are negatives of each other but whose x + * coordinates differ. If the x-coordinates were the same, these + * points would be negatives of each other and their sum is + * infinity. This is cool because it "covers up" any degeneracy + * in the addition algorithm that would cause the xy coordinates + * of the sum to be wrong (since infinity has no xy coordinates). + * HOWEVER, if the x-coordinates are different, infinity is the + * wrong answer, and such degeneracies are exposed. This is the + * root of https://github.com/bitcoin/secp256k1/issues/257 which + * this test is a regression test for. + * + * These points were generated in sage as + * # secp256k1 params + * F = FiniteField (0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F) + * C = EllipticCurve ([F (0), F (7)]) + * G = C.lift_x(0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798) + * N = FiniteField(G.order()) + * + * # endomorphism values (lambda is 1^{1/3} in N, beta is 1^{1/3} in F) + * x = polygen(N) + * lam = (1 - x^3).roots()[1][0] + * + * # random "bad pair" + * P = C.random_element() + * Q = -int(lam) * P + * print " P: %x %x" % P.xy() + * print " Q: %x %x" % Q.xy() + * print "P + Q: %x %x" % (P + Q).xy() + */ + secp256k1_gej aj = SECP256K1_GEJ_CONST( + 0x8d24cd95, 0x0a355af1, 0x3c543505, 0x44238d30, + 0x0643d79f, 0x05a59614, 0x2f8ec030, 0xd58977cb, + 0x001e337a, 0x38093dcd, 0x6c0f386d, 0x0b1293a8, + 0x4d72c879, 0xd7681924, 0x44e6d2f3, 0x9190117d + ); + secp256k1_gej bj = SECP256K1_GEJ_CONST( + 0xc7b74206, 0x1f788cd9, 0xabd0937d, 0x164a0d86, + 0x95f6ff75, 0xf19a4ce9, 0xd013bd7b, 0xbf92d2a7, + 0xffe1cc85, 0xc7f6c232, 0x93f0c792, 0xf4ed6c57, + 0xb28d3786, 0x2897e6db, 0xbb192d0b, 0x6e6feab2 + ); + secp256k1_gej sumj = SECP256K1_GEJ_CONST( + 0x671a63c0, 0x3efdad4c, 0x389a7798, 0x24356027, + 0xb3d69010, 0x278625c3, 0x5c86d390, 0x184a8f7a, + 0x5f6409c2, 0x2ce01f2b, 0x511fd375, 0x25071d08, + 0xda651801, 0x70e95caf, 0x8f0d893c, 0xbed8fbbe + ); + secp256k1_ge b; + secp256k1_gej resj; + secp256k1_ge res; + secp256k1_ge_set_gej(&b, &bj); + + secp256k1_gej_add_var(&resj, &aj, &bj, NULL); + secp256k1_ge_set_gej(&res, &resj); + ge_equals_gej(&res, &sumj); + + secp256k1_gej_add_ge(&resj, &aj, &b); + secp256k1_ge_set_gej(&res, &resj); + ge_equals_gej(&res, &sumj); + + secp256k1_gej_add_ge_var(&resj, &aj, &b, NULL); + secp256k1_ge_set_gej(&res, &resj); + ge_equals_gej(&res, &sumj); +} + +void run_ge(void) { + int i; + for (i = 0; i < count * 32; i++) { + test_ge(); + } + test_add_neg_y_diff_x(); +} + +void test_ec_combine(void) { + secp256k1_scalar sum = SECP256K1_SCALAR_CONST(0, 0, 0, 0, 0, 0, 0, 0); + secp256k1_pubkey data[6]; + const secp256k1_pubkey* d[6]; + secp256k1_pubkey sd; + secp256k1_pubkey sd2; + secp256k1_gej Qj; + secp256k1_ge Q; + int i; + for (i = 1; i <= 6; i++) { + secp256k1_scalar s; + random_scalar_order_test(&s); + secp256k1_scalar_add(&sum, &sum, &s); + secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &Qj, &s); + secp256k1_ge_set_gej(&Q, &Qj); + secp256k1_pubkey_save(&data[i - 1], &Q); + d[i - 1] = &data[i - 1]; + secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &Qj, &sum); + secp256k1_ge_set_gej(&Q, &Qj); + secp256k1_pubkey_save(&sd, &Q); + CHECK(secp256k1_ec_pubkey_combine(ctx, &sd2, d, i) == 1); + CHECK(memcmp(&sd, &sd2, sizeof(sd)) == 0); + } +} + +void run_ec_combine(void) { + int i; + for (i = 0; i < count * 8; i++) { + test_ec_combine(); + } +} + +/***** ECMULT TESTS *****/ + +void run_ecmult_chain(void) { + /* random starting point A (on the curve) */ + secp256k1_gej a = SECP256K1_GEJ_CONST( + 0x8b30bbe9, 0xae2a9906, 0x96b22f67, 0x0709dff3, + 0x727fd8bc, 0x04d3362c, 0x6c7bf458, 0xe2846004, + 0xa357ae91, 0x5c4a6528, 0x1309edf2, 0x0504740f, + 0x0eb33439, 0x90216b4f, 0x81063cb6, 0x5f2f7e0f + ); + /* two random initial factors xn and gn */ + secp256k1_scalar xn = SECP256K1_SCALAR_CONST( + 0x84cc5452, 0xf7fde1ed, 0xb4d38a8c, 0xe9b1b84c, + 0xcef31f14, 0x6e569be9, 0x705d357a, 0x42985407 + ); + secp256k1_scalar gn = SECP256K1_SCALAR_CONST( + 0xa1e58d22, 0x553dcd42, 0xb2398062, 0x5d4c57a9, + 0x6e9323d4, 0x2b3152e5, 0xca2c3990, 0xedc7c9de + ); + /* two small multipliers to be applied to xn and gn in every iteration: */ + static const secp256k1_scalar xf = SECP256K1_SCALAR_CONST(0, 0, 0, 0, 0, 0, 0, 0x1337); + static const secp256k1_scalar gf = SECP256K1_SCALAR_CONST(0, 0, 0, 0, 0, 0, 0, 0x7113); + /* accumulators with the resulting coefficients to A and G */ + secp256k1_scalar ae = SECP256K1_SCALAR_CONST(0, 0, 0, 0, 0, 0, 0, 1); + secp256k1_scalar ge = SECP256K1_SCALAR_CONST(0, 0, 0, 0, 0, 0, 0, 0); + /* actual points */ + secp256k1_gej x; + secp256k1_gej x2; + int i; + + /* the point being computed */ + x = a; + for (i = 0; i < 200*count; i++) { + /* in each iteration, compute X = xn*X + gn*G; */ + secp256k1_ecmult(&ctx->ecmult_ctx, &x, &x, &xn, &gn); + /* also compute ae and ge: the actual accumulated factors for A and G */ + /* if X was (ae*A+ge*G), xn*X + gn*G results in (xn*ae*A + (xn*ge+gn)*G) */ + secp256k1_scalar_mul(&ae, &ae, &xn); + secp256k1_scalar_mul(&ge, &ge, &xn); + secp256k1_scalar_add(&ge, &ge, &gn); + /* modify xn and gn */ + secp256k1_scalar_mul(&xn, &xn, &xf); + secp256k1_scalar_mul(&gn, &gn, &gf); + + /* verify */ + if (i == 19999) { + /* expected result after 19999 iterations */ + secp256k1_gej rp = SECP256K1_GEJ_CONST( + 0xD6E96687, 0xF9B10D09, 0x2A6F3543, 0x9D86CEBE, + 0xA4535D0D, 0x409F5358, 0x6440BD74, 0xB933E830, + 0xB95CBCA2, 0xC77DA786, 0x539BE8FD, 0x53354D2D, + 0x3B4F566A, 0xE6580454, 0x07ED6015, 0xEE1B2A88 + ); + + secp256k1_gej_neg(&rp, &rp); + secp256k1_gej_add_var(&rp, &rp, &x, NULL); + CHECK(secp256k1_gej_is_infinity(&rp)); + } + } + /* redo the computation, but directly with the resulting ae and ge coefficients: */ + secp256k1_ecmult(&ctx->ecmult_ctx, &x2, &a, &ae, &ge); + secp256k1_gej_neg(&x2, &x2); + secp256k1_gej_add_var(&x2, &x2, &x, NULL); + CHECK(secp256k1_gej_is_infinity(&x2)); +} + +void test_point_times_order(const secp256k1_gej *point) { + /* X * (point + G) + (order-X) * (pointer + G) = 0 */ + secp256k1_scalar x; + secp256k1_scalar nx; + secp256k1_scalar zero = SECP256K1_SCALAR_CONST(0, 0, 0, 0, 0, 0, 0, 0); + secp256k1_scalar one = SECP256K1_SCALAR_CONST(0, 0, 0, 0, 0, 0, 0, 1); + secp256k1_gej res1, res2; + secp256k1_ge res3; + unsigned char pub[65]; + size_t psize = 65; + random_scalar_order_test(&x); + secp256k1_scalar_negate(&nx, &x); + secp256k1_ecmult(&ctx->ecmult_ctx, &res1, point, &x, &x); /* calc res1 = x * point + x * G; */ + secp256k1_ecmult(&ctx->ecmult_ctx, &res2, point, &nx, &nx); /* calc res2 = (order - x) * point + (order - x) * G; */ + secp256k1_gej_add_var(&res1, &res1, &res2, NULL); + CHECK(secp256k1_gej_is_infinity(&res1)); + CHECK(secp256k1_gej_is_valid_var(&res1) == 0); + secp256k1_ge_set_gej(&res3, &res1); + CHECK(secp256k1_ge_is_infinity(&res3)); + CHECK(secp256k1_ge_is_valid_var(&res3) == 0); + CHECK(secp256k1_eckey_pubkey_serialize(&res3, pub, &psize, 0) == 0); + psize = 65; + CHECK(secp256k1_eckey_pubkey_serialize(&res3, pub, &psize, 1) == 0); + /* check zero/one edge cases */ + secp256k1_ecmult(&ctx->ecmult_ctx, &res1, point, &zero, &zero); + secp256k1_ge_set_gej(&res3, &res1); + CHECK(secp256k1_ge_is_infinity(&res3)); + secp256k1_ecmult(&ctx->ecmult_ctx, &res1, point, &one, &zero); + secp256k1_ge_set_gej(&res3, &res1); + ge_equals_gej(&res3, point); + secp256k1_ecmult(&ctx->ecmult_ctx, &res1, point, &zero, &one); + secp256k1_ge_set_gej(&res3, &res1); + ge_equals_ge(&res3, &secp256k1_ge_const_g); +} + +void run_point_times_order(void) { + int i; + secp256k1_fe x = SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 2); + static const secp256k1_fe xr = SECP256K1_FE_CONST( + 0x7603CB59, 0xB0EF6C63, 0xFE608479, 0x2A0C378C, + 0xDB3233A8, 0x0F8A9A09, 0xA877DEAD, 0x31B38C45 + ); + for (i = 0; i < 500; i++) { + secp256k1_ge p; + if (secp256k1_ge_set_xo_var(&p, &x, 1)) { + secp256k1_gej j; + CHECK(secp256k1_ge_is_valid_var(&p)); + secp256k1_gej_set_ge(&j, &p); + CHECK(secp256k1_gej_is_valid_var(&j)); + test_point_times_order(&j); + } + secp256k1_fe_sqr(&x, &x); + } + secp256k1_fe_normalize_var(&x); + CHECK(secp256k1_fe_equal_var(&x, &xr)); +} + +void ecmult_const_random_mult(void) { + /* random starting point A (on the curve) */ + secp256k1_ge a = SECP256K1_GE_CONST( + 0x6d986544, 0x57ff52b8, 0xcf1b8126, 0x5b802a5b, + 0xa97f9263, 0xb1e88044, 0x93351325, 0x91bc450a, + 0x535c59f7, 0x325e5d2b, 0xc391fbe8, 0x3c12787c, + 0x337e4a98, 0xe82a9011, 0x0123ba37, 0xdd769c7d + ); + /* random initial factor xn */ + secp256k1_scalar xn = SECP256K1_SCALAR_CONST( + 0x649d4f77, 0xc4242df7, 0x7f2079c9, 0x14530327, + 0xa31b876a, 0xd2d8ce2a, 0x2236d5c6, 0xd7b2029b + ); + /* expected xn * A (from sage) */ + secp256k1_ge expected_b = SECP256K1_GE_CONST( + 0x23773684, 0x4d209dc7, 0x098a786f, 0x20d06fcd, + 0x070a38bf, 0xc11ac651, 0x03004319, 0x1e2a8786, + 0xed8c3b8e, 0xc06dd57b, 0xd06ea66e, 0x45492b0f, + 0xb84e4e1b, 0xfb77e21f, 0x96baae2a, 0x63dec956 + ); + secp256k1_gej b; + secp256k1_ecmult_const(&b, &a, &xn); + + CHECK(secp256k1_ge_is_valid_var(&a)); + ge_equals_gej(&expected_b, &b); +} + +void ecmult_const_commutativity(void) { + secp256k1_scalar a; + secp256k1_scalar b; + secp256k1_gej res1; + secp256k1_gej res2; + secp256k1_ge mid1; + secp256k1_ge mid2; + random_scalar_order_test(&a); + random_scalar_order_test(&b); + + secp256k1_ecmult_const(&res1, &secp256k1_ge_const_g, &a); + secp256k1_ecmult_const(&res2, &secp256k1_ge_const_g, &b); + secp256k1_ge_set_gej(&mid1, &res1); + secp256k1_ge_set_gej(&mid2, &res2); + secp256k1_ecmult_const(&res1, &mid1, &b); + secp256k1_ecmult_const(&res2, &mid2, &a); + secp256k1_ge_set_gej(&mid1, &res1); + secp256k1_ge_set_gej(&mid2, &res2); + ge_equals_ge(&mid1, &mid2); +} + +void ecmult_const_mult_zero_one(void) { + secp256k1_scalar zero = SECP256K1_SCALAR_CONST(0, 0, 0, 0, 0, 0, 0, 0); + secp256k1_scalar one = SECP256K1_SCALAR_CONST(0, 0, 0, 0, 0, 0, 0, 1); + secp256k1_scalar negone; + secp256k1_gej res1; + secp256k1_ge res2; + secp256k1_ge point; + secp256k1_scalar_negate(&negone, &one); + + random_group_element_test(&point); + secp256k1_ecmult_const(&res1, &point, &zero); + secp256k1_ge_set_gej(&res2, &res1); + CHECK(secp256k1_ge_is_infinity(&res2)); + secp256k1_ecmult_const(&res1, &point, &one); + secp256k1_ge_set_gej(&res2, &res1); + ge_equals_ge(&res2, &point); + secp256k1_ecmult_const(&res1, &point, &negone); + secp256k1_gej_neg(&res1, &res1); + secp256k1_ge_set_gej(&res2, &res1); + ge_equals_ge(&res2, &point); +} + +void ecmult_const_chain_multiply(void) { + /* Check known result (randomly generated test problem from sage) */ + const secp256k1_scalar scalar = SECP256K1_SCALAR_CONST( + 0x4968d524, 0x2abf9b7a, 0x466abbcf, 0x34b11b6d, + 0xcd83d307, 0x827bed62, 0x05fad0ce, 0x18fae63b + ); + const secp256k1_gej expected_point = SECP256K1_GEJ_CONST( + 0x5494c15d, 0x32099706, 0xc2395f94, 0x348745fd, + 0x757ce30e, 0x4e8c90fb, 0xa2bad184, 0xf883c69f, + 0x5d195d20, 0xe191bf7f, 0x1be3e55f, 0x56a80196, + 0x6071ad01, 0xf1462f66, 0xc997fa94, 0xdb858435 + ); + secp256k1_gej point; + secp256k1_ge res; + int i; + + secp256k1_gej_set_ge(&point, &secp256k1_ge_const_g); + for (i = 0; i < 100; ++i) { + secp256k1_ge tmp; + secp256k1_ge_set_gej(&tmp, &point); + secp256k1_ecmult_const(&point, &tmp, &scalar); + } + secp256k1_ge_set_gej(&res, &point); + ge_equals_gej(&res, &expected_point); +} + +void run_ecmult_const_tests(void) { + ecmult_const_mult_zero_one(); + ecmult_const_random_mult(); + ecmult_const_commutativity(); + ecmult_const_chain_multiply(); +} + +void test_wnaf(const secp256k1_scalar *number, int w) { + secp256k1_scalar x, two, t; + int wnaf[256]; + int zeroes = -1; + int i; + int bits; + secp256k1_scalar_set_int(&x, 0); + secp256k1_scalar_set_int(&two, 2); + bits = secp256k1_ecmult_wnaf(wnaf, 256, number, w); + CHECK(bits <= 256); + for (i = bits-1; i >= 0; i--) { + int v = wnaf[i]; + secp256k1_scalar_mul(&x, &x, &two); + if (v) { + CHECK(zeroes == -1 || zeroes >= w-1); /* check that distance between non-zero elements is at least w-1 */ + zeroes=0; + CHECK((v & 1) == 1); /* check non-zero elements are odd */ + CHECK(v <= (1 << (w-1)) - 1); /* check range below */ + CHECK(v >= -(1 << (w-1)) - 1); /* check range above */ + } else { + CHECK(zeroes != -1); /* check that no unnecessary zero padding exists */ + zeroes++; + } + if (v >= 0) { + secp256k1_scalar_set_int(&t, v); + } else { + secp256k1_scalar_set_int(&t, -v); + secp256k1_scalar_negate(&t, &t); + } + secp256k1_scalar_add(&x, &x, &t); + } + CHECK(secp256k1_scalar_eq(&x, number)); /* check that wnaf represents number */ +} + +void test_constant_wnaf_negate(const secp256k1_scalar *number) { + secp256k1_scalar neg1 = *number; + secp256k1_scalar neg2 = *number; + int sign1 = 1; + int sign2 = 1; + + if (!secp256k1_scalar_get_bits(&neg1, 0, 1)) { + secp256k1_scalar_negate(&neg1, &neg1); + sign1 = -1; + } + sign2 = secp256k1_scalar_cond_negate(&neg2, secp256k1_scalar_is_even(&neg2)); + CHECK(sign1 == sign2); + CHECK(secp256k1_scalar_eq(&neg1, &neg2)); +} + +void test_constant_wnaf(const secp256k1_scalar *number, int w) { + secp256k1_scalar x, shift; + int wnaf[256] = {0}; + int i; +#ifdef USE_ENDOMORPHISM + int skew; +#endif + secp256k1_scalar num = *number; + + secp256k1_scalar_set_int(&x, 0); + secp256k1_scalar_set_int(&shift, 1 << w); + /* With USE_ENDOMORPHISM on we only consider 128-bit numbers */ +#ifdef USE_ENDOMORPHISM + for (i = 0; i < 16; ++i) { + secp256k1_scalar_shr_int(&num, 8); + } + skew = secp256k1_wnaf_const(wnaf, num, w); +#else + secp256k1_wnaf_const(wnaf, num, w); +#endif + + for (i = WNAF_SIZE(w); i >= 0; --i) { + secp256k1_scalar t; + int v = wnaf[i]; + CHECK(v != 0); /* check nonzero */ + CHECK(v & 1); /* check parity */ + CHECK(v > -(1 << w)); /* check range above */ + CHECK(v < (1 << w)); /* check range below */ + + secp256k1_scalar_mul(&x, &x, &shift); + if (v >= 0) { + secp256k1_scalar_set_int(&t, v); + } else { + secp256k1_scalar_set_int(&t, -v); + secp256k1_scalar_negate(&t, &t); + } + secp256k1_scalar_add(&x, &x, &t); + } +#ifdef USE_ENDOMORPHISM + /* Skew num because when encoding 128-bit numbers as odd we use an offset */ + secp256k1_scalar_cadd_bit(&num, skew == 2, 1); +#endif + CHECK(secp256k1_scalar_eq(&x, &num)); +} + +void run_wnaf(void) { + int i; + secp256k1_scalar n = {{0}}; + + /* Sanity check: 1 and 2 are the smallest odd and even numbers and should + * have easier-to-diagnose failure modes */ + n.d[0] = 1; + test_constant_wnaf(&n, 4); + n.d[0] = 2; + test_constant_wnaf(&n, 4); + /* Random tests */ + for (i = 0; i < count; i++) { + random_scalar_order(&n); + test_wnaf(&n, 4+(i%10)); + test_constant_wnaf_negate(&n); + test_constant_wnaf(&n, 4 + (i % 10)); + } +} + +void test_ecmult_constants(void) { + /* Test ecmult_gen() for [0..36) and [order-36..0). */ + secp256k1_scalar x; + secp256k1_gej r; + secp256k1_ge ng; + int i; + int j; + secp256k1_ge_neg(&ng, &secp256k1_ge_const_g); + for (i = 0; i < 36; i++ ) { + secp256k1_scalar_set_int(&x, i); + secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &r, &x); + for (j = 0; j < i; j++) { + if (j == i - 1) { + ge_equals_gej(&secp256k1_ge_const_g, &r); + } + secp256k1_gej_add_ge(&r, &r, &ng); + } + CHECK(secp256k1_gej_is_infinity(&r)); + } + for (i = 1; i <= 36; i++ ) { + secp256k1_scalar_set_int(&x, i); + secp256k1_scalar_negate(&x, &x); + secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &r, &x); + for (j = 0; j < i; j++) { + if (j == i - 1) { + ge_equals_gej(&ng, &r); + } + secp256k1_gej_add_ge(&r, &r, &secp256k1_ge_const_g); + } + CHECK(secp256k1_gej_is_infinity(&r)); + } +} + +void run_ecmult_constants(void) { + test_ecmult_constants(); +} + +void test_ecmult_gen_blind(void) { + /* Test ecmult_gen() blinding and confirm that the blinding changes, the affline points match, and the z's don't match. */ + secp256k1_scalar key; + secp256k1_scalar b; + unsigned char seed32[32]; + secp256k1_gej pgej; + secp256k1_gej pgej2; + secp256k1_gej i; + secp256k1_ge pge; + random_scalar_order_test(&key); + secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &pgej, &key); + secp256k1_rand256(seed32); + b = ctx->ecmult_gen_ctx.blind; + i = ctx->ecmult_gen_ctx.initial; + secp256k1_ecmult_gen_blind(&ctx->ecmult_gen_ctx, seed32); + CHECK(!secp256k1_scalar_eq(&b, &ctx->ecmult_gen_ctx.blind)); + secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &pgej2, &key); + CHECK(!gej_xyz_equals_gej(&pgej, &pgej2)); + CHECK(!gej_xyz_equals_gej(&i, &ctx->ecmult_gen_ctx.initial)); + secp256k1_ge_set_gej(&pge, &pgej); + ge_equals_gej(&pge, &pgej2); +} + +void test_ecmult_gen_blind_reset(void) { + /* Test ecmult_gen() blinding reset and confirm that the blinding is consistent. */ + secp256k1_scalar b; + secp256k1_gej initial; + secp256k1_ecmult_gen_blind(&ctx->ecmult_gen_ctx, 0); + b = ctx->ecmult_gen_ctx.blind; + initial = ctx->ecmult_gen_ctx.initial; + secp256k1_ecmult_gen_blind(&ctx->ecmult_gen_ctx, 0); + CHECK(secp256k1_scalar_eq(&b, &ctx->ecmult_gen_ctx.blind)); + CHECK(gej_xyz_equals_gej(&initial, &ctx->ecmult_gen_ctx.initial)); +} + +void run_ecmult_gen_blind(void) { + int i; + test_ecmult_gen_blind_reset(); + for (i = 0; i < 10; i++) { + test_ecmult_gen_blind(); + } +} + +#ifdef USE_ENDOMORPHISM +/***** ENDOMORPHISH TESTS *****/ +void test_scalar_split(void) { + secp256k1_scalar full; + secp256k1_scalar s1, slam; + const unsigned char zero[32] = {0}; + unsigned char tmp[32]; + + random_scalar_order_test(&full); + secp256k1_scalar_split_lambda(&s1, &slam, &full); + + /* check that both are <= 128 bits in size */ + if (secp256k1_scalar_is_high(&s1)) { + secp256k1_scalar_negate(&s1, &s1); + } + if (secp256k1_scalar_is_high(&slam)) { + secp256k1_scalar_negate(&slam, &slam); + } + + secp256k1_scalar_get_b32(tmp, &s1); + CHECK(memcmp(zero, tmp, 16) == 0); + secp256k1_scalar_get_b32(tmp, &slam); + CHECK(memcmp(zero, tmp, 16) == 0); +} + +void run_endomorphism_tests(void) { + test_scalar_split(); +} +#endif + +void random_sign(secp256k1_scalar *sigr, secp256k1_scalar *sigs, const secp256k1_scalar *key, const secp256k1_scalar *msg, int *recid) { + secp256k1_scalar nonce; + do { + random_scalar_order_test(&nonce); + } while(!secp256k1_ecdsa_sig_sign(&ctx->ecmult_gen_ctx, sigr, sigs, key, msg, &nonce, recid)); +} + +void test_ecdsa_sign_verify(void) { + secp256k1_gej pubj; + secp256k1_ge pub; + secp256k1_scalar one; + secp256k1_scalar msg, key; + secp256k1_scalar sigr, sigs; + int recid; + int getrec; + random_scalar_order_test(&msg); + random_scalar_order_test(&key); + secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &pubj, &key); + secp256k1_ge_set_gej(&pub, &pubj); + getrec = secp256k1_rand32()&1; + random_sign(&sigr, &sigs, &key, &msg, getrec?&recid:NULL); + if (getrec) { + CHECK(recid >= 0 && recid < 4); + } + CHECK(secp256k1_ecdsa_sig_verify(&ctx->ecmult_ctx, &sigr, &sigs, &pub, &msg)); + secp256k1_scalar_set_int(&one, 1); + secp256k1_scalar_add(&msg, &msg, &one); + CHECK(!secp256k1_ecdsa_sig_verify(&ctx->ecmult_ctx, &sigr, &sigs, &pub, &msg)); +} + +void run_ecdsa_sign_verify(void) { + int i; + for (i = 0; i < 10*count; i++) { + test_ecdsa_sign_verify(); + } +} + +/** Dummy nonce generation function that just uses a precomputed nonce, and fails if it is not accepted. Use only for testing. */ +static int precomputed_nonce_function(unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, const unsigned char *algo16, void *data, unsigned int counter) { + (void)msg32; + (void)key32; + (void)algo16; + memcpy(nonce32, data, 32); + return (counter == 0); +} + +static int nonce_function_test_fail(unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, const unsigned char *algo16, void *data, unsigned int counter) { + /* Dummy nonce generator that has a fatal error on the first counter value. */ + if (counter == 0) { + return 0; + } + return nonce_function_rfc6979(nonce32, msg32, key32, algo16, data, counter - 1); +} + +static int nonce_function_test_retry(unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, const unsigned char *algo16, void *data, unsigned int counter) { + /* Dummy nonce generator that produces unacceptable nonces for the first several counter values. */ + if (counter < 3) { + memset(nonce32, counter==0 ? 0 : 255, 32); + if (counter == 2) { + nonce32[31]--; + } + return 1; + } + if (counter < 5) { + static const unsigned char order[] = { + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE, + 0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B, + 0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x41 + }; + memcpy(nonce32, order, 32); + if (counter == 4) { + nonce32[31]++; + } + return 1; + } + /* Retry rate of 6979 is negligible esp. as we only call this in determinstic tests. */ + /* If someone does fine a case where it retries for secp256k1, we'd like to know. */ + if (counter > 5) { + return 0; + } + return nonce_function_rfc6979(nonce32, msg32, key32, algo16, data, counter - 5); +} + +int is_empty_signature(const secp256k1_ecdsa_signature *sig) { + static const unsigned char res[sizeof(secp256k1_ecdsa_signature)] = {0}; + return memcmp(sig, res, sizeof(secp256k1_ecdsa_signature)) == 0; +} + +void test_ecdsa_end_to_end(void) { + unsigned char extra[32] = {0x00}; + unsigned char privkey[32]; + unsigned char message[32]; + unsigned char privkey2[32]; + secp256k1_ecdsa_signature signature[5]; + unsigned char sig[74]; + size_t siglen = 74; + unsigned char pubkeyc[65]; + size_t pubkeyclen = 65; + secp256k1_pubkey pubkey; + unsigned char seckey[300]; + size_t seckeylen = 300; + + /* Generate a random key and message. */ + { + secp256k1_scalar msg, key; + random_scalar_order_test(&msg); + random_scalar_order_test(&key); + secp256k1_scalar_get_b32(privkey, &key); + secp256k1_scalar_get_b32(message, &msg); + } + + /* Construct and verify corresponding public key. */ + CHECK(secp256k1_ec_seckey_verify(ctx, privkey) == 1); + CHECK(secp256k1_ec_pubkey_create(ctx, &pubkey, privkey) == 1); + + /* Verify exporting and importing public key. */ + CHECK(secp256k1_ec_pubkey_serialize(ctx, pubkeyc, &pubkeyclen, &pubkey, secp256k1_rand32() % 2) == 1); + memset(&pubkey, 0, sizeof(pubkey)); + CHECK(secp256k1_ec_pubkey_parse(ctx, &pubkey, pubkeyc, pubkeyclen) == 1); + + /* Verify private key import and export. */ + CHECK(secp256k1_ec_privkey_export(ctx, seckey, &seckeylen, privkey, (secp256k1_rand32() % 2) == 1) ? SECP256K1_EC_COMPRESSED : 0); + CHECK(secp256k1_ec_privkey_import(ctx, privkey2, seckey, seckeylen) == 1); + CHECK(memcmp(privkey, privkey2, 32) == 0); + + /* Optionally tweak the keys using addition. */ + if (secp256k1_rand32() % 3 == 0) { + int ret1; + int ret2; + unsigned char rnd[32]; + secp256k1_pubkey pubkey2; + secp256k1_rand256_test(rnd); + ret1 = secp256k1_ec_privkey_tweak_add(ctx, privkey, rnd); + ret2 = secp256k1_ec_pubkey_tweak_add(ctx, &pubkey, rnd); + CHECK(ret1 == ret2); + if (ret1 == 0) { + return; + } + CHECK(secp256k1_ec_pubkey_create(ctx, &pubkey2, privkey) == 1); + CHECK(memcmp(&pubkey, &pubkey2, sizeof(pubkey)) == 0); + } + + /* Optionally tweak the keys using multiplication. */ + if (secp256k1_rand32() % 3 == 0) { + int ret1; + int ret2; + unsigned char rnd[32]; + secp256k1_pubkey pubkey2; + secp256k1_rand256_test(rnd); + ret1 = secp256k1_ec_privkey_tweak_mul(ctx, privkey, rnd); + ret2 = secp256k1_ec_pubkey_tweak_mul(ctx, &pubkey, rnd); + CHECK(ret1 == ret2); + if (ret1 == 0) { + return; + } + CHECK(secp256k1_ec_pubkey_create(ctx, &pubkey2, privkey) == 1); + CHECK(memcmp(&pubkey, &pubkey2, sizeof(pubkey)) == 0); + } + + /* Sign. */ + CHECK(secp256k1_ecdsa_sign(ctx, &signature[0], message, privkey, NULL, NULL) == 1); + CHECK(secp256k1_ecdsa_sign(ctx, &signature[4], message, privkey, NULL, NULL) == 1); + CHECK(secp256k1_ecdsa_sign(ctx, &signature[1], message, privkey, NULL, extra) == 1); + extra[31] = 1; + CHECK(secp256k1_ecdsa_sign(ctx, &signature[2], message, privkey, NULL, extra) == 1); + extra[31] = 0; + extra[0] = 1; + CHECK(secp256k1_ecdsa_sign(ctx, &signature[3], message, privkey, NULL, extra) == 1); + CHECK(memcmp(&signature[0], &signature[4], sizeof(signature[0])) == 0); + CHECK(memcmp(&signature[0], &signature[1], sizeof(signature[0])) != 0); + CHECK(memcmp(&signature[0], &signature[2], sizeof(signature[0])) != 0); + CHECK(memcmp(&signature[0], &signature[3], sizeof(signature[0])) != 0); + CHECK(memcmp(&signature[1], &signature[2], sizeof(signature[0])) != 0); + CHECK(memcmp(&signature[1], &signature[3], sizeof(signature[0])) != 0); + CHECK(memcmp(&signature[2], &signature[3], sizeof(signature[0])) != 0); + /* Verify. */ + CHECK(secp256k1_ecdsa_verify(ctx, &signature[0], message, &pubkey) == 1); + CHECK(secp256k1_ecdsa_verify(ctx, &signature[1], message, &pubkey) == 1); + CHECK(secp256k1_ecdsa_verify(ctx, &signature[2], message, &pubkey) == 1); + CHECK(secp256k1_ecdsa_verify(ctx, &signature[3], message, &pubkey) == 1); + + /* Serialize/parse DER and verify again */ + CHECK(secp256k1_ecdsa_signature_serialize_der(ctx, sig, &siglen, &signature[0]) == 1); + memset(&signature[0], 0, sizeof(signature[0])); + CHECK(secp256k1_ecdsa_signature_parse_der(ctx, &signature[0], sig, siglen) == 1); + CHECK(secp256k1_ecdsa_verify(ctx, &signature[0], message, &pubkey) == 1); + /* Serialize/destroy/parse DER and verify again. */ + siglen = 74; + CHECK(secp256k1_ecdsa_signature_serialize_der(ctx, sig, &siglen, &signature[0]) == 1); + sig[secp256k1_rand32() % siglen] += 1 + (secp256k1_rand32() % 255); + CHECK(secp256k1_ecdsa_signature_parse_der(ctx, &signature[0], sig, siglen) == 0 || + secp256k1_ecdsa_verify(ctx, &signature[0], message, &pubkey) == 0); +} + +void test_random_pubkeys(void) { + secp256k1_ge elem; + secp256k1_ge elem2; + unsigned char in[65]; + /* Generate some randomly sized pubkeys. */ + uint32_t r = secp256k1_rand32(); + size_t len = (r & 3) == 0 ? 65 : 33; + r>>=2; + if ((r & 3) == 0) { + len = (r & 252) >> 3; + } + r>>=8; + if (len == 65) { + in[0] = (r & 2) ? 4 : ((r & 1)? 6 : 7); + } else { + in[0] = (r & 1) ? 2 : 3; + } + r>>=2; + if ((r & 7) == 0) { + in[0] = (r & 2040) >> 3; + } + r>>=11; + if (len > 1) { + secp256k1_rand256(&in[1]); + } + if (len > 33) { + secp256k1_rand256(&in[33]); + } + if (secp256k1_eckey_pubkey_parse(&elem, in, len)) { + unsigned char out[65]; + unsigned char firstb; + int res; + size_t size = len; + firstb = in[0]; + /* If the pubkey can be parsed, it should round-trip... */ + CHECK(secp256k1_eckey_pubkey_serialize(&elem, out, &size, (len == 33) ? SECP256K1_EC_COMPRESSED : 0)); + CHECK(size == len); + CHECK(memcmp(&in[1], &out[1], len-1) == 0); + /* ... except for the type of hybrid inputs. */ + if ((in[0] != 6) && (in[0] != 7)) { + CHECK(in[0] == out[0]); + } + size = 65; + CHECK(secp256k1_eckey_pubkey_serialize(&elem, in, &size, 0)); + CHECK(size == 65); + CHECK(secp256k1_eckey_pubkey_parse(&elem2, in, size)); + ge_equals_ge(&elem,&elem2); + /* Check that the X9.62 hybrid type is checked. */ + in[0] = (r & 1) ? 6 : 7; + res = secp256k1_eckey_pubkey_parse(&elem2, in, size); + if (firstb == 2 || firstb == 3) { + if (in[0] == firstb + 4) { + CHECK(res); + } else { + CHECK(!res); + } + } + if (res) { + ge_equals_ge(&elem,&elem2); + CHECK(secp256k1_eckey_pubkey_serialize(&elem, out, &size, 0)); + CHECK(memcmp(&in[1], &out[1], 64) == 0); + } + } +} + +void run_random_pubkeys(void) { + int i; + for (i = 0; i < 10*count; i++) { + test_random_pubkeys(); + } +} + +void run_ecdsa_end_to_end(void) { + int i; + for (i = 0; i < 64*count; i++) { + test_ecdsa_end_to_end(); + } +} + +/* Tests several edge cases. */ +void test_ecdsa_edge_cases(void) { + int t; + secp256k1_ecdsa_signature sig; + + /* Test the case where ECDSA recomputes a point that is infinity. */ + { + secp256k1_gej keyj; + secp256k1_ge key; + secp256k1_scalar msg; + secp256k1_scalar sr, ss; + secp256k1_scalar_set_int(&ss, 1); + secp256k1_scalar_negate(&ss, &ss); + secp256k1_scalar_inverse(&ss, &ss); + secp256k1_scalar_set_int(&sr, 1); + secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &keyj, &sr); + secp256k1_ge_set_gej(&key, &keyj); + msg = ss; + CHECK(secp256k1_ecdsa_sig_verify(&ctx->ecmult_ctx, &sr, &ss, &key, &msg) == 0); + } + + /*Signature where s would be zero.*/ + { + unsigned char signature[72]; + size_t siglen; + const unsigned char nonce[32] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + }; + static const unsigned char nonce2[32] = { + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE, + 0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B, + 0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x40 + }; + const unsigned char key[32] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + }; + unsigned char msg[32] = { + 0x86, 0x41, 0x99, 0x81, 0x06, 0x23, 0x44, 0x53, + 0xaa, 0x5f, 0x9d, 0x6a, 0x31, 0x78, 0xf4, 0xf7, + 0xb8, 0x12, 0xe0, 0x0b, 0x81, 0x7a, 0x77, 0x62, + 0x65, 0xdf, 0xdd, 0x31, 0xb9, 0x3e, 0x29, 0xa9, + }; + CHECK(secp256k1_ecdsa_sign(ctx, &sig, msg, key, precomputed_nonce_function, nonce) == 0); + CHECK(secp256k1_ecdsa_sign(ctx, &sig, msg, key, precomputed_nonce_function, nonce2) == 0); + msg[31] = 0xaa; + CHECK(secp256k1_ecdsa_sign(ctx, &sig, msg, key, precomputed_nonce_function, nonce) == 1); + CHECK(secp256k1_ecdsa_sign(ctx, &sig, msg, key, precomputed_nonce_function, nonce2) == 1); + siglen = 72; + CHECK(secp256k1_ecdsa_signature_serialize_der(ctx, signature, &siglen, &sig) == 1); + siglen = 10; + CHECK(secp256k1_ecdsa_signature_serialize_der(ctx, signature, &siglen, &sig) == 0); + } + + /* Nonce function corner cases. */ + for (t = 0; t < 2; t++) { + static const unsigned char zero[32] = {0x00}; + int i; + unsigned char key[32]; + unsigned char msg[32]; + secp256k1_ecdsa_signature sig2; + secp256k1_scalar sr[512], ss; + const unsigned char *extra; + extra = t == 0 ? NULL : zero; + memset(msg, 0, 32); + msg[31] = 1; + /* High key results in signature failure. */ + memset(key, 0xFF, 32); + CHECK(secp256k1_ecdsa_sign(ctx, &sig, msg, key, NULL, extra) == 0); + CHECK(is_empty_signature(&sig)); + /* Zero key results in signature failure. */ + memset(key, 0, 32); + CHECK(secp256k1_ecdsa_sign(ctx, &sig, msg, key, NULL, extra) == 0); + CHECK(is_empty_signature(&sig)); + /* Nonce function failure results in signature failure. */ + key[31] = 1; + CHECK(secp256k1_ecdsa_sign(ctx, &sig, msg, key, nonce_function_test_fail, extra) == 0); + CHECK(is_empty_signature(&sig)); + /* The retry loop successfully makes its way to the first good value. */ + CHECK(secp256k1_ecdsa_sign(ctx, &sig, msg, key, nonce_function_test_retry, extra) == 1); + CHECK(!is_empty_signature(&sig)); + CHECK(secp256k1_ecdsa_sign(ctx, &sig2, msg, key, nonce_function_rfc6979, extra) == 1); + CHECK(!is_empty_signature(&sig2)); + CHECK(memcmp(&sig, &sig2, sizeof(sig)) == 0); + /* The default nonce function is determinstic. */ + CHECK(secp256k1_ecdsa_sign(ctx, &sig2, msg, key, NULL, extra) == 1); + CHECK(!is_empty_signature(&sig2)); + CHECK(memcmp(&sig, &sig2, sizeof(sig)) == 0); + /* The default nonce function changes output with different messages. */ + for(i = 0; i < 256; i++) { + int j; + msg[0] = i; + CHECK(secp256k1_ecdsa_sign(ctx, &sig2, msg, key, NULL, extra) == 1); + CHECK(!is_empty_signature(&sig2)); + secp256k1_ecdsa_signature_load(ctx, &sr[i], &ss, &sig2); + for (j = 0; j < i; j++) { + CHECK(!secp256k1_scalar_eq(&sr[i], &sr[j])); + } + } + msg[0] = 0; + msg[31] = 2; + /* The default nonce function changes output with different keys. */ + for(i = 256; i < 512; i++) { + int j; + key[0] = i - 256; + CHECK(secp256k1_ecdsa_sign(ctx, &sig2, msg, key, NULL, extra) == 1); + CHECK(!is_empty_signature(&sig2)); + secp256k1_ecdsa_signature_load(ctx, &sr[i], &ss, &sig2); + for (j = 0; j < i; j++) { + CHECK(!secp256k1_scalar_eq(&sr[i], &sr[j])); + } + } + key[0] = 0; + } + + /* Privkey export where pubkey is the point at infinity. */ + { + unsigned char privkey[300]; + unsigned char seckey[32] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, + 0xba, 0xae, 0xdc, 0xe6, 0xaf, 0x48, 0xa0, 0x3b, + 0xbf, 0xd2, 0x5e, 0x8c, 0xd0, 0x36, 0x41, 0x41, + }; + size_t outlen = 300; + CHECK(!secp256k1_ec_privkey_export(ctx, privkey, &outlen, seckey, 0)); + outlen = 300; + CHECK(!secp256k1_ec_privkey_export(ctx, privkey, &outlen, seckey, SECP256K1_EC_COMPRESSED)); + } +} + +void run_ecdsa_edge_cases(void) { + test_ecdsa_edge_cases(); +} + +#ifdef ENABLE_OPENSSL_TESTS +EC_KEY *get_openssl_key(const secp256k1_scalar *key) { + unsigned char privkey[300]; + size_t privkeylen; + const unsigned char* pbegin = privkey; + int compr = secp256k1_rand32() & 1; + EC_KEY *ec_key = EC_KEY_new_by_curve_name(NID_secp256k1); + CHECK(secp256k1_eckey_privkey_serialize(&ctx->ecmult_gen_ctx, privkey, &privkeylen, key, compr ? SECP256K1_EC_COMPRESSED : 0)); + CHECK(d2i_ECPrivateKey(&ec_key, &pbegin, privkeylen)); + CHECK(EC_KEY_check_key(ec_key)); + return ec_key; +} + +void test_ecdsa_openssl(void) { + secp256k1_gej qj; + secp256k1_ge q; + secp256k1_scalar sigr, sigs; + secp256k1_scalar one; + secp256k1_scalar msg2; + secp256k1_scalar key, msg; + EC_KEY *ec_key; + unsigned int sigsize = 80; + size_t secp_sigsize = 80; + unsigned char message[32]; + unsigned char signature[80]; + secp256k1_rand256_test(message); + secp256k1_scalar_set_b32(&msg, message, NULL); + random_scalar_order_test(&key); + secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &qj, &key); + secp256k1_ge_set_gej(&q, &qj); + ec_key = get_openssl_key(&key); + CHECK(ec_key != NULL); + CHECK(ECDSA_sign(0, message, sizeof(message), signature, &sigsize, ec_key)); + CHECK(secp256k1_ecdsa_sig_parse(&sigr, &sigs, signature, sigsize)); + CHECK(secp256k1_ecdsa_sig_verify(&ctx->ecmult_ctx, &sigr, &sigs, &q, &msg)); + secp256k1_scalar_set_int(&one, 1); + secp256k1_scalar_add(&msg2, &msg, &one); + CHECK(!secp256k1_ecdsa_sig_verify(&ctx->ecmult_ctx, &sigr, &sigs, &q, &msg2)); + + random_sign(&sigr, &sigs, &key, &msg, NULL); + CHECK(secp256k1_ecdsa_sig_serialize(signature, &secp_sigsize, &sigr, &sigs)); + CHECK(ECDSA_verify(0, message, sizeof(message), signature, secp_sigsize, ec_key) == 1); + + EC_KEY_free(ec_key); +} + +void run_ecdsa_openssl(void) { + int i; + for (i = 0; i < 10*count; i++) { + test_ecdsa_openssl(); + } +} +#endif + +#ifdef ENABLE_MODULE_ECDH +# include "modules/ecdh/tests_impl.h" +#endif + +#ifdef ENABLE_MODULE_SCHNORR +# include "modules/schnorr/tests_impl.h" +#endif + +#ifdef ENABLE_MODULE_RECOVERY +# include "modules/recovery/tests_impl.h" +#endif + +int main(int argc, char **argv) { + unsigned char seed16[16] = {0}; + unsigned char run32[32] = {0}; + /* find iteration count */ + if (argc > 1) { + count = strtol(argv[1], NULL, 0); + } + + /* find random seed */ + if (argc > 2) { + int pos = 0; + const char* ch = argv[2]; + while (pos < 16 && ch[0] != 0 && ch[1] != 0) { + unsigned short sh; + if (sscanf(ch, "%2hx", &sh)) { + seed16[pos] = sh; + } else { + break; + } + ch += 2; + pos++; + } + } else { + FILE *frand = fopen("/dev/urandom", "r"); + if ((frand == NULL) || !fread(&seed16, sizeof(seed16), 1, frand)) { + uint64_t t = time(NULL) * (uint64_t)1337; + seed16[0] ^= t; + seed16[1] ^= t >> 8; + seed16[2] ^= t >> 16; + seed16[3] ^= t >> 24; + seed16[4] ^= t >> 32; + seed16[5] ^= t >> 40; + seed16[6] ^= t >> 48; + seed16[7] ^= t >> 56; + } + fclose(frand); + } + secp256k1_rand_seed(seed16); + + printf("test count = %i\n", count); + printf("random seed = %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n", seed16[0], seed16[1], seed16[2], seed16[3], seed16[4], seed16[5], seed16[6], seed16[7], seed16[8], seed16[9], seed16[10], seed16[11], seed16[12], seed16[13], seed16[14], seed16[15]); + + /* initialize */ + run_context_tests(); + ctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY); + + if (secp256k1_rand32() & 1) { + secp256k1_rand256(run32); + CHECK(secp256k1_context_randomize(ctx, (secp256k1_rand32() & 1) ? run32 : NULL)); + } + + run_sha256_tests(); + run_hmac_sha256_tests(); + run_rfc6979_hmac_sha256_tests(); + +#ifndef USE_NUM_NONE + /* num tests */ + run_num_smalltests(); +#endif + + /* scalar tests */ + run_scalar_tests(); + + /* field tests */ + run_field_inv(); + run_field_inv_var(); + run_field_inv_all_var(); + run_field_misc(); + run_field_convert(); + run_sqr(); + run_sqrt(); + + /* group tests */ + run_ge(); + + /* ecmult tests */ + run_wnaf(); + run_point_times_order(); + run_ecmult_chain(); + run_ecmult_constants(); + run_ecmult_gen_blind(); + run_ecmult_const_tests(); + run_ec_combine(); + + /* endomorphism tests */ +#ifdef USE_ENDOMORPHISM + run_endomorphism_tests(); +#endif + +#ifdef ENABLE_MODULE_ECDH + /* ecdh tests */ + run_ecdh_tests(); +#endif + + /* ecdsa tests */ + run_random_pubkeys(); + run_ecdsa_sign_verify(); + run_ecdsa_end_to_end(); + run_ecdsa_edge_cases(); +#ifdef ENABLE_OPENSSL_TESTS + run_ecdsa_openssl(); +#endif + +#ifdef ENABLE_MODULE_SCHNORR + /* Schnorr tests */ + run_schnorr_tests(); +#endif + +#ifdef ENABLE_MODULE_RECOVERY + /* ECDSA pubkey recovery tests */ + run_recovery_tests(); +#endif + + secp256k1_rand256(run32); + printf("random run = %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n", run32[0], run32[1], run32[2], run32[3], run32[4], run32[5], run32[6], run32[7], run32[8], run32[9], run32[10], run32[11], run32[12], run32[13], run32[14], run32[15]); + + /* shutdown */ + secp256k1_context_destroy(ctx); + + printf("no problems found\n"); + return 0; +} diff --git a/crypto/secp256k1/libsecp256k1/src/util.h b/crypto/secp256k1/libsecp256k1/src/util.h new file mode 100644 index 000000000..4eef4ded4 --- /dev/null +++ b/crypto/secp256k1/libsecp256k1/src/util.h @@ -0,0 +1,110 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_UTIL_H_ +#define _SECP256K1_UTIL_H_ + +#if defined HAVE_CONFIG_H +#include "libsecp256k1-config.h" +#endif + +#include +#include +#include + +typedef struct { + void (*fn)(const char *text, void* data); + const void* data; +} secp256k1_callback; + +static SECP256K1_INLINE void secp256k1_callback_call(const secp256k1_callback * const cb, const char * const text) { + cb->fn(text, (void*)cb->data); +} + +#ifdef DETERMINISTIC +#define TEST_FAILURE(msg) do { \ + fprintf(stderr, "%s\n", msg); \ + abort(); \ +} while(0); +#else +#define TEST_FAILURE(msg) do { \ + fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, msg); \ + abort(); \ +} while(0) +#endif + +#ifdef HAVE_BUILTIN_EXPECT +#define EXPECT(x,c) __builtin_expect((x),(c)) +#else +#define EXPECT(x,c) (x) +#endif + +#ifdef DETERMINISTIC +#define CHECK(cond) do { \ + if (EXPECT(!(cond), 0)) { \ + TEST_FAILURE("test condition failed"); \ + } \ +} while(0) +#else +#define CHECK(cond) do { \ + if (EXPECT(!(cond), 0)) { \ + TEST_FAILURE("test condition failed: " #cond); \ + } \ +} while(0) +#endif + +/* Like assert(), but when VERIFY is defined, and side-effect safe. */ +#ifdef VERIFY +#define VERIFY_CHECK CHECK +#define VERIFY_SETUP(stmt) do { stmt; } while(0) +#else +#define VERIFY_CHECK(cond) do { (void)(cond); } while(0) +#define VERIFY_SETUP(stmt) +#endif + +static SECP256K1_INLINE void *checked_malloc(const secp256k1_callback* cb, size_t size) { + void *ret = malloc(size); + if (ret == NULL) { + secp256k1_callback_call(cb, "Out of memory"); + } + return ret; +} + +/* Macro for restrict, when available and not in a VERIFY build. */ +#if defined(SECP256K1_BUILD) && defined(VERIFY) +# define SECP256K1_RESTRICT +#else +# if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) ) +# if SECP256K1_GNUC_PREREQ(3,0) +# define SECP256K1_RESTRICT __restrict__ +# elif (defined(_MSC_VER) && _MSC_VER >= 1400) +# define SECP256K1_RESTRICT __restrict +# else +# define SECP256K1_RESTRICT +# endif +# else +# define SECP256K1_RESTRICT restrict +# endif +#endif + +#if defined(_WIN32) +# define I64FORMAT "I64d" +# define I64uFORMAT "I64u" +#else +# define I64FORMAT "lld" +# define I64uFORMAT "llu" +#endif + +#if defined(HAVE___INT128) +# if defined(__GNUC__) +# define SECP256K1_GNUC_EXT __extension__ +# else +# define SECP256K1_GNUC_EXT +# endif +SECP256K1_GNUC_EXT typedef unsigned __int128 uint128_t; +#endif + +#endif diff --git a/crypto/secp256k1/secp256k1/.travis.yml b/crypto/secp256k1/secp256k1/.travis.yml deleted file mode 100644 index 40f8dae23..000000000 --- a/crypto/secp256k1/secp256k1/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -language: c -compiler: - - clang - - gcc -install: - - sudo apt-get install -qq libssl-dev - - if [ "$BIGNUM" = "gmp" -o "$BIGNUM" = "auto" ]; then sudo apt-get install --no-install-recommends --no-upgrade -qq libgmp-dev; fi - - if [ -n "$EXTRAPACKAGES" ]; then sudo apt-get update && sudo apt-get install --no-install-recommends --no-upgrade $EXTRAPACKAGES; fi -env: - global: - - FIELD=auto BIGNUM=auto SCALAR=auto ENDOMORPHISM=no ASM=no BUILD=check EXTRAFLAGS= HOST= EXTRAPACKAGES= - matrix: - - SCALAR=32bit - - SCALAR=64bit - - FIELD=64bit - - FIELD=64bit ENDOMORPHISM=yes - - FIELD=64bit ASM=x86_64 - - FIELD=64bit ENDOMORPHISM=yes ASM=x86_64 - - FIELD=32bit - - FIELD=32bit ENDOMORPHISM=yes - - BIGNUM=no - - BIGNUM=no ENDOMORPHISM=yes - - BUILD=distcheck - - EXTRAFLAGS=CFLAGS=-DDETERMINISTIC - - HOST=i686-linux-gnu EXTRAPACKAGES="gcc-multilib" - - HOST=i686-linux-gnu EXTRAPACKAGES="gcc-multilib" ENDOMORPHISM=yes -before_script: ./autogen.sh -script: - - if [ -n "$HOST" ]; then export USE_HOST="--host=$HOST"; fi - - if [ "x$HOST" = "xi686-linux-gnu" ]; then export CC="$CC -m32"; fi - - ./configure --enable-endomorphism=$ENDOMORPHISM --with-field=$FIELD --with-bignum=$BIGNUM --with-scalar=$SCALAR $EXTRAFLAGS $USE_HOST && make -j2 $BUILD -os: linux diff --git a/crypto/secp256k1/secp256k1/COPYING b/crypto/secp256k1/secp256k1/COPYING deleted file mode 100644 index 4522a5990..000000000 --- a/crypto/secp256k1/secp256k1/COPYING +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2013 Pieter Wuille - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/crypto/secp256k1/secp256k1/Makefile.am b/crypto/secp256k1/secp256k1/Makefile.am deleted file mode 100644 index cc15338b7..000000000 --- a/crypto/secp256k1/secp256k1/Makefile.am +++ /dev/null @@ -1,77 +0,0 @@ -ACLOCAL_AMFLAGS = -I build-aux/m4 - -lib_LTLIBRARIES = libsecp256k1.la -include_HEADERS = include/secp256k1.h -noinst_HEADERS = -noinst_HEADERS += src/scalar.h -noinst_HEADERS += src/scalar_4x64.h -noinst_HEADERS += src/scalar_8x32.h -noinst_HEADERS += src/scalar_impl.h -noinst_HEADERS += src/scalar_4x64_impl.h -noinst_HEADERS += src/scalar_8x32_impl.h -noinst_HEADERS += src/group.h -noinst_HEADERS += src/group_impl.h -noinst_HEADERS += src/num_gmp.h -noinst_HEADERS += src/num_gmp_impl.h -noinst_HEADERS += src/ecdsa.h -noinst_HEADERS += src/ecdsa_impl.h -noinst_HEADERS += src/eckey.h -noinst_HEADERS += src/eckey_impl.h -noinst_HEADERS += src/ecmult.h -noinst_HEADERS += src/ecmult_impl.h -noinst_HEADERS += src/ecmult_gen.h -noinst_HEADERS += src/ecmult_gen_impl.h -noinst_HEADERS += src/num.h -noinst_HEADERS += src/num_impl.h -noinst_HEADERS += src/field_10x26.h -noinst_HEADERS += src/field_10x26_impl.h -noinst_HEADERS += src/field_5x52.h -noinst_HEADERS += src/field_5x52_impl.h -noinst_HEADERS += src/field_5x52_int128_impl.h -noinst_HEADERS += src/field_5x52_asm_impl.h -noinst_HEADERS += src/java/org_bitcoin_NativeSecp256k1.h -noinst_HEADERS += src/util.h -noinst_HEADERS += src/testrand.h -noinst_HEADERS += src/testrand_impl.h -noinst_HEADERS += src/hash.h -noinst_HEADERS += src/hash_impl.h -noinst_HEADERS += src/field.h -noinst_HEADERS += src/field_impl.h -noinst_HEADERS += src/bench.h - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libsecp256k1.pc - -libsecp256k1_la_SOURCES = src/secp256k1.c -libsecp256k1_la_CPPFLAGS = -I$(top_srcdir)/include $(SECP_INCLUDES) -libsecp256k1_la_LIBADD = $(SECP_LIBS) - - -noinst_PROGRAMS = -if USE_BENCHMARK -noinst_PROGRAMS += bench_verify bench_recover bench_sign bench_internal -bench_verify_SOURCES = src/bench_verify.c -bench_verify_LDADD = libsecp256k1.la $(SECP_LIBS) -bench_verify_LDFLAGS = -static -bench_recover_SOURCES = src/bench_recover.c -bench_recover_LDADD = libsecp256k1.la $(SECP_LIBS) -bench_recover_LDFLAGS = -static -bench_sign_SOURCES = src/bench_sign.c -bench_sign_LDADD = libsecp256k1.la $(SECP_LIBS) -bench_sign_LDFLAGS = -static -bench_internal_SOURCES = src/bench_internal.c -bench_internal_LDADD = $(SECP_LIBS) -bench_internal_LDFLAGS = -static -bench_internal_CPPFLAGS = $(SECP_INCLUDES) -endif - -if USE_TESTS -noinst_PROGRAMS += tests -tests_SOURCES = src/tests.c -tests_CPPFLAGS = -DVERIFY $(SECP_INCLUDES) $(SECP_TEST_INCLUDES) -tests_LDADD = $(SECP_LIBS) $(SECP_TEST_LIBS) -tests_LDFLAGS = -static -TESTS = tests -endif - -EXTRA_DIST = autogen.sh diff --git a/crypto/secp256k1/secp256k1/README.md b/crypto/secp256k1/secp256k1/README.md deleted file mode 100644 index 6095db422..000000000 --- a/crypto/secp256k1/secp256k1/README.md +++ /dev/null @@ -1,61 +0,0 @@ -libsecp256k1 -============ - -[![Build Status](https://travis-ci.org/bitcoin/secp256k1.svg?branch=master)](https://travis-ci.org/bitcoin/secp256k1) - -Optimized C library for EC operations on curve secp256k1. - -This library is a work in progress and is being used to research best practices. Use at your own risk. - -Features: -* secp256k1 ECDSA signing/verification and key generation. -* Adding/multiplying private/public keys. -* Serialization/parsing of private keys, public keys, signatures. -* Constant time, constant memory access signing and pubkey generation. -* Derandomized DSA (via RFC6979 or with a caller provided function.) -* Very efficient implementation. - -Implementation details ----------------------- - -* General - * No runtime heap allocation. - * Extensive testing infrastructure. - * Structured to facilitate review and analysis. - * Intended to be portable to any system with a C89 compiler and uint64_t support. - * Expose only higher level interfaces to minimize the API surface and improve application security. ("Be difficult to use insecurely.") -* Field operations - * Optimized implementation of arithmetic modulo the curve's field size (2^256 - 0x1000003D1). - * Using 5 52-bit limbs (including hand-optimized assembly for x86_64, by Diederik Huys). - * Using 10 26-bit limbs. - * Field inverses and square roots using a sliding window over blocks of 1s (by Peter Dettman). -* Scalar operations - * Optimized implementation without data-dependent branches of arithmetic modulo the curve's order. - * Using 4 64-bit limbs (relying on __int128 support in the compiler). - * Using 8 32-bit limbs. -* Group operations - * Point addition formula specifically simplified for the curve equation (y^2 = x^3 + 7). - * Use addition between points in Jacobian and affine coordinates where possible. - * Use a unified addition/doubling formula where necessary to avoid data-dependent branches. - * Point/x comparison without a field inversion by comparison in the Jacobian coordinate space. -* Point multiplication for verification (a*P + b*G). - * Use wNAF notation for point multiplicands. - * Use a much larger window for multiples of G, using precomputed multiples. - * Use Shamir's trick to do the multiplication with the public key and the generator simultaneously. - * Optionally (off by default) use secp256k1's efficiently-computable endomorphism to split the P multiplicand into 2 half-sized ones. -* Point multiplication for signing - * Use a precomputed table of multiples of powers of 16 multiplied with the generator, so general multiplication becomes a series of additions. - * Access the table with branch-free conditional moves so memory access is uniform. - * No data-dependent branches - * The precomputed tables add and eventually subtract points for which no known scalar (private key) is known, preventing even an attacker with control over the private key used to control the data internally. - -Build steps ------------ - -libsecp256k1 is built using autotools: - - $ ./autogen.sh - $ ./configure - $ make - $ ./tests - $ sudo make install # optional diff --git a/crypto/secp256k1/secp256k1/TODO b/crypto/secp256k1/secp256k1/TODO deleted file mode 100644 index a300e1c5e..000000000 --- a/crypto/secp256k1/secp256k1/TODO +++ /dev/null @@ -1,3 +0,0 @@ -* Unit tests for fieldelem/groupelem, including ones intended to - trigger fieldelem's boundary cases. -* Complete constant-time operations for signing/keygen diff --git a/crypto/secp256k1/secp256k1/autogen.sh b/crypto/secp256k1/secp256k1/autogen.sh deleted file mode 100755 index 65286b935..000000000 --- a/crypto/secp256k1/secp256k1/autogen.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -set -e -autoreconf -if --warnings=all diff --git a/crypto/secp256k1/secp256k1/build-aux/m4/bitcoin_secp.m4 b/crypto/secp256k1/secp256k1/build-aux/m4/bitcoin_secp.m4 deleted file mode 100644 index 4a398d6c9..000000000 --- a/crypto/secp256k1/secp256k1/build-aux/m4/bitcoin_secp.m4 +++ /dev/null @@ -1,61 +0,0 @@ -dnl libsecp25k1 helper checks -AC_DEFUN([SECP_INT128_CHECK],[ -has_int128=$ac_cv_type___int128 -]) - -dnl -AC_DEFUN([SECP_64BIT_ASM_CHECK],[ -AC_MSG_CHECKING(for x86_64 assembly availability) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include ]],[[ - uint64_t a = 11, tmp; - __asm__ __volatile__("movq $0x100000000,%1; mulq %%rsi" : "+a"(a) : "S"(tmp) : "cc", "%rdx"); - ]])],[has_64bit_asm=yes],[has_64bit_asm=no]) -AC_MSG_RESULT([$has_64bit_asm]) -]) - -dnl -AC_DEFUN([SECP_OPENSSL_CHECK],[ -if test x"$use_pkgconfig" = x"yes"; then - : #NOP - m4_ifdef([PKG_CHECK_MODULES],[ - PKG_CHECK_MODULES([CRYPTO], [libcrypto], [has_libcrypto=yes],[has_libcrypto=no]) - if test x"$has_libcrypto" = x"yes"; then - TEMP_LIBS="$LIBS" - LIBS="$LIBS $CRYPTO_LIBS" - AC_CHECK_LIB(crypto, main,[AC_DEFINE(HAVE_LIBCRYPTO,1,[Define this symbol if libcrypto is installed])],[has_libcrypto=no]) - LIBS="$TEMP_LIBS" - fi - ]) -else - AC_CHECK_HEADER(openssl/crypto.h,[AC_CHECK_LIB(crypto, main,[has_libcrypto=yes; CRYPTO_LIBS=-lcrypto; AC_DEFINE(HAVE_LIBCRYPTO,1,[Define this symbol if libcrypto is installed])] -)]) - LIBS= -fi -if test x"$has_libcrypto" = x"yes" && test x"$has_openssl_ec" = x; then - AC_MSG_CHECKING(for EC functions in libcrypto) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - #include ]],[[ - EC_KEY *eckey = EC_KEY_new_by_curve_name(NID_secp256k1); - ECDSA_sign(0, NULL, 0, NULL, NULL, eckey); - ECDSA_verify(0, NULL, 0, NULL, 0, eckey); - EC_KEY_free(eckey); - ]])],[has_openssl_ec=yes],[has_openssl_ec=no]) - AC_MSG_RESULT([$has_openssl_ec]) -fi -]) - -dnl -AC_DEFUN([SECP_GMP_CHECK],[ -if test x"$has_gmp" != x"yes"; then - CPPFLAGS_TEMP="$CPPFLAGS" - CPPFLAGS="$GMP_CPPFLAGS $CPPFLAGS" - LIBS_TEMP="$LIBS" - LIBS="$GMP_LIBS $LIBS" - AC_CHECK_HEADER(gmp.h,[AC_CHECK_LIB(gmp, __gmpz_init,[has_gmp=yes; GMP_LIBS="$GMP_LIBS -lgmp"; AC_DEFINE(HAVE_LIBGMP,1,[Define this symbol if libgmp is installed])])]) - CPPFLAGS="$CPPFLAGS_TEMP" - LIBS="$LIBS_TEMP" -fi -]) diff --git a/crypto/secp256k1/secp256k1/configure.ac b/crypto/secp256k1/secp256k1/configure.ac deleted file mode 100644 index 3dc182951..000000000 --- a/crypto/secp256k1/secp256k1/configure.ac +++ /dev/null @@ -1,330 +0,0 @@ -AC_PREREQ([2.60]) -AC_INIT([libsecp256k1],[0.1]) -AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_MACRO_DIR([build-aux/m4]) -AC_CANONICAL_HOST -AH_TOP([#ifndef LIBSECP256K1_CONFIG_H]) -AH_TOP([#define LIBSECP256K1_CONFIG_H]) -AH_BOTTOM([#endif /*LIBSECP256K1_CONFIG_H*/]) -AM_INIT_AUTOMAKE([foreign subdir-objects]) -LT_INIT - -dnl make the compilation flags quiet unless V=1 is used -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) - -PKG_PROG_PKG_CONFIG - -AC_PATH_TOOL(AR, ar) -AC_PATH_TOOL(RANLIB, ranlib) -AC_PATH_TOOL(STRIP, strip) - -if test "x$CFLAGS" = "x"; then - CFLAGS="-O3 -g" -fi - -AC_PROG_CC_C89 -if test x"$ac_cv_prog_cc_c89" = x"no"; then - AC_MSG_ERROR([c89 compiler support required]) -fi - -case $host in - *mingw*) - use_pkgconfig=no - ;; - *) - use_pkgconfig=yes - ;; -esac - -case $host_os in - *darwin*) - if test x$cross_compiling != xyes; then - AC_PATH_PROG([BREW],brew,) - if test x$BREW != x; then - dnl These Homebrew packages may be keg-only, meaning that they won't be found - dnl in expected paths because they may conflict with system files. Ask - dnl Homebrew where each one is located, then adjust paths accordingly. - - openssl_prefix=`$BREW --prefix openssl 2>/dev/null` - gmp_prefix=`$BREW --prefix gmp 2>/dev/null` - if test x$openssl_prefix != x; then - PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH" - export PKG_CONFIG_PATH - fi - if test x$gmp_prefix != x; then - GMP_CPPFLAGS="-I$gmp_prefix/include" - GMP_LIBS="-L$gmp_prefix/lib" - fi - else - AC_PATH_PROG([PORT],port,) - dnl if homebrew isn't installed and macports is, add the macports default paths - dnl as a last resort. - if test x$PORT != x; then - CPPFLAGS="$CPPFLAGS -isystem /opt/local/include" - LDFLAGS="$LDFLAGS -L/opt/local/lib" - fi - fi - fi - ;; -esac - -CFLAGS="$CFLAGS -W" - -warn_CFLAGS="-std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-unused-function -Wno-long-long -Wno-overlength-strings" -saved_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS $warn_CFLAGS" -AC_MSG_CHECKING([if ${CC} supports ${warn_CFLAGS}]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])], - [ AC_MSG_RESULT([yes]) ], - [ AC_MSG_RESULT([no]) - CFLAGS="$saved_CFLAGS" - ]) - - -AC_ARG_ENABLE(benchmark, - AS_HELP_STRING([--enable-benchmark],[compile benchmark (default is no)]), - [use_benchmark=$enableval], - [use_benchmark=no]) - -AC_ARG_ENABLE(tests, - AS_HELP_STRING([--enable-tests],[compile tests (default is yes)]), - [use_tests=$enableval], - [use_tests=yes]) - -AC_ARG_ENABLE(endomorphism, - AS_HELP_STRING([--enable-endomorphism],[enable endomorphism (default is no)]), - [use_endomorphism=$enableval], - [use_endomorphism=no]) - -AC_ARG_WITH([field], [AS_HELP_STRING([--with-field=64bit|32bit|auto], -[Specify Field Implementation. Default is auto])],[req_field=$withval], [req_field=auto]) - -AC_ARG_WITH([bignum], [AS_HELP_STRING([--with-bignum=gmp|no|auto], -[Specify Bignum Implementation. Default is auto])],[req_bignum=$withval], [req_bignum=auto]) - -AC_ARG_WITH([scalar], [AS_HELP_STRING([--with-scalar=64bit|32bit|auto], -[Specify scalar implementation. Default is auto])],[req_scalar=$withval], [req_scalar=auto]) - -AC_ARG_WITH([asm], [AS_HELP_STRING([--with-asm=x86_64|no|auto] -[Specify assembly optimizations to use. Default is auto])],[req_asm=$withval], [req_asm=auto]) - -AC_CHECK_TYPES([__int128]) - -AC_MSG_CHECKING([for __builtin_expect]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([[void myfunc() {__builtin_expect(0,0);}]])], - [ AC_MSG_RESULT([yes]);AC_DEFINE(HAVE_BUILTIN_EXPECT,1,[Define this symbol if __builtin_expect is available]) ], - [ AC_MSG_RESULT([no]) - ]) - -if test x"$req_asm" = x"auto"; then - SECP_64BIT_ASM_CHECK - if test x"$has_64bit_asm" = x"yes"; then - set_asm=x86_64 - fi - if test x"$set_asm" = x; then - set_asm=no - fi -else - set_asm=$req_asm - case $set_asm in - x86_64) - SECP_64BIT_ASM_CHECK - if test x"$has_64bit_asm" != x"yes"; then - AC_MSG_ERROR([x86_64 assembly optimization requested but not available]) - fi - ;; - no) - ;; - *) - AC_MSG_ERROR([invalid assembly optimization selection]) - ;; - esac -fi - -if test x"$req_field" = x"auto"; then - if test x"set_asm" = x"x86_64"; then - set_field=64bit - fi - if test x"$set_field" = x; then - SECP_INT128_CHECK - if test x"$has_int128" = x"yes"; then - set_field=64bit - fi - fi - if test x"$set_field" = x; then - set_field=32bit - fi -else - set_field=$req_field - case $set_field in - 64bit) - if test x"$set_asm" != x"x86_64"; then - SECP_INT128_CHECK - if test x"$has_int128" != x"yes"; then - AC_MSG_ERROR([64bit field explicitly requested but neither __int128 support or x86_64 assembly available]) - fi - fi - ;; - 32bit) - ;; - *) - AC_MSG_ERROR([invalid field implementation selection]) - ;; - esac -fi - -if test x"$req_scalar" = x"auto"; then - SECP_INT128_CHECK - if test x"$has_int128" = x"yes"; then - set_scalar=64bit - fi - if test x"$set_scalar" = x; then - set_scalar=32bit - fi -else - set_scalar=$req_scalar - case $set_scalar in - 64bit) - SECP_INT128_CHECK - if test x"$has_int128" != x"yes"; then - AC_MSG_ERROR([64bit scalar explicitly requested but __int128 support not available]) - fi - ;; - 32bit) - ;; - *) - AC_MSG_ERROR([invalid scalar implementation selected]) - ;; - esac -fi - -if test x"$req_bignum" = x"auto"; then - SECP_GMP_CHECK - if test x"$has_gmp" = x"yes"; then - set_bignum=gmp - fi - - if test x"$set_bignum" = x; then - set_bignum=no - fi -else - set_bignum=$req_bignum - case $set_bignum in - gmp) - SECP_GMP_CHECK - if test x"$has_gmp" != x"yes"; then - AC_MSG_ERROR([gmp bignum explicitly requested but libgmp not available]) - fi - ;; - no) - ;; - *) - AC_MSG_ERROR([invalid bignum implementation selection]) - ;; - esac -fi - -# select assembly optimization -case $set_asm in -x86_64) - AC_DEFINE(USE_ASM_X86_64, 1, [Define this symbol to enable x86_64 assembly optimizations]) - ;; -no) - ;; -*) - AC_MSG_ERROR([invalid assembly optimizations]) - ;; -esac - -# select field implementation -case $set_field in -64bit) - AC_DEFINE(USE_FIELD_5X52, 1, [Define this symbol to use the FIELD_5X52 implementation]) - ;; -32bit) - AC_DEFINE(USE_FIELD_10X26, 1, [Define this symbol to use the FIELD_10X26 implementation]) - ;; -*) - AC_MSG_ERROR([invalid field implementation]) - ;; -esac - -# select bignum implementation -case $set_bignum in -gmp) - AC_DEFINE(HAVE_LIBGMP, 1, [Define this symbol if libgmp is installed]) - AC_DEFINE(USE_NUM_GMP, 1, [Define this symbol to use the gmp implementation for num]) - AC_DEFINE(USE_FIELD_INV_NUM, 1, [Define this symbol to use the num-based field inverse implementation]) - AC_DEFINE(USE_SCALAR_INV_NUM, 1, [Define this symbol to use the num-based scalar inverse implementation]) - ;; -no) - AC_DEFINE(USE_NUM_NONE, 1, [Define this symbol to use no num implementation]) - AC_DEFINE(USE_FIELD_INV_BUILTIN, 1, [Define this symbol to use the native field inverse implementation]) - AC_DEFINE(USE_SCALAR_INV_BUILTIN, 1, [Define this symbol to use the native scalar inverse implementation]) - ;; -*) - AC_MSG_ERROR([invalid bignum implementation]) - ;; -esac - -#select scalar implementation -case $set_scalar in -64bit) - AC_DEFINE(USE_SCALAR_4X64, 1, [Define this symbol to use the 4x64 scalar implementation]) - ;; -32bit) - AC_DEFINE(USE_SCALAR_8X32, 1, [Define this symbol to use the 8x32 scalar implementation]) - ;; -*) - AC_MSG_ERROR([invalid scalar implementation]) - ;; -esac - -if test x"$use_tests" = x"yes"; then - SECP_OPENSSL_CHECK - if test x"$has_openssl_ec" = x"yes"; then - AC_DEFINE(ENABLE_OPENSSL_TESTS, 1, [Define this symbol if OpenSSL EC functions are available]) - SECP_TEST_INCLUDES="$SSL_CFLAGS $CRYPTO_CFLAGS" - SECP_TEST_LIBS="$CRYPTO_LIBS" - - case $host in - *mingw*) - SECP_TEST_LIBS="$SECP_TEST_LIBS -lgdi32" - ;; - esac - - fi -fi - -if test x"$set_bignum" = x"gmp"; then - SECP_LIBS="$SECP_LIBS $GMP_LIBS" - SECP_INCLUDES="$SECP_INCLUDES $GMP_CPPFLAGS" -fi - -if test x"$use_endomorphism" = x"yes"; then - AC_DEFINE(USE_ENDOMORPHISM, 1, [Define this symbol to use endomorphism optimization]) -fi - -AC_C_BIGENDIAN() - -AC_MSG_NOTICE([Using assembly optimizations: $set_asm]) -AC_MSG_NOTICE([Using field implementation: $set_field]) -AC_MSG_NOTICE([Using bignum implementation: $set_bignum]) -AC_MSG_NOTICE([Using scalar implementation: $set_scalar]) -AC_MSG_NOTICE([Using endomorphism optimizations: $use_endomorphism]) - -AC_CONFIG_HEADERS([src/libsecp256k1-config.h]) -AC_CONFIG_FILES([Makefile libsecp256k1.pc]) -AC_SUBST(SECP_INCLUDES) -AC_SUBST(SECP_LIBS) -AC_SUBST(SECP_TEST_LIBS) -AC_SUBST(SECP_TEST_INCLUDES) -AM_CONDITIONAL([USE_TESTS], [test x"$use_tests" != x"no"]) -AM_CONDITIONAL([USE_BENCHMARK], [test x"$use_benchmark" = x"yes"]) - -dnl make sure nothing new is exported so that we don't break the cache -PKGCONFIG_PATH_TEMP="$PKG_CONFIG_PATH" -unset PKG_CONFIG_PATH -PKG_CONFIG_PATH="$PKGCONFIG_PATH_TEMP" - -AC_OUTPUT diff --git a/crypto/secp256k1/secp256k1/include/secp256k1.h b/crypto/secp256k1/secp256k1/include/secp256k1.h deleted file mode 100644 index a6e39d13d..000000000 --- a/crypto/secp256k1/secp256k1/include/secp256k1.h +++ /dev/null @@ -1,295 +0,0 @@ -#ifndef _SECP256K1_ -# define _SECP256K1_ - -# ifdef __cplusplus -extern "C" { -# endif - -# if !defined(SECP256K1_GNUC_PREREQ) -# if defined(__GNUC__)&&defined(__GNUC_MINOR__) -# define SECP256K1_GNUC_PREREQ(_maj,_min) \ - ((__GNUC__<<16)+__GNUC_MINOR__>=((_maj)<<16)+(_min)) -# else -# define SECP256K1_GNUC_PREREQ(_maj,_min) 0 -# endif -# endif - -# if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) ) -# if SECP256K1_GNUC_PREREQ(2,7) -# define SECP256K1_INLINE __inline__ -# elif (defined(_MSC_VER)) -# define SECP256K1_INLINE __inline -# else -# define SECP256K1_INLINE -# endif -# else -# define SECP256K1_INLINE inline -# endif - -/**Warning attributes - * NONNULL is not used if SECP256K1_BUILD is set to avoid the compiler optimizing out - * some paranoid null checks. */ -# if defined(__GNUC__) && SECP256K1_GNUC_PREREQ(3, 4) -# define SECP256K1_WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__)) -# else -# define SECP256K1_WARN_UNUSED_RESULT -# endif -# if !defined(SECP256K1_BUILD) && defined(__GNUC__) && SECP256K1_GNUC_PREREQ(3, 4) -# define SECP256K1_ARG_NONNULL(_x) __attribute__ ((__nonnull__(_x))) -# else -# define SECP256K1_ARG_NONNULL(_x) -# endif - - -/** Flags to pass to secp256k1_start. */ -# define SECP256K1_START_VERIFY (1 << 0) -# define SECP256K1_START_SIGN (1 << 1) - -/** Initialize the library. This may take some time (10-100 ms). - * You need to call this before calling any other function. - * It cannot run in parallel with any other functions, but once - * secp256k1_start() returns, all other functions are thread-safe. - */ -void secp256k1_start(unsigned int flags); - -/** Free all memory associated with this library. After this, no - * functions can be called anymore, except secp256k1_start() - */ -void secp256k1_stop(void); - -/** Verify an ECDSA signature. - * Returns: 1: correct signature - * 0: incorrect signature - * -1: invalid public key - * -2: invalid signature - * In: msg32: the 32-byte message hash being verified (cannot be NULL) - * sig: the signature being verified (cannot be NULL) - * siglen: the length of the signature - * pubkey: the public key to verify with (cannot be NULL) - * pubkeylen: the length of pubkey - * Requires starting using SECP256K1_START_VERIFY. - */ -SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdsa_verify( - const unsigned char *msg32, - const unsigned char *sig, - int siglen, - const unsigned char *pubkey, - int pubkeylen -) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(4); - -/** A pointer to a function to deterministically generate a nonce. - * Returns: 1 if a nonce was successfully generated. 0 will cause signing to fail. - * In: msg32: the 32-byte message hash being verified (will not be NULL) - * key32: pointer to a 32-byte secret key (will not be NULL) - * attempt: how many iterations we have tried to find a nonce. - * This will almost always be 0, but different attempt values - * are required to result in a different nonce. - * data: Arbitrary data pointer that is passed through. - * Out: nonce32: pointer to a 32-byte array to be filled by the function. - * Except for test cases, this function should compute some cryptographic hash of - * the message, the key and the attempt. - */ -typedef int (*secp256k1_nonce_function_t)( - unsigned char *nonce32, - const unsigned char *msg32, - const unsigned char *key32, - unsigned int attempt, - const void *data -); - -/** An implementation of RFC6979 (using HMAC-SHA256) as nonce generation function. - * If a data pointer is passed, it is assumed to be a pointer to 32 bytes of - * extra entropy. - */ -extern const secp256k1_nonce_function_t secp256k1_nonce_function_rfc6979; - -/** A default safe nonce generation function (currently equal to secp256k1_nonce_function_rfc6979). */ -extern const secp256k1_nonce_function_t secp256k1_nonce_function_default; - - -/** Create an ECDSA signature. - * Returns: 1: signature created - * 0: the nonce generation function failed, the private key was invalid, or there is not - * enough space in the signature (as indicated by siglen). - * In: msg32: the 32-byte message hash being signed (cannot be NULL) - * seckey: pointer to a 32-byte secret key (cannot be NULL) - * noncefp:pointer to a nonce generation function. If NULL, secp256k1_nonce_function_default is used - * ndata: pointer to arbitrary data used by the nonce generation function (can be NULL) - * Out: sig: pointer to an array where the signature will be placed (cannot be NULL) - * In/Out: siglen: pointer to an int with the length of sig, which will be updated - * to contain the actual signature length (<=72). If 0 is returned, this will be - * set to zero. - * Requires starting using SECP256K1_START_SIGN. - * - * The sig always has an s value in the lower half of the range (From 0x1 - * to 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, - * inclusive), unlike many other implementations. - * With ECDSA a third-party can can forge a second distinct signature - * of the same message given a single initial signature without knowing - * the key by setting s to its additive inverse mod-order, 'flipping' the - * sign of the random point R which is not included in the signature. - * Since the forgery is of the same message this isn't universally - * problematic, but in systems where message malleability or uniqueness - * of signatures is important this can cause issues. This forgery can be - * blocked by all verifiers forcing signers to use a canonical form. The - * lower-S form reduces the size of signatures slightly on average when - * variable length encodings (such as DER) are used and is cheap to - * verify, making it a good choice. Security of always using lower-S is - * assured because anyone can trivially modify a signature after the - * fact to enforce this property. Adjusting it inside the signing - * function avoids the need to re-serialize or have curve specific - * constants outside of the library. By always using a canonical form - * even in applications where it isn't needed it becomes possible to - * impose a requirement later if a need is discovered. - * No other forms of ECDSA malleability are known and none seem likely, - * but there is no formal proof that ECDSA, even with this additional - * restriction, is free of other malleability. Commonly used serialization - * schemes will also accept various non-unique encodings, so care should - * be taken when this property is required for an application. - */ -int secp256k1_ecdsa_sign( - const unsigned char *msg32, - unsigned char *sig, - int *siglen, - const unsigned char *seckey, - secp256k1_nonce_function_t noncefp, - const void *ndata -) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); - -/** Create a compact ECDSA signature (64 byte + recovery id). - * Returns: 1: signature created - * 0: the nonce generation function failed, or the secret key was invalid. - * In: msg32: the 32-byte message hash being signed (cannot be NULL) - * seckey: pointer to a 32-byte secret key (cannot be NULL) - * noncefp:pointer to a nonce generation function. If NULL, secp256k1_nonce_function_default is used - * ndata: pointer to arbitrary data used by the nonce generation function (can be NULL) - * Out: sig: pointer to a 64-byte array where the signature will be placed (cannot be NULL) - * In case 0 is returned, the returned signature length will be zero. - * recid: pointer to an int, which will be updated to contain the recovery id (can be NULL) - * Requires starting using SECP256K1_START_SIGN. - */ -int secp256k1_ecdsa_sign_compact( - const unsigned char *msg32, - unsigned char *sig64, - const unsigned char *seckey, - secp256k1_nonce_function_t noncefp, - const void *ndata, - int *recid -) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); - -/** Recover an ECDSA public key from a compact signature. - * Returns: 1: public key successfully recovered (which guarantees a correct signature). - * 0: otherwise. - * In: msg32: the 32-byte message hash assumed to be signed (cannot be NULL) - * sig64: signature as 64 byte array (cannot be NULL) - * compressed: whether to recover a compressed or uncompressed pubkey - * recid: the recovery id (0-3, as returned by ecdsa_sign_compact) - * Out: pubkey: pointer to a 33 or 65 byte array to put the pubkey (cannot be NULL) - * pubkeylen: pointer to an int that will contain the pubkey length (cannot be NULL) - * Requires starting using SECP256K1_START_VERIFY. - */ -SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdsa_recover_compact( - const unsigned char *msg32, - const unsigned char *sig64, - unsigned char *pubkey, - int *pubkeylen, - int compressed, - int recid -) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); - -/** Verify an ECDSA secret key. - * Returns: 1: secret key is valid - * 0: secret key is invalid - * In: seckey: pointer to a 32-byte secret key (cannot be NULL) - */ -SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_verify(const unsigned char *seckey) SECP256K1_ARG_NONNULL(1); - -/** Just validate a public key. - * Returns: 1: valid public key - * 0: invalid public key - * In: pubkey: pointer to a 33-byte or 65-byte public key (cannot be NULL). - * pubkeylen: length of pubkey - */ -SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_verify(const unsigned char *pubkey, int pubkeylen) SECP256K1_ARG_NONNULL(1); - -/** Compute the public key for a secret key. - * In: compressed: whether the computed public key should be compressed - * seckey: pointer to a 32-byte private key (cannot be NULL) - * Out: pubkey: pointer to a 33-byte (if compressed) or 65-byte (if uncompressed) - * area to store the public key (cannot be NULL) - * pubkeylen: pointer to int that will be updated to contains the pubkey's - * length (cannot be NULL) - * Returns: 1: secret was valid, public key stores - * 0: secret was invalid, try again. - * Requires starting using SECP256K1_START_SIGN. - */ -SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_create( - unsigned char *pubkey, - int *pubkeylen, - const unsigned char *seckey, - int compressed -) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); - -/** Decompress a public key. - * In/Out: pubkey: pointer to a 65-byte array to put the decompressed public key. - It must contain a 33-byte or 65-byte public key already (cannot be NULL) - * pubkeylen: pointer to the size of the public key pointed to by pubkey (cannot be NULL) - It will be updated to reflect the new size. - * Returns: 0 if the passed public key was invalid, 1 otherwise. If 1 is returned, the - pubkey is replaced with its decompressed version. - */ -SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_decompress( - unsigned char *pubkey, - int *pubkeylen -) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2); - -/** Export a private key in DER format. */ -SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_export( - const unsigned char *seckey, - unsigned char *privkey, - int *privkeylen, - int compressed -) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); - -/** Import a private key in DER format. */ -SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_import( - unsigned char *seckey, - const unsigned char *privkey, - int privkeylen -) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2); - -/** Tweak a private key by adding tweak to it. */ -SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_add( - unsigned char *seckey, - const unsigned char *tweak -) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2); - -/** Tweak a public key by adding tweak times the generator to it. - * Requires starting with SECP256K1_START_VERIFY. - */ -SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_add( - unsigned char *pubkey, - int pubkeylen, - const unsigned char *tweak -) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(3); - -/** Tweak a private key by multiplying it with tweak. */ -SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_mul( - unsigned char *seckey, - const unsigned char *tweak -) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2); - -/** Tweak a public key by multiplying it with tweak. - * Requires starting with SECP256K1_START_VERIFY. - */ -SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_mul( - unsigned char *pubkey, - int pubkeylen, - const unsigned char *tweak -) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(3); - -# ifdef __cplusplus -} -# endif - -#endif diff --git a/crypto/secp256k1/secp256k1/libsecp256k1.pc.in b/crypto/secp256k1/secp256k1/libsecp256k1.pc.in deleted file mode 100644 index 1c72dd000..000000000 --- a/crypto/secp256k1/secp256k1/libsecp256k1.pc.in +++ /dev/null @@ -1,13 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: libsecp256k1 -Description: Optimized C library for EC operations on curve secp256k1 -URL: https://github.com/bitcoin/secp256k1 -Version: @PACKAGE_VERSION@ -Cflags: -I${includedir} -Libs.private: @SECP_LIBS@ -Libs: -L${libdir} -lsecp256k1 - diff --git a/crypto/secp256k1/secp256k1/obj/.gitignore b/crypto/secp256k1/secp256k1/obj/.gitignore deleted file mode 100644 index e69de29bb..000000000 diff --git a/crypto/secp256k1/secp256k1/src/bench.h b/crypto/secp256k1/secp256k1/src/bench.h deleted file mode 100644 index 0559b3e85..000000000 --- a/crypto/secp256k1/secp256k1/src/bench.h +++ /dev/null @@ -1,56 +0,0 @@ -/********************************************************************** - * Copyright (c) 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_BENCH_H_ -#define _SECP256K1_BENCH_H_ - -#include -#include -#include "sys/time.h" - -static double gettimedouble(void) { - struct timeval tv; - gettimeofday(&tv, NULL); - return tv.tv_usec * 0.000001 + tv.tv_sec; -} - -void print_number(double x) { - double y = x; - int c = 0; - if (y < 0.0) y = -y; - while (y < 100.0) { - y *= 10.0; - c++; - } - printf("%.*f", c, x); -} - -void run_benchmark(char *name, void (*benchmark)(void*), void (*setup)(void*), void (*teardown)(void*), void* data, int count, int iter) { - int i; - double min = HUGE_VAL; - double sum = 0.0; - double max = 0.0; - for (i = 0; i < count; i++) { - double begin, total; - if (setup) setup(data); - begin = gettimedouble(); - benchmark(data); - total = gettimedouble() - begin; - if (teardown) teardown(data); - if (total < min) min = total; - if (total > max) max = total; - sum += total; - } - printf("%s: min ", name); - print_number(min * 1000000.0 / iter); - printf("us / avg "); - print_number((sum / count) * 1000000.0 / iter); - printf("us / avg "); - print_number(max * 1000000.0 / iter); - printf("us\n"); -} - -#endif diff --git a/crypto/secp256k1/secp256k1/src/bench_internal.c b/crypto/secp256k1/secp256k1/src/bench_internal.c deleted file mode 100644 index a960549b9..000000000 --- a/crypto/secp256k1/secp256k1/src/bench_internal.c +++ /dev/null @@ -1,318 +0,0 @@ -/********************************************************************** - * Copyright (c) 2014-2015 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ -#include - -#include "include/secp256k1.h" - -#include "util.h" -#include "hash_impl.h" -#include "num_impl.h" -#include "field_impl.h" -#include "group_impl.h" -#include "scalar_impl.h" -#include "ecmult_impl.h" -#include "bench.h" - -typedef struct { - secp256k1_scalar_t scalar_x, scalar_y; - secp256k1_fe_t fe_x, fe_y; - secp256k1_ge_t ge_x, ge_y; - secp256k1_gej_t gej_x, gej_y; - unsigned char data[32]; - int wnaf[256]; -} bench_inv_t; - -void bench_setup(void* arg) { - bench_inv_t *data = (bench_inv_t*)arg; - - static const unsigned char init_x[32] = { - 0x02, 0x03, 0x05, 0x07, 0x0b, 0x0d, 0x11, 0x13, - 0x17, 0x1d, 0x1f, 0x25, 0x29, 0x2b, 0x2f, 0x35, - 0x3b, 0x3d, 0x43, 0x47, 0x49, 0x4f, 0x53, 0x59, - 0x61, 0x65, 0x67, 0x6b, 0x6d, 0x71, 0x7f, 0x83 - }; - - static const unsigned char init_y[32] = { - 0x82, 0x83, 0x85, 0x87, 0x8b, 0x8d, 0x81, 0x83, - 0x97, 0xad, 0xaf, 0xb5, 0xb9, 0xbb, 0xbf, 0xc5, - 0xdb, 0xdd, 0xe3, 0xe7, 0xe9, 0xef, 0xf3, 0xf9, - 0x11, 0x15, 0x17, 0x1b, 0x1d, 0xb1, 0xbf, 0xd3 - }; - - secp256k1_scalar_set_b32(&data->scalar_x, init_x, NULL); - secp256k1_scalar_set_b32(&data->scalar_y, init_y, NULL); - secp256k1_fe_set_b32(&data->fe_x, init_x); - secp256k1_fe_set_b32(&data->fe_y, init_y); - CHECK(secp256k1_ge_set_xo_var(&data->ge_x, &data->fe_x, 0)); - CHECK(secp256k1_ge_set_xo_var(&data->ge_y, &data->fe_y, 1)); - secp256k1_gej_set_ge(&data->gej_x, &data->ge_x); - secp256k1_gej_set_ge(&data->gej_y, &data->ge_y); - memcpy(data->data, init_x, 32); -} - -void bench_scalar_add(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - - for (i = 0; i < 2000000; i++) { - secp256k1_scalar_add(&data->scalar_x, &data->scalar_x, &data->scalar_y); - } -} - -void bench_scalar_negate(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - - for (i = 0; i < 2000000; i++) { - secp256k1_scalar_negate(&data->scalar_x, &data->scalar_x); - } -} - -void bench_scalar_sqr(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - - for (i = 0; i < 200000; i++) { - secp256k1_scalar_sqr(&data->scalar_x, &data->scalar_x); - } -} - -void bench_scalar_mul(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - - for (i = 0; i < 200000; i++) { - secp256k1_scalar_mul(&data->scalar_x, &data->scalar_x, &data->scalar_y); - } -} - -#ifdef USE_ENDOMORPHISM -void bench_scalar_split(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - - for (i = 0; i < 20000; i++) { - secp256k1_scalar_t l, r; - secp256k1_scalar_split_lambda_var(&l, &r, &data->scalar_x); - secp256k1_scalar_add(&data->scalar_x, &data->scalar_x, &data->scalar_y); - } -} -#endif - -void bench_scalar_inverse(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - - for (i = 0; i < 2000; i++) { - secp256k1_scalar_inverse(&data->scalar_x, &data->scalar_x); - secp256k1_scalar_add(&data->scalar_x, &data->scalar_x, &data->scalar_y); - } -} - -void bench_scalar_inverse_var(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - - for (i = 0; i < 2000; i++) { - secp256k1_scalar_inverse_var(&data->scalar_x, &data->scalar_x); - secp256k1_scalar_add(&data->scalar_x, &data->scalar_x, &data->scalar_y); - } -} - -void bench_field_normalize(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - - for (i = 0; i < 2000000; i++) { - secp256k1_fe_normalize(&data->fe_x); - } -} - -void bench_field_normalize_weak(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - - for (i = 0; i < 2000000; i++) { - secp256k1_fe_normalize_weak(&data->fe_x); - } -} - -void bench_field_mul(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - - for (i = 0; i < 200000; i++) { - secp256k1_fe_mul(&data->fe_x, &data->fe_x, &data->fe_y); - } -} - -void bench_field_sqr(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - - for (i = 0; i < 200000; i++) { - secp256k1_fe_sqr(&data->fe_x, &data->fe_x); - } -} - -void bench_field_inverse(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - - for (i = 0; i < 20000; i++) { - secp256k1_fe_inv(&data->fe_x, &data->fe_x); - secp256k1_fe_add(&data->fe_x, &data->fe_y); - } -} - -void bench_field_inverse_var(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - - for (i = 0; i < 20000; i++) { - secp256k1_fe_inv_var(&data->fe_x, &data->fe_x); - secp256k1_fe_add(&data->fe_x, &data->fe_y); - } -} - -void bench_field_sqrt_var(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - - for (i = 0; i < 20000; i++) { - secp256k1_fe_sqrt_var(&data->fe_x, &data->fe_x); - secp256k1_fe_add(&data->fe_x, &data->fe_y); - } -} - -void bench_group_double_var(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - - for (i = 0; i < 200000; i++) { - secp256k1_gej_double_var(&data->gej_x, &data->gej_x); - } -} - -void bench_group_add_var(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - - for (i = 0; i < 200000; i++) { - secp256k1_gej_add_var(&data->gej_x, &data->gej_x, &data->gej_y); - } -} - -void bench_group_add_affine(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - - for (i = 0; i < 200000; i++) { - secp256k1_gej_add_ge(&data->gej_x, &data->gej_x, &data->ge_y); - } -} - -void bench_group_add_affine_var(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - - for (i = 0; i < 200000; i++) { - secp256k1_gej_add_ge_var(&data->gej_x, &data->gej_x, &data->ge_y); - } -} - -void bench_ecmult_wnaf(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - - for (i = 0; i < 20000; i++) { - secp256k1_ecmult_wnaf(data->wnaf, &data->scalar_x, WINDOW_A); - secp256k1_scalar_add(&data->scalar_x, &data->scalar_x, &data->scalar_y); - } -} - - -void bench_sha256(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - secp256k1_sha256_t sha; - - for (i = 0; i < 20000; i++) { - secp256k1_sha256_initialize(&sha); - secp256k1_sha256_write(&sha, data->data, 32); - secp256k1_sha256_finalize(&sha, data->data); - } -} - -void bench_hmac_sha256(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - secp256k1_hmac_sha256_t hmac; - - for (i = 0; i < 20000; i++) { - secp256k1_hmac_sha256_initialize(&hmac, data->data, 32); - secp256k1_hmac_sha256_write(&hmac, data->data, 32); - secp256k1_hmac_sha256_finalize(&hmac, data->data); - } -} - -void bench_rfc6979_hmac_sha256(void* arg) { - int i; - bench_inv_t *data = (bench_inv_t*)arg; - secp256k1_rfc6979_hmac_sha256_t rng; - - for (i = 0; i < 20000; i++) { - secp256k1_rfc6979_hmac_sha256_initialize(&rng, data->data, 32, data->data, 32, NULL, 0); - secp256k1_rfc6979_hmac_sha256_generate(&rng, data->data, 32); - } -} - - -int have_flag(int argc, char** argv, char *flag) { - char** argm = argv + argc; - argv++; - if (argv == argm) { - return 1; - } - while (argv != NULL && argv != argm) { - if (strcmp(*argv, flag) == 0) return 1; - argv++; - } - return 0; -} - -int main(int argc, char **argv) { - bench_inv_t data; - if (have_flag(argc, argv, "scalar") || have_flag(argc, argv, "add")) run_benchmark("scalar_add", bench_scalar_add, bench_setup, NULL, &data, 10, 2000000); - if (have_flag(argc, argv, "scalar") || have_flag(argc, argv, "negate")) run_benchmark("scalar_negate", bench_scalar_negate, bench_setup, NULL, &data, 10, 2000000); - if (have_flag(argc, argv, "scalar") || have_flag(argc, argv, "sqr")) run_benchmark("scalar_sqr", bench_scalar_sqr, bench_setup, NULL, &data, 10, 200000); - if (have_flag(argc, argv, "scalar") || have_flag(argc, argv, "mul")) run_benchmark("scalar_mul", bench_scalar_mul, bench_setup, NULL, &data, 10, 200000); -#ifdef USE_ENDOMORPHISM - if (have_flag(argc, argv, "scalar") || have_flag(argc, argv, "split")) run_benchmark("scalar_split", bench_scalar_split, bench_setup, NULL, &data, 10, 20000); -#endif - if (have_flag(argc, argv, "scalar") || have_flag(argc, argv, "inverse")) run_benchmark("scalar_inverse", bench_scalar_inverse, bench_setup, NULL, &data, 10, 2000); - if (have_flag(argc, argv, "scalar") || have_flag(argc, argv, "inverse")) run_benchmark("scalar_inverse_var", bench_scalar_inverse_var, bench_setup, NULL, &data, 10, 2000); - - if (have_flag(argc, argv, "field") || have_flag(argc, argv, "normalize")) run_benchmark("field_normalize", bench_field_normalize, bench_setup, NULL, &data, 10, 2000000); - if (have_flag(argc, argv, "field") || have_flag(argc, argv, "normalize")) run_benchmark("field_normalize_weak", bench_field_normalize_weak, bench_setup, NULL, &data, 10, 2000000); - if (have_flag(argc, argv, "field") || have_flag(argc, argv, "sqr")) run_benchmark("field_sqr", bench_field_sqr, bench_setup, NULL, &data, 10, 200000); - if (have_flag(argc, argv, "field") || have_flag(argc, argv, "mul")) run_benchmark("field_mul", bench_field_mul, bench_setup, NULL, &data, 10, 200000); - if (have_flag(argc, argv, "field") || have_flag(argc, argv, "inverse")) run_benchmark("field_inverse", bench_field_inverse, bench_setup, NULL, &data, 10, 20000); - if (have_flag(argc, argv, "field") || have_flag(argc, argv, "inverse")) run_benchmark("field_inverse_var", bench_field_inverse_var, bench_setup, NULL, &data, 10, 20000); - if (have_flag(argc, argv, "field") || have_flag(argc, argv, "sqrt")) run_benchmark("field_sqrt_var", bench_field_sqrt_var, bench_setup, NULL, &data, 10, 20000); - - if (have_flag(argc, argv, "group") || have_flag(argc, argv, "double")) run_benchmark("group_double_var", bench_group_double_var, bench_setup, NULL, &data, 10, 200000); - if (have_flag(argc, argv, "group") || have_flag(argc, argv, "add")) run_benchmark("group_add_var", bench_group_add_var, bench_setup, NULL, &data, 10, 200000); - if (have_flag(argc, argv, "group") || have_flag(argc, argv, "add")) run_benchmark("group_add_affine", bench_group_add_affine, bench_setup, NULL, &data, 10, 200000); - if (have_flag(argc, argv, "group") || have_flag(argc, argv, "add")) run_benchmark("group_add_affine_var", bench_group_add_affine_var, bench_setup, NULL, &data, 10, 200000); - - if (have_flag(argc, argv, "ecmult") || have_flag(argc, argv, "wnaf")) run_benchmark("ecmult_wnaf", bench_ecmult_wnaf, bench_setup, NULL, &data, 10, 20000); - - if (have_flag(argc, argv, "hash") || have_flag(argc, argv, "sha256")) run_benchmark("hash_sha256", bench_sha256, bench_setup, NULL, &data, 10, 20000); - if (have_flag(argc, argv, "hash") || have_flag(argc, argv, "hmac")) run_benchmark("hash_hmac_sha256", bench_hmac_sha256, bench_setup, NULL, &data, 10, 20000); - if (have_flag(argc, argv, "hash") || have_flag(argc, argv, "rng6979")) run_benchmark("hash_rfc6979_hmac_sha256", bench_rfc6979_hmac_sha256, bench_setup, NULL, &data, 10, 20000); - return 0; -} diff --git a/crypto/secp256k1/secp256k1/src/bench_recover.c b/crypto/secp256k1/secp256k1/src/bench_recover.c deleted file mode 100644 index 6991cc9d6..000000000 --- a/crypto/secp256k1/secp256k1/src/bench_recover.c +++ /dev/null @@ -1,49 +0,0 @@ -/********************************************************************** - * Copyright (c) 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#include "include/secp256k1.h" -#include "util.h" -#include "bench.h" - -typedef struct { - unsigned char msg[32]; - unsigned char sig[64]; -} bench_recover_t; - -void bench_recover(void* arg) { - int i; - bench_recover_t *data = (bench_recover_t*)arg; - unsigned char pubkey[33]; - - for (i = 0; i < 20000; i++) { - int j; - int pubkeylen = 33; - CHECK(secp256k1_ecdsa_recover_compact(data->msg, data->sig, pubkey, &pubkeylen, 1, i % 2)); - for (j = 0; j < 32; j++) { - data->sig[j + 32] = data->msg[j]; /* Move former message to S. */ - data->msg[j] = data->sig[j]; /* Move former R to message. */ - data->sig[j] = pubkey[j + 1]; /* Move recovered pubkey X coordinate to R (which must be a valid X coordinate). */ - } - } -} - -void bench_recover_setup(void* arg) { - int i; - bench_recover_t *data = (bench_recover_t*)arg; - - for (i = 0; i < 32; i++) data->msg[i] = 1 + i; - for (i = 0; i < 64; i++) data->sig[i] = 65 + i; -} - -int main(void) { - bench_recover_t data; - secp256k1_start(SECP256K1_START_VERIFY); - - run_benchmark("ecdsa_recover", bench_recover, bench_recover_setup, NULL, &data, 10, 20000); - - secp256k1_stop(); - return 0; -} diff --git a/crypto/secp256k1/secp256k1/src/bench_sign.c b/crypto/secp256k1/secp256k1/src/bench_sign.c deleted file mode 100644 index c5b6829a8..000000000 --- a/crypto/secp256k1/secp256k1/src/bench_sign.c +++ /dev/null @@ -1,48 +0,0 @@ -/********************************************************************** - * Copyright (c) 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#include "include/secp256k1.h" -#include "util.h" -#include "bench.h" - -typedef struct { - unsigned char msg[32]; - unsigned char key[32]; -} bench_sign_t; - -static void bench_sign_setup(void* arg) { - int i; - bench_sign_t *data = (bench_sign_t*)arg; - - for (i = 0; i < 32; i++) data->msg[i] = i + 1; - for (i = 0; i < 32; i++) data->key[i] = i + 65; -} - -static void bench_sign(void* arg) { - int i; - bench_sign_t *data = (bench_sign_t*)arg; - - unsigned char sig[64]; - for (i = 0; i < 20000; i++) { - int j; - int recid = 0; - CHECK(secp256k1_ecdsa_sign_compact(data->msg, sig, data->key, NULL, NULL, &recid)); - for (j = 0; j < 32; j++) { - data->msg[j] = sig[j]; /* Move former R to message. */ - data->key[j] = sig[j + 32]; /* Move former S to key. */ - } - } -} - -int main(void) { - bench_sign_t data; - secp256k1_start(SECP256K1_START_SIGN); - - run_benchmark("ecdsa_sign", bench_sign, bench_sign_setup, NULL, &data, 10, 20000); - - secp256k1_stop(); - return 0; -} diff --git a/crypto/secp256k1/secp256k1/src/bench_verify.c b/crypto/secp256k1/secp256k1/src/bench_verify.c deleted file mode 100644 index c279305a0..000000000 --- a/crypto/secp256k1/secp256k1/src/bench_verify.c +++ /dev/null @@ -1,55 +0,0 @@ -/********************************************************************** - * Copyright (c) 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#include -#include - -#include "include/secp256k1.h" -#include "util.h" -#include "bench.h" - -typedef struct { - unsigned char msg[32]; - unsigned char key[32]; - unsigned char sig[72]; - int siglen; - unsigned char pubkey[33]; - int pubkeylen; -} benchmark_verify_t; - -static void benchmark_verify(void* arg) { - int i; - benchmark_verify_t* data = (benchmark_verify_t*)arg; - - for (i = 0; i < 20000; i++) { - data->sig[data->siglen - 1] ^= (i & 0xFF); - data->sig[data->siglen - 2] ^= ((i >> 8) & 0xFF); - data->sig[data->siglen - 3] ^= ((i >> 16) & 0xFF); - CHECK(secp256k1_ecdsa_verify(data->msg, data->sig, data->siglen, data->pubkey, data->pubkeylen) == (i == 0)); - data->sig[data->siglen - 1] ^= (i & 0xFF); - data->sig[data->siglen - 2] ^= ((i >> 8) & 0xFF); - data->sig[data->siglen - 3] ^= ((i >> 16) & 0xFF); - } -} - -int main(void) { - int i; - benchmark_verify_t data; - - secp256k1_start(SECP256K1_START_VERIFY | SECP256K1_START_SIGN); - - for (i = 0; i < 32; i++) data.msg[i] = 1 + i; - for (i = 0; i < 32; i++) data.key[i] = 33 + i; - data.siglen = 72; - secp256k1_ecdsa_sign(data.msg, data.sig, &data.siglen, data.key, NULL, NULL); - data.pubkeylen = 33; - CHECK(secp256k1_ec_pubkey_create(data.pubkey, &data.pubkeylen, data.key, 1)); - - run_benchmark("ecdsa_verify", benchmark_verify, NULL, NULL, &data, 10, 20000); - - secp256k1_stop(); - return 0; -} diff --git a/crypto/secp256k1/secp256k1/src/ecdsa.h b/crypto/secp256k1/secp256k1/src/ecdsa.h deleted file mode 100644 index c195e7afc..000000000 --- a/crypto/secp256k1/secp256k1/src/ecdsa.h +++ /dev/null @@ -1,23 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_ECDSA_ -#define _SECP256K1_ECDSA_ - -#include "scalar.h" -#include "group.h" - -typedef struct { - secp256k1_scalar_t r, s; -} secp256k1_ecdsa_sig_t; - -static int secp256k1_ecdsa_sig_parse(secp256k1_ecdsa_sig_t *r, const unsigned char *sig, int size); -static int secp256k1_ecdsa_sig_serialize(unsigned char *sig, int *size, const secp256k1_ecdsa_sig_t *a); -static int secp256k1_ecdsa_sig_verify(const secp256k1_ecdsa_sig_t *sig, const secp256k1_ge_t *pubkey, const secp256k1_scalar_t *message); -static int secp256k1_ecdsa_sig_sign(secp256k1_ecdsa_sig_t *sig, const secp256k1_scalar_t *seckey, const secp256k1_scalar_t *message, const secp256k1_scalar_t *nonce, int *recid); -static int secp256k1_ecdsa_sig_recover(const secp256k1_ecdsa_sig_t *sig, secp256k1_ge_t *pubkey, const secp256k1_scalar_t *message, int recid); - -#endif diff --git a/crypto/secp256k1/secp256k1/src/ecdsa_impl.h b/crypto/secp256k1/secp256k1/src/ecdsa_impl.h deleted file mode 100644 index 17514047b..000000000 --- a/crypto/secp256k1/secp256k1/src/ecdsa_impl.h +++ /dev/null @@ -1,263 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - - -#ifndef _SECP256K1_ECDSA_IMPL_H_ -#define _SECP256K1_ECDSA_IMPL_H_ - -#include "scalar.h" -#include "field.h" -#include "group.h" -#include "ecmult.h" -#include "ecmult_gen.h" -#include "ecdsa.h" - -/** Group order for secp256k1 defined as 'n' in "Standards for Efficient Cryptography" (SEC2) 2.7.1 - * sage: for t in xrange(1023, -1, -1): - * .. p = 2**256 - 2**32 - t - * .. if p.is_prime(): - * .. print '%x'%p - * .. break - * 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f' - * sage: a = 0 - * sage: b = 7 - * sage: F = FiniteField (p) - * sage: '%x' % (EllipticCurve ([F (a), F (b)]).order()) - * 'fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141' - */ -static const secp256k1_fe_t secp256k1_ecdsa_const_order_as_fe = SECP256K1_FE_CONST( - 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFEUL, - 0xBAAEDCE6UL, 0xAF48A03BUL, 0xBFD25E8CUL, 0xD0364141UL -); - -/** Difference between field and order, values 'p' and 'n' values defined in - * "Standards for Efficient Cryptography" (SEC2) 2.7.1. - * sage: p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F - * sage: a = 0 - * sage: b = 7 - * sage: F = FiniteField (p) - * sage: '%x' % (p - EllipticCurve ([F (a), F (b)]).order()) - * '14551231950b75fc4402da1722fc9baee' - */ -static const secp256k1_fe_t secp256k1_ecdsa_const_p_minus_order = SECP256K1_FE_CONST( - 0, 0, 0, 1, 0x45512319UL, 0x50B75FC4UL, 0x402DA172UL, 0x2FC9BAEEUL -); - -static int secp256k1_ecdsa_sig_parse(secp256k1_ecdsa_sig_t *r, const unsigned char *sig, int size) { - unsigned char ra[32] = {0}, sa[32] = {0}; - const unsigned char *rp; - const unsigned char *sp; - int lenr; - int lens; - int overflow; - if (sig[0] != 0x30) { - return 0; - } - lenr = sig[3]; - if (5+lenr >= size) { - return 0; - } - lens = sig[lenr+5]; - if (sig[1] != lenr+lens+4) { - return 0; - } - if (lenr+lens+6 > size) { - return 0; - } - if (sig[2] != 0x02) { - return 0; - } - if (lenr == 0) { - return 0; - } - if (sig[lenr+4] != 0x02) { - return 0; - } - if (lens == 0) { - return 0; - } - sp = sig + 6 + lenr; - while (lens > 0 && sp[0] == 0) { - lens--; - sp++; - } - if (lens > 32) { - return 0; - } - rp = sig + 4; - while (lenr > 0 && rp[0] == 0) { - lenr--; - rp++; - } - if (lenr > 32) { - return 0; - } - memcpy(ra + 32 - lenr, rp, lenr); - memcpy(sa + 32 - lens, sp, lens); - overflow = 0; - secp256k1_scalar_set_b32(&r->r, ra, &overflow); - if (overflow) { - return 0; - } - secp256k1_scalar_set_b32(&r->s, sa, &overflow); - if (overflow) { - return 0; - } - return 1; -} - -static int secp256k1_ecdsa_sig_serialize(unsigned char *sig, int *size, const secp256k1_ecdsa_sig_t *a) { - unsigned char r[33] = {0}, s[33] = {0}; - unsigned char *rp = r, *sp = s; - int lenR = 33, lenS = 33; - secp256k1_scalar_get_b32(&r[1], &a->r); - secp256k1_scalar_get_b32(&s[1], &a->s); - while (lenR > 1 && rp[0] == 0 && rp[1] < 0x80) { lenR--; rp++; } - while (lenS > 1 && sp[0] == 0 && sp[1] < 0x80) { lenS--; sp++; } - if (*size < 6+lenS+lenR) { - return 0; - } - *size = 6 + lenS + lenR; - sig[0] = 0x30; - sig[1] = 4 + lenS + lenR; - sig[2] = 0x02; - sig[3] = lenR; - memcpy(sig+4, rp, lenR); - sig[4+lenR] = 0x02; - sig[5+lenR] = lenS; - memcpy(sig+lenR+6, sp, lenS); - return 1; -} - -static int secp256k1_ecdsa_sig_verify(const secp256k1_ecdsa_sig_t *sig, const secp256k1_ge_t *pubkey, const secp256k1_scalar_t *message) { - unsigned char c[32]; - secp256k1_scalar_t sn, u1, u2; - secp256k1_fe_t xr; - secp256k1_gej_t pubkeyj; - secp256k1_gej_t pr; - - if (secp256k1_scalar_is_zero(&sig->r) || secp256k1_scalar_is_zero(&sig->s)) { - return 0; - } - - secp256k1_scalar_inverse_var(&sn, &sig->s); - secp256k1_scalar_mul(&u1, &sn, message); - secp256k1_scalar_mul(&u2, &sn, &sig->r); - secp256k1_gej_set_ge(&pubkeyj, pubkey); - secp256k1_ecmult(&pr, &pubkeyj, &u2, &u1); - if (secp256k1_gej_is_infinity(&pr)) { - return 0; - } - secp256k1_scalar_get_b32(c, &sig->r); - secp256k1_fe_set_b32(&xr, c); - - /** We now have the recomputed R point in pr, and its claimed x coordinate (modulo n) - * in xr. Naively, we would extract the x coordinate from pr (requiring a inversion modulo p), - * compute the remainder modulo n, and compare it to xr. However: - * - * xr == X(pr) mod n - * <=> exists h. (xr + h * n < p && xr + h * n == X(pr)) - * [Since 2 * n > p, h can only be 0 or 1] - * <=> (xr == X(pr)) || (xr + n < p && xr + n == X(pr)) - * [In Jacobian coordinates, X(pr) is pr.x / pr.z^2 mod p] - * <=> (xr == pr.x / pr.z^2 mod p) || (xr + n < p && xr + n == pr.x / pr.z^2 mod p) - * [Multiplying both sides of the equations by pr.z^2 mod p] - * <=> (xr * pr.z^2 mod p == pr.x) || (xr + n < p && (xr + n) * pr.z^2 mod p == pr.x) - * - * Thus, we can avoid the inversion, but we have to check both cases separately. - * secp256k1_gej_eq_x implements the (xr * pr.z^2 mod p == pr.x) test. - */ - if (secp256k1_gej_eq_x_var(&xr, &pr)) { - /* xr.x == xr * xr.z^2 mod p, so the signature is valid. */ - return 1; - } - if (secp256k1_fe_cmp_var(&xr, &secp256k1_ecdsa_const_p_minus_order) >= 0) { - /* xr + p >= n, so we can skip testing the second case. */ - return 0; - } - secp256k1_fe_add(&xr, &secp256k1_ecdsa_const_order_as_fe); - if (secp256k1_gej_eq_x_var(&xr, &pr)) { - /* (xr + n) * pr.z^2 mod p == pr.x, so the signature is valid. */ - return 1; - } - return 0; -} - -static int secp256k1_ecdsa_sig_recover(const secp256k1_ecdsa_sig_t *sig, secp256k1_ge_t *pubkey, const secp256k1_scalar_t *message, int recid) { - unsigned char brx[32]; - secp256k1_fe_t fx; - secp256k1_ge_t x; - secp256k1_gej_t xj; - secp256k1_scalar_t rn, u1, u2; - secp256k1_gej_t qj; - - if (secp256k1_scalar_is_zero(&sig->r) || secp256k1_scalar_is_zero(&sig->s)) { - return 0; - } - - secp256k1_scalar_get_b32(brx, &sig->r); - VERIFY_CHECK(secp256k1_fe_set_b32(&fx, brx)); /* brx comes from a scalar, so is less than the order; certainly less than p */ - if (recid & 2) { - if (secp256k1_fe_cmp_var(&fx, &secp256k1_ecdsa_const_p_minus_order) >= 0) { - return 0; - } - secp256k1_fe_add(&fx, &secp256k1_ecdsa_const_order_as_fe); - } - if (!secp256k1_ge_set_xo_var(&x, &fx, recid & 1)) { - return 0; - } - secp256k1_gej_set_ge(&xj, &x); - secp256k1_scalar_inverse_var(&rn, &sig->r); - secp256k1_scalar_mul(&u1, &rn, message); - secp256k1_scalar_negate(&u1, &u1); - secp256k1_scalar_mul(&u2, &rn, &sig->s); - secp256k1_ecmult(&qj, &xj, &u2, &u1); - secp256k1_ge_set_gej_var(pubkey, &qj); - return !secp256k1_gej_is_infinity(&qj); -} - -static int secp256k1_ecdsa_sig_sign(secp256k1_ecdsa_sig_t *sig, const secp256k1_scalar_t *seckey, const secp256k1_scalar_t *message, const secp256k1_scalar_t *nonce, int *recid) { - unsigned char b[32]; - secp256k1_gej_t rp; - secp256k1_ge_t r; - secp256k1_scalar_t n; - int overflow = 0; - - secp256k1_ecmult_gen(&rp, nonce); - secp256k1_ge_set_gej(&r, &rp); - secp256k1_fe_normalize(&r.x); - secp256k1_fe_normalize(&r.y); - secp256k1_fe_get_b32(b, &r.x); - secp256k1_scalar_set_b32(&sig->r, b, &overflow); - if (secp256k1_scalar_is_zero(&sig->r)) { - /* P.x = order is on the curve, so technically sig->r could end up zero, which would be an invalid signature. */ - secp256k1_gej_clear(&rp); - secp256k1_ge_clear(&r); - return 0; - } - if (recid) { - *recid = (overflow ? 2 : 0) | (secp256k1_fe_is_odd(&r.y) ? 1 : 0); - } - secp256k1_scalar_mul(&n, &sig->r, seckey); - secp256k1_scalar_add(&n, &n, message); - secp256k1_scalar_inverse(&sig->s, nonce); - secp256k1_scalar_mul(&sig->s, &sig->s, &n); - secp256k1_scalar_clear(&n); - secp256k1_gej_clear(&rp); - secp256k1_ge_clear(&r); - if (secp256k1_scalar_is_zero(&sig->s)) { - return 0; - } - if (secp256k1_scalar_is_high(&sig->s)) { - secp256k1_scalar_negate(&sig->s, &sig->s); - if (recid) { - *recid ^= 1; - } - } - return 1; -} - -#endif diff --git a/crypto/secp256k1/secp256k1/src/eckey.h b/crypto/secp256k1/secp256k1/src/eckey.h deleted file mode 100644 index 6de5dc0a5..000000000 --- a/crypto/secp256k1/secp256k1/src/eckey.h +++ /dev/null @@ -1,24 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_ECKEY_ -#define _SECP256K1_ECKEY_ - -#include "group.h" -#include "scalar.h" - -static int secp256k1_eckey_pubkey_parse(secp256k1_ge_t *elem, const unsigned char *pub, int size); -static int secp256k1_eckey_pubkey_serialize(secp256k1_ge_t *elem, unsigned char *pub, int *size, int compressed); - -static int secp256k1_eckey_privkey_parse(secp256k1_scalar_t *key, const unsigned char *privkey, int privkeylen); -static int secp256k1_eckey_privkey_serialize(unsigned char *privkey, int *privkeylen, const secp256k1_scalar_t *key, int compressed); - -static int secp256k1_eckey_privkey_tweak_add(secp256k1_scalar_t *key, const secp256k1_scalar_t *tweak); -static int secp256k1_eckey_pubkey_tweak_add(secp256k1_ge_t *key, const secp256k1_scalar_t *tweak); -static int secp256k1_eckey_privkey_tweak_mul(secp256k1_scalar_t *key, const secp256k1_scalar_t *tweak); -static int secp256k1_eckey_pubkey_tweak_mul(secp256k1_ge_t *key, const secp256k1_scalar_t *tweak); - -#endif diff --git a/crypto/secp256k1/secp256k1/src/eckey_impl.h b/crypto/secp256k1/secp256k1/src/eckey_impl.h deleted file mode 100644 index 4382ff5f3..000000000 --- a/crypto/secp256k1/secp256k1/src/eckey_impl.h +++ /dev/null @@ -1,202 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_ECKEY_IMPL_H_ -#define _SECP256K1_ECKEY_IMPL_H_ - -#include "eckey.h" - -#include "scalar.h" -#include "field.h" -#include "group.h" -#include "ecmult_gen.h" - -static int secp256k1_eckey_pubkey_parse(secp256k1_ge_t *elem, const unsigned char *pub, int size) { - if (size == 33 && (pub[0] == 0x02 || pub[0] == 0x03)) { - secp256k1_fe_t x; - return secp256k1_fe_set_b32(&x, pub+1) && secp256k1_ge_set_xo_var(elem, &x, pub[0] == 0x03); - } else if (size == 65 && (pub[0] == 0x04 || pub[0] == 0x06 || pub[0] == 0x07)) { - secp256k1_fe_t x, y; - if (!secp256k1_fe_set_b32(&x, pub+1) || !secp256k1_fe_set_b32(&y, pub+33)) { - return 0; - } - secp256k1_ge_set_xy(elem, &x, &y); - if ((pub[0] == 0x06 || pub[0] == 0x07) && secp256k1_fe_is_odd(&y) != (pub[0] == 0x07)) { - return 0; - } - return secp256k1_ge_is_valid_var(elem); - } else { - return 0; - } -} - -static int secp256k1_eckey_pubkey_serialize(secp256k1_ge_t *elem, unsigned char *pub, int *size, int compressed) { - if (secp256k1_ge_is_infinity(elem)) { - return 0; - } - secp256k1_fe_normalize_var(&elem->x); - secp256k1_fe_normalize_var(&elem->y); - secp256k1_fe_get_b32(&pub[1], &elem->x); - if (compressed) { - *size = 33; - pub[0] = 0x02 | (secp256k1_fe_is_odd(&elem->y) ? 0x01 : 0x00); - } else { - *size = 65; - pub[0] = 0x04; - secp256k1_fe_get_b32(&pub[33], &elem->y); - } - return 1; -} - -static int secp256k1_eckey_privkey_parse(secp256k1_scalar_t *key, const unsigned char *privkey, int privkeylen) { - unsigned char c[32] = {0}; - const unsigned char *end = privkey + privkeylen; - int lenb = 0; - int len = 0; - int overflow = 0; - /* sequence header */ - if (end < privkey+1 || *privkey != 0x30) { - return 0; - } - privkey++; - /* sequence length constructor */ - if (end < privkey+1 || !(*privkey & 0x80)) { - return 0; - } - lenb = *privkey & ~0x80; privkey++; - if (lenb < 1 || lenb > 2) { - return 0; - } - if (end < privkey+lenb) { - return 0; - } - /* sequence length */ - len = privkey[lenb-1] | (lenb > 1 ? privkey[lenb-2] << 8 : 0); - privkey += lenb; - if (end < privkey+len) { - return 0; - } - /* sequence element 0: version number (=1) */ - if (end < privkey+3 || privkey[0] != 0x02 || privkey[1] != 0x01 || privkey[2] != 0x01) { - return 0; - } - privkey += 3; - /* sequence element 1: octet string, up to 32 bytes */ - if (end < privkey+2 || privkey[0] != 0x04 || privkey[1] > 0x20 || end < privkey+2+privkey[1]) { - return 0; - } - memcpy(c + 32 - privkey[1], privkey + 2, privkey[1]); - secp256k1_scalar_set_b32(key, c, &overflow); - memset(c, 0, 32); - return !overflow; -} - -static int secp256k1_eckey_privkey_serialize(unsigned char *privkey, int *privkeylen, const secp256k1_scalar_t *key, int compressed) { - secp256k1_gej_t rp; - secp256k1_ge_t r; - int pubkeylen = 0; - secp256k1_ecmult_gen(&rp, key); - secp256k1_ge_set_gej(&r, &rp); - if (compressed) { - static const unsigned char begin[] = { - 0x30,0x81,0xD3,0x02,0x01,0x01,0x04,0x20 - }; - static const unsigned char middle[] = { - 0xA0,0x81,0x85,0x30,0x81,0x82,0x02,0x01,0x01,0x30,0x2C,0x06,0x07,0x2A,0x86,0x48, - 0xCE,0x3D,0x01,0x01,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFE,0xFF,0xFF,0xFC,0x2F,0x30,0x06,0x04,0x01,0x00,0x04,0x01,0x07,0x04, - 0x21,0x02,0x79,0xBE,0x66,0x7E,0xF9,0xDC,0xBB,0xAC,0x55,0xA0,0x62,0x95,0xCE,0x87, - 0x0B,0x07,0x02,0x9B,0xFC,0xDB,0x2D,0xCE,0x28,0xD9,0x59,0xF2,0x81,0x5B,0x16,0xF8, - 0x17,0x98,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFE,0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,0xBF,0xD2,0x5E, - 0x8C,0xD0,0x36,0x41,0x41,0x02,0x01,0x01,0xA1,0x24,0x03,0x22,0x00 - }; - unsigned char *ptr = privkey; - memcpy(ptr, begin, sizeof(begin)); ptr += sizeof(begin); - secp256k1_scalar_get_b32(ptr, key); ptr += 32; - memcpy(ptr, middle, sizeof(middle)); ptr += sizeof(middle); - if (!secp256k1_eckey_pubkey_serialize(&r, ptr, &pubkeylen, 1)) { - return 0; - } - ptr += pubkeylen; - *privkeylen = ptr - privkey; - } else { - static const unsigned char begin[] = { - 0x30,0x82,0x01,0x13,0x02,0x01,0x01,0x04,0x20 - }; - static const unsigned char middle[] = { - 0xA0,0x81,0xA5,0x30,0x81,0xA2,0x02,0x01,0x01,0x30,0x2C,0x06,0x07,0x2A,0x86,0x48, - 0xCE,0x3D,0x01,0x01,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFE,0xFF,0xFF,0xFC,0x2F,0x30,0x06,0x04,0x01,0x00,0x04,0x01,0x07,0x04, - 0x41,0x04,0x79,0xBE,0x66,0x7E,0xF9,0xDC,0xBB,0xAC,0x55,0xA0,0x62,0x95,0xCE,0x87, - 0x0B,0x07,0x02,0x9B,0xFC,0xDB,0x2D,0xCE,0x28,0xD9,0x59,0xF2,0x81,0x5B,0x16,0xF8, - 0x17,0x98,0x48,0x3A,0xDA,0x77,0x26,0xA3,0xC4,0x65,0x5D,0xA4,0xFB,0xFC,0x0E,0x11, - 0x08,0xA8,0xFD,0x17,0xB4,0x48,0xA6,0x85,0x54,0x19,0x9C,0x47,0xD0,0x8F,0xFB,0x10, - 0xD4,0xB8,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFE,0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,0xBF,0xD2,0x5E, - 0x8C,0xD0,0x36,0x41,0x41,0x02,0x01,0x01,0xA1,0x44,0x03,0x42,0x00 - }; - unsigned char *ptr = privkey; - memcpy(ptr, begin, sizeof(begin)); ptr += sizeof(begin); - secp256k1_scalar_get_b32(ptr, key); ptr += 32; - memcpy(ptr, middle, sizeof(middle)); ptr += sizeof(middle); - if (!secp256k1_eckey_pubkey_serialize(&r, ptr, &pubkeylen, 0)) { - return 0; - } - ptr += pubkeylen; - *privkeylen = ptr - privkey; - } - return 1; -} - -static int secp256k1_eckey_privkey_tweak_add(secp256k1_scalar_t *key, const secp256k1_scalar_t *tweak) { - secp256k1_scalar_add(key, key, tweak); - if (secp256k1_scalar_is_zero(key)) { - return 0; - } - return 1; -} - -static int secp256k1_eckey_pubkey_tweak_add(secp256k1_ge_t *key, const secp256k1_scalar_t *tweak) { - secp256k1_gej_t pt; - secp256k1_scalar_t one; - secp256k1_gej_set_ge(&pt, key); - secp256k1_scalar_set_int(&one, 1); - secp256k1_ecmult(&pt, &pt, &one, tweak); - - if (secp256k1_gej_is_infinity(&pt)) { - return 0; - } - secp256k1_ge_set_gej(key, &pt); - return 1; -} - -static int secp256k1_eckey_privkey_tweak_mul(secp256k1_scalar_t *key, const secp256k1_scalar_t *tweak) { - if (secp256k1_scalar_is_zero(tweak)) { - return 0; - } - - secp256k1_scalar_mul(key, key, tweak); - return 1; -} - -static int secp256k1_eckey_pubkey_tweak_mul(secp256k1_ge_t *key, const secp256k1_scalar_t *tweak) { - secp256k1_scalar_t zero; - secp256k1_gej_t pt; - if (secp256k1_scalar_is_zero(tweak)) { - return 0; - } - - secp256k1_scalar_set_int(&zero, 0); - secp256k1_gej_set_ge(&pt, key); - secp256k1_ecmult(&pt, &pt, tweak, &zero); - secp256k1_ge_set_gej(key, &pt); - return 1; -} - -#endif diff --git a/crypto/secp256k1/secp256k1/src/ecmult.h b/crypto/secp256k1/secp256k1/src/ecmult.h deleted file mode 100644 index 15a7100a4..000000000 --- a/crypto/secp256k1/secp256k1/src/ecmult.h +++ /dev/null @@ -1,19 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_ECMULT_ -#define _SECP256K1_ECMULT_ - -#include "num.h" -#include "group.h" - -static void secp256k1_ecmult_start(void); -static void secp256k1_ecmult_stop(void); - -/** Double multiply: R = na*A + ng*G */ -static void secp256k1_ecmult(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_scalar_t *na, const secp256k1_scalar_t *ng); - -#endif diff --git a/crypto/secp256k1/secp256k1/src/ecmult_gen.h b/crypto/secp256k1/secp256k1/src/ecmult_gen.h deleted file mode 100644 index 42f822f9c..000000000 --- a/crypto/secp256k1/secp256k1/src/ecmult_gen.h +++ /dev/null @@ -1,19 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_ECMULT_GEN_ -#define _SECP256K1_ECMULT_GEN_ - -#include "scalar.h" -#include "group.h" - -static void secp256k1_ecmult_gen_start(void); -static void secp256k1_ecmult_gen_stop(void); - -/** Multiply with the generator: R = a*G */ -static void secp256k1_ecmult_gen(secp256k1_gej_t *r, const secp256k1_scalar_t *a); - -#endif diff --git a/crypto/secp256k1/secp256k1/src/ecmult_gen_impl.h b/crypto/secp256k1/secp256k1/src/ecmult_gen_impl.h deleted file mode 100644 index 3146a93b5..000000000 --- a/crypto/secp256k1/secp256k1/src/ecmult_gen_impl.h +++ /dev/null @@ -1,128 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_ECMULT_GEN_IMPL_H_ -#define _SECP256K1_ECMULT_GEN_IMPL_H_ - -#include "scalar.h" -#include "group.h" -#include "ecmult_gen.h" - -typedef struct { - /* For accelerating the computation of a*G: - * To harden against timing attacks, use the following mechanism: - * * Break up the multiplicand into groups of 4 bits, called n_0, n_1, n_2, ..., n_63. - * * Compute sum(n_i * 16^i * G + U_i, i=0..63), where: - * * U_i = U * 2^i (for i=0..62) - * * U_i = U * (1-2^63) (for i=63) - * where U is a point with no known corresponding scalar. Note that sum(U_i, i=0..63) = 0. - * For each i, and each of the 16 possible values of n_i, (n_i * 16^i * G + U_i) is - * precomputed (call it prec(i, n_i)). The formula now becomes sum(prec(i, n_i), i=0..63). - * None of the resulting prec group elements have a known scalar, and neither do any of - * the intermediate sums while computing a*G. - */ - secp256k1_ge_storage_t prec[64][16]; /* prec[j][i] = 16^j * i * G + U_i */ -} secp256k1_ecmult_gen_consts_t; - -static const secp256k1_ecmult_gen_consts_t *secp256k1_ecmult_gen_consts = NULL; - -static void secp256k1_ecmult_gen_start(void) { - secp256k1_ge_t prec[1024]; - secp256k1_gej_t gj; - secp256k1_gej_t nums_gej; - secp256k1_ecmult_gen_consts_t *ret; - int i, j; - if (secp256k1_ecmult_gen_consts != NULL) { - return; - } - - /* Allocate the precomputation table. */ - ret = (secp256k1_ecmult_gen_consts_t*)checked_malloc(sizeof(secp256k1_ecmult_gen_consts_t)); - - /* get the generator */ - secp256k1_gej_set_ge(&gj, &secp256k1_ge_const_g); - - /* Construct a group element with no known corresponding scalar (nothing up my sleeve). */ - { - static const unsigned char nums_b32[33] = "The scalar for this x is unknown"; - secp256k1_fe_t nums_x; - secp256k1_ge_t nums_ge; - VERIFY_CHECK(secp256k1_fe_set_b32(&nums_x, nums_b32)); - VERIFY_CHECK(secp256k1_ge_set_xo_var(&nums_ge, &nums_x, 0)); - secp256k1_gej_set_ge(&nums_gej, &nums_ge); - /* Add G to make the bits in x uniformly distributed. */ - secp256k1_gej_add_ge_var(&nums_gej, &nums_gej, &secp256k1_ge_const_g); - } - - /* compute prec. */ - { - secp256k1_gej_t precj[1024]; /* Jacobian versions of prec. */ - secp256k1_gej_t gbase; - secp256k1_gej_t numsbase; - gbase = gj; /* 16^j * G */ - numsbase = nums_gej; /* 2^j * nums. */ - for (j = 0; j < 64; j++) { - /* Set precj[j*16 .. j*16+15] to (numsbase, numsbase + gbase, ..., numsbase + 15*gbase). */ - precj[j*16] = numsbase; - for (i = 1; i < 16; i++) { - secp256k1_gej_add_var(&precj[j*16 + i], &precj[j*16 + i - 1], &gbase); - } - /* Multiply gbase by 16. */ - for (i = 0; i < 4; i++) { - secp256k1_gej_double_var(&gbase, &gbase); - } - /* Multiply numbase by 2. */ - secp256k1_gej_double_var(&numsbase, &numsbase); - if (j == 62) { - /* In the last iteration, numsbase is (1 - 2^j) * nums instead. */ - secp256k1_gej_neg(&numsbase, &numsbase); - secp256k1_gej_add_var(&numsbase, &numsbase, &nums_gej); - } - } - secp256k1_ge_set_all_gej_var(1024, prec, precj); - } - for (j = 0; j < 64; j++) { - for (i = 0; i < 16; i++) { - secp256k1_ge_to_storage(&ret->prec[j][i], &prec[j*16 + i]); - } - } - - /* Set the global pointer to the precomputation table. */ - secp256k1_ecmult_gen_consts = ret; -} - -static void secp256k1_ecmult_gen_stop(void) { - secp256k1_ecmult_gen_consts_t *c; - if (secp256k1_ecmult_gen_consts == NULL) { - return; - } - - c = (secp256k1_ecmult_gen_consts_t*)secp256k1_ecmult_gen_consts; - secp256k1_ecmult_gen_consts = NULL; - free(c); -} - -static void secp256k1_ecmult_gen(secp256k1_gej_t *r, const secp256k1_scalar_t *gn) { - const secp256k1_ecmult_gen_consts_t *c = secp256k1_ecmult_gen_consts; - secp256k1_ge_t add; - secp256k1_ge_storage_t adds; - int bits; - int i, j; - secp256k1_gej_set_infinity(r); - add.infinity = 0; - for (j = 0; j < 64; j++) { - bits = secp256k1_scalar_get_bits(gn, j * 4, 4); - for (i = 0; i < 16; i++) { - secp256k1_ge_storage_cmov(&adds, &c->prec[j][i], i == bits); - } - secp256k1_ge_from_storage(&add, &adds); - secp256k1_gej_add_ge(r, r, &add); - } - bits = 0; - secp256k1_ge_clear(&add); -} - -#endif diff --git a/crypto/secp256k1/secp256k1/src/ecmult_impl.h b/crypto/secp256k1/secp256k1/src/ecmult_impl.h deleted file mode 100644 index f6f0c4294..000000000 --- a/crypto/secp256k1/secp256k1/src/ecmult_impl.h +++ /dev/null @@ -1,302 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_ECMULT_IMPL_H_ -#define _SECP256K1_ECMULT_IMPL_H_ - -#include "group.h" -#include "scalar.h" -#include "ecmult.h" - -/* optimal for 128-bit and 256-bit exponents. */ -#define WINDOW_A 5 - -/** larger numbers may result in slightly better performance, at the cost of - exponentially larger precomputed tables. */ -#ifdef USE_ENDOMORPHISM -/** Two tables for window size 15: 1.375 MiB. */ -#define WINDOW_G 15 -#else -/** One table for window size 16: 1.375 MiB. */ -#define WINDOW_G 16 -#endif - -/** Fill a table 'pre' with precomputed odd multiples of a. W determines the size of the table. - * pre will contains the values [1*a,3*a,5*a,...,(2^(w-1)-1)*a], so it needs place for - * 2^(w-2) entries. - * - * There are two versions of this function: - * - secp256k1_ecmult_precomp_wnaf_gej, which operates on group elements in jacobian notation, - * fast to precompute, but slower to use in later additions. - * - secp256k1_ecmult_precomp_wnaf_ge, which operates on group elements in affine notations, - * (much) slower to precompute, but a bit faster to use in later additions. - * To compute a*P + b*G, we use the jacobian version for P, and the affine version for G, as - * G is constant, so it only needs to be done once in advance. - */ -static void secp256k1_ecmult_table_precomp_gej_var(secp256k1_gej_t *pre, const secp256k1_gej_t *a, int w) { - secp256k1_gej_t d; - int i; - pre[0] = *a; - secp256k1_gej_double_var(&d, &pre[0]); - for (i = 1; i < (1 << (w-2)); i++) { - secp256k1_gej_add_var(&pre[i], &d, &pre[i-1]); - } -} - -static void secp256k1_ecmult_table_precomp_ge_storage_var(secp256k1_ge_storage_t *pre, const secp256k1_gej_t *a, int w) { - secp256k1_gej_t d; - int i; - const int table_size = 1 << (w-2); - secp256k1_gej_t *prej = (secp256k1_gej_t *)checked_malloc(sizeof(secp256k1_gej_t) * table_size); - secp256k1_ge_t *prea = (secp256k1_ge_t *)checked_malloc(sizeof(secp256k1_ge_t) * table_size); - prej[0] = *a; - secp256k1_gej_double_var(&d, a); - for (i = 1; i < table_size; i++) { - secp256k1_gej_add_var(&prej[i], &d, &prej[i-1]); - } - secp256k1_ge_set_all_gej_var(table_size, prea, prej); - for (i = 0; i < table_size; i++) { - secp256k1_ge_to_storage(&pre[i], &prea[i]); - } - free(prej); - free(prea); -} - -/** The number of entries a table with precomputed multiples needs to have. */ -#define ECMULT_TABLE_SIZE(w) (1 << ((w)-2)) - -/** The following two macro retrieves a particular odd multiple from a table - * of precomputed multiples. */ -#define ECMULT_TABLE_GET_GEJ(r,pre,n,w) do { \ - VERIFY_CHECK(((n) & 1) == 1); \ - VERIFY_CHECK((n) >= -((1 << ((w)-1)) - 1)); \ - VERIFY_CHECK((n) <= ((1 << ((w)-1)) - 1)); \ - if ((n) > 0) { \ - *(r) = (pre)[((n)-1)/2]; \ - } else { \ - secp256k1_gej_neg((r), &(pre)[(-(n)-1)/2]); \ - } \ -} while(0) -#define ECMULT_TABLE_GET_GE_STORAGE(r,pre,n,w) do { \ - VERIFY_CHECK(((n) & 1) == 1); \ - VERIFY_CHECK((n) >= -((1 << ((w)-1)) - 1)); \ - VERIFY_CHECK((n) <= ((1 << ((w)-1)) - 1)); \ - if ((n) > 0) { \ - secp256k1_ge_from_storage((r), &(pre)[((n)-1)/2]); \ - } else { \ - secp256k1_ge_from_storage((r), &(pre)[(-(n)-1)/2]); \ - secp256k1_ge_neg((r), (r)); \ - } \ -} while(0) - -typedef struct { - /* For accelerating the computation of a*P + b*G: */ - secp256k1_ge_storage_t pre_g[ECMULT_TABLE_SIZE(WINDOW_G)]; /* odd multiples of the generator */ -#ifdef USE_ENDOMORPHISM - secp256k1_ge_storage_t pre_g_128[ECMULT_TABLE_SIZE(WINDOW_G)]; /* odd multiples of 2^128*generator */ -#endif -} secp256k1_ecmult_consts_t; - -static const secp256k1_ecmult_consts_t *secp256k1_ecmult_consts = NULL; - -static void secp256k1_ecmult_start(void) { - secp256k1_gej_t gj; - secp256k1_ecmult_consts_t *ret; - if (secp256k1_ecmult_consts != NULL) { - return; - } - - /* Allocate the precomputation table. */ - ret = (secp256k1_ecmult_consts_t*)checked_malloc(sizeof(secp256k1_ecmult_consts_t)); - - /* get the generator */ - secp256k1_gej_set_ge(&gj, &secp256k1_ge_const_g); - - - /* precompute the tables with odd multiples */ - secp256k1_ecmult_table_precomp_ge_storage_var(ret->pre_g, &gj, WINDOW_G); - -#ifdef USE_ENDOMORPHISM - { - secp256k1_gej_t g_128j; - int i; - /* calculate 2^128*generator */ - g_128j = gj; - for (i = 0; i < 128; i++) { - secp256k1_gej_double_var(&g_128j, &g_128j); - } - secp256k1_ecmult_table_precomp_ge_storage_var(ret->pre_g_128, &g_128j, WINDOW_G); - } -#endif - - /* Set the global pointer to the precomputation table. */ - secp256k1_ecmult_consts = ret; -} - -static void secp256k1_ecmult_stop(void) { - secp256k1_ecmult_consts_t *c; - if (secp256k1_ecmult_consts == NULL) { - return; - } - - c = (secp256k1_ecmult_consts_t*)secp256k1_ecmult_consts; - secp256k1_ecmult_consts = NULL; - free(c); -} - -/** Convert a number to WNAF notation. The number becomes represented by sum(2^i * wnaf[i], i=0..bits), - * with the following guarantees: - * - each wnaf[i] is either 0, or an odd integer between -(1<<(w-1) - 1) and (1<<(w-1) - 1) - * - two non-zero entries in wnaf are separated by at least w-1 zeroes. - * - the number of set values in wnaf is returned. This number is at most 256, and at most one more - * - than the number of bits in the (absolute value) of the input. - */ -static int secp256k1_ecmult_wnaf(int *wnaf, const secp256k1_scalar_t *a, int w) { - secp256k1_scalar_t s = *a; - int set_bits = 0; - int bit = 0; - int sign = 1; - - if (secp256k1_scalar_get_bits(&s, 255, 1)) { - secp256k1_scalar_negate(&s, &s); - sign = -1; - } - - while (bit < 256) { - int now; - int word; - if (secp256k1_scalar_get_bits(&s, bit, 1) == 0) { - bit++; - continue; - } - while (set_bits < bit) { - wnaf[set_bits++] = 0; - } - now = w; - if (bit + now > 256) { - now = 256 - bit; - } - word = secp256k1_scalar_get_bits_var(&s, bit, now); - if (word & (1 << (w-1))) { - secp256k1_scalar_add_bit(&s, bit + w); - wnaf[set_bits++] = sign * (word - (1 << w)); - } else { - wnaf[set_bits++] = sign * word; - } - bit += now; - } - return set_bits; -} - -static void secp256k1_ecmult(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_scalar_t *na, const secp256k1_scalar_t *ng) { - secp256k1_gej_t tmpj; - secp256k1_gej_t pre_a[ECMULT_TABLE_SIZE(WINDOW_A)]; - secp256k1_ge_t tmpa; - const secp256k1_ecmult_consts_t *c = secp256k1_ecmult_consts; -#ifdef USE_ENDOMORPHISM - secp256k1_gej_t pre_a_lam[ECMULT_TABLE_SIZE(WINDOW_A)]; - secp256k1_scalar_t na_1, na_lam; - /* Splitted G factors. */ - secp256k1_scalar_t ng_1, ng_128; - int wnaf_na_1[130]; - int wnaf_na_lam[130]; - int bits_na_1; - int bits_na_lam; - int wnaf_ng_1[129]; - int bits_ng_1; - int wnaf_ng_128[129]; - int bits_ng_128; -#else - int wnaf_na[256]; - int bits_na; - int wnaf_ng[257]; - int bits_ng; -#endif - int i; - int bits; - -#ifdef USE_ENDOMORPHISM - /* split na into na_1 and na_lam (where na = na_1 + na_lam*lambda, and na_1 and na_lam are ~128 bit) */ - secp256k1_scalar_split_lambda_var(&na_1, &na_lam, na); - - /* build wnaf representation for na_1 and na_lam. */ - bits_na_1 = secp256k1_ecmult_wnaf(wnaf_na_1, &na_1, WINDOW_A); - bits_na_lam = secp256k1_ecmult_wnaf(wnaf_na_lam, &na_lam, WINDOW_A); - VERIFY_CHECK(bits_na_1 <= 130); - VERIFY_CHECK(bits_na_lam <= 130); - bits = bits_na_1; - if (bits_na_lam > bits) { - bits = bits_na_lam; - } -#else - /* build wnaf representation for na. */ - bits_na = secp256k1_ecmult_wnaf(wnaf_na, na, WINDOW_A); - bits = bits_na; -#endif - - /* calculate odd multiples of a */ - secp256k1_ecmult_table_precomp_gej_var(pre_a, a, WINDOW_A); - -#ifdef USE_ENDOMORPHISM - for (i = 0; i < ECMULT_TABLE_SIZE(WINDOW_A); i++) { - secp256k1_gej_mul_lambda(&pre_a_lam[i], &pre_a[i]); - } - - /* split ng into ng_1 and ng_128 (where gn = gn_1 + gn_128*2^128, and gn_1 and gn_128 are ~128 bit) */ - secp256k1_scalar_split_128(&ng_1, &ng_128, ng); - - /* Build wnaf representation for ng_1 and ng_128 */ - bits_ng_1 = secp256k1_ecmult_wnaf(wnaf_ng_1, &ng_1, WINDOW_G); - bits_ng_128 = secp256k1_ecmult_wnaf(wnaf_ng_128, &ng_128, WINDOW_G); - if (bits_ng_1 > bits) { - bits = bits_ng_1; - } - if (bits_ng_128 > bits) { - bits = bits_ng_128; - } -#else - bits_ng = secp256k1_ecmult_wnaf(wnaf_ng, ng, WINDOW_G); - if (bits_ng > bits) { - bits = bits_ng; - } -#endif - - secp256k1_gej_set_infinity(r); - - for (i = bits-1; i >= 0; i--) { - int n; - secp256k1_gej_double_var(r, r); -#ifdef USE_ENDOMORPHISM - if (i < bits_na_1 && (n = wnaf_na_1[i])) { - ECMULT_TABLE_GET_GEJ(&tmpj, pre_a, n, WINDOW_A); - secp256k1_gej_add_var(r, r, &tmpj); - } - if (i < bits_na_lam && (n = wnaf_na_lam[i])) { - ECMULT_TABLE_GET_GEJ(&tmpj, pre_a_lam, n, WINDOW_A); - secp256k1_gej_add_var(r, r, &tmpj); - } - if (i < bits_ng_1 && (n = wnaf_ng_1[i])) { - ECMULT_TABLE_GET_GE_STORAGE(&tmpa, c->pre_g, n, WINDOW_G); - secp256k1_gej_add_ge_var(r, r, &tmpa); - } - if (i < bits_ng_128 && (n = wnaf_ng_128[i])) { - ECMULT_TABLE_GET_GE_STORAGE(&tmpa, c->pre_g_128, n, WINDOW_G); - secp256k1_gej_add_ge_var(r, r, &tmpa); - } -#else - if (i < bits_na && (n = wnaf_na[i])) { - ECMULT_TABLE_GET_GEJ(&tmpj, pre_a, n, WINDOW_A); - secp256k1_gej_add_var(r, r, &tmpj); - } - if (i < bits_ng && (n = wnaf_ng[i])) { - ECMULT_TABLE_GET_GE_STORAGE(&tmpa, c->pre_g, n, WINDOW_G); - secp256k1_gej_add_ge_var(r, r, &tmpa); - } -#endif - } -} - -#endif diff --git a/crypto/secp256k1/secp256k1/src/field.h b/crypto/secp256k1/secp256k1/src/field.h deleted file mode 100644 index 9e6d7d3c0..000000000 --- a/crypto/secp256k1/secp256k1/src/field.h +++ /dev/null @@ -1,116 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_FIELD_ -#define _SECP256K1_FIELD_ - -/** Field element module. - * - * Field elements can be represented in several ways, but code accessing - * it (and implementations) need to take certain properaties into account: - * - Each field element can be normalized or not. - * - Each field element has a magnitude, which represents how far away - * its representation is away from normalization. Normalized elements - * always have a magnitude of 1, but a magnitude of 1 doesn't imply - * normality. - */ - -#if defined HAVE_CONFIG_H -#include "libsecp256k1-config.h" -#endif - -#if defined(USE_FIELD_10X26) -#include "field_10x26.h" -#elif defined(USE_FIELD_5X52) -#include "field_5x52.h" -#else -#error "Please select field implementation" -#endif - -/** Normalize a field element. */ -static void secp256k1_fe_normalize(secp256k1_fe_t *r); - -/** Weakly normalize a field element: reduce it magnitude to 1, but don't fully normalize. */ -static void secp256k1_fe_normalize_weak(secp256k1_fe_t *r); - -/** Normalize a field element, without constant-time guarantee. */ -static void secp256k1_fe_normalize_var(secp256k1_fe_t *r); - -/** Verify whether a field element represents zero i.e. would normalize to a zero value. The field - * implementation may optionally normalize the input, but this should not be relied upon. */ -static int secp256k1_fe_normalizes_to_zero(secp256k1_fe_t *r); - -/** Verify whether a field element represents zero i.e. would normalize to a zero value. The field - * implementation may optionally normalize the input, but this should not be relied upon. */ -static int secp256k1_fe_normalizes_to_zero_var(secp256k1_fe_t *r); - -/** Set a field element equal to a small integer. Resulting field element is normalized. */ -static void secp256k1_fe_set_int(secp256k1_fe_t *r, int a); - -/** Verify whether a field element is zero. Requires the input to be normalized. */ -static int secp256k1_fe_is_zero(const secp256k1_fe_t *a); - -/** Check the "oddness" of a field element. Requires the input to be normalized. */ -static int secp256k1_fe_is_odd(const secp256k1_fe_t *a); - -/** Compare two field elements. Requires magnitude-1 inputs. */ -static int secp256k1_fe_equal_var(const secp256k1_fe_t *a, const secp256k1_fe_t *b); - -/** Compare two field elements. Requires both inputs to be normalized */ -static int secp256k1_fe_cmp_var(const secp256k1_fe_t *a, const secp256k1_fe_t *b); - -/** Set a field element equal to 32-byte big endian value. If succesful, the resulting field element is normalized. */ -static int secp256k1_fe_set_b32(secp256k1_fe_t *r, const unsigned char *a); - -/** Convert a field element to a 32-byte big endian value. Requires the input to be normalized */ -static void secp256k1_fe_get_b32(unsigned char *r, const secp256k1_fe_t *a); - -/** Set a field element equal to the additive inverse of another. Takes a maximum magnitude of the input - * as an argument. The magnitude of the output is one higher. */ -static void secp256k1_fe_negate(secp256k1_fe_t *r, const secp256k1_fe_t *a, int m); - -/** Multiplies the passed field element with a small integer constant. Multiplies the magnitude by that - * small integer. */ -static void secp256k1_fe_mul_int(secp256k1_fe_t *r, int a); - -/** Adds a field element to another. The result has the sum of the inputs' magnitudes as magnitude. */ -static void secp256k1_fe_add(secp256k1_fe_t *r, const secp256k1_fe_t *a); - -/** Sets a field element to be the product of two others. Requires the inputs' magnitudes to be at most 8. - * The output magnitude is 1 (but not guaranteed to be normalized). */ -static void secp256k1_fe_mul(secp256k1_fe_t *r, const secp256k1_fe_t *a, const secp256k1_fe_t * SECP256K1_RESTRICT b); - -/** Sets a field element to be the square of another. Requires the input's magnitude to be at most 8. - * The output magnitude is 1 (but not guaranteed to be normalized). */ -static void secp256k1_fe_sqr(secp256k1_fe_t *r, const secp256k1_fe_t *a); - -/** Sets a field element to be the (modular) square root (if any exist) of another. Requires the - * input's magnitude to be at most 8. The output magnitude is 1 (but not guaranteed to be - * normalized). Return value indicates whether a square root was found. */ -static int secp256k1_fe_sqrt_var(secp256k1_fe_t *r, const secp256k1_fe_t *a); - -/** Sets a field element to be the (modular) inverse of another. Requires the input's magnitude to be - * at most 8. The output magnitude is 1 (but not guaranteed to be normalized). */ -static void secp256k1_fe_inv(secp256k1_fe_t *r, const secp256k1_fe_t *a); - -/** Potentially faster version of secp256k1_fe_inv, without constant-time guarantee. */ -static void secp256k1_fe_inv_var(secp256k1_fe_t *r, const secp256k1_fe_t *a); - -/** Calculate the (modular) inverses of a batch of field elements. Requires the inputs' magnitudes to be - * at most 8. The output magnitudes are 1 (but not guaranteed to be normalized). The inputs and - * outputs must not overlap in memory. */ -static void secp256k1_fe_inv_all_var(size_t len, secp256k1_fe_t *r, const secp256k1_fe_t *a); - -/** Convert a field element to the storage type. */ -static void secp256k1_fe_to_storage(secp256k1_fe_storage_t *r, const secp256k1_fe_t*); - -/** Convert a field element back from the storage type. */ -static void secp256k1_fe_from_storage(secp256k1_fe_t *r, const secp256k1_fe_storage_t*); - -/** If flag is true, set *r equal to *a; otherwise leave it. Constant-time. */ -static void secp256k1_fe_storage_cmov(secp256k1_fe_storage_t *r, const secp256k1_fe_storage_t *a, int flag); - -#endif diff --git a/crypto/secp256k1/secp256k1/src/field_10x26.h b/crypto/secp256k1/secp256k1/src/field_10x26.h deleted file mode 100644 index 44bce6525..000000000 --- a/crypto/secp256k1/secp256k1/src/field_10x26.h +++ /dev/null @@ -1,47 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_FIELD_REPR_ -#define _SECP256K1_FIELD_REPR_ - -#include - -typedef struct { - /* X = sum(i=0..9, elem[i]*2^26) mod n */ - uint32_t n[10]; -#ifdef VERIFY - int magnitude; - int normalized; -#endif -} secp256k1_fe_t; - -/* Unpacks a constant into a overlapping multi-limbed FE element. */ -#define SECP256K1_FE_CONST_INNER(d7, d6, d5, d4, d3, d2, d1, d0) { \ - (d0) & 0x3FFFFFFUL, \ - ((d0) >> 26) | ((d1) & 0xFFFFFUL) << 6, \ - ((d1) >> 20) | ((d2) & 0x3FFFUL) << 12, \ - ((d2) >> 14) | ((d3) & 0xFFUL) << 18, \ - ((d3) >> 8) | ((d4) & 0x3) << 24, \ - ((d4) >> 2) & 0x3FFFFFFUL, \ - ((d4) >> 28) | ((d5) & 0x3FFFFFUL) << 4, \ - ((d5) >> 22) | ((d6) & 0xFFFF) << 10, \ - ((d6) >> 16) | ((d7) & 0x3FF) << 16, \ - ((d7) >> 10) \ -} - -#ifdef VERIFY -#define SECP256K1_FE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {SECP256K1_FE_CONST_INNER((d7), (d6), (d5), (d4), (d3), (d2), (d1), (d0)), 1, 1} -#else -#define SECP256K1_FE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {SECP256K1_FE_CONST_INNER((d7), (d6), (d5), (d4), (d3), (d2), (d1), (d0))} -#endif - -typedef struct { - uint32_t n[8]; -} secp256k1_fe_storage_t; - -#define SECP256K1_FE_STORAGE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{ (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }} - -#endif diff --git a/crypto/secp256k1/secp256k1/src/field_10x26_impl.h b/crypto/secp256k1/secp256k1/src/field_10x26_impl.h deleted file mode 100644 index b32a666f5..000000000 --- a/crypto/secp256k1/secp256k1/src/field_10x26_impl.h +++ /dev/null @@ -1,1116 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_FIELD_REPR_IMPL_H_ -#define _SECP256K1_FIELD_REPR_IMPL_H_ - -#include -#include -#include "util.h" -#include "num.h" -#include "field.h" - -#ifdef VERIFY -static void secp256k1_fe_verify(const secp256k1_fe_t *a) { - const uint32_t *d = a->n; - int m = a->normalized ? 1 : 2 * a->magnitude, r = 1; - r &= (d[0] <= 0x3FFFFFFUL * m); - r &= (d[1] <= 0x3FFFFFFUL * m); - r &= (d[2] <= 0x3FFFFFFUL * m); - r &= (d[3] <= 0x3FFFFFFUL * m); - r &= (d[4] <= 0x3FFFFFFUL * m); - r &= (d[5] <= 0x3FFFFFFUL * m); - r &= (d[6] <= 0x3FFFFFFUL * m); - r &= (d[7] <= 0x3FFFFFFUL * m); - r &= (d[8] <= 0x3FFFFFFUL * m); - r &= (d[9] <= 0x03FFFFFUL * m); - r &= (a->magnitude >= 0); - r &= (a->magnitude <= 32); - if (a->normalized) { - r &= (a->magnitude <= 1); - if (r && (d[9] == 0x03FFFFFUL)) { - uint32_t mid = d[8] & d[7] & d[6] & d[5] & d[4] & d[3] & d[2]; - if (mid == 0x3FFFFFFUL) { - r &= ((d[1] + 0x40UL + ((d[0] + 0x3D1UL) >> 26)) <= 0x3FFFFFFUL); - } - } - } - VERIFY_CHECK(r == 1); -} -#else -static void secp256k1_fe_verify(const secp256k1_fe_t *a) { - (void)a; -} -#endif - -static void secp256k1_fe_normalize(secp256k1_fe_t *r) { - uint32_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4], - t5 = r->n[5], t6 = r->n[6], t7 = r->n[7], t8 = r->n[8], t9 = r->n[9]; - - /* Reduce t9 at the start so there will be at most a single carry from the first pass */ - uint32_t m; - uint32_t x = t9 >> 22; t9 &= 0x03FFFFFUL; - - /* The first pass ensures the magnitude is 1, ... */ - t0 += x * 0x3D1UL; t1 += (x << 6); - t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL; - t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; - t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; m = t2; - t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; m &= t3; - t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; m &= t4; - t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; m &= t5; - t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; m &= t6; - t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; m &= t7; - t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; m &= t8; - - /* ... except for a possible carry at bit 22 of t9 (i.e. bit 256 of the field element) */ - VERIFY_CHECK(t9 >> 23 == 0); - - /* At most a single final reduction is needed; check if the value is >= the field characteristic */ - x = (t9 >> 22) | ((t9 == 0x03FFFFFUL) & (m == 0x3FFFFFFUL) - & ((t1 + 0x40UL + ((t0 + 0x3D1UL) >> 26)) > 0x3FFFFFFUL)); - - /* Apply the final reduction (for constant-time behaviour, we do it always) */ - t0 += x * 0x3D1UL; t1 += (x << 6); - t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL; - t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; - t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; - t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; - t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; - t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; - t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; - t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; - t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; - - /* If t9 didn't carry to bit 22 already, then it should have after any final reduction */ - VERIFY_CHECK(t9 >> 22 == x); - - /* Mask off the possible multiple of 2^256 from the final reduction */ - t9 &= 0x03FFFFFUL; - - r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4; - r->n[5] = t5; r->n[6] = t6; r->n[7] = t7; r->n[8] = t8; r->n[9] = t9; - -#ifdef VERIFY - r->magnitude = 1; - r->normalized = 1; - secp256k1_fe_verify(r); -#endif -} - -static void secp256k1_fe_normalize_weak(secp256k1_fe_t *r) { - uint32_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4], - t5 = r->n[5], t6 = r->n[6], t7 = r->n[7], t8 = r->n[8], t9 = r->n[9]; - - /* Reduce t9 at the start so there will be at most a single carry from the first pass */ - uint32_t x = t9 >> 22; t9 &= 0x03FFFFFUL; - - /* The first pass ensures the magnitude is 1, ... */ - t0 += x * 0x3D1UL; t1 += (x << 6); - t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL; - t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; - t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; - t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; - t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; - t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; - t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; - t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; - t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; - - /* ... except for a possible carry at bit 22 of t9 (i.e. bit 256 of the field element) */ - VERIFY_CHECK(t9 >> 23 == 0); - - r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4; - r->n[5] = t5; r->n[6] = t6; r->n[7] = t7; r->n[8] = t8; r->n[9] = t9; - -#ifdef VERIFY - r->magnitude = 1; - secp256k1_fe_verify(r); -#endif -} - -static void secp256k1_fe_normalize_var(secp256k1_fe_t *r) { - uint32_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4], - t5 = r->n[5], t6 = r->n[6], t7 = r->n[7], t8 = r->n[8], t9 = r->n[9]; - - /* Reduce t9 at the start so there will be at most a single carry from the first pass */ - uint32_t m; - uint32_t x = t9 >> 22; t9 &= 0x03FFFFFUL; - - /* The first pass ensures the magnitude is 1, ... */ - t0 += x * 0x3D1UL; t1 += (x << 6); - t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL; - t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; - t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; m = t2; - t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; m &= t3; - t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; m &= t4; - t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; m &= t5; - t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; m &= t6; - t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; m &= t7; - t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; m &= t8; - - /* ... except for a possible carry at bit 22 of t9 (i.e. bit 256 of the field element) */ - VERIFY_CHECK(t9 >> 23 == 0); - - /* At most a single final reduction is needed; check if the value is >= the field characteristic */ - x = (t9 >> 22) | ((t9 == 0x03FFFFFUL) & (m == 0x3FFFFFFUL) - & ((t1 + 0x40UL + ((t0 + 0x3D1UL) >> 26)) > 0x3FFFFFFUL)); - - if (x) { - t0 += 0x3D1UL; t1 += (x << 6); - t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL; - t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; - t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; - t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; - t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; - t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; - t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; - t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; - t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; - - /* If t9 didn't carry to bit 22 already, then it should have after any final reduction */ - VERIFY_CHECK(t9 >> 22 == x); - - /* Mask off the possible multiple of 2^256 from the final reduction */ - t9 &= 0x03FFFFFUL; - } - - r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4; - r->n[5] = t5; r->n[6] = t6; r->n[7] = t7; r->n[8] = t8; r->n[9] = t9; - -#ifdef VERIFY - r->magnitude = 1; - r->normalized = 1; - secp256k1_fe_verify(r); -#endif -} - -static int secp256k1_fe_normalizes_to_zero(secp256k1_fe_t *r) { - uint32_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4], - t5 = r->n[5], t6 = r->n[6], t7 = r->n[7], t8 = r->n[8], t9 = r->n[9]; - - /* z0 tracks a possible raw value of 0, z1 tracks a possible raw value of P */ - uint32_t z0, z1; - - /* Reduce t9 at the start so there will be at most a single carry from the first pass */ - uint32_t x = t9 >> 22; t9 &= 0x03FFFFFUL; - - /* The first pass ensures the magnitude is 1, ... */ - t0 += x * 0x3D1UL; t1 += (x << 6); - t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL; z0 = t0; z1 = t0 ^ 0x3D0UL; - t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; z0 |= t1; z1 &= t1 ^ 0x40UL; - t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; z0 |= t2; z1 &= t2; - t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; z0 |= t3; z1 &= t3; - t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; z0 |= t4; z1 &= t4; - t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; z0 |= t5; z1 &= t5; - t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; z0 |= t6; z1 &= t6; - t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; z0 |= t7; z1 &= t7; - t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; z0 |= t8; z1 &= t8; - z0 |= t9; z1 &= t9 ^ 0x3C00000UL; - - /* ... except for a possible carry at bit 22 of t9 (i.e. bit 256 of the field element) */ - VERIFY_CHECK(t9 >> 23 == 0); - - return (z0 == 0) | (z1 == 0x3FFFFFFUL); -} - -static int secp256k1_fe_normalizes_to_zero_var(secp256k1_fe_t *r) { - uint32_t t0, t1, t2, t3, t4, t5, t6, t7, t8, t9; - uint32_t z0, z1; - uint32_t x; - - t0 = r->n[0]; - t9 = r->n[9]; - - /* Reduce t9 at the start so there will be at most a single carry from the first pass */ - x = t9 >> 22; - - /* The first pass ensures the magnitude is 1, ... */ - t0 += x * 0x3D1UL; - - /* z0 tracks a possible raw value of 0, z1 tracks a possible raw value of P */ - z0 = t0 & 0x3FFFFFFUL; - z1 = z0 ^ 0x3D0UL; - - /* Fast return path should catch the majority of cases */ - if ((z0 != 0UL) & (z1 != 0x3FFFFFFUL)) { - return 0; - } - - t1 = r->n[1]; - t2 = r->n[2]; - t3 = r->n[3]; - t4 = r->n[4]; - t5 = r->n[5]; - t6 = r->n[6]; - t7 = r->n[7]; - t8 = r->n[8]; - - t9 &= 0x03FFFFFUL; - t1 += (x << 6); - - t1 += (t0 >> 26); t0 = z0; - t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL; z0 |= t1; z1 &= t1 ^ 0x40UL; - t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; z0 |= t2; z1 &= t2; - t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; z0 |= t3; z1 &= t3; - t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; z0 |= t4; z1 &= t4; - t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; z0 |= t5; z1 &= t5; - t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; z0 |= t6; z1 &= t6; - t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; z0 |= t7; z1 &= t7; - t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; z0 |= t8; z1 &= t8; - z0 |= t9; z1 &= t9 ^ 0x3C00000UL; - - /* ... except for a possible carry at bit 22 of t9 (i.e. bit 256 of the field element) */ - VERIFY_CHECK(t9 >> 23 == 0); - - return (z0 == 0) | (z1 == 0x3FFFFFFUL); -} - -SECP256K1_INLINE static void secp256k1_fe_set_int(secp256k1_fe_t *r, int a) { - r->n[0] = a; - r->n[1] = r->n[2] = r->n[3] = r->n[4] = r->n[5] = r->n[6] = r->n[7] = r->n[8] = r->n[9] = 0; -#ifdef VERIFY - r->magnitude = 1; - r->normalized = 1; - secp256k1_fe_verify(r); -#endif -} - -SECP256K1_INLINE static int secp256k1_fe_is_zero(const secp256k1_fe_t *a) { - const uint32_t *t = a->n; -#ifdef VERIFY - VERIFY_CHECK(a->normalized); - secp256k1_fe_verify(a); -#endif - return (t[0] | t[1] | t[2] | t[3] | t[4] | t[5] | t[6] | t[7] | t[8] | t[9]) == 0; -} - -SECP256K1_INLINE static int secp256k1_fe_is_odd(const secp256k1_fe_t *a) { -#ifdef VERIFY - VERIFY_CHECK(a->normalized); - secp256k1_fe_verify(a); -#endif - return a->n[0] & 1; -} - -SECP256K1_INLINE static void secp256k1_fe_clear(secp256k1_fe_t *a) { - int i; -#ifdef VERIFY - a->magnitude = 0; - a->normalized = 1; -#endif - for (i=0; i<10; i++) { - a->n[i] = 0; - } -} - -static int secp256k1_fe_cmp_var(const secp256k1_fe_t *a, const secp256k1_fe_t *b) { - int i; -#ifdef VERIFY - VERIFY_CHECK(a->normalized); - VERIFY_CHECK(b->normalized); - secp256k1_fe_verify(a); - secp256k1_fe_verify(b); -#endif - for (i = 9; i >= 0; i--) { - if (a->n[i] > b->n[i]) { - return 1; - } - if (a->n[i] < b->n[i]) { - return -1; - } - } - return 0; -} - -static int secp256k1_fe_set_b32(secp256k1_fe_t *r, const unsigned char *a) { - int i; - r->n[0] = r->n[1] = r->n[2] = r->n[3] = r->n[4] = 0; - r->n[5] = r->n[6] = r->n[7] = r->n[8] = r->n[9] = 0; - for (i=0; i<32; i++) { - int j; - for (j=0; j<4; j++) { - int limb = (8*i+2*j)/26; - int shift = (8*i+2*j)%26; - r->n[limb] |= (uint32_t)((a[31-i] >> (2*j)) & 0x3) << shift; - } - } - if (r->n[9] == 0x3FFFFFUL && (r->n[8] & r->n[7] & r->n[6] & r->n[5] & r->n[4] & r->n[3] & r->n[2]) == 0x3FFFFFFUL && (r->n[1] + 0x40UL + ((r->n[0] + 0x3D1UL) >> 26)) > 0x3FFFFFFUL) { - return 0; - } -#ifdef VERIFY - r->magnitude = 1; - r->normalized = 1; - secp256k1_fe_verify(r); -#endif - return 1; -} - -/** Convert a field element to a 32-byte big endian value. Requires the input to be normalized */ -static void secp256k1_fe_get_b32(unsigned char *r, const secp256k1_fe_t *a) { - int i; -#ifdef VERIFY - VERIFY_CHECK(a->normalized); - secp256k1_fe_verify(a); -#endif - for (i=0; i<32; i++) { - int j; - int c = 0; - for (j=0; j<4; j++) { - int limb = (8*i+2*j)/26; - int shift = (8*i+2*j)%26; - c |= ((a->n[limb] >> shift) & 0x3) << (2 * j); - } - r[31-i] = c; - } -} - -SECP256K1_INLINE static void secp256k1_fe_negate(secp256k1_fe_t *r, const secp256k1_fe_t *a, int m) { -#ifdef VERIFY - VERIFY_CHECK(a->magnitude <= m); - secp256k1_fe_verify(a); -#endif - r->n[0] = 0x3FFFC2FUL * 2 * (m + 1) - a->n[0]; - r->n[1] = 0x3FFFFBFUL * 2 * (m + 1) - a->n[1]; - r->n[2] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[2]; - r->n[3] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[3]; - r->n[4] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[4]; - r->n[5] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[5]; - r->n[6] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[6]; - r->n[7] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[7]; - r->n[8] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[8]; - r->n[9] = 0x03FFFFFUL * 2 * (m + 1) - a->n[9]; -#ifdef VERIFY - r->magnitude = m + 1; - r->normalized = 0; - secp256k1_fe_verify(r); -#endif -} - -SECP256K1_INLINE static void secp256k1_fe_mul_int(secp256k1_fe_t *r, int a) { - r->n[0] *= a; - r->n[1] *= a; - r->n[2] *= a; - r->n[3] *= a; - r->n[4] *= a; - r->n[5] *= a; - r->n[6] *= a; - r->n[7] *= a; - r->n[8] *= a; - r->n[9] *= a; -#ifdef VERIFY - r->magnitude *= a; - r->normalized = 0; - secp256k1_fe_verify(r); -#endif -} - -SECP256K1_INLINE static void secp256k1_fe_add(secp256k1_fe_t *r, const secp256k1_fe_t *a) { -#ifdef VERIFY - secp256k1_fe_verify(a); -#endif - r->n[0] += a->n[0]; - r->n[1] += a->n[1]; - r->n[2] += a->n[2]; - r->n[3] += a->n[3]; - r->n[4] += a->n[4]; - r->n[5] += a->n[5]; - r->n[6] += a->n[6]; - r->n[7] += a->n[7]; - r->n[8] += a->n[8]; - r->n[9] += a->n[9]; -#ifdef VERIFY - r->magnitude += a->magnitude; - r->normalized = 0; - secp256k1_fe_verify(r); -#endif -} - -#ifdef VERIFY -#define VERIFY_BITS(x, n) VERIFY_CHECK(((x) >> (n)) == 0) -#else -#define VERIFY_BITS(x, n) do { } while(0) -#endif - -SECP256K1_INLINE static void secp256k1_fe_mul_inner(uint32_t *r, const uint32_t *a, const uint32_t * SECP256K1_RESTRICT b) { - uint64_t c, d; - uint64_t u0, u1, u2, u3, u4, u5, u6, u7, u8; - uint32_t t9, t1, t0, t2, t3, t4, t5, t6, t7; - const uint32_t M = 0x3FFFFFFUL, R0 = 0x3D10UL, R1 = 0x400UL; - - VERIFY_BITS(a[0], 30); - VERIFY_BITS(a[1], 30); - VERIFY_BITS(a[2], 30); - VERIFY_BITS(a[3], 30); - VERIFY_BITS(a[4], 30); - VERIFY_BITS(a[5], 30); - VERIFY_BITS(a[6], 30); - VERIFY_BITS(a[7], 30); - VERIFY_BITS(a[8], 30); - VERIFY_BITS(a[9], 26); - VERIFY_BITS(b[0], 30); - VERIFY_BITS(b[1], 30); - VERIFY_BITS(b[2], 30); - VERIFY_BITS(b[3], 30); - VERIFY_BITS(b[4], 30); - VERIFY_BITS(b[5], 30); - VERIFY_BITS(b[6], 30); - VERIFY_BITS(b[7], 30); - VERIFY_BITS(b[8], 30); - VERIFY_BITS(b[9], 26); - - /** [... a b c] is a shorthand for ... + a<<52 + b<<26 + c<<0 mod n. - * px is a shorthand for sum(a[i]*b[x-i], i=0..x). - * Note that [x 0 0 0 0 0 0 0 0 0 0] = [x*R1 x*R0]. - */ - - d = (uint64_t)a[0] * b[9] - + (uint64_t)a[1] * b[8] - + (uint64_t)a[2] * b[7] - + (uint64_t)a[3] * b[6] - + (uint64_t)a[4] * b[5] - + (uint64_t)a[5] * b[4] - + (uint64_t)a[6] * b[3] - + (uint64_t)a[7] * b[2] - + (uint64_t)a[8] * b[1] - + (uint64_t)a[9] * b[0]; - /* VERIFY_BITS(d, 64); */ - /* [d 0 0 0 0 0 0 0 0 0] = [p9 0 0 0 0 0 0 0 0 0] */ - t9 = d & M; d >>= 26; - VERIFY_BITS(t9, 26); - VERIFY_BITS(d, 38); - /* [d t9 0 0 0 0 0 0 0 0 0] = [p9 0 0 0 0 0 0 0 0 0] */ - - c = (uint64_t)a[0] * b[0]; - VERIFY_BITS(c, 60); - /* [d t9 0 0 0 0 0 0 0 0 c] = [p9 0 0 0 0 0 0 0 0 p0] */ - d += (uint64_t)a[1] * b[9] - + (uint64_t)a[2] * b[8] - + (uint64_t)a[3] * b[7] - + (uint64_t)a[4] * b[6] - + (uint64_t)a[5] * b[5] - + (uint64_t)a[6] * b[4] - + (uint64_t)a[7] * b[3] - + (uint64_t)a[8] * b[2] - + (uint64_t)a[9] * b[1]; - VERIFY_BITS(d, 63); - /* [d t9 0 0 0 0 0 0 0 0 c] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ - u0 = d & M; d >>= 26; c += u0 * R0; - VERIFY_BITS(u0, 26); - VERIFY_BITS(d, 37); - VERIFY_BITS(c, 61); - /* [d u0 t9 0 0 0 0 0 0 0 0 c-u0*R0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ - t0 = c & M; c >>= 26; c += u0 * R1; - VERIFY_BITS(t0, 26); - VERIFY_BITS(c, 37); - /* [d u0 t9 0 0 0 0 0 0 0 c-u0*R1 t0-u0*R0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ - /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ - - c += (uint64_t)a[0] * b[1] - + (uint64_t)a[1] * b[0]; - VERIFY_BITS(c, 62); - /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p10 p9 0 0 0 0 0 0 0 p1 p0] */ - d += (uint64_t)a[2] * b[9] - + (uint64_t)a[3] * b[8] - + (uint64_t)a[4] * b[7] - + (uint64_t)a[5] * b[6] - + (uint64_t)a[6] * b[5] - + (uint64_t)a[7] * b[4] - + (uint64_t)a[8] * b[3] - + (uint64_t)a[9] * b[2]; - VERIFY_BITS(d, 63); - /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ - u1 = d & M; d >>= 26; c += u1 * R0; - VERIFY_BITS(u1, 26); - VERIFY_BITS(d, 37); - VERIFY_BITS(c, 63); - /* [d u1 0 t9 0 0 0 0 0 0 0 c-u1*R0 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ - t1 = c & M; c >>= 26; c += u1 * R1; - VERIFY_BITS(t1, 26); - VERIFY_BITS(c, 38); - /* [d u1 0 t9 0 0 0 0 0 0 c-u1*R1 t1-u1*R0 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ - /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ - - c += (uint64_t)a[0] * b[2] - + (uint64_t)a[1] * b[1] - + (uint64_t)a[2] * b[0]; - VERIFY_BITS(c, 62); - /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ - d += (uint64_t)a[3] * b[9] - + (uint64_t)a[4] * b[8] - + (uint64_t)a[5] * b[7] - + (uint64_t)a[6] * b[6] - + (uint64_t)a[7] * b[5] - + (uint64_t)a[8] * b[4] - + (uint64_t)a[9] * b[3]; - VERIFY_BITS(d, 63); - /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ - u2 = d & M; d >>= 26; c += u2 * R0; - VERIFY_BITS(u2, 26); - VERIFY_BITS(d, 37); - VERIFY_BITS(c, 63); - /* [d u2 0 0 t9 0 0 0 0 0 0 c-u2*R0 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ - t2 = c & M; c >>= 26; c += u2 * R1; - VERIFY_BITS(t2, 26); - VERIFY_BITS(c, 38); - /* [d u2 0 0 t9 0 0 0 0 0 c-u2*R1 t2-u2*R0 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ - /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ - - c += (uint64_t)a[0] * b[3] - + (uint64_t)a[1] * b[2] - + (uint64_t)a[2] * b[1] - + (uint64_t)a[3] * b[0]; - VERIFY_BITS(c, 63); - /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ - d += (uint64_t)a[4] * b[9] - + (uint64_t)a[5] * b[8] - + (uint64_t)a[6] * b[7] - + (uint64_t)a[7] * b[6] - + (uint64_t)a[8] * b[5] - + (uint64_t)a[9] * b[4]; - VERIFY_BITS(d, 63); - /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ - u3 = d & M; d >>= 26; c += u3 * R0; - VERIFY_BITS(u3, 26); - VERIFY_BITS(d, 37); - /* VERIFY_BITS(c, 64); */ - /* [d u3 0 0 0 t9 0 0 0 0 0 c-u3*R0 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ - t3 = c & M; c >>= 26; c += u3 * R1; - VERIFY_BITS(t3, 26); - VERIFY_BITS(c, 39); - /* [d u3 0 0 0 t9 0 0 0 0 c-u3*R1 t3-u3*R0 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ - /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ - - c += (uint64_t)a[0] * b[4] - + (uint64_t)a[1] * b[3] - + (uint64_t)a[2] * b[2] - + (uint64_t)a[3] * b[1] - + (uint64_t)a[4] * b[0]; - VERIFY_BITS(c, 63); - /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ - d += (uint64_t)a[5] * b[9] - + (uint64_t)a[6] * b[8] - + (uint64_t)a[7] * b[7] - + (uint64_t)a[8] * b[6] - + (uint64_t)a[9] * b[5]; - VERIFY_BITS(d, 62); - /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ - u4 = d & M; d >>= 26; c += u4 * R0; - VERIFY_BITS(u4, 26); - VERIFY_BITS(d, 36); - /* VERIFY_BITS(c, 64); */ - /* [d u4 0 0 0 0 t9 0 0 0 0 c-u4*R0 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ - t4 = c & M; c >>= 26; c += u4 * R1; - VERIFY_BITS(t4, 26); - VERIFY_BITS(c, 39); - /* [d u4 0 0 0 0 t9 0 0 0 c-u4*R1 t4-u4*R0 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ - /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ - - c += (uint64_t)a[0] * b[5] - + (uint64_t)a[1] * b[4] - + (uint64_t)a[2] * b[3] - + (uint64_t)a[3] * b[2] - + (uint64_t)a[4] * b[1] - + (uint64_t)a[5] * b[0]; - VERIFY_BITS(c, 63); - /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ - d += (uint64_t)a[6] * b[9] - + (uint64_t)a[7] * b[8] - + (uint64_t)a[8] * b[7] - + (uint64_t)a[9] * b[6]; - VERIFY_BITS(d, 62); - /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ - u5 = d & M; d >>= 26; c += u5 * R0; - VERIFY_BITS(u5, 26); - VERIFY_BITS(d, 36); - /* VERIFY_BITS(c, 64); */ - /* [d u5 0 0 0 0 0 t9 0 0 0 c-u5*R0 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ - t5 = c & M; c >>= 26; c += u5 * R1; - VERIFY_BITS(t5, 26); - VERIFY_BITS(c, 39); - /* [d u5 0 0 0 0 0 t9 0 0 c-u5*R1 t5-u5*R0 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ - /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ - - c += (uint64_t)a[0] * b[6] - + (uint64_t)a[1] * b[5] - + (uint64_t)a[2] * b[4] - + (uint64_t)a[3] * b[3] - + (uint64_t)a[4] * b[2] - + (uint64_t)a[5] * b[1] - + (uint64_t)a[6] * b[0]; - VERIFY_BITS(c, 63); - /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ - d += (uint64_t)a[7] * b[9] - + (uint64_t)a[8] * b[8] - + (uint64_t)a[9] * b[7]; - VERIFY_BITS(d, 61); - /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ - u6 = d & M; d >>= 26; c += u6 * R0; - VERIFY_BITS(u6, 26); - VERIFY_BITS(d, 35); - /* VERIFY_BITS(c, 64); */ - /* [d u6 0 0 0 0 0 0 t9 0 0 c-u6*R0 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ - t6 = c & M; c >>= 26; c += u6 * R1; - VERIFY_BITS(t6, 26); - VERIFY_BITS(c, 39); - /* [d u6 0 0 0 0 0 0 t9 0 c-u6*R1 t6-u6*R0 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ - /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ - - c += (uint64_t)a[0] * b[7] - + (uint64_t)a[1] * b[6] - + (uint64_t)a[2] * b[5] - + (uint64_t)a[3] * b[4] - + (uint64_t)a[4] * b[3] - + (uint64_t)a[5] * b[2] - + (uint64_t)a[6] * b[1] - + (uint64_t)a[7] * b[0]; - /* VERIFY_BITS(c, 64); */ - VERIFY_CHECK(c <= 0x8000007C00000007ULL); - /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ - d += (uint64_t)a[8] * b[9] - + (uint64_t)a[9] * b[8]; - VERIFY_BITS(d, 58); - /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ - u7 = d & M; d >>= 26; c += u7 * R0; - VERIFY_BITS(u7, 26); - VERIFY_BITS(d, 32); - /* VERIFY_BITS(c, 64); */ - VERIFY_CHECK(c <= 0x800001703FFFC2F7ULL); - /* [d u7 0 0 0 0 0 0 0 t9 0 c-u7*R0 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ - t7 = c & M; c >>= 26; c += u7 * R1; - VERIFY_BITS(t7, 26); - VERIFY_BITS(c, 38); - /* [d u7 0 0 0 0 0 0 0 t9 c-u7*R1 t7-u7*R0 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ - /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ - - c += (uint64_t)a[0] * b[8] - + (uint64_t)a[1] * b[7] - + (uint64_t)a[2] * b[6] - + (uint64_t)a[3] * b[5] - + (uint64_t)a[4] * b[4] - + (uint64_t)a[5] * b[3] - + (uint64_t)a[6] * b[2] - + (uint64_t)a[7] * b[1] - + (uint64_t)a[8] * b[0]; - /* VERIFY_BITS(c, 64); */ - VERIFY_CHECK(c <= 0x9000007B80000008ULL); - /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - d += (uint64_t)a[9] * b[9]; - VERIFY_BITS(d, 57); - /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - u8 = d & M; d >>= 26; c += u8 * R0; - VERIFY_BITS(u8, 26); - VERIFY_BITS(d, 31); - /* VERIFY_BITS(c, 64); */ - VERIFY_CHECK(c <= 0x9000016FBFFFC2F8ULL); - /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 t4 t3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - - r[3] = t3; - VERIFY_BITS(r[3], 26); - /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 t4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[4] = t4; - VERIFY_BITS(r[4], 26); - /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[5] = t5; - VERIFY_BITS(r[5], 26); - /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[6] = t6; - VERIFY_BITS(r[6], 26); - /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[7] = t7; - VERIFY_BITS(r[7], 26); - /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - - r[8] = c & M; c >>= 26; c += u8 * R1; - VERIFY_BITS(r[8], 26); - VERIFY_BITS(c, 39); - /* [d u8 0 0 0 0 0 0 0 0 t9+c-u8*R1 r8-u8*R0 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - /* [d 0 0 0 0 0 0 0 0 0 t9+c r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - c += d * R0 + t9; - VERIFY_BITS(c, 45); - /* [d 0 0 0 0 0 0 0 0 0 c-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[9] = c & (M >> 4); c >>= 22; c += d * (R1 << 4); - VERIFY_BITS(r[9], 22); - VERIFY_BITS(c, 46); - /* [d 0 0 0 0 0 0 0 0 r9+((c-d*R1<<4)<<22)-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - /* [d 0 0 0 0 0 0 0 -d*R1 r9+(c<<22)-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - - d = c * (R0 >> 4) + t0; - VERIFY_BITS(d, 56); - /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1 d-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[0] = d & M; d >>= 26; - VERIFY_BITS(r[0], 26); - VERIFY_BITS(d, 30); - /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1+d r0-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - d += c * (R1 >> 4) + t1; - VERIFY_BITS(d, 53); - VERIFY_CHECK(d <= 0x10000003FFFFBFULL); - /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 d-c*R1>>4 r0-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - /* [r9 r8 r7 r6 r5 r4 r3 t2 d r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[1] = d & M; d >>= 26; - VERIFY_BITS(r[1], 26); - VERIFY_BITS(d, 27); - VERIFY_CHECK(d <= 0x4000000ULL); - /* [r9 r8 r7 r6 r5 r4 r3 t2+d r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - d += t2; - VERIFY_BITS(d, 27); - /* [r9 r8 r7 r6 r5 r4 r3 d r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[2] = d; - VERIFY_BITS(r[2], 27); - /* [r9 r8 r7 r6 r5 r4 r3 r2 r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ -} - -SECP256K1_INLINE static void secp256k1_fe_sqr_inner(uint32_t *r, const uint32_t *a) { - uint64_t c, d; - uint64_t u0, u1, u2, u3, u4, u5, u6, u7, u8; - uint32_t t9, t0, t1, t2, t3, t4, t5, t6, t7; - const uint32_t M = 0x3FFFFFFUL, R0 = 0x3D10UL, R1 = 0x400UL; - - VERIFY_BITS(a[0], 30); - VERIFY_BITS(a[1], 30); - VERIFY_BITS(a[2], 30); - VERIFY_BITS(a[3], 30); - VERIFY_BITS(a[4], 30); - VERIFY_BITS(a[5], 30); - VERIFY_BITS(a[6], 30); - VERIFY_BITS(a[7], 30); - VERIFY_BITS(a[8], 30); - VERIFY_BITS(a[9], 26); - - /** [... a b c] is a shorthand for ... + a<<52 + b<<26 + c<<0 mod n. - * px is a shorthand for sum(a[i]*a[x-i], i=0..x). - * Note that [x 0 0 0 0 0 0 0 0 0 0] = [x*R1 x*R0]. - */ - - d = (uint64_t)(a[0]*2) * a[9] - + (uint64_t)(a[1]*2) * a[8] - + (uint64_t)(a[2]*2) * a[7] - + (uint64_t)(a[3]*2) * a[6] - + (uint64_t)(a[4]*2) * a[5]; - /* VERIFY_BITS(d, 64); */ - /* [d 0 0 0 0 0 0 0 0 0] = [p9 0 0 0 0 0 0 0 0 0] */ - t9 = d & M; d >>= 26; - VERIFY_BITS(t9, 26); - VERIFY_BITS(d, 38); - /* [d t9 0 0 0 0 0 0 0 0 0] = [p9 0 0 0 0 0 0 0 0 0] */ - - c = (uint64_t)a[0] * a[0]; - VERIFY_BITS(c, 60); - /* [d t9 0 0 0 0 0 0 0 0 c] = [p9 0 0 0 0 0 0 0 0 p0] */ - d += (uint64_t)(a[1]*2) * a[9] - + (uint64_t)(a[2]*2) * a[8] - + (uint64_t)(a[3]*2) * a[7] - + (uint64_t)(a[4]*2) * a[6] - + (uint64_t)a[5] * a[5]; - VERIFY_BITS(d, 63); - /* [d t9 0 0 0 0 0 0 0 0 c] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ - u0 = d & M; d >>= 26; c += u0 * R0; - VERIFY_BITS(u0, 26); - VERIFY_BITS(d, 37); - VERIFY_BITS(c, 61); - /* [d u0 t9 0 0 0 0 0 0 0 0 c-u0*R0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ - t0 = c & M; c >>= 26; c += u0 * R1; - VERIFY_BITS(t0, 26); - VERIFY_BITS(c, 37); - /* [d u0 t9 0 0 0 0 0 0 0 c-u0*R1 t0-u0*R0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ - /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */ - - c += (uint64_t)(a[0]*2) * a[1]; - VERIFY_BITS(c, 62); - /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p10 p9 0 0 0 0 0 0 0 p1 p0] */ - d += (uint64_t)(a[2]*2) * a[9] - + (uint64_t)(a[3]*2) * a[8] - + (uint64_t)(a[4]*2) * a[7] - + (uint64_t)(a[5]*2) * a[6]; - VERIFY_BITS(d, 63); - /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ - u1 = d & M; d >>= 26; c += u1 * R0; - VERIFY_BITS(u1, 26); - VERIFY_BITS(d, 37); - VERIFY_BITS(c, 63); - /* [d u1 0 t9 0 0 0 0 0 0 0 c-u1*R0 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ - t1 = c & M; c >>= 26; c += u1 * R1; - VERIFY_BITS(t1, 26); - VERIFY_BITS(c, 38); - /* [d u1 0 t9 0 0 0 0 0 0 c-u1*R1 t1-u1*R0 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ - /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */ - - c += (uint64_t)(a[0]*2) * a[2] - + (uint64_t)a[1] * a[1]; - VERIFY_BITS(c, 62); - /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ - d += (uint64_t)(a[3]*2) * a[9] - + (uint64_t)(a[4]*2) * a[8] - + (uint64_t)(a[5]*2) * a[7] - + (uint64_t)a[6] * a[6]; - VERIFY_BITS(d, 63); - /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ - u2 = d & M; d >>= 26; c += u2 * R0; - VERIFY_BITS(u2, 26); - VERIFY_BITS(d, 37); - VERIFY_BITS(c, 63); - /* [d u2 0 0 t9 0 0 0 0 0 0 c-u2*R0 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ - t2 = c & M; c >>= 26; c += u2 * R1; - VERIFY_BITS(t2, 26); - VERIFY_BITS(c, 38); - /* [d u2 0 0 t9 0 0 0 0 0 c-u2*R1 t2-u2*R0 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ - /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */ - - c += (uint64_t)(a[0]*2) * a[3] - + (uint64_t)(a[1]*2) * a[2]; - VERIFY_BITS(c, 63); - /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ - d += (uint64_t)(a[4]*2) * a[9] - + (uint64_t)(a[5]*2) * a[8] - + (uint64_t)(a[6]*2) * a[7]; - VERIFY_BITS(d, 63); - /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ - u3 = d & M; d >>= 26; c += u3 * R0; - VERIFY_BITS(u3, 26); - VERIFY_BITS(d, 37); - /* VERIFY_BITS(c, 64); */ - /* [d u3 0 0 0 t9 0 0 0 0 0 c-u3*R0 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ - t3 = c & M; c >>= 26; c += u3 * R1; - VERIFY_BITS(t3, 26); - VERIFY_BITS(c, 39); - /* [d u3 0 0 0 t9 0 0 0 0 c-u3*R1 t3-u3*R0 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ - /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */ - - c += (uint64_t)(a[0]*2) * a[4] - + (uint64_t)(a[1]*2) * a[3] - + (uint64_t)a[2] * a[2]; - VERIFY_BITS(c, 63); - /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ - d += (uint64_t)(a[5]*2) * a[9] - + (uint64_t)(a[6]*2) * a[8] - + (uint64_t)a[7] * a[7]; - VERIFY_BITS(d, 62); - /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ - u4 = d & M; d >>= 26; c += u4 * R0; - VERIFY_BITS(u4, 26); - VERIFY_BITS(d, 36); - /* VERIFY_BITS(c, 64); */ - /* [d u4 0 0 0 0 t9 0 0 0 0 c-u4*R0 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ - t4 = c & M; c >>= 26; c += u4 * R1; - VERIFY_BITS(t4, 26); - VERIFY_BITS(c, 39); - /* [d u4 0 0 0 0 t9 0 0 0 c-u4*R1 t4-u4*R0 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ - /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */ - - c += (uint64_t)(a[0]*2) * a[5] - + (uint64_t)(a[1]*2) * a[4] - + (uint64_t)(a[2]*2) * a[3]; - VERIFY_BITS(c, 63); - /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ - d += (uint64_t)(a[6]*2) * a[9] - + (uint64_t)(a[7]*2) * a[8]; - VERIFY_BITS(d, 62); - /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ - u5 = d & M; d >>= 26; c += u5 * R0; - VERIFY_BITS(u5, 26); - VERIFY_BITS(d, 36); - /* VERIFY_BITS(c, 64); */ - /* [d u5 0 0 0 0 0 t9 0 0 0 c-u5*R0 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ - t5 = c & M; c >>= 26; c += u5 * R1; - VERIFY_BITS(t5, 26); - VERIFY_BITS(c, 39); - /* [d u5 0 0 0 0 0 t9 0 0 c-u5*R1 t5-u5*R0 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ - /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */ - - c += (uint64_t)(a[0]*2) * a[6] - + (uint64_t)(a[1]*2) * a[5] - + (uint64_t)(a[2]*2) * a[4] - + (uint64_t)a[3] * a[3]; - VERIFY_BITS(c, 63); - /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ - d += (uint64_t)(a[7]*2) * a[9] - + (uint64_t)a[8] * a[8]; - VERIFY_BITS(d, 61); - /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ - u6 = d & M; d >>= 26; c += u6 * R0; - VERIFY_BITS(u6, 26); - VERIFY_BITS(d, 35); - /* VERIFY_BITS(c, 64); */ - /* [d u6 0 0 0 0 0 0 t9 0 0 c-u6*R0 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ - t6 = c & M; c >>= 26; c += u6 * R1; - VERIFY_BITS(t6, 26); - VERIFY_BITS(c, 39); - /* [d u6 0 0 0 0 0 0 t9 0 c-u6*R1 t6-u6*R0 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ - /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */ - - c += (uint64_t)(a[0]*2) * a[7] - + (uint64_t)(a[1]*2) * a[6] - + (uint64_t)(a[2]*2) * a[5] - + (uint64_t)(a[3]*2) * a[4]; - /* VERIFY_BITS(c, 64); */ - VERIFY_CHECK(c <= 0x8000007C00000007ULL); - /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ - d += (uint64_t)(a[8]*2) * a[9]; - VERIFY_BITS(d, 58); - /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ - u7 = d & M; d >>= 26; c += u7 * R0; - VERIFY_BITS(u7, 26); - VERIFY_BITS(d, 32); - /* VERIFY_BITS(c, 64); */ - VERIFY_CHECK(c <= 0x800001703FFFC2F7ULL); - /* [d u7 0 0 0 0 0 0 0 t9 0 c-u7*R0 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ - t7 = c & M; c >>= 26; c += u7 * R1; - VERIFY_BITS(t7, 26); - VERIFY_BITS(c, 38); - /* [d u7 0 0 0 0 0 0 0 t9 c-u7*R1 t7-u7*R0 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ - /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */ - - c += (uint64_t)(a[0]*2) * a[8] - + (uint64_t)(a[1]*2) * a[7] - + (uint64_t)(a[2]*2) * a[6] - + (uint64_t)(a[3]*2) * a[5] - + (uint64_t)a[4] * a[4]; - /* VERIFY_BITS(c, 64); */ - VERIFY_CHECK(c <= 0x9000007B80000008ULL); - /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - d += (uint64_t)a[9] * a[9]; - VERIFY_BITS(d, 57); - /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - u8 = d & M; d >>= 26; c += u8 * R0; - VERIFY_BITS(u8, 26); - VERIFY_BITS(d, 31); - /* VERIFY_BITS(c, 64); */ - VERIFY_CHECK(c <= 0x9000016FBFFFC2F8ULL); - /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 t4 t3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - - r[3] = t3; - VERIFY_BITS(r[3], 26); - /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 t4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[4] = t4; - VERIFY_BITS(r[4], 26); - /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[5] = t5; - VERIFY_BITS(r[5], 26); - /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[6] = t6; - VERIFY_BITS(r[6], 26); - /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[7] = t7; - VERIFY_BITS(r[7], 26); - /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - - r[8] = c & M; c >>= 26; c += u8 * R1; - VERIFY_BITS(r[8], 26); - VERIFY_BITS(c, 39); - /* [d u8 0 0 0 0 0 0 0 0 t9+c-u8*R1 r8-u8*R0 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - /* [d 0 0 0 0 0 0 0 0 0 t9+c r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - c += d * R0 + t9; - VERIFY_BITS(c, 45); - /* [d 0 0 0 0 0 0 0 0 0 c-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[9] = c & (M >> 4); c >>= 22; c += d * (R1 << 4); - VERIFY_BITS(r[9], 22); - VERIFY_BITS(c, 46); - /* [d 0 0 0 0 0 0 0 0 r9+((c-d*R1<<4)<<22)-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - /* [d 0 0 0 0 0 0 0 -d*R1 r9+(c<<22)-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - - d = c * (R0 >> 4) + t0; - VERIFY_BITS(d, 56); - /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1 d-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[0] = d & M; d >>= 26; - VERIFY_BITS(r[0], 26); - VERIFY_BITS(d, 30); - /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1+d r0-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - d += c * (R1 >> 4) + t1; - VERIFY_BITS(d, 53); - VERIFY_CHECK(d <= 0x10000003FFFFBFULL); - /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 d-c*R1>>4 r0-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - /* [r9 r8 r7 r6 r5 r4 r3 t2 d r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[1] = d & M; d >>= 26; - VERIFY_BITS(r[1], 26); - VERIFY_BITS(d, 27); - VERIFY_CHECK(d <= 0x4000000ULL); - /* [r9 r8 r7 r6 r5 r4 r3 t2+d r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - d += t2; - VERIFY_BITS(d, 27); - /* [r9 r8 r7 r6 r5 r4 r3 d r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[2] = d; - VERIFY_BITS(r[2], 27); - /* [r9 r8 r7 r6 r5 r4 r3 r2 r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ -} - - -static void secp256k1_fe_mul(secp256k1_fe_t *r, const secp256k1_fe_t *a, const secp256k1_fe_t * SECP256K1_RESTRICT b) { -#ifdef VERIFY - VERIFY_CHECK(a->magnitude <= 8); - VERIFY_CHECK(b->magnitude <= 8); - secp256k1_fe_verify(a); - secp256k1_fe_verify(b); - VERIFY_CHECK(r != b); -#endif - secp256k1_fe_mul_inner(r->n, a->n, b->n); -#ifdef VERIFY - r->magnitude = 1; - r->normalized = 0; - secp256k1_fe_verify(r); -#endif -} - -static void secp256k1_fe_sqr(secp256k1_fe_t *r, const secp256k1_fe_t *a) { -#ifdef VERIFY - VERIFY_CHECK(a->magnitude <= 8); - secp256k1_fe_verify(a); -#endif - secp256k1_fe_sqr_inner(r->n, a->n); -#ifdef VERIFY - r->magnitude = 1; - r->normalized = 0; - secp256k1_fe_verify(r); -#endif -} - -static SECP256K1_INLINE void secp256k1_fe_storage_cmov(secp256k1_fe_storage_t *r, const secp256k1_fe_storage_t *a, int flag) { - uint32_t mask0, mask1; - mask0 = flag + ~((uint32_t)0); - mask1 = ~mask0; - r->n[0] = (r->n[0] & mask0) | (a->n[0] & mask1); - r->n[1] = (r->n[1] & mask0) | (a->n[1] & mask1); - r->n[2] = (r->n[2] & mask0) | (a->n[2] & mask1); - r->n[3] = (r->n[3] & mask0) | (a->n[3] & mask1); - r->n[4] = (r->n[4] & mask0) | (a->n[4] & mask1); - r->n[5] = (r->n[5] & mask0) | (a->n[5] & mask1); - r->n[6] = (r->n[6] & mask0) | (a->n[6] & mask1); - r->n[7] = (r->n[7] & mask0) | (a->n[7] & mask1); -} - -static void secp256k1_fe_to_storage(secp256k1_fe_storage_t *r, const secp256k1_fe_t *a) { -#ifdef VERIFY - VERIFY_CHECK(a->normalized); -#endif - r->n[0] = a->n[0] | a->n[1] << 26; - r->n[1] = a->n[1] >> 6 | a->n[2] << 20; - r->n[2] = a->n[2] >> 12 | a->n[3] << 14; - r->n[3] = a->n[3] >> 18 | a->n[4] << 8; - r->n[4] = a->n[4] >> 24 | a->n[5] << 2 | a->n[6] << 28; - r->n[5] = a->n[6] >> 4 | a->n[7] << 22; - r->n[6] = a->n[7] >> 10 | a->n[8] << 16; - r->n[7] = a->n[8] >> 16 | a->n[9] << 10; -} - -static SECP256K1_INLINE void secp256k1_fe_from_storage(secp256k1_fe_t *r, const secp256k1_fe_storage_t *a) { - r->n[0] = a->n[0] & 0x3FFFFFFUL; - r->n[1] = a->n[0] >> 26 | ((a->n[1] << 6) & 0x3FFFFFFUL); - r->n[2] = a->n[1] >> 20 | ((a->n[2] << 12) & 0x3FFFFFFUL); - r->n[3] = a->n[2] >> 14 | ((a->n[3] << 18) & 0x3FFFFFFUL); - r->n[4] = a->n[3] >> 8 | ((a->n[4] << 24) & 0x3FFFFFFUL); - r->n[5] = (a->n[4] >> 2) & 0x3FFFFFFUL; - r->n[6] = a->n[4] >> 28 | ((a->n[5] << 4) & 0x3FFFFFFUL); - r->n[7] = a->n[5] >> 22 | ((a->n[6] << 10) & 0x3FFFFFFUL); - r->n[8] = a->n[6] >> 16 | ((a->n[7] << 16) & 0x3FFFFFFUL); - r->n[9] = a->n[7] >> 10; -#ifdef VERIFY - r->magnitude = 1; - r->normalized = 1; -#endif -} - -#endif diff --git a/crypto/secp256k1/secp256k1/src/field_5x52.h b/crypto/secp256k1/secp256k1/src/field_5x52.h deleted file mode 100644 index 4513d36f4..000000000 --- a/crypto/secp256k1/secp256k1/src/field_5x52.h +++ /dev/null @@ -1,47 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_FIELD_REPR_ -#define _SECP256K1_FIELD_REPR_ - -#include - -typedef struct { - /* X = sum(i=0..4, elem[i]*2^52) mod n */ - uint64_t n[5]; -#ifdef VERIFY - int magnitude; - int normalized; -#endif -} secp256k1_fe_t; - -/* Unpacks a constant into a overlapping multi-limbed FE element. */ -#define SECP256K1_FE_CONST_INNER(d7, d6, d5, d4, d3, d2, d1, d0) { \ - (d0) | ((uint64_t)(d1) & 0xFFFFFUL) << 32, \ - ((d1) >> 20) | ((uint64_t)(d2)) << 12 | ((uint64_t)(d3) & 0xFFUL) << 44, \ - ((d3) >> 8) | ((uint64_t)(d4) & 0xFFFFFFFUL) << 24, \ - ((d4) >> 28) | ((uint64_t)(d5)) << 4 | ((uint64_t)(d6) & 0xFFFFUL) << 36, \ - ((d6) >> 16) | ((uint64_t)(d7)) << 16 \ -} - -#ifdef VERIFY -#define SECP256K1_FE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {SECP256K1_FE_CONST_INNER((d7), (d6), (d5), (d4), (d3), (d2), (d1), (d0)), 1, 1} -#else -#define SECP256K1_FE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {SECP256K1_FE_CONST_INNER((d7), (d6), (d5), (d4), (d3), (d2), (d1), (d0))} -#endif - -typedef struct { - uint64_t n[4]; -} secp256k1_fe_storage_t; - -#define SECP256K1_FE_STORAGE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{ \ - (d0) | ((uint64_t)(d1)) << 32, \ - (d2) | ((uint64_t)(d3)) << 32, \ - (d4) | ((uint64_t)(d5)) << 32, \ - (d6) | ((uint64_t)(d7)) << 32 \ -}} - -#endif diff --git a/crypto/secp256k1/secp256k1/src/field_5x52_asm_impl.h b/crypto/secp256k1/secp256k1/src/field_5x52_asm_impl.h deleted file mode 100644 index 98cc004bf..000000000 --- a/crypto/secp256k1/secp256k1/src/field_5x52_asm_impl.h +++ /dev/null @@ -1,502 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013-2014 Diederik Huys, Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -/** - * Changelog: - * - March 2013, Diederik Huys: original version - * - November 2014, Pieter Wuille: updated to use Peter Dettman's parallel multiplication algorithm - * - December 2014, Pieter Wuille: converted from YASM to GCC inline assembly - */ - -#ifndef _SECP256K1_FIELD_INNER5X52_IMPL_H_ -#define _SECP256K1_FIELD_INNER5X52_IMPL_H_ - -SECP256K1_INLINE static void secp256k1_fe_mul_inner(uint64_t *r, const uint64_t *a, const uint64_t * SECP256K1_RESTRICT b) { -/** - * Registers: rdx:rax = multiplication accumulator - * r9:r8 = c - * r15:rcx = d - * r10-r14 = a0-a4 - * rbx = b - * rdi = r - * rsi = a / t? - */ - uint64_t tmp1, tmp2, tmp3; -__asm__ __volatile__( - "movq 0(%%rsi),%%r10\n" - "movq 8(%%rsi),%%r11\n" - "movq 16(%%rsi),%%r12\n" - "movq 24(%%rsi),%%r13\n" - "movq 32(%%rsi),%%r14\n" - - /* d += a3 * b0 */ - "movq 0(%%rbx),%%rax\n" - "mulq %%r13\n" - "movq %%rax,%%rcx\n" - "movq %%rdx,%%r15\n" - /* d += a2 * b1 */ - "movq 8(%%rbx),%%rax\n" - "mulq %%r12\n" - "addq %%rax,%%rcx\n" - "adcq %%rdx,%%r15\n" - /* d += a1 * b2 */ - "movq 16(%%rbx),%%rax\n" - "mulq %%r11\n" - "addq %%rax,%%rcx\n" - "adcq %%rdx,%%r15\n" - /* d = a0 * b3 */ - "movq 24(%%rbx),%%rax\n" - "mulq %%r10\n" - "addq %%rax,%%rcx\n" - "adcq %%rdx,%%r15\n" - /* c = a4 * b4 */ - "movq 32(%%rbx),%%rax\n" - "mulq %%r14\n" - "movq %%rax,%%r8\n" - "movq %%rdx,%%r9\n" - /* d += (c & M) * R */ - "movq $0xfffffffffffff,%%rdx\n" - "andq %%rdx,%%rax\n" - "movq $0x1000003d10,%%rdx\n" - "mulq %%rdx\n" - "addq %%rax,%%rcx\n" - "adcq %%rdx,%%r15\n" - /* c >>= 52 (%%r8 only) */ - "shrdq $52,%%r9,%%r8\n" - /* t3 (tmp1) = d & M */ - "movq %%rcx,%%rsi\n" - "movq $0xfffffffffffff,%%rdx\n" - "andq %%rdx,%%rsi\n" - "movq %%rsi,%q1\n" - /* d >>= 52 */ - "shrdq $52,%%r15,%%rcx\n" - "xorq %%r15,%%r15\n" - /* d += a4 * b0 */ - "movq 0(%%rbx),%%rax\n" - "mulq %%r14\n" - "addq %%rax,%%rcx\n" - "adcq %%rdx,%%r15\n" - /* d += a3 * b1 */ - "movq 8(%%rbx),%%rax\n" - "mulq %%r13\n" - "addq %%rax,%%rcx\n" - "adcq %%rdx,%%r15\n" - /* d += a2 * b2 */ - "movq 16(%%rbx),%%rax\n" - "mulq %%r12\n" - "addq %%rax,%%rcx\n" - "adcq %%rdx,%%r15\n" - /* d += a1 * b3 */ - "movq 24(%%rbx),%%rax\n" - "mulq %%r11\n" - "addq %%rax,%%rcx\n" - "adcq %%rdx,%%r15\n" - /* d += a0 * b4 */ - "movq 32(%%rbx),%%rax\n" - "mulq %%r10\n" - "addq %%rax,%%rcx\n" - "adcq %%rdx,%%r15\n" - /* d += c * R */ - "movq %%r8,%%rax\n" - "movq $0x1000003d10,%%rdx\n" - "mulq %%rdx\n" - "addq %%rax,%%rcx\n" - "adcq %%rdx,%%r15\n" - /* t4 = d & M (%%rsi) */ - "movq %%rcx,%%rsi\n" - "movq $0xfffffffffffff,%%rdx\n" - "andq %%rdx,%%rsi\n" - /* d >>= 52 */ - "shrdq $52,%%r15,%%rcx\n" - "xorq %%r15,%%r15\n" - /* tx = t4 >> 48 (tmp3) */ - "movq %%rsi,%%rax\n" - "shrq $48,%%rax\n" - "movq %%rax,%q3\n" - /* t4 &= (M >> 4) (tmp2) */ - "movq $0xffffffffffff,%%rax\n" - "andq %%rax,%%rsi\n" - "movq %%rsi,%q2\n" - /* c = a0 * b0 */ - "movq 0(%%rbx),%%rax\n" - "mulq %%r10\n" - "movq %%rax,%%r8\n" - "movq %%rdx,%%r9\n" - /* d += a4 * b1 */ - "movq 8(%%rbx),%%rax\n" - "mulq %%r14\n" - "addq %%rax,%%rcx\n" - "adcq %%rdx,%%r15\n" - /* d += a3 * b2 */ - "movq 16(%%rbx),%%rax\n" - "mulq %%r13\n" - "addq %%rax,%%rcx\n" - "adcq %%rdx,%%r15\n" - /* d += a2 * b3 */ - "movq 24(%%rbx),%%rax\n" - "mulq %%r12\n" - "addq %%rax,%%rcx\n" - "adcq %%rdx,%%r15\n" - /* d += a1 * b4 */ - "movq 32(%%rbx),%%rax\n" - "mulq %%r11\n" - "addq %%rax,%%rcx\n" - "adcq %%rdx,%%r15\n" - /* u0 = d & M (%%rsi) */ - "movq %%rcx,%%rsi\n" - "movq $0xfffffffffffff,%%rdx\n" - "andq %%rdx,%%rsi\n" - /* d >>= 52 */ - "shrdq $52,%%r15,%%rcx\n" - "xorq %%r15,%%r15\n" - /* u0 = (u0 << 4) | tx (%%rsi) */ - "shlq $4,%%rsi\n" - "movq %q3,%%rax\n" - "orq %%rax,%%rsi\n" - /* c += u0 * (R >> 4) */ - "movq $0x1000003d1,%%rax\n" - "mulq %%rsi\n" - "addq %%rax,%%r8\n" - "adcq %%rdx,%%r9\n" - /* r[0] = c & M */ - "movq %%r8,%%rax\n" - "movq $0xfffffffffffff,%%rdx\n" - "andq %%rdx,%%rax\n" - "movq %%rax,0(%%rdi)\n" - /* c >>= 52 */ - "shrdq $52,%%r9,%%r8\n" - "xorq %%r9,%%r9\n" - /* c += a1 * b0 */ - "movq 0(%%rbx),%%rax\n" - "mulq %%r11\n" - "addq %%rax,%%r8\n" - "adcq %%rdx,%%r9\n" - /* c += a0 * b1 */ - "movq 8(%%rbx),%%rax\n" - "mulq %%r10\n" - "addq %%rax,%%r8\n" - "adcq %%rdx,%%r9\n" - /* d += a4 * b2 */ - "movq 16(%%rbx),%%rax\n" - "mulq %%r14\n" - "addq %%rax,%%rcx\n" - "adcq %%rdx,%%r15\n" - /* d += a3 * b3 */ - "movq 24(%%rbx),%%rax\n" - "mulq %%r13\n" - "addq %%rax,%%rcx\n" - "adcq %%rdx,%%r15\n" - /* d += a2 * b4 */ - "movq 32(%%rbx),%%rax\n" - "mulq %%r12\n" - "addq %%rax,%%rcx\n" - "adcq %%rdx,%%r15\n" - /* c += (d & M) * R */ - "movq %%rcx,%%rax\n" - "movq $0xfffffffffffff,%%rdx\n" - "andq %%rdx,%%rax\n" - "movq $0x1000003d10,%%rdx\n" - "mulq %%rdx\n" - "addq %%rax,%%r8\n" - "adcq %%rdx,%%r9\n" - /* d >>= 52 */ - "shrdq $52,%%r15,%%rcx\n" - "xorq %%r15,%%r15\n" - /* r[1] = c & M */ - "movq %%r8,%%rax\n" - "movq $0xfffffffffffff,%%rdx\n" - "andq %%rdx,%%rax\n" - "movq %%rax,8(%%rdi)\n" - /* c >>= 52 */ - "shrdq $52,%%r9,%%r8\n" - "xorq %%r9,%%r9\n" - /* c += a2 * b0 */ - "movq 0(%%rbx),%%rax\n" - "mulq %%r12\n" - "addq %%rax,%%r8\n" - "adcq %%rdx,%%r9\n" - /* c += a1 * b1 */ - "movq 8(%%rbx),%%rax\n" - "mulq %%r11\n" - "addq %%rax,%%r8\n" - "adcq %%rdx,%%r9\n" - /* c += a0 * b2 (last use of %%r10 = a0) */ - "movq 16(%%rbx),%%rax\n" - "mulq %%r10\n" - "addq %%rax,%%r8\n" - "adcq %%rdx,%%r9\n" - /* fetch t3 (%%r10, overwrites a0), t4 (%%rsi) */ - "movq %q2,%%rsi\n" - "movq %q1,%%r10\n" - /* d += a4 * b3 */ - "movq 24(%%rbx),%%rax\n" - "mulq %%r14\n" - "addq %%rax,%%rcx\n" - "adcq %%rdx,%%r15\n" - /* d += a3 * b4 */ - "movq 32(%%rbx),%%rax\n" - "mulq %%r13\n" - "addq %%rax,%%rcx\n" - "adcq %%rdx,%%r15\n" - /* c += (d & M) * R */ - "movq %%rcx,%%rax\n" - "movq $0xfffffffffffff,%%rdx\n" - "andq %%rdx,%%rax\n" - "movq $0x1000003d10,%%rdx\n" - "mulq %%rdx\n" - "addq %%rax,%%r8\n" - "adcq %%rdx,%%r9\n" - /* d >>= 52 (%%rcx only) */ - "shrdq $52,%%r15,%%rcx\n" - /* r[2] = c & M */ - "movq %%r8,%%rax\n" - "movq $0xfffffffffffff,%%rdx\n" - "andq %%rdx,%%rax\n" - "movq %%rax,16(%%rdi)\n" - /* c >>= 52 */ - "shrdq $52,%%r9,%%r8\n" - "xorq %%r9,%%r9\n" - /* c += t3 */ - "addq %%r10,%%r8\n" - /* c += d * R */ - "movq %%rcx,%%rax\n" - "movq $0x1000003d10,%%rdx\n" - "mulq %%rdx\n" - "addq %%rax,%%r8\n" - "adcq %%rdx,%%r9\n" - /* r[3] = c & M */ - "movq %%r8,%%rax\n" - "movq $0xfffffffffffff,%%rdx\n" - "andq %%rdx,%%rax\n" - "movq %%rax,24(%%rdi)\n" - /* c >>= 52 (%%r8 only) */ - "shrdq $52,%%r9,%%r8\n" - /* c += t4 (%%r8 only) */ - "addq %%rsi,%%r8\n" - /* r[4] = c */ - "movq %%r8,32(%%rdi)\n" -: "+S"(a), "=m"(tmp1), "=m"(tmp2), "=m"(tmp3) -: "b"(b), "D"(r) -: "%rax", "%rcx", "%rdx", "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", "cc", "memory" -); -} - -SECP256K1_INLINE static void secp256k1_fe_sqr_inner(uint64_t *r, const uint64_t *a) { -/** - * Registers: rdx:rax = multiplication accumulator - * r9:r8 = c - * rcx:rbx = d - * r10-r14 = a0-a4 - * r15 = M (0xfffffffffffff) - * rdi = r - * rsi = a / t? - */ - uint64_t tmp1, tmp2, tmp3; -__asm__ __volatile__( - "movq 0(%%rsi),%%r10\n" - "movq 8(%%rsi),%%r11\n" - "movq 16(%%rsi),%%r12\n" - "movq 24(%%rsi),%%r13\n" - "movq 32(%%rsi),%%r14\n" - "movq $0xfffffffffffff,%%r15\n" - - /* d = (a0*2) * a3 */ - "leaq (%%r10,%%r10,1),%%rax\n" - "mulq %%r13\n" - "movq %%rax,%%rbx\n" - "movq %%rdx,%%rcx\n" - /* d += (a1*2) * a2 */ - "leaq (%%r11,%%r11,1),%%rax\n" - "mulq %%r12\n" - "addq %%rax,%%rbx\n" - "adcq %%rdx,%%rcx\n" - /* c = a4 * a4 */ - "movq %%r14,%%rax\n" - "mulq %%r14\n" - "movq %%rax,%%r8\n" - "movq %%rdx,%%r9\n" - /* d += (c & M) * R */ - "andq %%r15,%%rax\n" - "movq $0x1000003d10,%%rdx\n" - "mulq %%rdx\n" - "addq %%rax,%%rbx\n" - "adcq %%rdx,%%rcx\n" - /* c >>= 52 (%%r8 only) */ - "shrdq $52,%%r9,%%r8\n" - /* t3 (tmp1) = d & M */ - "movq %%rbx,%%rsi\n" - "andq %%r15,%%rsi\n" - "movq %%rsi,%q1\n" - /* d >>= 52 */ - "shrdq $52,%%rcx,%%rbx\n" - "xorq %%rcx,%%rcx\n" - /* a4 *= 2 */ - "addq %%r14,%%r14\n" - /* d += a0 * a4 */ - "movq %%r10,%%rax\n" - "mulq %%r14\n" - "addq %%rax,%%rbx\n" - "adcq %%rdx,%%rcx\n" - /* d+= (a1*2) * a3 */ - "leaq (%%r11,%%r11,1),%%rax\n" - "mulq %%r13\n" - "addq %%rax,%%rbx\n" - "adcq %%rdx,%%rcx\n" - /* d += a2 * a2 */ - "movq %%r12,%%rax\n" - "mulq %%r12\n" - "addq %%rax,%%rbx\n" - "adcq %%rdx,%%rcx\n" - /* d += c * R */ - "movq %%r8,%%rax\n" - "movq $0x1000003d10,%%rdx\n" - "mulq %%rdx\n" - "addq %%rax,%%rbx\n" - "adcq %%rdx,%%rcx\n" - /* t4 = d & M (%%rsi) */ - "movq %%rbx,%%rsi\n" - "andq %%r15,%%rsi\n" - /* d >>= 52 */ - "shrdq $52,%%rcx,%%rbx\n" - "xorq %%rcx,%%rcx\n" - /* tx = t4 >> 48 (tmp3) */ - "movq %%rsi,%%rax\n" - "shrq $48,%%rax\n" - "movq %%rax,%q3\n" - /* t4 &= (M >> 4) (tmp2) */ - "movq $0xffffffffffff,%%rax\n" - "andq %%rax,%%rsi\n" - "movq %%rsi,%q2\n" - /* c = a0 * a0 */ - "movq %%r10,%%rax\n" - "mulq %%r10\n" - "movq %%rax,%%r8\n" - "movq %%rdx,%%r9\n" - /* d += a1 * a4 */ - "movq %%r11,%%rax\n" - "mulq %%r14\n" - "addq %%rax,%%rbx\n" - "adcq %%rdx,%%rcx\n" - /* d += (a2*2) * a3 */ - "leaq (%%r12,%%r12,1),%%rax\n" - "mulq %%r13\n" - "addq %%rax,%%rbx\n" - "adcq %%rdx,%%rcx\n" - /* u0 = d & M (%%rsi) */ - "movq %%rbx,%%rsi\n" - "andq %%r15,%%rsi\n" - /* d >>= 52 */ - "shrdq $52,%%rcx,%%rbx\n" - "xorq %%rcx,%%rcx\n" - /* u0 = (u0 << 4) | tx (%%rsi) */ - "shlq $4,%%rsi\n" - "movq %q3,%%rax\n" - "orq %%rax,%%rsi\n" - /* c += u0 * (R >> 4) */ - "movq $0x1000003d1,%%rax\n" - "mulq %%rsi\n" - "addq %%rax,%%r8\n" - "adcq %%rdx,%%r9\n" - /* r[0] = c & M */ - "movq %%r8,%%rax\n" - "andq %%r15,%%rax\n" - "movq %%rax,0(%%rdi)\n" - /* c >>= 52 */ - "shrdq $52,%%r9,%%r8\n" - "xorq %%r9,%%r9\n" - /* a0 *= 2 */ - "addq %%r10,%%r10\n" - /* c += a0 * a1 */ - "movq %%r10,%%rax\n" - "mulq %%r11\n" - "addq %%rax,%%r8\n" - "adcq %%rdx,%%r9\n" - /* d += a2 * a4 */ - "movq %%r12,%%rax\n" - "mulq %%r14\n" - "addq %%rax,%%rbx\n" - "adcq %%rdx,%%rcx\n" - /* d += a3 * a3 */ - "movq %%r13,%%rax\n" - "mulq %%r13\n" - "addq %%rax,%%rbx\n" - "adcq %%rdx,%%rcx\n" - /* c += (d & M) * R */ - "movq %%rbx,%%rax\n" - "andq %%r15,%%rax\n" - "movq $0x1000003d10,%%rdx\n" - "mulq %%rdx\n" - "addq %%rax,%%r8\n" - "adcq %%rdx,%%r9\n" - /* d >>= 52 */ - "shrdq $52,%%rcx,%%rbx\n" - "xorq %%rcx,%%rcx\n" - /* r[1] = c & M */ - "movq %%r8,%%rax\n" - "andq %%r15,%%rax\n" - "movq %%rax,8(%%rdi)\n" - /* c >>= 52 */ - "shrdq $52,%%r9,%%r8\n" - "xorq %%r9,%%r9\n" - /* c += a0 * a2 (last use of %%r10) */ - "movq %%r10,%%rax\n" - "mulq %%r12\n" - "addq %%rax,%%r8\n" - "adcq %%rdx,%%r9\n" - /* fetch t3 (%%r10, overwrites a0),t4 (%%rsi) */ - "movq %q2,%%rsi\n" - "movq %q1,%%r10\n" - /* c += a1 * a1 */ - "movq %%r11,%%rax\n" - "mulq %%r11\n" - "addq %%rax,%%r8\n" - "adcq %%rdx,%%r9\n" - /* d += a3 * a4 */ - "movq %%r13,%%rax\n" - "mulq %%r14\n" - "addq %%rax,%%rbx\n" - "adcq %%rdx,%%rcx\n" - /* c += (d & M) * R */ - "movq %%rbx,%%rax\n" - "andq %%r15,%%rax\n" - "movq $0x1000003d10,%%rdx\n" - "mulq %%rdx\n" - "addq %%rax,%%r8\n" - "adcq %%rdx,%%r9\n" - /* d >>= 52 (%%rbx only) */ - "shrdq $52,%%rcx,%%rbx\n" - /* r[2] = c & M */ - "movq %%r8,%%rax\n" - "andq %%r15,%%rax\n" - "movq %%rax,16(%%rdi)\n" - /* c >>= 52 */ - "shrdq $52,%%r9,%%r8\n" - "xorq %%r9,%%r9\n" - /* c += t3 */ - "addq %%r10,%%r8\n" - /* c += d * R */ - "movq %%rbx,%%rax\n" - "movq $0x1000003d10,%%rdx\n" - "mulq %%rdx\n" - "addq %%rax,%%r8\n" - "adcq %%rdx,%%r9\n" - /* r[3] = c & M */ - "movq %%r8,%%rax\n" - "andq %%r15,%%rax\n" - "movq %%rax,24(%%rdi)\n" - /* c >>= 52 (%%r8 only) */ - "shrdq $52,%%r9,%%r8\n" - /* c += t4 (%%r8 only) */ - "addq %%rsi,%%r8\n" - /* r[4] = c */ - "movq %%r8,32(%%rdi)\n" -: "+S"(a), "=m"(tmp1), "=m"(tmp2), "=m"(tmp3) -: "D"(r) -: "%rax", "%rbx", "%rcx", "%rdx", "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", "cc", "memory" -); -} - -#endif diff --git a/crypto/secp256k1/secp256k1/src/field_5x52_impl.h b/crypto/secp256k1/secp256k1/src/field_5x52_impl.h deleted file mode 100644 index 874d3caab..000000000 --- a/crypto/secp256k1/secp256k1/src/field_5x52_impl.h +++ /dev/null @@ -1,439 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_FIELD_REPR_IMPL_H_ -#define _SECP256K1_FIELD_REPR_IMPL_H_ - -#if defined HAVE_CONFIG_H -#include "libsecp256k1-config.h" -#endif - -#include -#include "util.h" -#include "num.h" -#include "field.h" - -#if defined(USE_ASM_X86_64) -#include "field_5x52_asm_impl.h" -#else -#include "field_5x52_int128_impl.h" -#endif - -/** Implements arithmetic modulo FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE FFFFFC2F, - * represented as 5 uint64_t's in base 2^52. The values are allowed to contain >52 each. In particular, - * each FieldElem has a 'magnitude' associated with it. Internally, a magnitude M means each element - * is at most M*(2^53-1), except the most significant one, which is limited to M*(2^49-1). All operations - * accept any input with magnitude at most M, and have different rules for propagating magnitude to their - * output. - */ - -#ifdef VERIFY -static void secp256k1_fe_verify(const secp256k1_fe_t *a) { - const uint64_t *d = a->n; - int m = a->normalized ? 1 : 2 * a->magnitude, r = 1; - /* secp256k1 'p' value defined in "Standards for Efficient Cryptography" (SEC2) 2.7.1. */ - r &= (d[0] <= 0xFFFFFFFFFFFFFULL * m); - r &= (d[1] <= 0xFFFFFFFFFFFFFULL * m); - r &= (d[2] <= 0xFFFFFFFFFFFFFULL * m); - r &= (d[3] <= 0xFFFFFFFFFFFFFULL * m); - r &= (d[4] <= 0x0FFFFFFFFFFFFULL * m); - r &= (a->magnitude >= 0); - r &= (a->magnitude <= 2048); - if (a->normalized) { - r &= (a->magnitude <= 1); - if (r && (d[4] == 0x0FFFFFFFFFFFFULL) && ((d[3] & d[2] & d[1]) == 0xFFFFFFFFFFFFFULL)) { - r &= (d[0] < 0xFFFFEFFFFFC2FULL); - } - } - VERIFY_CHECK(r == 1); -} -#else -static void secp256k1_fe_verify(const secp256k1_fe_t *a) { - (void)a; -} -#endif - -static void secp256k1_fe_normalize(secp256k1_fe_t *r) { - uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4]; - - /* Reduce t4 at the start so there will be at most a single carry from the first pass */ - uint64_t m; - uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL; - - /* The first pass ensures the magnitude is 1, ... */ - t0 += x * 0x1000003D1ULL; - t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; - t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; m = t1; - t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; m &= t2; - t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; m &= t3; - - /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */ - VERIFY_CHECK(t4 >> 49 == 0); - - /* At most a single final reduction is needed; check if the value is >= the field characteristic */ - x = (t4 >> 48) | ((t4 == 0x0FFFFFFFFFFFFULL) & (m == 0xFFFFFFFFFFFFFULL) - & (t0 >= 0xFFFFEFFFFFC2FULL)); - - /* Apply the final reduction (for constant-time behaviour, we do it always) */ - t0 += x * 0x1000003D1ULL; - t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; - t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; - t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; - t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; - - /* If t4 didn't carry to bit 48 already, then it should have after any final reduction */ - VERIFY_CHECK(t4 >> 48 == x); - - /* Mask off the possible multiple of 2^256 from the final reduction */ - t4 &= 0x0FFFFFFFFFFFFULL; - - r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4; - -#ifdef VERIFY - r->magnitude = 1; - r->normalized = 1; - secp256k1_fe_verify(r); -#endif -} - -static void secp256k1_fe_normalize_weak(secp256k1_fe_t *r) { - uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4]; - - /* Reduce t4 at the start so there will be at most a single carry from the first pass */ - uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL; - - /* The first pass ensures the magnitude is 1, ... */ - t0 += x * 0x1000003D1ULL; - t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; - t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; - t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; - t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; - - /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */ - VERIFY_CHECK(t4 >> 49 == 0); - - r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4; - -#ifdef VERIFY - r->magnitude = 1; - secp256k1_fe_verify(r); -#endif -} - -static void secp256k1_fe_normalize_var(secp256k1_fe_t *r) { - uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4]; - - /* Reduce t4 at the start so there will be at most a single carry from the first pass */ - uint64_t m; - uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL; - - /* The first pass ensures the magnitude is 1, ... */ - t0 += x * 0x1000003D1ULL; - t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; - t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; m = t1; - t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; m &= t2; - t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; m &= t3; - - /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */ - VERIFY_CHECK(t4 >> 49 == 0); - - /* At most a single final reduction is needed; check if the value is >= the field characteristic */ - x = (t4 >> 48) | ((t4 == 0x0FFFFFFFFFFFFULL) & (m == 0xFFFFFFFFFFFFFULL) - & (t0 >= 0xFFFFEFFFFFC2FULL)); - - if (x) { - t0 += 0x1000003D1ULL; - t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; - t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; - t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; - t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; - - /* If t4 didn't carry to bit 48 already, then it should have after any final reduction */ - VERIFY_CHECK(t4 >> 48 == x); - - /* Mask off the possible multiple of 2^256 from the final reduction */ - t4 &= 0x0FFFFFFFFFFFFULL; - } - - r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4; - -#ifdef VERIFY - r->magnitude = 1; - r->normalized = 1; - secp256k1_fe_verify(r); -#endif -} - -static int secp256k1_fe_normalizes_to_zero(secp256k1_fe_t *r) { - uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4]; - - /* z0 tracks a possible raw value of 0, z1 tracks a possible raw value of P */ - uint64_t z0, z1; - - /* Reduce t4 at the start so there will be at most a single carry from the first pass */ - uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL; - - /* The first pass ensures the magnitude is 1, ... */ - t0 += x * 0x1000003D1ULL; - t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL; z0 = t0; z1 = t0 ^ 0x1000003D0ULL; - t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; z0 |= t1; z1 &= t1; - t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; z0 |= t2; z1 &= t2; - t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; z0 |= t3; z1 &= t3; - z0 |= t4; z1 &= t4 ^ 0xF000000000000ULL; - - /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */ - VERIFY_CHECK(t4 >> 49 == 0); - - return (z0 == 0) | (z1 == 0xFFFFFFFFFFFFFULL); -} - -static int secp256k1_fe_normalizes_to_zero_var(secp256k1_fe_t *r) { - uint64_t t0, t1, t2, t3, t4; - uint64_t z0, z1; - uint64_t x; - - t0 = r->n[0]; - t4 = r->n[4]; - - /* Reduce t4 at the start so there will be at most a single carry from the first pass */ - x = t4 >> 48; - - /* The first pass ensures the magnitude is 1, ... */ - t0 += x * 0x1000003D1ULL; - - /* z0 tracks a possible raw value of 0, z1 tracks a possible raw value of P */ - z0 = t0 & 0xFFFFFFFFFFFFFULL; - z1 = z0 ^ 0x1000003D0ULL; - - /* Fast return path should catch the majority of cases */ - if ((z0 != 0ULL) & (z1 != 0xFFFFFFFFFFFFFULL)) { - return 0; - } - - t1 = r->n[1]; - t2 = r->n[2]; - t3 = r->n[3]; - - t4 &= 0x0FFFFFFFFFFFFULL; - - t1 += (t0 >> 52); t0 = z0; - t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; z0 |= t1; z1 &= t1; - t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; z0 |= t2; z1 &= t2; - t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; z0 |= t3; z1 &= t3; - z0 |= t4; z1 &= t4 ^ 0xF000000000000ULL; - - /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */ - VERIFY_CHECK(t4 >> 49 == 0); - - return (z0 == 0) | (z1 == 0xFFFFFFFFFFFFFULL); -} - -SECP256K1_INLINE static void secp256k1_fe_set_int(secp256k1_fe_t *r, int a) { - r->n[0] = a; - r->n[1] = r->n[2] = r->n[3] = r->n[4] = 0; -#ifdef VERIFY - r->magnitude = 1; - r->normalized = 1; - secp256k1_fe_verify(r); -#endif -} - -SECP256K1_INLINE static int secp256k1_fe_is_zero(const secp256k1_fe_t *a) { - const uint64_t *t = a->n; -#ifdef VERIFY - VERIFY_CHECK(a->normalized); - secp256k1_fe_verify(a); -#endif - return (t[0] | t[1] | t[2] | t[3] | t[4]) == 0; -} - -SECP256K1_INLINE static int secp256k1_fe_is_odd(const secp256k1_fe_t *a) { -#ifdef VERIFY - VERIFY_CHECK(a->normalized); - secp256k1_fe_verify(a); -#endif - return a->n[0] & 1; -} - -SECP256K1_INLINE static void secp256k1_fe_clear(secp256k1_fe_t *a) { - int i; -#ifdef VERIFY - a->magnitude = 0; - a->normalized = 1; -#endif - for (i=0; i<5; i++) { - a->n[i] = 0; - } -} - -static int secp256k1_fe_cmp_var(const secp256k1_fe_t *a, const secp256k1_fe_t *b) { - int i; -#ifdef VERIFY - VERIFY_CHECK(a->normalized); - VERIFY_CHECK(b->normalized); - secp256k1_fe_verify(a); - secp256k1_fe_verify(b); -#endif - for (i = 4; i >= 0; i--) { - if (a->n[i] > b->n[i]) { - return 1; - } - if (a->n[i] < b->n[i]) { - return -1; - } - } - return 0; -} - -static int secp256k1_fe_set_b32(secp256k1_fe_t *r, const unsigned char *a) { - int i; - r->n[0] = r->n[1] = r->n[2] = r->n[3] = r->n[4] = 0; - for (i=0; i<32; i++) { - int j; - for (j=0; j<2; j++) { - int limb = (8*i+4*j)/52; - int shift = (8*i+4*j)%52; - r->n[limb] |= (uint64_t)((a[31-i] >> (4*j)) & 0xF) << shift; - } - } - if (r->n[4] == 0x0FFFFFFFFFFFFULL && (r->n[3] & r->n[2] & r->n[1]) == 0xFFFFFFFFFFFFFULL && r->n[0] >= 0xFFFFEFFFFFC2FULL) { - return 0; - } -#ifdef VERIFY - r->magnitude = 1; - r->normalized = 1; - secp256k1_fe_verify(r); -#endif - return 1; -} - -/** Convert a field element to a 32-byte big endian value. Requires the input to be normalized */ -static void secp256k1_fe_get_b32(unsigned char *r, const secp256k1_fe_t *a) { - int i; -#ifdef VERIFY - VERIFY_CHECK(a->normalized); - secp256k1_fe_verify(a); -#endif - for (i=0; i<32; i++) { - int j; - int c = 0; - for (j=0; j<2; j++) { - int limb = (8*i+4*j)/52; - int shift = (8*i+4*j)%52; - c |= ((a->n[limb] >> shift) & 0xF) << (4 * j); - } - r[31-i] = c; - } -} - -SECP256K1_INLINE static void secp256k1_fe_negate(secp256k1_fe_t *r, const secp256k1_fe_t *a, int m) { -#ifdef VERIFY - VERIFY_CHECK(a->magnitude <= m); - secp256k1_fe_verify(a); -#endif - r->n[0] = 0xFFFFEFFFFFC2FULL * 2 * (m + 1) - a->n[0]; - r->n[1] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[1]; - r->n[2] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[2]; - r->n[3] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[3]; - r->n[4] = 0x0FFFFFFFFFFFFULL * 2 * (m + 1) - a->n[4]; -#ifdef VERIFY - r->magnitude = m + 1; - r->normalized = 0; - secp256k1_fe_verify(r); -#endif -} - -SECP256K1_INLINE static void secp256k1_fe_mul_int(secp256k1_fe_t *r, int a) { - r->n[0] *= a; - r->n[1] *= a; - r->n[2] *= a; - r->n[3] *= a; - r->n[4] *= a; -#ifdef VERIFY - r->magnitude *= a; - r->normalized = 0; - secp256k1_fe_verify(r); -#endif -} - -SECP256K1_INLINE static void secp256k1_fe_add(secp256k1_fe_t *r, const secp256k1_fe_t *a) { -#ifdef VERIFY - secp256k1_fe_verify(a); -#endif - r->n[0] += a->n[0]; - r->n[1] += a->n[1]; - r->n[2] += a->n[2]; - r->n[3] += a->n[3]; - r->n[4] += a->n[4]; -#ifdef VERIFY - r->magnitude += a->magnitude; - r->normalized = 0; - secp256k1_fe_verify(r); -#endif -} - -static void secp256k1_fe_mul(secp256k1_fe_t *r, const secp256k1_fe_t *a, const secp256k1_fe_t * SECP256K1_RESTRICT b) { -#ifdef VERIFY - VERIFY_CHECK(a->magnitude <= 8); - VERIFY_CHECK(b->magnitude <= 8); - secp256k1_fe_verify(a); - secp256k1_fe_verify(b); - VERIFY_CHECK(r != b); -#endif - secp256k1_fe_mul_inner(r->n, a->n, b->n); -#ifdef VERIFY - r->magnitude = 1; - r->normalized = 0; - secp256k1_fe_verify(r); -#endif -} - -static void secp256k1_fe_sqr(secp256k1_fe_t *r, const secp256k1_fe_t *a) { -#ifdef VERIFY - VERIFY_CHECK(a->magnitude <= 8); - secp256k1_fe_verify(a); -#endif - secp256k1_fe_sqr_inner(r->n, a->n); -#ifdef VERIFY - r->magnitude = 1; - r->normalized = 0; - secp256k1_fe_verify(r); -#endif -} - -static SECP256K1_INLINE void secp256k1_fe_storage_cmov(secp256k1_fe_storage_t *r, const secp256k1_fe_storage_t *a, int flag) { - uint64_t mask0, mask1; - mask0 = flag + ~((uint64_t)0); - mask1 = ~mask0; - r->n[0] = (r->n[0] & mask0) | (a->n[0] & mask1); - r->n[1] = (r->n[1] & mask0) | (a->n[1] & mask1); - r->n[2] = (r->n[2] & mask0) | (a->n[2] & mask1); - r->n[3] = (r->n[3] & mask0) | (a->n[3] & mask1); -} - -static void secp256k1_fe_to_storage(secp256k1_fe_storage_t *r, const secp256k1_fe_t *a) { -#ifdef VERIFY - VERIFY_CHECK(a->normalized); -#endif - r->n[0] = a->n[0] | a->n[1] << 52; - r->n[1] = a->n[1] >> 12 | a->n[2] << 40; - r->n[2] = a->n[2] >> 24 | a->n[3] << 28; - r->n[3] = a->n[3] >> 36 | a->n[4] << 16; -} - -static SECP256K1_INLINE void secp256k1_fe_from_storage(secp256k1_fe_t *r, const secp256k1_fe_storage_t *a) { - r->n[0] = a->n[0] & 0xFFFFFFFFFFFFFULL; - r->n[1] = a->n[0] >> 52 | ((a->n[1] << 12) & 0xFFFFFFFFFFFFFULL); - r->n[2] = a->n[1] >> 40 | ((a->n[2] << 24) & 0xFFFFFFFFFFFFFULL); - r->n[3] = a->n[2] >> 28 | ((a->n[3] << 36) & 0xFFFFFFFFFFFFFULL); - r->n[4] = a->n[3] >> 16; -#ifdef VERIFY - r->magnitude = 1; - r->normalized = 1; -#endif -} - -#endif diff --git a/crypto/secp256k1/secp256k1/src/field_5x52_int128_impl.h b/crypto/secp256k1/secp256k1/src/field_5x52_int128_impl.h deleted file mode 100644 index 9280bb5ea..000000000 --- a/crypto/secp256k1/secp256k1/src/field_5x52_int128_impl.h +++ /dev/null @@ -1,277 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_FIELD_INNER5X52_IMPL_H_ -#define _SECP256K1_FIELD_INNER5X52_IMPL_H_ - -#include - -#ifdef VERIFY -#define VERIFY_BITS(x, n) VERIFY_CHECK(((x) >> (n)) == 0) -#else -#define VERIFY_BITS(x, n) do { } while(0) -#endif - -SECP256K1_INLINE static void secp256k1_fe_mul_inner(uint64_t *r, const uint64_t *a, const uint64_t * SECP256K1_RESTRICT b) { - uint128_t c, d; - uint64_t t3, t4, tx, u0; - uint64_t a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4]; - const uint64_t M = 0xFFFFFFFFFFFFFULL, R = 0x1000003D10ULL; - - VERIFY_BITS(a[0], 56); - VERIFY_BITS(a[1], 56); - VERIFY_BITS(a[2], 56); - VERIFY_BITS(a[3], 56); - VERIFY_BITS(a[4], 52); - VERIFY_BITS(b[0], 56); - VERIFY_BITS(b[1], 56); - VERIFY_BITS(b[2], 56); - VERIFY_BITS(b[3], 56); - VERIFY_BITS(b[4], 52); - VERIFY_CHECK(r != b); - - /* [... a b c] is a shorthand for ... + a<<104 + b<<52 + c<<0 mod n. - * px is a shorthand for sum(a[i]*b[x-i], i=0..x). - * Note that [x 0 0 0 0 0] = [x*R]. - */ - - d = (uint128_t)a0 * b[3] - + (uint128_t)a1 * b[2] - + (uint128_t)a2 * b[1] - + (uint128_t)a3 * b[0]; - VERIFY_BITS(d, 114); - /* [d 0 0 0] = [p3 0 0 0] */ - c = (uint128_t)a4 * b[4]; - VERIFY_BITS(c, 112); - /* [c 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */ - d += (c & M) * R; c >>= 52; - VERIFY_BITS(d, 115); - VERIFY_BITS(c, 60); - /* [c 0 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */ - t3 = d & M; d >>= 52; - VERIFY_BITS(t3, 52); - VERIFY_BITS(d, 63); - /* [c 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */ - - d += (uint128_t)a0 * b[4] - + (uint128_t)a1 * b[3] - + (uint128_t)a2 * b[2] - + (uint128_t)a3 * b[1] - + (uint128_t)a4 * b[0]; - VERIFY_BITS(d, 115); - /* [c 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ - d += c * R; - VERIFY_BITS(d, 116); - /* [d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ - t4 = d & M; d >>= 52; - VERIFY_BITS(t4, 52); - VERIFY_BITS(d, 64); - /* [d t4 t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ - tx = (t4 >> 48); t4 &= (M >> 4); - VERIFY_BITS(tx, 4); - VERIFY_BITS(t4, 48); - /* [d t4+(tx<<48) t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ - - c = (uint128_t)a0 * b[0]; - VERIFY_BITS(c, 112); - /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 0 p4 p3 0 0 p0] */ - d += (uint128_t)a1 * b[4] - + (uint128_t)a2 * b[3] - + (uint128_t)a3 * b[2] - + (uint128_t)a4 * b[1]; - VERIFY_BITS(d, 115); - /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ - u0 = d & M; d >>= 52; - VERIFY_BITS(u0, 52); - VERIFY_BITS(d, 63); - /* [d u0 t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ - /* [d 0 t4+(tx<<48)+(u0<<52) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ - u0 = (u0 << 4) | tx; - VERIFY_BITS(u0, 56); - /* [d 0 t4+(u0<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ - c += (uint128_t)u0 * (R >> 4); - VERIFY_BITS(c, 115); - /* [d 0 t4 t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ - r[0] = c & M; c >>= 52; - VERIFY_BITS(r[0], 52); - VERIFY_BITS(c, 61); - /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 0 p0] */ - - c += (uint128_t)a0 * b[1] - + (uint128_t)a1 * b[0]; - VERIFY_BITS(c, 114); - /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 p1 p0] */ - d += (uint128_t)a2 * b[4] - + (uint128_t)a3 * b[3] - + (uint128_t)a4 * b[2]; - VERIFY_BITS(d, 114); - /* [d 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */ - c += (d & M) * R; d >>= 52; - VERIFY_BITS(c, 115); - VERIFY_BITS(d, 62); - /* [d 0 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */ - r[1] = c & M; c >>= 52; - VERIFY_BITS(r[1], 52); - VERIFY_BITS(c, 63); - /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */ - - c += (uint128_t)a0 * b[2] - + (uint128_t)a1 * b[1] - + (uint128_t)a2 * b[0]; - VERIFY_BITS(c, 114); - /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 p2 p1 p0] */ - d += (uint128_t)a3 * b[4] - + (uint128_t)a4 * b[3]; - VERIFY_BITS(d, 114); - /* [d 0 0 t4 t3 c t1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - c += (d & M) * R; d >>= 52; - VERIFY_BITS(c, 115); - VERIFY_BITS(d, 62); - /* [d 0 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - - /* [d 0 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[2] = c & M; c >>= 52; - VERIFY_BITS(r[2], 52); - VERIFY_BITS(c, 63); - /* [d 0 0 0 t4 t3+c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - c += d * R + t3;; - VERIFY_BITS(c, 100); - /* [t4 c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[3] = c & M; c >>= 52; - VERIFY_BITS(r[3], 52); - VERIFY_BITS(c, 48); - /* [t4+c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - c += t4; - VERIFY_BITS(c, 49); - /* [c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[4] = c; - VERIFY_BITS(r[4], 49); - /* [r4 r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ -} - -SECP256K1_INLINE static void secp256k1_fe_sqr_inner(uint64_t *r, const uint64_t *a) { - uint128_t c, d; - uint64_t a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4]; - int64_t t3, t4, tx, u0; - const uint64_t M = 0xFFFFFFFFFFFFFULL, R = 0x1000003D10ULL; - - VERIFY_BITS(a[0], 56); - VERIFY_BITS(a[1], 56); - VERIFY_BITS(a[2], 56); - VERIFY_BITS(a[3], 56); - VERIFY_BITS(a[4], 52); - - /** [... a b c] is a shorthand for ... + a<<104 + b<<52 + c<<0 mod n. - * px is a shorthand for sum(a[i]*a[x-i], i=0..x). - * Note that [x 0 0 0 0 0] = [x*R]. - */ - - d = (uint128_t)(a0*2) * a3 - + (uint128_t)(a1*2) * a2; - VERIFY_BITS(d, 114); - /* [d 0 0 0] = [p3 0 0 0] */ - c = (uint128_t)a4 * a4; - VERIFY_BITS(c, 112); - /* [c 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */ - d += (c & M) * R; c >>= 52; - VERIFY_BITS(d, 115); - VERIFY_BITS(c, 60); - /* [c 0 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */ - t3 = d & M; d >>= 52; - VERIFY_BITS(t3, 52); - VERIFY_BITS(d, 63); - /* [c 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */ - - a4 *= 2; - d += (uint128_t)a0 * a4 - + (uint128_t)(a1*2) * a3 - + (uint128_t)a2 * a2; - VERIFY_BITS(d, 115); - /* [c 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ - d += c * R; - VERIFY_BITS(d, 116); - /* [d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ - t4 = d & M; d >>= 52; - VERIFY_BITS(t4, 52); - VERIFY_BITS(d, 64); - /* [d t4 t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ - tx = (t4 >> 48); t4 &= (M >> 4); - VERIFY_BITS(tx, 4); - VERIFY_BITS(t4, 48); - /* [d t4+(tx<<48) t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */ - - c = (uint128_t)a0 * a0; - VERIFY_BITS(c, 112); - /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 0 p4 p3 0 0 p0] */ - d += (uint128_t)a1 * a4 - + (uint128_t)(a2*2) * a3; - VERIFY_BITS(d, 114); - /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ - u0 = d & M; d >>= 52; - VERIFY_BITS(u0, 52); - VERIFY_BITS(d, 62); - /* [d u0 t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ - /* [d 0 t4+(tx<<48)+(u0<<52) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ - u0 = (u0 << 4) | tx; - VERIFY_BITS(u0, 56); - /* [d 0 t4+(u0<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ - c += (uint128_t)u0 * (R >> 4); - VERIFY_BITS(c, 113); - /* [d 0 t4 t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */ - r[0] = c & M; c >>= 52; - VERIFY_BITS(r[0], 52); - VERIFY_BITS(c, 61); - /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 0 p0] */ - - a0 *= 2; - c += (uint128_t)a0 * a1; - VERIFY_BITS(c, 114); - /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 p1 p0] */ - d += (uint128_t)a2 * a4 - + (uint128_t)a3 * a3; - VERIFY_BITS(d, 114); - /* [d 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */ - c += (d & M) * R; d >>= 52; - VERIFY_BITS(c, 115); - VERIFY_BITS(d, 62); - /* [d 0 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */ - r[1] = c & M; c >>= 52; - VERIFY_BITS(r[1], 52); - VERIFY_BITS(c, 63); - /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */ - - c += (uint128_t)a0 * a2 - + (uint128_t)a1 * a1; - VERIFY_BITS(c, 114); - /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 p2 p1 p0] */ - d += (uint128_t)a3 * a4; - VERIFY_BITS(d, 114); - /* [d 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - c += (d & M) * R; d >>= 52; - VERIFY_BITS(c, 115); - VERIFY_BITS(d, 62); - /* [d 0 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[2] = c & M; c >>= 52; - VERIFY_BITS(r[2], 52); - VERIFY_BITS(c, 63); - /* [d 0 0 0 t4 t3+c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - - c += d * R + t3;; - VERIFY_BITS(c, 100); - /* [t4 c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[3] = c & M; c >>= 52; - VERIFY_BITS(r[3], 52); - VERIFY_BITS(c, 48); - /* [t4+c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - c += t4; - VERIFY_BITS(c, 49); - /* [c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - r[4] = c; - VERIFY_BITS(r[4], 49); - /* [r4 r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ -} - -#endif diff --git a/crypto/secp256k1/secp256k1/src/field_impl.h b/crypto/secp256k1/secp256k1/src/field_impl.h deleted file mode 100644 index e6ec11e8f..000000000 --- a/crypto/secp256k1/secp256k1/src/field_impl.h +++ /dev/null @@ -1,263 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_FIELD_IMPL_H_ -#define _SECP256K1_FIELD_IMPL_H_ - -#if defined HAVE_CONFIG_H -#include "libsecp256k1-config.h" -#endif - -#include "util.h" - -#if defined(USE_FIELD_10X26) -#include "field_10x26_impl.h" -#elif defined(USE_FIELD_5X52) -#include "field_5x52_impl.h" -#else -#error "Please select field implementation" -#endif - -SECP256K1_INLINE static int secp256k1_fe_equal_var(const secp256k1_fe_t *a, const secp256k1_fe_t *b) { - secp256k1_fe_t na; - secp256k1_fe_negate(&na, a, 1); - secp256k1_fe_add(&na, b); - return secp256k1_fe_normalizes_to_zero_var(&na); -} - -static int secp256k1_fe_sqrt_var(secp256k1_fe_t *r, const secp256k1_fe_t *a) { - secp256k1_fe_t x2, x3, x6, x9, x11, x22, x44, x88, x176, x220, x223, t1; - int j; - - /** The binary representation of (p + 1)/4 has 3 blocks of 1s, with lengths in - * { 2, 22, 223 }. Use an addition chain to calculate 2^n - 1 for each block: - * 1, [2], 3, 6, 9, 11, [22], 44, 88, 176, 220, [223] - */ - - secp256k1_fe_sqr(&x2, a); - secp256k1_fe_mul(&x2, &x2, a); - - secp256k1_fe_sqr(&x3, &x2); - secp256k1_fe_mul(&x3, &x3, a); - - x6 = x3; - for (j=0; j<3; j++) { - secp256k1_fe_sqr(&x6, &x6); - } - secp256k1_fe_mul(&x6, &x6, &x3); - - x9 = x6; - for (j=0; j<3; j++) { - secp256k1_fe_sqr(&x9, &x9); - } - secp256k1_fe_mul(&x9, &x9, &x3); - - x11 = x9; - for (j=0; j<2; j++) { - secp256k1_fe_sqr(&x11, &x11); - } - secp256k1_fe_mul(&x11, &x11, &x2); - - x22 = x11; - for (j=0; j<11; j++) { - secp256k1_fe_sqr(&x22, &x22); - } - secp256k1_fe_mul(&x22, &x22, &x11); - - x44 = x22; - for (j=0; j<22; j++) { - secp256k1_fe_sqr(&x44, &x44); - } - secp256k1_fe_mul(&x44, &x44, &x22); - - x88 = x44; - for (j=0; j<44; j++) { - secp256k1_fe_sqr(&x88, &x88); - } - secp256k1_fe_mul(&x88, &x88, &x44); - - x176 = x88; - for (j=0; j<88; j++) { - secp256k1_fe_sqr(&x176, &x176); - } - secp256k1_fe_mul(&x176, &x176, &x88); - - x220 = x176; - for (j=0; j<44; j++) { - secp256k1_fe_sqr(&x220, &x220); - } - secp256k1_fe_mul(&x220, &x220, &x44); - - x223 = x220; - for (j=0; j<3; j++) { - secp256k1_fe_sqr(&x223, &x223); - } - secp256k1_fe_mul(&x223, &x223, &x3); - - /* The final result is then assembled using a sliding window over the blocks. */ - - t1 = x223; - for (j=0; j<23; j++) { - secp256k1_fe_sqr(&t1, &t1); - } - secp256k1_fe_mul(&t1, &t1, &x22); - for (j=0; j<6; j++) { - secp256k1_fe_sqr(&t1, &t1); - } - secp256k1_fe_mul(&t1, &t1, &x2); - secp256k1_fe_sqr(&t1, &t1); - secp256k1_fe_sqr(r, &t1); - - /* Check that a square root was actually calculated */ - - secp256k1_fe_sqr(&t1, r); - return secp256k1_fe_equal_var(&t1, a); -} - -static void secp256k1_fe_inv(secp256k1_fe_t *r, const secp256k1_fe_t *a) { - secp256k1_fe_t x2, x3, x6, x9, x11, x22, x44, x88, x176, x220, x223, t1; - int j; - - /** The binary representation of (p - 2) has 5 blocks of 1s, with lengths in - * { 1, 2, 22, 223 }. Use an addition chain to calculate 2^n - 1 for each block: - * [1], [2], 3, 6, 9, 11, [22], 44, 88, 176, 220, [223] - */ - - secp256k1_fe_sqr(&x2, a); - secp256k1_fe_mul(&x2, &x2, a); - - secp256k1_fe_sqr(&x3, &x2); - secp256k1_fe_mul(&x3, &x3, a); - - x6 = x3; - for (j=0; j<3; j++) { - secp256k1_fe_sqr(&x6, &x6); - } - secp256k1_fe_mul(&x6, &x6, &x3); - - x9 = x6; - for (j=0; j<3; j++) { - secp256k1_fe_sqr(&x9, &x9); - } - secp256k1_fe_mul(&x9, &x9, &x3); - - x11 = x9; - for (j=0; j<2; j++) { - secp256k1_fe_sqr(&x11, &x11); - } - secp256k1_fe_mul(&x11, &x11, &x2); - - x22 = x11; - for (j=0; j<11; j++) { - secp256k1_fe_sqr(&x22, &x22); - } - secp256k1_fe_mul(&x22, &x22, &x11); - - x44 = x22; - for (j=0; j<22; j++) { - secp256k1_fe_sqr(&x44, &x44); - } - secp256k1_fe_mul(&x44, &x44, &x22); - - x88 = x44; - for (j=0; j<44; j++) { - secp256k1_fe_sqr(&x88, &x88); - } - secp256k1_fe_mul(&x88, &x88, &x44); - - x176 = x88; - for (j=0; j<88; j++) { - secp256k1_fe_sqr(&x176, &x176); - } - secp256k1_fe_mul(&x176, &x176, &x88); - - x220 = x176; - for (j=0; j<44; j++) { - secp256k1_fe_sqr(&x220, &x220); - } - secp256k1_fe_mul(&x220, &x220, &x44); - - x223 = x220; - for (j=0; j<3; j++) { - secp256k1_fe_sqr(&x223, &x223); - } - secp256k1_fe_mul(&x223, &x223, &x3); - - /* The final result is then assembled using a sliding window over the blocks. */ - - t1 = x223; - for (j=0; j<23; j++) { - secp256k1_fe_sqr(&t1, &t1); - } - secp256k1_fe_mul(&t1, &t1, &x22); - for (j=0; j<5; j++) { - secp256k1_fe_sqr(&t1, &t1); - } - secp256k1_fe_mul(&t1, &t1, a); - for (j=0; j<3; j++) { - secp256k1_fe_sqr(&t1, &t1); - } - secp256k1_fe_mul(&t1, &t1, &x2); - for (j=0; j<2; j++) { - secp256k1_fe_sqr(&t1, &t1); - } - secp256k1_fe_mul(r, a, &t1); -} - -static void secp256k1_fe_inv_var(secp256k1_fe_t *r, const secp256k1_fe_t *a) { -#if defined(USE_FIELD_INV_BUILTIN) - secp256k1_fe_inv(r, a); -#elif defined(USE_FIELD_INV_NUM) - secp256k1_num_t n, m; - /* secp256k1 field prime, value p defined in "Standards for Efficient Cryptography" (SEC2) 2.7.1. */ - static const unsigned char prime[32] = { - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFC,0x2F - }; - unsigned char b[32]; - secp256k1_fe_t c = *a; - secp256k1_fe_normalize_var(&c); - secp256k1_fe_get_b32(b, &c); - secp256k1_num_set_bin(&n, b, 32); - secp256k1_num_set_bin(&m, prime, 32); - secp256k1_num_mod_inverse(&n, &n, &m); - secp256k1_num_get_bin(b, 32, &n); - VERIFY_CHECK(secp256k1_fe_set_b32(r, b)); -#else -#error "Please select field inverse implementation" -#endif -} - -static void secp256k1_fe_inv_all_var(size_t len, secp256k1_fe_t *r, const secp256k1_fe_t *a) { - secp256k1_fe_t u; - size_t i; - if (len < 1) { - return; - } - - VERIFY_CHECK((r + len <= a) || (a + len <= r)); - - r[0] = a[0]; - - i = 0; - while (++i < len) { - secp256k1_fe_mul(&r[i], &r[i - 1], &a[i]); - } - - secp256k1_fe_inv_var(&u, &r[--i]); - - while (i > 0) { - int j = i--; - secp256k1_fe_mul(&r[j], &r[i], &u); - secp256k1_fe_mul(&u, &u, &a[j]); - } - - r[0] = u; -} - -#endif diff --git a/crypto/secp256k1/secp256k1/src/group.h b/crypto/secp256k1/secp256k1/src/group.h deleted file mode 100644 index d1e583490..000000000 --- a/crypto/secp256k1/secp256k1/src/group.h +++ /dev/null @@ -1,118 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_GROUP_ -#define _SECP256K1_GROUP_ - -#include "num.h" -#include "field.h" - -/** A group element of the secp256k1 curve, in affine coordinates. */ -typedef struct { - secp256k1_fe_t x; - secp256k1_fe_t y; - int infinity; /* whether this represents the point at infinity */ -} secp256k1_ge_t; - -#define SECP256K1_GE_CONST(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {SECP256K1_FE_CONST((a),(b),(c),(d),(e),(f),(g),(h)), SECP256K1_FE_CONST((i),(j),(k),(l),(m),(n),(o),(p)), 0} -#define SECP256K1_GE_CONST_INFINITY {SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 0), SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 0), 1} - -/** A group element of the secp256k1 curve, in jacobian coordinates. */ -typedef struct { - secp256k1_fe_t x; /* actual X: x/z^2 */ - secp256k1_fe_t y; /* actual Y: y/z^3 */ - secp256k1_fe_t z; - int infinity; /* whether this represents the point at infinity */ -} secp256k1_gej_t; - -#define SECP256K1_GEJ_CONST(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {SECP256K1_FE_CONST((a),(b),(c),(d),(e),(f),(g),(h)), SECP256K1_FE_CONST((i),(j),(k),(l),(m),(n),(o),(p)), SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 1), 0} -#define SECP256K1_GEJ_CONST_INFINITY {SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 0), SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 0), SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 0), 1} - -typedef struct { - secp256k1_fe_storage_t x; - secp256k1_fe_storage_t y; -} secp256k1_ge_storage_t; - -#define SECP256K1_GE_STORAGE_CONST(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {SECP256K1_FE_STORAGE_CONST((a),(b),(c),(d),(e),(f),(g),(h)), SECP256K1_FE_STORAGE_CONST((i),(j),(k),(l),(m),(n),(o),(p))} - -/** Set a group element equal to the point at infinity */ -static void secp256k1_ge_set_infinity(secp256k1_ge_t *r); - -/** Set a group element equal to the point with given X and Y coordinates */ -static void secp256k1_ge_set_xy(secp256k1_ge_t *r, const secp256k1_fe_t *x, const secp256k1_fe_t *y); - -/** Set a group element (affine) equal to the point with the given X coordinate, and given oddness - * for Y. Return value indicates whether the result is valid. */ -static int secp256k1_ge_set_xo_var(secp256k1_ge_t *r, const secp256k1_fe_t *x, int odd); - -/** Check whether a group element is the point at infinity. */ -static int secp256k1_ge_is_infinity(const secp256k1_ge_t *a); - -/** Check whether a group element is valid (i.e., on the curve). */ -static int secp256k1_ge_is_valid_var(const secp256k1_ge_t *a); - -static void secp256k1_ge_neg(secp256k1_ge_t *r, const secp256k1_ge_t *a); - -/** Set a group element equal to another which is given in jacobian coordinates */ -static void secp256k1_ge_set_gej(secp256k1_ge_t *r, secp256k1_gej_t *a); - -/** Set a batch of group elements equal to the inputs given in jacobian coordinates */ -static void secp256k1_ge_set_all_gej_var(size_t len, secp256k1_ge_t *r, const secp256k1_gej_t *a); - - -/** Set a group element (jacobian) equal to the point at infinity. */ -static void secp256k1_gej_set_infinity(secp256k1_gej_t *r); - -/** Set a group element (jacobian) equal to the point with given X and Y coordinates. */ -static void secp256k1_gej_set_xy(secp256k1_gej_t *r, const secp256k1_fe_t *x, const secp256k1_fe_t *y); - -/** Set a group element (jacobian) equal to another which is given in affine coordinates. */ -static void secp256k1_gej_set_ge(secp256k1_gej_t *r, const secp256k1_ge_t *a); - -/** Compare the X coordinate of a group element (jacobian). */ -static int secp256k1_gej_eq_x_var(const secp256k1_fe_t *x, const secp256k1_gej_t *a); - -/** Set r equal to the inverse of a (i.e., mirrored around the X axis) */ -static void secp256k1_gej_neg(secp256k1_gej_t *r, const secp256k1_gej_t *a); - -/** Check whether a group element is the point at infinity. */ -static int secp256k1_gej_is_infinity(const secp256k1_gej_t *a); - -/** Set r equal to the double of a. */ -static void secp256k1_gej_double_var(secp256k1_gej_t *r, const secp256k1_gej_t *a); - -/** Set r equal to the sum of a and b. */ -static void secp256k1_gej_add_var(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_gej_t *b); - -/** Set r equal to the sum of a and b (with b given in affine coordinates, and not infinity). */ -static void secp256k1_gej_add_ge(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_ge_t *b); - -/** Set r equal to the sum of a and b (with b given in affine coordinates). This is more efficient - than secp256k1_gej_add_var. It is identical to secp256k1_gej_add_ge but without constant-time - guarantee, and b is allowed to be infinity. */ -static void secp256k1_gej_add_ge_var(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_ge_t *b); - -#ifdef USE_ENDOMORPHISM -/** Set r to be equal to lambda times a, where lambda is chosen in a way such that this is very fast. */ -static void secp256k1_gej_mul_lambda(secp256k1_gej_t *r, const secp256k1_gej_t *a); -#endif - -/** Clear a secp256k1_gej_t to prevent leaking sensitive information. */ -static void secp256k1_gej_clear(secp256k1_gej_t *r); - -/** Clear a secp256k1_ge_t to prevent leaking sensitive information. */ -static void secp256k1_ge_clear(secp256k1_ge_t *r); - -/** Convert a group element to the storage type. */ -static void secp256k1_ge_to_storage(secp256k1_ge_storage_t *r, const secp256k1_ge_t*); - -/** Convert a group element back from the storage type. */ -static void secp256k1_ge_from_storage(secp256k1_ge_t *r, const secp256k1_ge_storage_t*); - -/** If flag is true, set *r equal to *a; otherwise leave it. Constant-time. */ -static void secp256k1_ge_storage_cmov(secp256k1_ge_storage_t *r, const secp256k1_ge_storage_t *a, int flag); - -#endif diff --git a/crypto/secp256k1/secp256k1/src/group_impl.h b/crypto/secp256k1/secp256k1/src/group_impl.h deleted file mode 100644 index 0d1c7b02f..000000000 --- a/crypto/secp256k1/secp256k1/src/group_impl.h +++ /dev/null @@ -1,434 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_GROUP_IMPL_H_ -#define _SECP256K1_GROUP_IMPL_H_ - -#include - -#include "num.h" -#include "field.h" -#include "group.h" - -/** Generator for secp256k1, value 'g' defined in - * "Standards for Efficient Cryptography" (SEC2) 2.7.1. - */ -static const secp256k1_ge_t secp256k1_ge_const_g = SECP256K1_GE_CONST( - 0x79BE667EUL, 0xF9DCBBACUL, 0x55A06295UL, 0xCE870B07UL, - 0x029BFCDBUL, 0x2DCE28D9UL, 0x59F2815BUL, 0x16F81798UL, - 0x483ADA77UL, 0x26A3C465UL, 0x5DA4FBFCUL, 0x0E1108A8UL, - 0xFD17B448UL, 0xA6855419UL, 0x9C47D08FUL, 0xFB10D4B8UL -); - -static void secp256k1_ge_set_infinity(secp256k1_ge_t *r) { - r->infinity = 1; -} - -static void secp256k1_ge_set_xy(secp256k1_ge_t *r, const secp256k1_fe_t *x, const secp256k1_fe_t *y) { - r->infinity = 0; - r->x = *x; - r->y = *y; -} - -static int secp256k1_ge_is_infinity(const secp256k1_ge_t *a) { - return a->infinity; -} - -static void secp256k1_ge_neg(secp256k1_ge_t *r, const secp256k1_ge_t *a) { - *r = *a; - secp256k1_fe_normalize_weak(&r->y); - secp256k1_fe_negate(&r->y, &r->y, 1); -} - -static void secp256k1_ge_set_gej(secp256k1_ge_t *r, secp256k1_gej_t *a) { - secp256k1_fe_t z2, z3; - r->infinity = a->infinity; - secp256k1_fe_inv(&a->z, &a->z); - secp256k1_fe_sqr(&z2, &a->z); - secp256k1_fe_mul(&z3, &a->z, &z2); - secp256k1_fe_mul(&a->x, &a->x, &z2); - secp256k1_fe_mul(&a->y, &a->y, &z3); - secp256k1_fe_set_int(&a->z, 1); - r->x = a->x; - r->y = a->y; -} - -static void secp256k1_ge_set_gej_var(secp256k1_ge_t *r, secp256k1_gej_t *a) { - secp256k1_fe_t z2, z3; - r->infinity = a->infinity; - if (a->infinity) { - return; - } - secp256k1_fe_inv_var(&a->z, &a->z); - secp256k1_fe_sqr(&z2, &a->z); - secp256k1_fe_mul(&z3, &a->z, &z2); - secp256k1_fe_mul(&a->x, &a->x, &z2); - secp256k1_fe_mul(&a->y, &a->y, &z3); - secp256k1_fe_set_int(&a->z, 1); - r->x = a->x; - r->y = a->y; -} - -static void secp256k1_ge_set_all_gej_var(size_t len, secp256k1_ge_t *r, const secp256k1_gej_t *a) { - secp256k1_fe_t *az; - secp256k1_fe_t *azi; - size_t i; - size_t count = 0; - az = (secp256k1_fe_t *)checked_malloc(sizeof(secp256k1_fe_t) * len); - for (i = 0; i < len; i++) { - if (!a[i].infinity) { - az[count++] = a[i].z; - } - } - - azi = (secp256k1_fe_t *)checked_malloc(sizeof(secp256k1_fe_t) * count); - secp256k1_fe_inv_all_var(count, azi, az); - free(az); - - count = 0; - for (i = 0; i < len; i++) { - r[i].infinity = a[i].infinity; - if (!a[i].infinity) { - secp256k1_fe_t zi2, zi3; - secp256k1_fe_t *zi = &azi[count++]; - secp256k1_fe_sqr(&zi2, zi); - secp256k1_fe_mul(&zi3, &zi2, zi); - secp256k1_fe_mul(&r[i].x, &a[i].x, &zi2); - secp256k1_fe_mul(&r[i].y, &a[i].y, &zi3); - } - } - free(azi); -} - -static void secp256k1_gej_set_infinity(secp256k1_gej_t *r) { - r->infinity = 1; - secp256k1_fe_set_int(&r->x, 0); - secp256k1_fe_set_int(&r->y, 0); - secp256k1_fe_set_int(&r->z, 0); -} - -static void secp256k1_gej_set_xy(secp256k1_gej_t *r, const secp256k1_fe_t *x, const secp256k1_fe_t *y) { - r->infinity = 0; - r->x = *x; - r->y = *y; - secp256k1_fe_set_int(&r->z, 1); -} - -static void secp256k1_gej_clear(secp256k1_gej_t *r) { - r->infinity = 0; - secp256k1_fe_clear(&r->x); - secp256k1_fe_clear(&r->y); - secp256k1_fe_clear(&r->z); -} - -static void secp256k1_ge_clear(secp256k1_ge_t *r) { - r->infinity = 0; - secp256k1_fe_clear(&r->x); - secp256k1_fe_clear(&r->y); -} - -static int secp256k1_ge_set_xo_var(secp256k1_ge_t *r, const secp256k1_fe_t *x, int odd) { - secp256k1_fe_t x2, x3, c; - r->x = *x; - secp256k1_fe_sqr(&x2, x); - secp256k1_fe_mul(&x3, x, &x2); - r->infinity = 0; - secp256k1_fe_set_int(&c, 7); - secp256k1_fe_add(&c, &x3); - if (!secp256k1_fe_sqrt_var(&r->y, &c)) { - return 0; - } - secp256k1_fe_normalize_var(&r->y); - if (secp256k1_fe_is_odd(&r->y) != odd) { - secp256k1_fe_negate(&r->y, &r->y, 1); - } - return 1; -} - -static void secp256k1_gej_set_ge(secp256k1_gej_t *r, const secp256k1_ge_t *a) { - r->infinity = a->infinity; - r->x = a->x; - r->y = a->y; - secp256k1_fe_set_int(&r->z, 1); -} - -static int secp256k1_gej_eq_x_var(const secp256k1_fe_t *x, const secp256k1_gej_t *a) { - secp256k1_fe_t r, r2; - VERIFY_CHECK(!a->infinity); - secp256k1_fe_sqr(&r, &a->z); secp256k1_fe_mul(&r, &r, x); - r2 = a->x; secp256k1_fe_normalize_weak(&r2); - return secp256k1_fe_equal_var(&r, &r2); -} - -static void secp256k1_gej_neg(secp256k1_gej_t *r, const secp256k1_gej_t *a) { - r->infinity = a->infinity; - r->x = a->x; - r->y = a->y; - r->z = a->z; - secp256k1_fe_normalize_weak(&r->y); - secp256k1_fe_negate(&r->y, &r->y, 1); -} - -static int secp256k1_gej_is_infinity(const secp256k1_gej_t *a) { - return a->infinity; -} - -static int secp256k1_gej_is_valid_var(const secp256k1_gej_t *a) { - secp256k1_fe_t y2, x3, z2, z6; - if (a->infinity) { - return 0; - } - /** y^2 = x^3 + 7 - * (Y/Z^3)^2 = (X/Z^2)^3 + 7 - * Y^2 / Z^6 = X^3 / Z^6 + 7 - * Y^2 = X^3 + 7*Z^6 - */ - secp256k1_fe_sqr(&y2, &a->y); - secp256k1_fe_sqr(&x3, &a->x); secp256k1_fe_mul(&x3, &x3, &a->x); - secp256k1_fe_sqr(&z2, &a->z); - secp256k1_fe_sqr(&z6, &z2); secp256k1_fe_mul(&z6, &z6, &z2); - secp256k1_fe_mul_int(&z6, 7); - secp256k1_fe_add(&x3, &z6); - secp256k1_fe_normalize_weak(&x3); - return secp256k1_fe_equal_var(&y2, &x3); -} - -static int secp256k1_ge_is_valid_var(const secp256k1_ge_t *a) { - secp256k1_fe_t y2, x3, c; - if (a->infinity) { - return 0; - } - /* y^2 = x^3 + 7 */ - secp256k1_fe_sqr(&y2, &a->y); - secp256k1_fe_sqr(&x3, &a->x); secp256k1_fe_mul(&x3, &x3, &a->x); - secp256k1_fe_set_int(&c, 7); - secp256k1_fe_add(&x3, &c); - secp256k1_fe_normalize_weak(&x3); - return secp256k1_fe_equal_var(&y2, &x3); -} - -static void secp256k1_gej_double_var(secp256k1_gej_t *r, const secp256k1_gej_t *a) { - /* Operations: 3 mul, 4 sqr, 0 normalize, 12 mul_int/add/negate */ - secp256k1_fe_t t1,t2,t3,t4; - /** For secp256k1, 2Q is infinity if and only if Q is infinity. This is because if 2Q = infinity, - * Q must equal -Q, or that Q.y == -(Q.y), or Q.y is 0. For a point on y^2 = x^3 + 7 to have - * y=0, x^3 must be -7 mod p. However, -7 has no cube root mod p. - */ - r->infinity = a->infinity; - if (r->infinity) { - return; - } - - secp256k1_fe_mul(&r->z, &a->z, &a->y); - secp256k1_fe_mul_int(&r->z, 2); /* Z' = 2*Y*Z (2) */ - secp256k1_fe_sqr(&t1, &a->x); - secp256k1_fe_mul_int(&t1, 3); /* T1 = 3*X^2 (3) */ - secp256k1_fe_sqr(&t2, &t1); /* T2 = 9*X^4 (1) */ - secp256k1_fe_sqr(&t3, &a->y); - secp256k1_fe_mul_int(&t3, 2); /* T3 = 2*Y^2 (2) */ - secp256k1_fe_sqr(&t4, &t3); - secp256k1_fe_mul_int(&t4, 2); /* T4 = 8*Y^4 (2) */ - secp256k1_fe_mul(&t3, &t3, &a->x); /* T3 = 2*X*Y^2 (1) */ - r->x = t3; - secp256k1_fe_mul_int(&r->x, 4); /* X' = 8*X*Y^2 (4) */ - secp256k1_fe_negate(&r->x, &r->x, 4); /* X' = -8*X*Y^2 (5) */ - secp256k1_fe_add(&r->x, &t2); /* X' = 9*X^4 - 8*X*Y^2 (6) */ - secp256k1_fe_negate(&t2, &t2, 1); /* T2 = -9*X^4 (2) */ - secp256k1_fe_mul_int(&t3, 6); /* T3 = 12*X*Y^2 (6) */ - secp256k1_fe_add(&t3, &t2); /* T3 = 12*X*Y^2 - 9*X^4 (8) */ - secp256k1_fe_mul(&r->y, &t1, &t3); /* Y' = 36*X^3*Y^2 - 27*X^6 (1) */ - secp256k1_fe_negate(&t2, &t4, 2); /* T2 = -8*Y^4 (3) */ - secp256k1_fe_add(&r->y, &t2); /* Y' = 36*X^3*Y^2 - 27*X^6 - 8*Y^4 (4) */ -} - -static void secp256k1_gej_add_var(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_gej_t *b) { - /* Operations: 12 mul, 4 sqr, 2 normalize, 12 mul_int/add/negate */ - secp256k1_fe_t z22, z12, u1, u2, s1, s2, h, i, i2, h2, h3, t; - if (a->infinity) { - *r = *b; - return; - } - if (b->infinity) { - *r = *a; - return; - } - r->infinity = 0; - secp256k1_fe_sqr(&z22, &b->z); - secp256k1_fe_sqr(&z12, &a->z); - secp256k1_fe_mul(&u1, &a->x, &z22); - secp256k1_fe_mul(&u2, &b->x, &z12); - secp256k1_fe_mul(&s1, &a->y, &z22); secp256k1_fe_mul(&s1, &s1, &b->z); - secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &a->z); - secp256k1_fe_negate(&h, &u1, 1); secp256k1_fe_add(&h, &u2); - secp256k1_fe_negate(&i, &s1, 1); secp256k1_fe_add(&i, &s2); - if (secp256k1_fe_normalizes_to_zero_var(&h)) { - if (secp256k1_fe_normalizes_to_zero_var(&i)) { - secp256k1_gej_double_var(r, a); - } else { - r->infinity = 1; - } - return; - } - secp256k1_fe_sqr(&i2, &i); - secp256k1_fe_sqr(&h2, &h); - secp256k1_fe_mul(&h3, &h, &h2); - secp256k1_fe_mul(&r->z, &a->z, &b->z); secp256k1_fe_mul(&r->z, &r->z, &h); - secp256k1_fe_mul(&t, &u1, &h2); - r->x = t; secp256k1_fe_mul_int(&r->x, 2); secp256k1_fe_add(&r->x, &h3); secp256k1_fe_negate(&r->x, &r->x, 3); secp256k1_fe_add(&r->x, &i2); - secp256k1_fe_negate(&r->y, &r->x, 5); secp256k1_fe_add(&r->y, &t); secp256k1_fe_mul(&r->y, &r->y, &i); - secp256k1_fe_mul(&h3, &h3, &s1); secp256k1_fe_negate(&h3, &h3, 1); - secp256k1_fe_add(&r->y, &h3); -} - -static void secp256k1_gej_add_ge_var(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_ge_t *b) { - /* 8 mul, 3 sqr, 4 normalize, 12 mul_int/add/negate */ - secp256k1_fe_t z12, u1, u2, s1, s2, h, i, i2, h2, h3, t; - if (a->infinity) { - r->infinity = b->infinity; - r->x = b->x; - r->y = b->y; - secp256k1_fe_set_int(&r->z, 1); - return; - } - if (b->infinity) { - *r = *a; - return; - } - r->infinity = 0; - secp256k1_fe_sqr(&z12, &a->z); - u1 = a->x; secp256k1_fe_normalize_weak(&u1); - secp256k1_fe_mul(&u2, &b->x, &z12); - s1 = a->y; secp256k1_fe_normalize_weak(&s1); - secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &a->z); - secp256k1_fe_negate(&h, &u1, 1); secp256k1_fe_add(&h, &u2); - secp256k1_fe_negate(&i, &s1, 1); secp256k1_fe_add(&i, &s2); - if (secp256k1_fe_normalizes_to_zero_var(&h)) { - if (secp256k1_fe_normalizes_to_zero_var(&i)) { - secp256k1_gej_double_var(r, a); - } else { - r->infinity = 1; - } - return; - } - secp256k1_fe_sqr(&i2, &i); - secp256k1_fe_sqr(&h2, &h); - secp256k1_fe_mul(&h3, &h, &h2); - r->z = a->z; secp256k1_fe_mul(&r->z, &r->z, &h); - secp256k1_fe_mul(&t, &u1, &h2); - r->x = t; secp256k1_fe_mul_int(&r->x, 2); secp256k1_fe_add(&r->x, &h3); secp256k1_fe_negate(&r->x, &r->x, 3); secp256k1_fe_add(&r->x, &i2); - secp256k1_fe_negate(&r->y, &r->x, 5); secp256k1_fe_add(&r->y, &t); secp256k1_fe_mul(&r->y, &r->y, &i); - secp256k1_fe_mul(&h3, &h3, &s1); secp256k1_fe_negate(&h3, &h3, 1); - secp256k1_fe_add(&r->y, &h3); -} - -static void secp256k1_gej_add_ge(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_ge_t *b) { - /* Operations: 7 mul, 5 sqr, 5 normalize, 19 mul_int/add/negate */ - secp256k1_fe_t zz, u1, u2, s1, s2, z, t, m, n, q, rr; - int infinity; - VERIFY_CHECK(!b->infinity); - VERIFY_CHECK(a->infinity == 0 || a->infinity == 1); - - /** In: - * Eric Brier and Marc Joye, Weierstrass Elliptic Curves and Side-Channel Attacks. - * In D. Naccache and P. Paillier, Eds., Public Key Cryptography, vol. 2274 of Lecture Notes in Computer Science, pages 335-345. Springer-Verlag, 2002. - * we find as solution for a unified addition/doubling formula: - * lambda = ((x1 + x2)^2 - x1 * x2 + a) / (y1 + y2), with a = 0 for secp256k1's curve equation. - * x3 = lambda^2 - (x1 + x2) - * 2*y3 = lambda * (x1 + x2 - 2 * x3) - (y1 + y2). - * - * Substituting x_i = Xi / Zi^2 and yi = Yi / Zi^3, for i=1,2,3, gives: - * U1 = X1*Z2^2, U2 = X2*Z1^2 - * S1 = Y1*Z2^3, S2 = Y2*Z1^3 - * Z = Z1*Z2 - * T = U1+U2 - * M = S1+S2 - * Q = T*M^2 - * R = T^2-U1*U2 - * X3 = 4*(R^2-Q) - * Y3 = 4*(R*(3*Q-2*R^2)-M^4) - * Z3 = 2*M*Z - * (Note that the paper uses xi = Xi / Zi and yi = Yi / Zi instead.) - */ - - secp256k1_fe_sqr(&zz, &a->z); /* z = Z1^2 */ - u1 = a->x; secp256k1_fe_normalize_weak(&u1); /* u1 = U1 = X1*Z2^2 (1) */ - secp256k1_fe_mul(&u2, &b->x, &zz); /* u2 = U2 = X2*Z1^2 (1) */ - s1 = a->y; secp256k1_fe_normalize_weak(&s1); /* s1 = S1 = Y1*Z2^3 (1) */ - secp256k1_fe_mul(&s2, &b->y, &zz); /* s2 = Y2*Z2^2 (1) */ - secp256k1_fe_mul(&s2, &s2, &a->z); /* s2 = S2 = Y2*Z1^3 (1) */ - z = a->z; /* z = Z = Z1*Z2 (8) */ - t = u1; secp256k1_fe_add(&t, &u2); /* t = T = U1+U2 (2) */ - m = s1; secp256k1_fe_add(&m, &s2); /* m = M = S1+S2 (2) */ - secp256k1_fe_sqr(&n, &m); /* n = M^2 (1) */ - secp256k1_fe_mul(&q, &n, &t); /* q = Q = T*M^2 (1) */ - secp256k1_fe_sqr(&n, &n); /* n = M^4 (1) */ - secp256k1_fe_sqr(&rr, &t); /* rr = T^2 (1) */ - secp256k1_fe_mul(&t, &u1, &u2); secp256k1_fe_negate(&t, &t, 1); /* t = -U1*U2 (2) */ - secp256k1_fe_add(&rr, &t); /* rr = R = T^2-U1*U2 (3) */ - secp256k1_fe_sqr(&t, &rr); /* t = R^2 (1) */ - secp256k1_fe_mul(&r->z, &m, &z); /* r->z = M*Z (1) */ - infinity = secp256k1_fe_normalizes_to_zero(&r->z) * (1 - a->infinity); - secp256k1_fe_mul_int(&r->z, 2 * (1 - a->infinity)); /* r->z = Z3 = 2*M*Z (2) */ - r->x = t; /* r->x = R^2 (1) */ - secp256k1_fe_negate(&q, &q, 1); /* q = -Q (2) */ - secp256k1_fe_add(&r->x, &q); /* r->x = R^2-Q (3) */ - secp256k1_fe_normalize(&r->x); - secp256k1_fe_mul_int(&q, 3); /* q = -3*Q (6) */ - secp256k1_fe_mul_int(&t, 2); /* t = 2*R^2 (2) */ - secp256k1_fe_add(&t, &q); /* t = 2*R^2-3*Q (8) */ - secp256k1_fe_mul(&t, &t, &rr); /* t = R*(2*R^2-3*Q) (1) */ - secp256k1_fe_add(&t, &n); /* t = R*(2*R^2-3*Q)+M^4 (2) */ - secp256k1_fe_negate(&r->y, &t, 2); /* r->y = R*(3*Q-2*R^2)-M^4 (3) */ - secp256k1_fe_normalize_weak(&r->y); - secp256k1_fe_mul_int(&r->x, 4 * (1 - a->infinity)); /* r->x = X3 = 4*(R^2-Q) */ - secp256k1_fe_mul_int(&r->y, 4 * (1 - a->infinity)); /* r->y = Y3 = 4*R*(3*Q-2*R^2)-4*M^4 (4) */ - - /** In case a->infinity == 1, the above code results in r->x, r->y, and r->z all equal to 0. - * Add b->x to x, b->y to y, and 1 to z in that case. - */ - t = b->x; secp256k1_fe_mul_int(&t, a->infinity); - secp256k1_fe_add(&r->x, &t); - t = b->y; secp256k1_fe_mul_int(&t, a->infinity); - secp256k1_fe_add(&r->y, &t); - secp256k1_fe_set_int(&t, a->infinity); - secp256k1_fe_add(&r->z, &t); - r->infinity = infinity; -} - -static void secp256k1_ge_to_storage(secp256k1_ge_storage_t *r, const secp256k1_ge_t *a) { - secp256k1_fe_t x, y; - VERIFY_CHECK(!a->infinity); - x = a->x; - secp256k1_fe_normalize(&x); - y = a->y; - secp256k1_fe_normalize(&y); - secp256k1_fe_to_storage(&r->x, &x); - secp256k1_fe_to_storage(&r->y, &y); -} - -static void secp256k1_ge_from_storage(secp256k1_ge_t *r, const secp256k1_ge_storage_t *a) { - secp256k1_fe_from_storage(&r->x, &a->x); - secp256k1_fe_from_storage(&r->y, &a->y); - r->infinity = 0; -} - -static SECP256K1_INLINE void secp256k1_ge_storage_cmov(secp256k1_ge_storage_t *r, const secp256k1_ge_storage_t *a, int flag) { - secp256k1_fe_storage_cmov(&r->x, &a->x, flag); - secp256k1_fe_storage_cmov(&r->y, &a->y, flag); -} - -#ifdef USE_ENDOMORPHISM -static void secp256k1_gej_mul_lambda(secp256k1_gej_t *r, const secp256k1_gej_t *a) { - static const secp256k1_fe_t beta = SECP256K1_FE_CONST( - 0x7ae96a2bul, 0x657c0710ul, 0x6e64479eul, 0xac3434e9ul, - 0x9cf04975ul, 0x12f58995ul, 0xc1396c28ul, 0x719501eeul - ); - *r = *a; - secp256k1_fe_mul(&r->x, &r->x, &beta); -} -#endif - -#endif diff --git a/crypto/secp256k1/secp256k1/src/hash.h b/crypto/secp256k1/secp256k1/src/hash.h deleted file mode 100644 index 843423d7f..000000000 --- a/crypto/secp256k1/secp256k1/src/hash.h +++ /dev/null @@ -1,41 +0,0 @@ -/********************************************************************** - * Copyright (c) 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_HASH_ -#define _SECP256K1_HASH_ - -#include -#include - -typedef struct { - uint32_t s[32]; - uint32_t buf[16]; /* In big endian */ - size_t bytes; -} secp256k1_sha256_t; - -static void secp256k1_sha256_initialize(secp256k1_sha256_t *hash); -static void secp256k1_sha256_write(secp256k1_sha256_t *hash, const unsigned char *data, size_t size); -static void secp256k1_sha256_finalize(secp256k1_sha256_t *hash, unsigned char *out32); - -typedef struct { - secp256k1_sha256_t inner, outer; -} secp256k1_hmac_sha256_t; - -static void secp256k1_hmac_sha256_initialize(secp256k1_hmac_sha256_t *hash, const unsigned char *key, size_t size); -static void secp256k1_hmac_sha256_write(secp256k1_hmac_sha256_t *hash, const unsigned char *data, size_t size); -static void secp256k1_hmac_sha256_finalize(secp256k1_hmac_sha256_t *hash, unsigned char *out32); - -typedef struct { - unsigned char v[32]; - unsigned char k[32]; - int retry; -} secp256k1_rfc6979_hmac_sha256_t; - -static void secp256k1_rfc6979_hmac_sha256_initialize(secp256k1_rfc6979_hmac_sha256_t *rng, const unsigned char *key, size_t keylen, const unsigned char *msg, size_t msglen, const unsigned char *rnd, size_t rndlen); -static void secp256k1_rfc6979_hmac_sha256_generate(secp256k1_rfc6979_hmac_sha256_t *rng, unsigned char *out, size_t outlen); -static void secp256k1_rfc6979_hmac_sha256_finalize(secp256k1_rfc6979_hmac_sha256_t *rng); - -#endif diff --git a/crypto/secp256k1/secp256k1/src/hash_impl.h b/crypto/secp256k1/secp256k1/src/hash_impl.h deleted file mode 100644 index 9828827bc..000000000 --- a/crypto/secp256k1/secp256k1/src/hash_impl.h +++ /dev/null @@ -1,293 +0,0 @@ -/********************************************************************** - * Copyright (c) 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_HASH_IMPL_H_ -#define _SECP256K1_HASH_IMPL_H_ - -#include "hash.h" - -#include -#include -#include - -#define Ch(x,y,z) ((z) ^ ((x) & ((y) ^ (z)))) -#define Maj(x,y,z) (((x) & (y)) | ((z) & ((x) | (y)))) -#define Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10)) -#define Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7)) -#define sigma0(x) (((x) >> 7 | (x) << 25) ^ ((x) >> 18 | (x) << 14) ^ ((x) >> 3)) -#define sigma1(x) (((x) >> 17 | (x) << 15) ^ ((x) >> 19 | (x) << 13) ^ ((x) >> 10)) - -#define Round(a,b,c,d,e,f,g,h,k,w) do { \ - uint32_t t1 = (h) + Sigma1(e) + Ch((e), (f), (g)) + (k) + (w); \ - uint32_t t2 = Sigma0(a) + Maj((a), (b), (c)); \ - (d) += t1; \ - (h) = t1 + t2; \ -} while(0) - -#ifdef WORDS_BIGENDIAN -#define BE32(x) (x) -#else -#define BE32(p) ((((p) & 0xFF) << 24) | (((p) & 0xFF00) << 8) | (((p) & 0xFF0000) >> 8) | (((p) & 0xFF000000) >> 24)) -#endif - -static void secp256k1_sha256_initialize(secp256k1_sha256_t *hash) { - hash->s[0] = 0x6a09e667ul; - hash->s[1] = 0xbb67ae85ul; - hash->s[2] = 0x3c6ef372ul; - hash->s[3] = 0xa54ff53aul; - hash->s[4] = 0x510e527ful; - hash->s[5] = 0x9b05688cul; - hash->s[6] = 0x1f83d9abul; - hash->s[7] = 0x5be0cd19ul; - hash->bytes = 0; -} - -/** Perform one SHA-256 transformation, processing 16 big endian 32-bit words. */ -static void secp256k1_sha256_transform(uint32_t* s, const uint32_t* chunk) { - uint32_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4], f = s[5], g = s[6], h = s[7]; - uint32_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15; - - Round(a, b, c, d, e, f, g, h, 0x428a2f98, w0 = BE32(chunk[0])); - Round(h, a, b, c, d, e, f, g, 0x71374491, w1 = BE32(chunk[1])); - Round(g, h, a, b, c, d, e, f, 0xb5c0fbcf, w2 = BE32(chunk[2])); - Round(f, g, h, a, b, c, d, e, 0xe9b5dba5, w3 = BE32(chunk[3])); - Round(e, f, g, h, a, b, c, d, 0x3956c25b, w4 = BE32(chunk[4])); - Round(d, e, f, g, h, a, b, c, 0x59f111f1, w5 = BE32(chunk[5])); - Round(c, d, e, f, g, h, a, b, 0x923f82a4, w6 = BE32(chunk[6])); - Round(b, c, d, e, f, g, h, a, 0xab1c5ed5, w7 = BE32(chunk[7])); - Round(a, b, c, d, e, f, g, h, 0xd807aa98, w8 = BE32(chunk[8])); - Round(h, a, b, c, d, e, f, g, 0x12835b01, w9 = BE32(chunk[9])); - Round(g, h, a, b, c, d, e, f, 0x243185be, w10 = BE32(chunk[10])); - Round(f, g, h, a, b, c, d, e, 0x550c7dc3, w11 = BE32(chunk[11])); - Round(e, f, g, h, a, b, c, d, 0x72be5d74, w12 = BE32(chunk[12])); - Round(d, e, f, g, h, a, b, c, 0x80deb1fe, w13 = BE32(chunk[13])); - Round(c, d, e, f, g, h, a, b, 0x9bdc06a7, w14 = BE32(chunk[14])); - Round(b, c, d, e, f, g, h, a, 0xc19bf174, w15 = BE32(chunk[15])); - - Round(a, b, c, d, e, f, g, h, 0xe49b69c1, w0 += sigma1(w14) + w9 + sigma0(w1)); - Round(h, a, b, c, d, e, f, g, 0xefbe4786, w1 += sigma1(w15) + w10 + sigma0(w2)); - Round(g, h, a, b, c, d, e, f, 0x0fc19dc6, w2 += sigma1(w0) + w11 + sigma0(w3)); - Round(f, g, h, a, b, c, d, e, 0x240ca1cc, w3 += sigma1(w1) + w12 + sigma0(w4)); - Round(e, f, g, h, a, b, c, d, 0x2de92c6f, w4 += sigma1(w2) + w13 + sigma0(w5)); - Round(d, e, f, g, h, a, b, c, 0x4a7484aa, w5 += sigma1(w3) + w14 + sigma0(w6)); - Round(c, d, e, f, g, h, a, b, 0x5cb0a9dc, w6 += sigma1(w4) + w15 + sigma0(w7)); - Round(b, c, d, e, f, g, h, a, 0x76f988da, w7 += sigma1(w5) + w0 + sigma0(w8)); - Round(a, b, c, d, e, f, g, h, 0x983e5152, w8 += sigma1(w6) + w1 + sigma0(w9)); - Round(h, a, b, c, d, e, f, g, 0xa831c66d, w9 += sigma1(w7) + w2 + sigma0(w10)); - Round(g, h, a, b, c, d, e, f, 0xb00327c8, w10 += sigma1(w8) + w3 + sigma0(w11)); - Round(f, g, h, a, b, c, d, e, 0xbf597fc7, w11 += sigma1(w9) + w4 + sigma0(w12)); - Round(e, f, g, h, a, b, c, d, 0xc6e00bf3, w12 += sigma1(w10) + w5 + sigma0(w13)); - Round(d, e, f, g, h, a, b, c, 0xd5a79147, w13 += sigma1(w11) + w6 + sigma0(w14)); - Round(c, d, e, f, g, h, a, b, 0x06ca6351, w14 += sigma1(w12) + w7 + sigma0(w15)); - Round(b, c, d, e, f, g, h, a, 0x14292967, w15 += sigma1(w13) + w8 + sigma0(w0)); - - Round(a, b, c, d, e, f, g, h, 0x27b70a85, w0 += sigma1(w14) + w9 + sigma0(w1)); - Round(h, a, b, c, d, e, f, g, 0x2e1b2138, w1 += sigma1(w15) + w10 + sigma0(w2)); - Round(g, h, a, b, c, d, e, f, 0x4d2c6dfc, w2 += sigma1(w0) + w11 + sigma0(w3)); - Round(f, g, h, a, b, c, d, e, 0x53380d13, w3 += sigma1(w1) + w12 + sigma0(w4)); - Round(e, f, g, h, a, b, c, d, 0x650a7354, w4 += sigma1(w2) + w13 + sigma0(w5)); - Round(d, e, f, g, h, a, b, c, 0x766a0abb, w5 += sigma1(w3) + w14 + sigma0(w6)); - Round(c, d, e, f, g, h, a, b, 0x81c2c92e, w6 += sigma1(w4) + w15 + sigma0(w7)); - Round(b, c, d, e, f, g, h, a, 0x92722c85, w7 += sigma1(w5) + w0 + sigma0(w8)); - Round(a, b, c, d, e, f, g, h, 0xa2bfe8a1, w8 += sigma1(w6) + w1 + sigma0(w9)); - Round(h, a, b, c, d, e, f, g, 0xa81a664b, w9 += sigma1(w7) + w2 + sigma0(w10)); - Round(g, h, a, b, c, d, e, f, 0xc24b8b70, w10 += sigma1(w8) + w3 + sigma0(w11)); - Round(f, g, h, a, b, c, d, e, 0xc76c51a3, w11 += sigma1(w9) + w4 + sigma0(w12)); - Round(e, f, g, h, a, b, c, d, 0xd192e819, w12 += sigma1(w10) + w5 + sigma0(w13)); - Round(d, e, f, g, h, a, b, c, 0xd6990624, w13 += sigma1(w11) + w6 + sigma0(w14)); - Round(c, d, e, f, g, h, a, b, 0xf40e3585, w14 += sigma1(w12) + w7 + sigma0(w15)); - Round(b, c, d, e, f, g, h, a, 0x106aa070, w15 += sigma1(w13) + w8 + sigma0(w0)); - - Round(a, b, c, d, e, f, g, h, 0x19a4c116, w0 += sigma1(w14) + w9 + sigma0(w1)); - Round(h, a, b, c, d, e, f, g, 0x1e376c08, w1 += sigma1(w15) + w10 + sigma0(w2)); - Round(g, h, a, b, c, d, e, f, 0x2748774c, w2 += sigma1(w0) + w11 + sigma0(w3)); - Round(f, g, h, a, b, c, d, e, 0x34b0bcb5, w3 += sigma1(w1) + w12 + sigma0(w4)); - Round(e, f, g, h, a, b, c, d, 0x391c0cb3, w4 += sigma1(w2) + w13 + sigma0(w5)); - Round(d, e, f, g, h, a, b, c, 0x4ed8aa4a, w5 += sigma1(w3) + w14 + sigma0(w6)); - Round(c, d, e, f, g, h, a, b, 0x5b9cca4f, w6 += sigma1(w4) + w15 + sigma0(w7)); - Round(b, c, d, e, f, g, h, a, 0x682e6ff3, w7 += sigma1(w5) + w0 + sigma0(w8)); - Round(a, b, c, d, e, f, g, h, 0x748f82ee, w8 += sigma1(w6) + w1 + sigma0(w9)); - Round(h, a, b, c, d, e, f, g, 0x78a5636f, w9 += sigma1(w7) + w2 + sigma0(w10)); - Round(g, h, a, b, c, d, e, f, 0x84c87814, w10 += sigma1(w8) + w3 + sigma0(w11)); - Round(f, g, h, a, b, c, d, e, 0x8cc70208, w11 += sigma1(w9) + w4 + sigma0(w12)); - Round(e, f, g, h, a, b, c, d, 0x90befffa, w12 += sigma1(w10) + w5 + sigma0(w13)); - Round(d, e, f, g, h, a, b, c, 0xa4506ceb, w13 += sigma1(w11) + w6 + sigma0(w14)); - Round(c, d, e, f, g, h, a, b, 0xbef9a3f7, w14 + sigma1(w12) + w7 + sigma0(w15)); - Round(b, c, d, e, f, g, h, a, 0xc67178f2, w15 + sigma1(w13) + w8 + sigma0(w0)); - - s[0] += a; - s[1] += b; - s[2] += c; - s[3] += d; - s[4] += e; - s[5] += f; - s[6] += g; - s[7] += h; -} - -static void secp256k1_sha256_write(secp256k1_sha256_t *hash, const unsigned char *data, size_t len) { - size_t bufsize = hash->bytes & 0x3F; - hash->bytes += len; - while (bufsize + len >= 64) { - /* Fill the buffer, and process it. */ - memcpy(((unsigned char*)hash->buf) + bufsize, data, 64 - bufsize); - data += 64 - bufsize; - len -= 64 - bufsize; - secp256k1_sha256_transform(hash->s, hash->buf); - bufsize = 0; - } - if (len) { - /* Fill the buffer with what remains. */ - memcpy(((unsigned char*)hash->buf) + bufsize, data, len); - } -} - -static void secp256k1_sha256_finalize(secp256k1_sha256_t *hash, unsigned char *out32) { - static const unsigned char pad[64] = {0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - uint32_t sizedesc[2]; - uint32_t out[8]; - int i = 0; - sizedesc[0] = BE32(hash->bytes >> 29); - sizedesc[1] = BE32(hash->bytes << 3); - secp256k1_sha256_write(hash, pad, 1 + ((119 - (hash->bytes % 64)) % 64)); - secp256k1_sha256_write(hash, (const unsigned char*)sizedesc, 8); - for (i = 0; i < 8; i++) { - out[i] = BE32(hash->s[i]); - hash->s[i] = 0; - } - memcpy(out32, (const unsigned char*)out, 32); -} - -static void secp256k1_hmac_sha256_initialize(secp256k1_hmac_sha256_t *hash, const unsigned char *key, size_t keylen) { - int n; - unsigned char rkey[64]; - if (keylen <= 64) { - memcpy(rkey, key, keylen); - memset(rkey + keylen, 0, 64 - keylen); - } else { - secp256k1_sha256_t sha256; - secp256k1_sha256_initialize(&sha256); - secp256k1_sha256_write(&sha256, key, keylen); - secp256k1_sha256_finalize(&sha256, rkey); - memset(rkey + 32, 0, 32); - } - - secp256k1_sha256_initialize(&hash->outer); - for (n = 0; n < 64; n++) { - rkey[n] ^= 0x5c; - } - secp256k1_sha256_write(&hash->outer, rkey, 64); - - secp256k1_sha256_initialize(&hash->inner); - for (n = 0; n < 64; n++) { - rkey[n] ^= 0x5c ^ 0x36; - } - secp256k1_sha256_write(&hash->inner, rkey, 64); - memset(rkey, 0, 64); -} - -static void secp256k1_hmac_sha256_write(secp256k1_hmac_sha256_t *hash, const unsigned char *data, size_t size) { - secp256k1_sha256_write(&hash->inner, data, size); -} - -static void secp256k1_hmac_sha256_finalize(secp256k1_hmac_sha256_t *hash, unsigned char *out32) { - unsigned char temp[32]; - secp256k1_sha256_finalize(&hash->inner, temp); - secp256k1_sha256_write(&hash->outer, temp, 32); - memset(temp, 0, 32); - secp256k1_sha256_finalize(&hash->outer, out32); -} - - -static void secp256k1_rfc6979_hmac_sha256_initialize(secp256k1_rfc6979_hmac_sha256_t *rng, const unsigned char *key, size_t keylen, const unsigned char *msg, size_t msglen, const unsigned char *rnd, size_t rndlen) { - secp256k1_hmac_sha256_t hmac; - static const unsigned char zero[1] = {0x00}; - static const unsigned char one[1] = {0x01}; - - memset(rng->v, 0x01, 32); /* RFC6979 3.2.b. */ - memset(rng->k, 0x00, 32); /* RFC6979 3.2.c. */ - - /* RFC6979 3.2.d. */ - secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); - secp256k1_hmac_sha256_write(&hmac, rng->v, 32); - secp256k1_hmac_sha256_write(&hmac, zero, 1); - secp256k1_hmac_sha256_write(&hmac, key, keylen); - secp256k1_hmac_sha256_write(&hmac, msg, msglen); - if (rnd && rndlen) { - /* RFC6979 3.6 "Additional data". */ - secp256k1_hmac_sha256_write(&hmac, rnd, rndlen); - } - secp256k1_hmac_sha256_finalize(&hmac, rng->k); - secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); - secp256k1_hmac_sha256_write(&hmac, rng->v, 32); - secp256k1_hmac_sha256_finalize(&hmac, rng->v); - - /* RFC6979 3.2.f. */ - secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); - secp256k1_hmac_sha256_write(&hmac, rng->v, 32); - secp256k1_hmac_sha256_write(&hmac, one, 1); - secp256k1_hmac_sha256_write(&hmac, key, keylen); - secp256k1_hmac_sha256_write(&hmac, msg, msglen); - if (rnd && rndlen) { - /* RFC6979 3.6 "Additional data". */ - secp256k1_hmac_sha256_write(&hmac, rnd, rndlen); - } - secp256k1_hmac_sha256_finalize(&hmac, rng->k); - secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); - secp256k1_hmac_sha256_write(&hmac, rng->v, 32); - secp256k1_hmac_sha256_finalize(&hmac, rng->v); - rng->retry = 0; -} - -static void secp256k1_rfc6979_hmac_sha256_generate(secp256k1_rfc6979_hmac_sha256_t *rng, unsigned char *out, size_t outlen) { - /* RFC6979 3.2.h. */ - static const unsigned char zero[1] = {0x00}; - if (rng->retry) { - secp256k1_hmac_sha256_t hmac; - secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); - secp256k1_hmac_sha256_write(&hmac, rng->v, 32); - secp256k1_hmac_sha256_write(&hmac, zero, 1); - secp256k1_hmac_sha256_finalize(&hmac, rng->k); - secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); - secp256k1_hmac_sha256_write(&hmac, rng->v, 32); - secp256k1_hmac_sha256_finalize(&hmac, rng->v); - } - - while (outlen > 0) { - secp256k1_hmac_sha256_t hmac; - int now = outlen; - secp256k1_hmac_sha256_initialize(&hmac, rng->k, 32); - secp256k1_hmac_sha256_write(&hmac, rng->v, 32); - secp256k1_hmac_sha256_finalize(&hmac, rng->v); - if (now > 32) { - now = 32; - } - memcpy(out, rng->v, now); - out += now; - outlen -= now; - } - - rng->retry = 1; -} - -static void secp256k1_rfc6979_hmac_sha256_finalize(secp256k1_rfc6979_hmac_sha256_t *rng) { - memset(rng->k, 0, 32); - memset(rng->v, 0, 32); - rng->retry = 0; -} - - -#undef Round -#undef sigma0 -#undef sigma1 -#undef Sigma0 -#undef Sigma1 -#undef Ch -#undef Maj -#undef ReadBE32 -#undef WriteBE32 - -#endif diff --git a/crypto/secp256k1/secp256k1/src/java/org/bitcoin/NativeSecp256k1.java b/crypto/secp256k1/secp256k1/src/java/org/bitcoin/NativeSecp256k1.java deleted file mode 100644 index 90a498eaa..000000000 --- a/crypto/secp256k1/secp256k1/src/java/org/bitcoin/NativeSecp256k1.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.bitcoin; - -import java.nio.ByteBuffer; -import java.nio.ByteOrder; - -import com.google.common.base.Preconditions; - - -/** - * This class holds native methods to handle ECDSA verification. - * You can find an example library that can be used for this at - * https://github.com/sipa/secp256k1 - */ -public class NativeSecp256k1 { - public static final boolean enabled; - static { - boolean isEnabled = true; - try { - System.loadLibrary("javasecp256k1"); - } catch (UnsatisfiedLinkError e) { - isEnabled = false; - } - enabled = isEnabled; - } - - private static ThreadLocal nativeECDSABuffer = new ThreadLocal(); - /** - * Verifies the given secp256k1 signature in native code. - * Calling when enabled == false is undefined (probably library not loaded) - * - * @param data The data which was signed, must be exactly 32 bytes - * @param signature The signature - * @param pub The public key which did the signing - */ - public static boolean verify(byte[] data, byte[] signature, byte[] pub) { - Preconditions.checkArgument(data.length == 32 && signature.length <= 520 && pub.length <= 520); - - ByteBuffer byteBuff = nativeECDSABuffer.get(); - if (byteBuff == null) { - byteBuff = ByteBuffer.allocateDirect(32 + 8 + 520 + 520); - byteBuff.order(ByteOrder.nativeOrder()); - nativeECDSABuffer.set(byteBuff); - } - byteBuff.rewind(); - byteBuff.put(data); - byteBuff.putInt(signature.length); - byteBuff.putInt(pub.length); - byteBuff.put(signature); - byteBuff.put(pub); - return secp256k1_ecdsa_verify(byteBuff) == 1; - } - - /** - * @param byteBuff signature format is byte[32] data, - * native-endian int signatureLength, native-endian int pubkeyLength, - * byte[signatureLength] signature, byte[pubkeyLength] pub - * @returns 1 for valid signature, anything else for invalid - */ - private static native int secp256k1_ecdsa_verify(ByteBuffer byteBuff); -} diff --git a/crypto/secp256k1/secp256k1/src/java/org_bitcoin_NativeSecp256k1.c b/crypto/secp256k1/secp256k1/src/java/org_bitcoin_NativeSecp256k1.c deleted file mode 100644 index bb4cd7072..000000000 --- a/crypto/secp256k1/secp256k1/src/java/org_bitcoin_NativeSecp256k1.c +++ /dev/null @@ -1,23 +0,0 @@ -#include "org_bitcoin_NativeSecp256k1.h" -#include "include/secp256k1.h" - -JNIEXPORT jint JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdsa_1verify - (JNIEnv* env, jclass classObject, jobject byteBufferObject) -{ - unsigned char* data = (unsigned char*) (*env)->GetDirectBufferAddress(env, byteBufferObject); - int sigLen = *((int*)(data + 32)); - int pubLen = *((int*)(data + 32 + 4)); - - return secp256k1_ecdsa_verify(data, 32, data+32+8, sigLen, data+32+8+sigLen, pubLen); -} - -static void __javasecp256k1_attach(void) __attribute__((constructor)); -static void __javasecp256k1_detach(void) __attribute__((destructor)); - -static void __javasecp256k1_attach(void) { - secp256k1_start(SECP256K1_START_VERIFY); -} - -static void __javasecp256k1_detach(void) { - secp256k1_stop(); -} diff --git a/crypto/secp256k1/secp256k1/src/java/org_bitcoin_NativeSecp256k1.h b/crypto/secp256k1/secp256k1/src/java/org_bitcoin_NativeSecp256k1.h deleted file mode 100644 index d7fb004fa..000000000 --- a/crypto/secp256k1/secp256k1/src/java/org_bitcoin_NativeSecp256k1.h +++ /dev/null @@ -1,21 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class org_bitcoin_NativeSecp256k1 */ - -#ifndef _Included_org_bitcoin_NativeSecp256k1 -#define _Included_org_bitcoin_NativeSecp256k1 -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: org_bitcoin_NativeSecp256k1 - * Method: secp256k1_ecdsa_verify - * Signature: (Ljava/nio/ByteBuffer;)I - */ -JNIEXPORT jint JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdsa_1verify - (JNIEnv *, jclass, jobject); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/crypto/secp256k1/secp256k1/src/num.h b/crypto/secp256k1/secp256k1/src/num.h deleted file mode 100644 index 339b6bb6e..000000000 --- a/crypto/secp256k1/secp256k1/src/num.h +++ /dev/null @@ -1,68 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_NUM_ -#define _SECP256K1_NUM_ - -#ifndef USE_NUM_NONE - -#if defined HAVE_CONFIG_H -#include "libsecp256k1-config.h" -#endif - -#if defined(USE_NUM_GMP) -#include "num_gmp.h" -#else -#error "Please select num implementation" -#endif - -/** Copy a number. */ -static void secp256k1_num_copy(secp256k1_num_t *r, const secp256k1_num_t *a); - -/** Convert a number's absolute value to a binary big-endian string. - * There must be enough place. */ -static void secp256k1_num_get_bin(unsigned char *r, unsigned int rlen, const secp256k1_num_t *a); - -/** Set a number to the value of a binary big-endian string. */ -static void secp256k1_num_set_bin(secp256k1_num_t *r, const unsigned char *a, unsigned int alen); - -/** Compute a modular inverse. The input must be less than the modulus. */ -static void secp256k1_num_mod_inverse(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *m); - -/** Compare the absolute value of two numbers. */ -static int secp256k1_num_cmp(const secp256k1_num_t *a, const secp256k1_num_t *b); - -/** Test whether two number are equal (including sign). */ -static int secp256k1_num_eq(const secp256k1_num_t *a, const secp256k1_num_t *b); - -/** Add two (signed) numbers. */ -static void secp256k1_num_add(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b); - -/** Subtract two (signed) numbers. */ -static void secp256k1_num_sub(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b); - -/** Multiply two (signed) numbers. */ -static void secp256k1_num_mul(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b); - -/** Replace a number by its remainder modulo m. M's sign is ignored. The result is a number between 0 and m-1, - even if r was negative. */ -static void secp256k1_num_mod(secp256k1_num_t *r, const secp256k1_num_t *m); - -/** Right-shift the passed number by bits bits. */ -static void secp256k1_num_shift(secp256k1_num_t *r, int bits); - -/** Check whether a number is zero. */ -static int secp256k1_num_is_zero(const secp256k1_num_t *a); - -/** Check whether a number is strictly negative. */ -static int secp256k1_num_is_neg(const secp256k1_num_t *a); - -/** Change a number's sign. */ -static void secp256k1_num_negate(secp256k1_num_t *r); - -#endif - -#endif diff --git a/crypto/secp256k1/secp256k1/src/num_gmp.h b/crypto/secp256k1/secp256k1/src/num_gmp.h deleted file mode 100644 index baa1f2bf2..000000000 --- a/crypto/secp256k1/secp256k1/src/num_gmp.h +++ /dev/null @@ -1,20 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_NUM_REPR_ -#define _SECP256K1_NUM_REPR_ - -#include - -#define NUM_LIMBS ((256+GMP_NUMB_BITS-1)/GMP_NUMB_BITS) - -typedef struct { - mp_limb_t data[2*NUM_LIMBS]; - int neg; - int limbs; -} secp256k1_num_t; - -#endif diff --git a/crypto/secp256k1/secp256k1/src/num_gmp_impl.h b/crypto/secp256k1/secp256k1/src/num_gmp_impl.h deleted file mode 100644 index dbbc458d5..000000000 --- a/crypto/secp256k1/secp256k1/src/num_gmp_impl.h +++ /dev/null @@ -1,260 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_NUM_REPR_IMPL_H_ -#define _SECP256K1_NUM_REPR_IMPL_H_ - -#include -#include -#include - -#include "util.h" -#include "num.h" - -#ifdef VERIFY -static void secp256k1_num_sanity(const secp256k1_num_t *a) { - VERIFY_CHECK(a->limbs == 1 || (a->limbs > 1 && a->data[a->limbs-1] != 0)); -} -#else -#define secp256k1_num_sanity(a) do { } while(0) -#endif - -static void secp256k1_num_copy(secp256k1_num_t *r, const secp256k1_num_t *a) { - *r = *a; -} - -static void secp256k1_num_get_bin(unsigned char *r, unsigned int rlen, const secp256k1_num_t *a) { - unsigned char tmp[65]; - int len = 0; - int shift = 0; - if (a->limbs>1 || a->data[0] != 0) { - len = mpn_get_str(tmp, 256, (mp_limb_t*)a->data, a->limbs); - } - while (shift < len && tmp[shift] == 0) shift++; - VERIFY_CHECK(len-shift <= (int)rlen); - memset(r, 0, rlen - len + shift); - if (len > shift) { - memcpy(r + rlen - len + shift, tmp + shift, len - shift); - } - memset(tmp, 0, sizeof(tmp)); -} - -static void secp256k1_num_set_bin(secp256k1_num_t *r, const unsigned char *a, unsigned int alen) { - int len; - VERIFY_CHECK(alen > 0); - VERIFY_CHECK(alen <= 64); - len = mpn_set_str(r->data, a, alen, 256); - if (len == 0) { - r->data[0] = 0; - len = 1; - } - VERIFY_CHECK(len <= NUM_LIMBS*2); - r->limbs = len; - r->neg = 0; - while (r->limbs > 1 && r->data[r->limbs-1]==0) { - r->limbs--; - } -} - -static void secp256k1_num_add_abs(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b) { - mp_limb_t c = mpn_add(r->data, a->data, a->limbs, b->data, b->limbs); - r->limbs = a->limbs; - if (c != 0) { - VERIFY_CHECK(r->limbs < 2*NUM_LIMBS); - r->data[r->limbs++] = c; - } -} - -static void secp256k1_num_sub_abs(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b) { - mp_limb_t c = mpn_sub(r->data, a->data, a->limbs, b->data, b->limbs); - VERIFY_CHECK(c == 0); - r->limbs = a->limbs; - while (r->limbs > 1 && r->data[r->limbs-1]==0) { - r->limbs--; - } -} - -static void secp256k1_num_mod(secp256k1_num_t *r, const secp256k1_num_t *m) { - secp256k1_num_sanity(r); - secp256k1_num_sanity(m); - - if (r->limbs >= m->limbs) { - mp_limb_t t[2*NUM_LIMBS]; - mpn_tdiv_qr(t, r->data, 0, r->data, r->limbs, m->data, m->limbs); - memset(t, 0, sizeof(t)); - r->limbs = m->limbs; - while (r->limbs > 1 && r->data[r->limbs-1]==0) { - r->limbs--; - } - } - - if (r->neg && (r->limbs > 1 || r->data[0] != 0)) { - secp256k1_num_sub_abs(r, m, r); - r->neg = 0; - } -} - -static void secp256k1_num_mod_inverse(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *m) { - int i; - mp_limb_t g[NUM_LIMBS+1]; - mp_limb_t u[NUM_LIMBS+1]; - mp_limb_t v[NUM_LIMBS+1]; - mp_size_t sn; - mp_size_t gn; - secp256k1_num_sanity(a); - secp256k1_num_sanity(m); - - /** mpn_gcdext computes: (G,S) = gcdext(U,V), where - * * G = gcd(U,V) - * * G = U*S + V*T - * * U has equal or more limbs than V, and V has no padding - * If we set U to be (a padded version of) a, and V = m: - * G = a*S + m*T - * G = a*S mod m - * Assuming G=1: - * S = 1/a mod m - */ - VERIFY_CHECK(m->limbs <= NUM_LIMBS); - VERIFY_CHECK(m->data[m->limbs-1] != 0); - for (i = 0; i < m->limbs; i++) { - u[i] = (i < a->limbs) ? a->data[i] : 0; - v[i] = m->data[i]; - } - sn = NUM_LIMBS+1; - gn = mpn_gcdext(g, r->data, &sn, u, m->limbs, v, m->limbs); - VERIFY_CHECK(gn == 1); - VERIFY_CHECK(g[0] == 1); - r->neg = a->neg ^ m->neg; - if (sn < 0) { - mpn_sub(r->data, m->data, m->limbs, r->data, -sn); - r->limbs = m->limbs; - while (r->limbs > 1 && r->data[r->limbs-1]==0) { - r->limbs--; - } - } else { - r->limbs = sn; - } - memset(g, 0, sizeof(g)); - memset(u, 0, sizeof(u)); - memset(v, 0, sizeof(v)); -} - -static int secp256k1_num_is_zero(const secp256k1_num_t *a) { - return (a->limbs == 1 && a->data[0] == 0); -} - -static int secp256k1_num_is_neg(const secp256k1_num_t *a) { - return (a->limbs > 1 || a->data[0] != 0) && a->neg; -} - -static int secp256k1_num_cmp(const secp256k1_num_t *a, const secp256k1_num_t *b) { - if (a->limbs > b->limbs) { - return 1; - } - if (a->limbs < b->limbs) { - return -1; - } - return mpn_cmp(a->data, b->data, a->limbs); -} - -static int secp256k1_num_eq(const secp256k1_num_t *a, const secp256k1_num_t *b) { - if (a->limbs > b->limbs) { - return 0; - } - if (a->limbs < b->limbs) { - return 0; - } - if ((a->neg && !secp256k1_num_is_zero(a)) != (b->neg && !secp256k1_num_is_zero(b))) { - return 0; - } - return mpn_cmp(a->data, b->data, a->limbs) == 0; -} - -static void secp256k1_num_subadd(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b, int bneg) { - if (!(b->neg ^ bneg ^ a->neg)) { /* a and b have the same sign */ - r->neg = a->neg; - if (a->limbs >= b->limbs) { - secp256k1_num_add_abs(r, a, b); - } else { - secp256k1_num_add_abs(r, b, a); - } - } else { - if (secp256k1_num_cmp(a, b) > 0) { - r->neg = a->neg; - secp256k1_num_sub_abs(r, a, b); - } else { - r->neg = b->neg ^ bneg; - secp256k1_num_sub_abs(r, b, a); - } - } -} - -static void secp256k1_num_add(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b) { - secp256k1_num_sanity(a); - secp256k1_num_sanity(b); - secp256k1_num_subadd(r, a, b, 0); -} - -static void secp256k1_num_sub(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b) { - secp256k1_num_sanity(a); - secp256k1_num_sanity(b); - secp256k1_num_subadd(r, a, b, 1); -} - -static void secp256k1_num_mul(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b) { - mp_limb_t tmp[2*NUM_LIMBS+1]; - secp256k1_num_sanity(a); - secp256k1_num_sanity(b); - - VERIFY_CHECK(a->limbs + b->limbs <= 2*NUM_LIMBS+1); - if ((a->limbs==1 && a->data[0]==0) || (b->limbs==1 && b->data[0]==0)) { - r->limbs = 1; - r->neg = 0; - r->data[0] = 0; - return; - } - if (a->limbs >= b->limbs) { - mpn_mul(tmp, a->data, a->limbs, b->data, b->limbs); - } else { - mpn_mul(tmp, b->data, b->limbs, a->data, a->limbs); - } - r->limbs = a->limbs + b->limbs; - if (r->limbs > 1 && tmp[r->limbs - 1]==0) { - r->limbs--; - } - VERIFY_CHECK(r->limbs <= 2*NUM_LIMBS); - mpn_copyi(r->data, tmp, r->limbs); - r->neg = a->neg ^ b->neg; - memset(tmp, 0, sizeof(tmp)); -} - -static void secp256k1_num_shift(secp256k1_num_t *r, int bits) { - int i; - if (bits % GMP_NUMB_BITS) { - /* Shift within limbs. */ - mpn_rshift(r->data, r->data, r->limbs, bits % GMP_NUMB_BITS); - } - if (bits >= GMP_NUMB_BITS) { - /* Shift full limbs. */ - for (i = 0; i < r->limbs; i++) { - int index = i + (bits / GMP_NUMB_BITS); - if (index < r->limbs && index < 2*NUM_LIMBS) { - r->data[i] = r->data[index]; - } else { - r->data[i] = 0; - } - } - } - while (r->limbs>1 && r->data[r->limbs-1]==0) { - r->limbs--; - } -} - -static void secp256k1_num_negate(secp256k1_num_t *r) { - r->neg ^= 1; -} - -#endif diff --git a/crypto/secp256k1/secp256k1/src/num_impl.h b/crypto/secp256k1/secp256k1/src/num_impl.h deleted file mode 100644 index 0b0e3a072..000000000 --- a/crypto/secp256k1/secp256k1/src/num_impl.h +++ /dev/null @@ -1,24 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_NUM_IMPL_H_ -#define _SECP256K1_NUM_IMPL_H_ - -#if defined HAVE_CONFIG_H -#include "libsecp256k1-config.h" -#endif - -#include "num.h" - -#if defined(USE_NUM_GMP) -#include "num_gmp_impl.h" -#elif defined(USE_NUM_NONE) -/* Nothing. */ -#else -#error "Please select num implementation" -#endif - -#endif diff --git a/crypto/secp256k1/secp256k1/src/scalar.h b/crypto/secp256k1/secp256k1/src/scalar.h deleted file mode 100644 index f5d09f8d4..000000000 --- a/crypto/secp256k1/secp256k1/src/scalar.h +++ /dev/null @@ -1,93 +0,0 @@ -/********************************************************************** - * Copyright (c) 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_SCALAR_ -#define _SECP256K1_SCALAR_ - -#include "num.h" - -#if defined HAVE_CONFIG_H -#include "libsecp256k1-config.h" -#endif - -#if defined(USE_SCALAR_4X64) -#include "scalar_4x64.h" -#elif defined(USE_SCALAR_8X32) -#include "scalar_8x32.h" -#else -#error "Please select scalar implementation" -#endif - -/** Clear a scalar to prevent the leak of sensitive data. */ -static void secp256k1_scalar_clear(secp256k1_scalar_t *r); - -/** Access bits from a scalar. All requested bits must belong to the same 32-bit limb. */ -static unsigned int secp256k1_scalar_get_bits(const secp256k1_scalar_t *a, unsigned int offset, unsigned int count); - -/** Access bits from a scalar. Not constant time. */ -static unsigned int secp256k1_scalar_get_bits_var(const secp256k1_scalar_t *a, unsigned int offset, unsigned int count); - -/** Set a scalar from a big endian byte array. */ -static void secp256k1_scalar_set_b32(secp256k1_scalar_t *r, const unsigned char *bin, int *overflow); - -/** Set a scalar to an unsigned integer. */ -static void secp256k1_scalar_set_int(secp256k1_scalar_t *r, unsigned int v); - -/** Convert a scalar to a byte array. */ -static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar_t* a); - -/** Add two scalars together (modulo the group order). Returns whether it overflowed. */ -static int secp256k1_scalar_add(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b); - -/** Add a power of two to a scalar. The result is not allowed to overflow. */ -static void secp256k1_scalar_add_bit(secp256k1_scalar_t *r, unsigned int bit); - -/** Multiply two scalars (modulo the group order). */ -static void secp256k1_scalar_mul(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b); - -/** Compute the square of a scalar (modulo the group order). */ -static void secp256k1_scalar_sqr(secp256k1_scalar_t *r, const secp256k1_scalar_t *a); - -/** Compute the inverse of a scalar (modulo the group order). */ -static void secp256k1_scalar_inverse(secp256k1_scalar_t *r, const secp256k1_scalar_t *a); - -/** Compute the inverse of a scalar (modulo the group order), without constant-time guarantee. */ -static void secp256k1_scalar_inverse_var(secp256k1_scalar_t *r, const secp256k1_scalar_t *a); - -/** Compute the complement of a scalar (modulo the group order). */ -static void secp256k1_scalar_negate(secp256k1_scalar_t *r, const secp256k1_scalar_t *a); - -/** Check whether a scalar equals zero. */ -static int secp256k1_scalar_is_zero(const secp256k1_scalar_t *a); - -/** Check whether a scalar equals one. */ -static int secp256k1_scalar_is_one(const secp256k1_scalar_t *a); - -/** Check whether a scalar is higher than the group order divided by 2. */ -static int secp256k1_scalar_is_high(const secp256k1_scalar_t *a); - -#ifndef USE_NUM_NONE -/** Convert a scalar to a number. */ -static void secp256k1_scalar_get_num(secp256k1_num_t *r, const secp256k1_scalar_t *a); - -/** Get the order of the group as a number. */ -static void secp256k1_scalar_order_get_num(secp256k1_num_t *r); -#endif - -/** Compare two scalars. */ -static int secp256k1_scalar_eq(const secp256k1_scalar_t *a, const secp256k1_scalar_t *b); - -#ifdef USE_ENDOMORPHISM -/** Find r1 and r2 such that r1+r2*2^128 = a. */ -static void secp256k1_scalar_split_128(secp256k1_scalar_t *r1, secp256k1_scalar_t *r2, const secp256k1_scalar_t *a); -/** Find r1 and r2 such that r1+r2*lambda = a, and r1 and r2 are maximum 128 bits long (see secp256k1_gej_mul_lambda). */ -static void secp256k1_scalar_split_lambda_var(secp256k1_scalar_t *r1, secp256k1_scalar_t *r2, const secp256k1_scalar_t *a); -#endif - -/** Multiply a and b (without taking the modulus!), divide by 2**shift, and round to the nearest integer. Shift must be at least 256. */ -static void secp256k1_scalar_mul_shift_var(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b, unsigned int shift); - -#endif diff --git a/crypto/secp256k1/secp256k1/src/scalar_4x64.h b/crypto/secp256k1/secp256k1/src/scalar_4x64.h deleted file mode 100644 index 82899aa7b..000000000 --- a/crypto/secp256k1/secp256k1/src/scalar_4x64.h +++ /dev/null @@ -1,19 +0,0 @@ -/********************************************************************** - * Copyright (c) 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_SCALAR_REPR_ -#define _SECP256K1_SCALAR_REPR_ - -#include - -/** A scalar modulo the group order of the secp256k1 curve. */ -typedef struct { - uint64_t d[4]; -} secp256k1_scalar_t; - -#define SECP256K1_SCALAR_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{((uint64_t)(d1)) << 32 | (d0), ((uint64_t)(d3)) << 32 | (d2), ((uint64_t)(d5)) << 32 | (d4), ((uint64_t)(d7)) << 32 | (d6)}} - -#endif diff --git a/crypto/secp256k1/secp256k1/src/scalar_4x64_impl.h b/crypto/secp256k1/secp256k1/src/scalar_4x64_impl.h deleted file mode 100644 index ff365292f..000000000 --- a/crypto/secp256k1/secp256k1/src/scalar_4x64_impl.h +++ /dev/null @@ -1,920 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_SCALAR_REPR_IMPL_H_ -#define _SECP256K1_SCALAR_REPR_IMPL_H_ - -/* Limbs of the secp256k1 order. */ -#define SECP256K1_N_0 ((uint64_t)0xBFD25E8CD0364141ULL) -#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL) -#define SECP256K1_N_2 ((uint64_t)0xFFFFFFFFFFFFFFFEULL) -#define SECP256K1_N_3 ((uint64_t)0xFFFFFFFFFFFFFFFFULL) - -/* Limbs of 2^256 minus the secp256k1 order. */ -#define SECP256K1_N_C_0 (~SECP256K1_N_0 + 1) -#define SECP256K1_N_C_1 (~SECP256K1_N_1) -#define SECP256K1_N_C_2 (1) - -/* Limbs of half the secp256k1 order. */ -#define SECP256K1_N_H_0 ((uint64_t)0xDFE92F46681B20A0ULL) -#define SECP256K1_N_H_1 ((uint64_t)0x5D576E7357A4501DULL) -#define SECP256K1_N_H_2 ((uint64_t)0xFFFFFFFFFFFFFFFFULL) -#define SECP256K1_N_H_3 ((uint64_t)0x7FFFFFFFFFFFFFFFULL) - -SECP256K1_INLINE static void secp256k1_scalar_clear(secp256k1_scalar_t *r) { - r->d[0] = 0; - r->d[1] = 0; - r->d[2] = 0; - r->d[3] = 0; -} - -SECP256K1_INLINE static void secp256k1_scalar_set_int(secp256k1_scalar_t *r, unsigned int v) { - r->d[0] = v; - r->d[1] = 0; - r->d[2] = 0; - r->d[3] = 0; -} - -SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits(const secp256k1_scalar_t *a, unsigned int offset, unsigned int count) { - VERIFY_CHECK((offset + count - 1) >> 6 == offset >> 6); - return (a->d[offset >> 6] >> (offset & 0x3F)) & ((((uint64_t)1) << count) - 1); -} - -SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits_var(const secp256k1_scalar_t *a, unsigned int offset, unsigned int count) { - VERIFY_CHECK(count < 32); - VERIFY_CHECK(offset + count <= 256); - if ((offset + count - 1) >> 6 == offset >> 6) { - return secp256k1_scalar_get_bits(a, offset, count); - } else { - VERIFY_CHECK((offset >> 6) + 1 < 4); - return ((a->d[offset >> 6] >> (offset & 0x3F)) | (a->d[(offset >> 6) + 1] << (64 - (offset & 0x3F)))) & ((((uint64_t)1) << count) - 1); - } -} - -SECP256K1_INLINE static int secp256k1_scalar_check_overflow(const secp256k1_scalar_t *a) { - int yes = 0; - int no = 0; - no |= (a->d[3] < SECP256K1_N_3); /* No need for a > check. */ - no |= (a->d[2] < SECP256K1_N_2); - yes |= (a->d[2] > SECP256K1_N_2) & ~no; - no |= (a->d[1] < SECP256K1_N_1); - yes |= (a->d[1] > SECP256K1_N_1) & ~no; - yes |= (a->d[0] >= SECP256K1_N_0) & ~no; - return yes; -} - -SECP256K1_INLINE static int secp256k1_scalar_reduce(secp256k1_scalar_t *r, unsigned int overflow) { - uint128_t t; - VERIFY_CHECK(overflow <= 1); - t = (uint128_t)r->d[0] + overflow * SECP256K1_N_C_0; - r->d[0] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; - t += (uint128_t)r->d[1] + overflow * SECP256K1_N_C_1; - r->d[1] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; - t += (uint128_t)r->d[2] + overflow * SECP256K1_N_C_2; - r->d[2] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; - t += (uint64_t)r->d[3]; - r->d[3] = t & 0xFFFFFFFFFFFFFFFFULL; - return overflow; -} - -static int secp256k1_scalar_add(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) { - int overflow; - uint128_t t = (uint128_t)a->d[0] + b->d[0]; - r->d[0] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; - t += (uint128_t)a->d[1] + b->d[1]; - r->d[1] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; - t += (uint128_t)a->d[2] + b->d[2]; - r->d[2] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; - t += (uint128_t)a->d[3] + b->d[3]; - r->d[3] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; - overflow = t + secp256k1_scalar_check_overflow(r); - VERIFY_CHECK(overflow == 0 || overflow == 1); - secp256k1_scalar_reduce(r, overflow); - return overflow; -} - -static void secp256k1_scalar_add_bit(secp256k1_scalar_t *r, unsigned int bit) { - uint128_t t; - VERIFY_CHECK(bit < 256); - t = (uint128_t)r->d[0] + (((uint64_t)((bit >> 6) == 0)) << (bit & 0x3F)); - r->d[0] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; - t += (uint128_t)r->d[1] + (((uint64_t)((bit >> 6) == 1)) << (bit & 0x3F)); - r->d[1] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; - t += (uint128_t)r->d[2] + (((uint64_t)((bit >> 6) == 2)) << (bit & 0x3F)); - r->d[2] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64; - t += (uint128_t)r->d[3] + (((uint64_t)((bit >> 6) == 3)) << (bit & 0x3F)); - r->d[3] = t & 0xFFFFFFFFFFFFFFFFULL; -#ifdef VERIFY - VERIFY_CHECK((t >> 64) == 0); - VERIFY_CHECK(secp256k1_scalar_check_overflow(r) == 0); -#endif -} - -static void secp256k1_scalar_set_b32(secp256k1_scalar_t *r, const unsigned char *b32, int *overflow) { - int over; - r->d[0] = (uint64_t)b32[31] | (uint64_t)b32[30] << 8 | (uint64_t)b32[29] << 16 | (uint64_t)b32[28] << 24 | (uint64_t)b32[27] << 32 | (uint64_t)b32[26] << 40 | (uint64_t)b32[25] << 48 | (uint64_t)b32[24] << 56; - r->d[1] = (uint64_t)b32[23] | (uint64_t)b32[22] << 8 | (uint64_t)b32[21] << 16 | (uint64_t)b32[20] << 24 | (uint64_t)b32[19] << 32 | (uint64_t)b32[18] << 40 | (uint64_t)b32[17] << 48 | (uint64_t)b32[16] << 56; - r->d[2] = (uint64_t)b32[15] | (uint64_t)b32[14] << 8 | (uint64_t)b32[13] << 16 | (uint64_t)b32[12] << 24 | (uint64_t)b32[11] << 32 | (uint64_t)b32[10] << 40 | (uint64_t)b32[9] << 48 | (uint64_t)b32[8] << 56; - r->d[3] = (uint64_t)b32[7] | (uint64_t)b32[6] << 8 | (uint64_t)b32[5] << 16 | (uint64_t)b32[4] << 24 | (uint64_t)b32[3] << 32 | (uint64_t)b32[2] << 40 | (uint64_t)b32[1] << 48 | (uint64_t)b32[0] << 56; - over = secp256k1_scalar_reduce(r, secp256k1_scalar_check_overflow(r)); - if (overflow) { - *overflow = over; - } -} - -static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar_t* a) { - bin[0] = a->d[3] >> 56; bin[1] = a->d[3] >> 48; bin[2] = a->d[3] >> 40; bin[3] = a->d[3] >> 32; bin[4] = a->d[3] >> 24; bin[5] = a->d[3] >> 16; bin[6] = a->d[3] >> 8; bin[7] = a->d[3]; - bin[8] = a->d[2] >> 56; bin[9] = a->d[2] >> 48; bin[10] = a->d[2] >> 40; bin[11] = a->d[2] >> 32; bin[12] = a->d[2] >> 24; bin[13] = a->d[2] >> 16; bin[14] = a->d[2] >> 8; bin[15] = a->d[2]; - bin[16] = a->d[1] >> 56; bin[17] = a->d[1] >> 48; bin[18] = a->d[1] >> 40; bin[19] = a->d[1] >> 32; bin[20] = a->d[1] >> 24; bin[21] = a->d[1] >> 16; bin[22] = a->d[1] >> 8; bin[23] = a->d[1]; - bin[24] = a->d[0] >> 56; bin[25] = a->d[0] >> 48; bin[26] = a->d[0] >> 40; bin[27] = a->d[0] >> 32; bin[28] = a->d[0] >> 24; bin[29] = a->d[0] >> 16; bin[30] = a->d[0] >> 8; bin[31] = a->d[0]; -} - -SECP256K1_INLINE static int secp256k1_scalar_is_zero(const secp256k1_scalar_t *a) { - return (a->d[0] | a->d[1] | a->d[2] | a->d[3]) == 0; -} - -static void secp256k1_scalar_negate(secp256k1_scalar_t *r, const secp256k1_scalar_t *a) { - uint64_t nonzero = 0xFFFFFFFFFFFFFFFFULL * (secp256k1_scalar_is_zero(a) == 0); - uint128_t t = (uint128_t)(~a->d[0]) + SECP256K1_N_0 + 1; - r->d[0] = t & nonzero; t >>= 64; - t += (uint128_t)(~a->d[1]) + SECP256K1_N_1; - r->d[1] = t & nonzero; t >>= 64; - t += (uint128_t)(~a->d[2]) + SECP256K1_N_2; - r->d[2] = t & nonzero; t >>= 64; - t += (uint128_t)(~a->d[3]) + SECP256K1_N_3; - r->d[3] = t & nonzero; -} - -SECP256K1_INLINE static int secp256k1_scalar_is_one(const secp256k1_scalar_t *a) { - return ((a->d[0] ^ 1) | a->d[1] | a->d[2] | a->d[3]) == 0; -} - -static int secp256k1_scalar_is_high(const secp256k1_scalar_t *a) { - int yes = 0; - int no = 0; - no |= (a->d[3] < SECP256K1_N_H_3); - yes |= (a->d[3] > SECP256K1_N_H_3) & ~no; - no |= (a->d[2] < SECP256K1_N_H_2) & ~yes; /* No need for a > check. */ - no |= (a->d[1] < SECP256K1_N_H_1) & ~yes; - yes |= (a->d[1] > SECP256K1_N_H_1) & ~no; - yes |= (a->d[0] > SECP256K1_N_H_0) & ~no; - return yes; -} - -/* Inspired by the macros in OpenSSL's crypto/bn/asm/x86_64-gcc.c. */ - -/** Add a*b to the number defined by (c0,c1,c2). c2 must never overflow. */ -#define muladd(a,b) { \ - uint64_t tl, th; \ - { \ - uint128_t t = (uint128_t)a * b; \ - th = t >> 64; /* at most 0xFFFFFFFFFFFFFFFE */ \ - tl = t; \ - } \ - c0 += tl; /* overflow is handled on the next line */ \ - th += (c0 < tl) ? 1 : 0; /* at most 0xFFFFFFFFFFFFFFFF */ \ - c1 += th; /* overflow is handled on the next line */ \ - c2 += (c1 < th) ? 1 : 0; /* never overflows by contract (verified in the next line) */ \ - VERIFY_CHECK((c1 >= th) || (c2 != 0)); \ -} - -/** Add a*b to the number defined by (c0,c1). c1 must never overflow. */ -#define muladd_fast(a,b) { \ - uint64_t tl, th; \ - { \ - uint128_t t = (uint128_t)a * b; \ - th = t >> 64; /* at most 0xFFFFFFFFFFFFFFFE */ \ - tl = t; \ - } \ - c0 += tl; /* overflow is handled on the next line */ \ - th += (c0 < tl) ? 1 : 0; /* at most 0xFFFFFFFFFFFFFFFF */ \ - c1 += th; /* never overflows by contract (verified in the next line) */ \ - VERIFY_CHECK(c1 >= th); \ -} - -/** Add 2*a*b to the number defined by (c0,c1,c2). c2 must never overflow. */ -#define muladd2(a,b) { \ - uint64_t tl, th, th2, tl2; \ - { \ - uint128_t t = (uint128_t)a * b; \ - th = t >> 64; /* at most 0xFFFFFFFFFFFFFFFE */ \ - tl = t; \ - } \ - th2 = th + th; /* at most 0xFFFFFFFFFFFFFFFE (in case th was 0x7FFFFFFFFFFFFFFF) */ \ - c2 += (th2 < th) ? 1 : 0; /* never overflows by contract (verified the next line) */ \ - VERIFY_CHECK((th2 >= th) || (c2 != 0)); \ - tl2 = tl + tl; /* at most 0xFFFFFFFFFFFFFFFE (in case the lowest 63 bits of tl were 0x7FFFFFFFFFFFFFFF) */ \ - th2 += (tl2 < tl) ? 1 : 0; /* at most 0xFFFFFFFFFFFFFFFF */ \ - c0 += tl2; /* overflow is handled on the next line */ \ - th2 += (c0 < tl2) ? 1 : 0; /* second overflow is handled on the next line */ \ - c2 += (c0 < tl2) & (th2 == 0); /* never overflows by contract (verified the next line) */ \ - VERIFY_CHECK((c0 >= tl2) || (th2 != 0) || (c2 != 0)); \ - c1 += th2; /* overflow is handled on the next line */ \ - c2 += (c1 < th2) ? 1 : 0; /* never overflows by contract (verified the next line) */ \ - VERIFY_CHECK((c1 >= th2) || (c2 != 0)); \ -} - -/** Add a to the number defined by (c0,c1,c2). c2 must never overflow. */ -#define sumadd(a) { \ - unsigned int over; \ - c0 += (a); /* overflow is handled on the next line */ \ - over = (c0 < (a)) ? 1 : 0; \ - c1 += over; /* overflow is handled on the next line */ \ - c2 += (c1 < over) ? 1 : 0; /* never overflows by contract */ \ -} - -/** Add a to the number defined by (c0,c1). c1 must never overflow, c2 must be zero. */ -#define sumadd_fast(a) { \ - c0 += (a); /* overflow is handled on the next line */ \ - c1 += (c0 < (a)) ? 1 : 0; /* never overflows by contract (verified the next line) */ \ - VERIFY_CHECK((c1 != 0) | (c0 >= (a))); \ - VERIFY_CHECK(c2 == 0); \ -} - -/** Extract the lowest 64 bits of (c0,c1,c2) into n, and left shift the number 64 bits. */ -#define extract(n) { \ - (n) = c0; \ - c0 = c1; \ - c1 = c2; \ - c2 = 0; \ -} - -/** Extract the lowest 64 bits of (c0,c1,c2) into n, and left shift the number 64 bits. c2 is required to be zero. */ -#define extract_fast(n) { \ - (n) = c0; \ - c0 = c1; \ - c1 = 0; \ - VERIFY_CHECK(c2 == 0); \ -} - -static void secp256k1_scalar_reduce_512(secp256k1_scalar_t *r, const uint64_t *l) { -#ifdef USE_ASM_X86_64 - /* Reduce 512 bits into 385. */ - uint64_t m0, m1, m2, m3, m4, m5, m6; - uint64_t p0, p1, p2, p3, p4; - uint64_t c; - - __asm__ __volatile__( - /* Preload. */ - "movq 32(%%rsi), %%r11\n" - "movq 40(%%rsi), %%r12\n" - "movq 48(%%rsi), %%r13\n" - "movq 56(%%rsi), %%r14\n" - /* Initialize r8,r9,r10 */ - "movq 0(%%rsi), %%r8\n" - "movq $0, %%r9\n" - "movq $0, %%r10\n" - /* (r8,r9) += n0 * c0 */ - "movq %8, %%rax\n" - "mulq %%r11\n" - "addq %%rax, %%r8\n" - "adcq %%rdx, %%r9\n" - /* extract m0 */ - "movq %%r8, %q0\n" - "movq $0, %%r8\n" - /* (r9,r10) += l1 */ - "addq 8(%%rsi), %%r9\n" - "adcq $0, %%r10\n" - /* (r9,r10,r8) += n1 * c0 */ - "movq %8, %%rax\n" - "mulq %%r12\n" - "addq %%rax, %%r9\n" - "adcq %%rdx, %%r10\n" - "adcq $0, %%r8\n" - /* (r9,r10,r8) += n0 * c1 */ - "movq %9, %%rax\n" - "mulq %%r11\n" - "addq %%rax, %%r9\n" - "adcq %%rdx, %%r10\n" - "adcq $0, %%r8\n" - /* extract m1 */ - "movq %%r9, %q1\n" - "movq $0, %%r9\n" - /* (r10,r8,r9) += l2 */ - "addq 16(%%rsi), %%r10\n" - "adcq $0, %%r8\n" - "adcq $0, %%r9\n" - /* (r10,r8,r9) += n2 * c0 */ - "movq %8, %%rax\n" - "mulq %%r13\n" - "addq %%rax, %%r10\n" - "adcq %%rdx, %%r8\n" - "adcq $0, %%r9\n" - /* (r10,r8,r9) += n1 * c1 */ - "movq %9, %%rax\n" - "mulq %%r12\n" - "addq %%rax, %%r10\n" - "adcq %%rdx, %%r8\n" - "adcq $0, %%r9\n" - /* (r10,r8,r9) += n0 */ - "addq %%r11, %%r10\n" - "adcq $0, %%r8\n" - "adcq $0, %%r9\n" - /* extract m2 */ - "movq %%r10, %q2\n" - "movq $0, %%r10\n" - /* (r8,r9,r10) += l3 */ - "addq 24(%%rsi), %%r8\n" - "adcq $0, %%r9\n" - "adcq $0, %%r10\n" - /* (r8,r9,r10) += n3 * c0 */ - "movq %8, %%rax\n" - "mulq %%r14\n" - "addq %%rax, %%r8\n" - "adcq %%rdx, %%r9\n" - "adcq $0, %%r10\n" - /* (r8,r9,r10) += n2 * c1 */ - "movq %9, %%rax\n" - "mulq %%r13\n" - "addq %%rax, %%r8\n" - "adcq %%rdx, %%r9\n" - "adcq $0, %%r10\n" - /* (r8,r9,r10) += n1 */ - "addq %%r12, %%r8\n" - "adcq $0, %%r9\n" - "adcq $0, %%r10\n" - /* extract m3 */ - "movq %%r8, %q3\n" - "movq $0, %%r8\n" - /* (r9,r10,r8) += n3 * c1 */ - "movq %9, %%rax\n" - "mulq %%r14\n" - "addq %%rax, %%r9\n" - "adcq %%rdx, %%r10\n" - "adcq $0, %%r8\n" - /* (r9,r10,r8) += n2 */ - "addq %%r13, %%r9\n" - "adcq $0, %%r10\n" - "adcq $0, %%r8\n" - /* extract m4 */ - "movq %%r9, %q4\n" - /* (r10,r8) += n3 */ - "addq %%r14, %%r10\n" - "adcq $0, %%r8\n" - /* extract m5 */ - "movq %%r10, %q5\n" - /* extract m6 */ - "movq %%r8, %q6\n" - : "=g"(m0), "=g"(m1), "=g"(m2), "=g"(m3), "=g"(m4), "=g"(m5), "=g"(m6) - : "S"(l), "n"(SECP256K1_N_C_0), "n"(SECP256K1_N_C_1) - : "rax", "rdx", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "cc"); - - /* Reduce 385 bits into 258. */ - __asm__ __volatile__( - /* Preload */ - "movq %q9, %%r11\n" - "movq %q10, %%r12\n" - "movq %q11, %%r13\n" - /* Initialize (r8,r9,r10) */ - "movq %q5, %%r8\n" - "movq $0, %%r9\n" - "movq $0, %%r10\n" - /* (r8,r9) += m4 * c0 */ - "movq %12, %%rax\n" - "mulq %%r11\n" - "addq %%rax, %%r8\n" - "adcq %%rdx, %%r9\n" - /* extract p0 */ - "movq %%r8, %q0\n" - "movq $0, %%r8\n" - /* (r9,r10) += m1 */ - "addq %q6, %%r9\n" - "adcq $0, %%r10\n" - /* (r9,r10,r8) += m5 * c0 */ - "movq %12, %%rax\n" - "mulq %%r12\n" - "addq %%rax, %%r9\n" - "adcq %%rdx, %%r10\n" - "adcq $0, %%r8\n" - /* (r9,r10,r8) += m4 * c1 */ - "movq %13, %%rax\n" - "mulq %%r11\n" - "addq %%rax, %%r9\n" - "adcq %%rdx, %%r10\n" - "adcq $0, %%r8\n" - /* extract p1 */ - "movq %%r9, %q1\n" - "movq $0, %%r9\n" - /* (r10,r8,r9) += m2 */ - "addq %q7, %%r10\n" - "adcq $0, %%r8\n" - "adcq $0, %%r9\n" - /* (r10,r8,r9) += m6 * c0 */ - "movq %12, %%rax\n" - "mulq %%r13\n" - "addq %%rax, %%r10\n" - "adcq %%rdx, %%r8\n" - "adcq $0, %%r9\n" - /* (r10,r8,r9) += m5 * c1 */ - "movq %13, %%rax\n" - "mulq %%r12\n" - "addq %%rax, %%r10\n" - "adcq %%rdx, %%r8\n" - "adcq $0, %%r9\n" - /* (r10,r8,r9) += m4 */ - "addq %%r11, %%r10\n" - "adcq $0, %%r8\n" - "adcq $0, %%r9\n" - /* extract p2 */ - "movq %%r10, %q2\n" - /* (r8,r9) += m3 */ - "addq %q8, %%r8\n" - "adcq $0, %%r9\n" - /* (r8,r9) += m6 * c1 */ - "movq %13, %%rax\n" - "mulq %%r13\n" - "addq %%rax, %%r8\n" - "adcq %%rdx, %%r9\n" - /* (r8,r9) += m5 */ - "addq %%r12, %%r8\n" - "adcq $0, %%r9\n" - /* extract p3 */ - "movq %%r8, %q3\n" - /* (r9) += m6 */ - "addq %%r13, %%r9\n" - /* extract p4 */ - "movq %%r9, %q4\n" - : "=&g"(p0), "=&g"(p1), "=&g"(p2), "=g"(p3), "=g"(p4) - : "g"(m0), "g"(m1), "g"(m2), "g"(m3), "g"(m4), "g"(m5), "g"(m6), "n"(SECP256K1_N_C_0), "n"(SECP256K1_N_C_1) - : "rax", "rdx", "r8", "r9", "r10", "r11", "r12", "r13", "cc"); - - /* Reduce 258 bits into 256. */ - __asm__ __volatile__( - /* Preload */ - "movq %q5, %%r10\n" - /* (rax,rdx) = p4 * c0 */ - "movq %7, %%rax\n" - "mulq %%r10\n" - /* (rax,rdx) += p0 */ - "addq %q1, %%rax\n" - "adcq $0, %%rdx\n" - /* extract r0 */ - "movq %%rax, 0(%q6)\n" - /* Move to (r8,r9) */ - "movq %%rdx, %%r8\n" - "movq $0, %%r9\n" - /* (r8,r9) += p1 */ - "addq %q2, %%r8\n" - "adcq $0, %%r9\n" - /* (r8,r9) += p4 * c1 */ - "movq %8, %%rax\n" - "mulq %%r10\n" - "addq %%rax, %%r8\n" - "adcq %%rdx, %%r9\n" - /* Extract r1 */ - "movq %%r8, 8(%q6)\n" - "movq $0, %%r8\n" - /* (r9,r8) += p4 */ - "addq %%r10, %%r9\n" - "adcq $0, %%r8\n" - /* (r9,r8) += p2 */ - "addq %q3, %%r9\n" - "adcq $0, %%r8\n" - /* Extract r2 */ - "movq %%r9, 16(%q6)\n" - "movq $0, %%r9\n" - /* (r8,r9) += p3 */ - "addq %q4, %%r8\n" - "adcq $0, %%r9\n" - /* Extract r3 */ - "movq %%r8, 24(%q6)\n" - /* Extract c */ - "movq %%r9, %q0\n" - : "=g"(c) - : "g"(p0), "g"(p1), "g"(p2), "g"(p3), "g"(p4), "D"(r), "n"(SECP256K1_N_C_0), "n"(SECP256K1_N_C_1) - : "rax", "rdx", "r8", "r9", "r10", "cc", "memory"); -#else - uint128_t c; - uint64_t c0, c1, c2; - uint64_t n0 = l[4], n1 = l[5], n2 = l[6], n3 = l[7]; - uint64_t m0, m1, m2, m3, m4, m5; - uint32_t m6; - uint64_t p0, p1, p2, p3; - uint32_t p4; - - /* Reduce 512 bits into 385. */ - /* m[0..6] = l[0..3] + n[0..3] * SECP256K1_N_C. */ - c0 = l[0]; c1 = 0; c2 = 0; - muladd_fast(n0, SECP256K1_N_C_0); - extract_fast(m0); - sumadd_fast(l[1]); - muladd(n1, SECP256K1_N_C_0); - muladd(n0, SECP256K1_N_C_1); - extract(m1); - sumadd(l[2]); - muladd(n2, SECP256K1_N_C_0); - muladd(n1, SECP256K1_N_C_1); - sumadd(n0); - extract(m2); - sumadd(l[3]); - muladd(n3, SECP256K1_N_C_0); - muladd(n2, SECP256K1_N_C_1); - sumadd(n1); - extract(m3); - muladd(n3, SECP256K1_N_C_1); - sumadd(n2); - extract(m4); - sumadd_fast(n3); - extract_fast(m5); - VERIFY_CHECK(c0 <= 1); - m6 = c0; - - /* Reduce 385 bits into 258. */ - /* p[0..4] = m[0..3] + m[4..6] * SECP256K1_N_C. */ - c0 = m0; c1 = 0; c2 = 0; - muladd_fast(m4, SECP256K1_N_C_0); - extract_fast(p0); - sumadd_fast(m1); - muladd(m5, SECP256K1_N_C_0); - muladd(m4, SECP256K1_N_C_1); - extract(p1); - sumadd(m2); - muladd(m6, SECP256K1_N_C_0); - muladd(m5, SECP256K1_N_C_1); - sumadd(m4); - extract(p2); - sumadd_fast(m3); - muladd_fast(m6, SECP256K1_N_C_1); - sumadd_fast(m5); - extract_fast(p3); - p4 = c0 + m6; - VERIFY_CHECK(p4 <= 2); - - /* Reduce 258 bits into 256. */ - /* r[0..3] = p[0..3] + p[4] * SECP256K1_N_C. */ - c = p0 + (uint128_t)SECP256K1_N_C_0 * p4; - r->d[0] = c & 0xFFFFFFFFFFFFFFFFULL; c >>= 64; - c += p1 + (uint128_t)SECP256K1_N_C_1 * p4; - r->d[1] = c & 0xFFFFFFFFFFFFFFFFULL; c >>= 64; - c += p2 + (uint128_t)p4; - r->d[2] = c & 0xFFFFFFFFFFFFFFFFULL; c >>= 64; - c += p3; - r->d[3] = c & 0xFFFFFFFFFFFFFFFFULL; c >>= 64; -#endif - - /* Final reduction of r. */ - secp256k1_scalar_reduce(r, c + secp256k1_scalar_check_overflow(r)); -} - -static void secp256k1_scalar_mul_512(uint64_t l[8], const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) { -#ifdef USE_ASM_X86_64 - const uint64_t *pb = b->d; - __asm__ __volatile__( - /* Preload */ - "movq 0(%%rdi), %%r15\n" - "movq 8(%%rdi), %%rbx\n" - "movq 16(%%rdi), %%rcx\n" - "movq 0(%%rdx), %%r11\n" - "movq 8(%%rdx), %%r12\n" - "movq 16(%%rdx), %%r13\n" - "movq 24(%%rdx), %%r14\n" - /* (rax,rdx) = a0 * b0 */ - "movq %%r15, %%rax\n" - "mulq %%r11\n" - /* Extract l0 */ - "movq %%rax, 0(%%rsi)\n" - /* (r8,r9,r10) = (rdx) */ - "movq %%rdx, %%r8\n" - "xorq %%r9, %%r9\n" - "xorq %%r10, %%r10\n" - /* (r8,r9,r10) += a0 * b1 */ - "movq %%r15, %%rax\n" - "mulq %%r12\n" - "addq %%rax, %%r8\n" - "adcq %%rdx, %%r9\n" - "adcq $0, %%r10\n" - /* (r8,r9,r10) += a1 * b0 */ - "movq %%rbx, %%rax\n" - "mulq %%r11\n" - "addq %%rax, %%r8\n" - "adcq %%rdx, %%r9\n" - "adcq $0, %%r10\n" - /* Extract l1 */ - "movq %%r8, 8(%%rsi)\n" - "xorq %%r8, %%r8\n" - /* (r9,r10,r8) += a0 * b2 */ - "movq %%r15, %%rax\n" - "mulq %%r13\n" - "addq %%rax, %%r9\n" - "adcq %%rdx, %%r10\n" - "adcq $0, %%r8\n" - /* (r9,r10,r8) += a1 * b1 */ - "movq %%rbx, %%rax\n" - "mulq %%r12\n" - "addq %%rax, %%r9\n" - "adcq %%rdx, %%r10\n" - "adcq $0, %%r8\n" - /* (r9,r10,r8) += a2 * b0 */ - "movq %%rcx, %%rax\n" - "mulq %%r11\n" - "addq %%rax, %%r9\n" - "adcq %%rdx, %%r10\n" - "adcq $0, %%r8\n" - /* Extract l2 */ - "movq %%r9, 16(%%rsi)\n" - "xorq %%r9, %%r9\n" - /* (r10,r8,r9) += a0 * b3 */ - "movq %%r15, %%rax\n" - "mulq %%r14\n" - "addq %%rax, %%r10\n" - "adcq %%rdx, %%r8\n" - "adcq $0, %%r9\n" - /* Preload a3 */ - "movq 24(%%rdi), %%r15\n" - /* (r10,r8,r9) += a1 * b2 */ - "movq %%rbx, %%rax\n" - "mulq %%r13\n" - "addq %%rax, %%r10\n" - "adcq %%rdx, %%r8\n" - "adcq $0, %%r9\n" - /* (r10,r8,r9) += a2 * b1 */ - "movq %%rcx, %%rax\n" - "mulq %%r12\n" - "addq %%rax, %%r10\n" - "adcq %%rdx, %%r8\n" - "adcq $0, %%r9\n" - /* (r10,r8,r9) += a3 * b0 */ - "movq %%r15, %%rax\n" - "mulq %%r11\n" - "addq %%rax, %%r10\n" - "adcq %%rdx, %%r8\n" - "adcq $0, %%r9\n" - /* Extract l3 */ - "movq %%r10, 24(%%rsi)\n" - "xorq %%r10, %%r10\n" - /* (r8,r9,r10) += a1 * b3 */ - "movq %%rbx, %%rax\n" - "mulq %%r14\n" - "addq %%rax, %%r8\n" - "adcq %%rdx, %%r9\n" - "adcq $0, %%r10\n" - /* (r8,r9,r10) += a2 * b2 */ - "movq %%rcx, %%rax\n" - "mulq %%r13\n" - "addq %%rax, %%r8\n" - "adcq %%rdx, %%r9\n" - "adcq $0, %%r10\n" - /* (r8,r9,r10) += a3 * b1 */ - "movq %%r15, %%rax\n" - "mulq %%r12\n" - "addq %%rax, %%r8\n" - "adcq %%rdx, %%r9\n" - "adcq $0, %%r10\n" - /* Extract l4 */ - "movq %%r8, 32(%%rsi)\n" - "xorq %%r8, %%r8\n" - /* (r9,r10,r8) += a2 * b3 */ - "movq %%rcx, %%rax\n" - "mulq %%r14\n" - "addq %%rax, %%r9\n" - "adcq %%rdx, %%r10\n" - "adcq $0, %%r8\n" - /* (r9,r10,r8) += a3 * b2 */ - "movq %%r15, %%rax\n" - "mulq %%r13\n" - "addq %%rax, %%r9\n" - "adcq %%rdx, %%r10\n" - "adcq $0, %%r8\n" - /* Extract l5 */ - "movq %%r9, 40(%%rsi)\n" - /* (r10,r8) += a3 * b3 */ - "movq %%r15, %%rax\n" - "mulq %%r14\n" - "addq %%rax, %%r10\n" - "adcq %%rdx, %%r8\n" - /* Extract l6 */ - "movq %%r10, 48(%%rsi)\n" - /* Extract l7 */ - "movq %%r8, 56(%%rsi)\n" - : "+d"(pb) - : "S"(l), "D"(a->d) - : "rax", "rbx", "rcx", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "cc", "memory"); -#else - /* 160 bit accumulator. */ - uint64_t c0 = 0, c1 = 0; - uint32_t c2 = 0; - - /* l[0..7] = a[0..3] * b[0..3]. */ - muladd_fast(a->d[0], b->d[0]); - extract_fast(l[0]); - muladd(a->d[0], b->d[1]); - muladd(a->d[1], b->d[0]); - extract(l[1]); - muladd(a->d[0], b->d[2]); - muladd(a->d[1], b->d[1]); - muladd(a->d[2], b->d[0]); - extract(l[2]); - muladd(a->d[0], b->d[3]); - muladd(a->d[1], b->d[2]); - muladd(a->d[2], b->d[1]); - muladd(a->d[3], b->d[0]); - extract(l[3]); - muladd(a->d[1], b->d[3]); - muladd(a->d[2], b->d[2]); - muladd(a->d[3], b->d[1]); - extract(l[4]); - muladd(a->d[2], b->d[3]); - muladd(a->d[3], b->d[2]); - extract(l[5]); - muladd_fast(a->d[3], b->d[3]); - extract_fast(l[6]); - VERIFY_CHECK(c1 <= 0); - l[7] = c0; -#endif -} - -static void secp256k1_scalar_sqr_512(uint64_t l[8], const secp256k1_scalar_t *a) { -#ifdef USE_ASM_X86_64 - __asm__ __volatile__( - /* Preload */ - "movq 0(%%rdi), %%r11\n" - "movq 8(%%rdi), %%r12\n" - "movq 16(%%rdi), %%r13\n" - "movq 24(%%rdi), %%r14\n" - /* (rax,rdx) = a0 * a0 */ - "movq %%r11, %%rax\n" - "mulq %%r11\n" - /* Extract l0 */ - "movq %%rax, 0(%%rsi)\n" - /* (r8,r9,r10) = (rdx,0) */ - "movq %%rdx, %%r8\n" - "xorq %%r9, %%r9\n" - "xorq %%r10, %%r10\n" - /* (r8,r9,r10) += 2 * a0 * a1 */ - "movq %%r11, %%rax\n" - "mulq %%r12\n" - "addq %%rax, %%r8\n" - "adcq %%rdx, %%r9\n" - "adcq $0, %%r10\n" - "addq %%rax, %%r8\n" - "adcq %%rdx, %%r9\n" - "adcq $0, %%r10\n" - /* Extract l1 */ - "movq %%r8, 8(%%rsi)\n" - "xorq %%r8, %%r8\n" - /* (r9,r10,r8) += 2 * a0 * a2 */ - "movq %%r11, %%rax\n" - "mulq %%r13\n" - "addq %%rax, %%r9\n" - "adcq %%rdx, %%r10\n" - "adcq $0, %%r8\n" - "addq %%rax, %%r9\n" - "adcq %%rdx, %%r10\n" - "adcq $0, %%r8\n" - /* (r9,r10,r8) += a1 * a1 */ - "movq %%r12, %%rax\n" - "mulq %%r12\n" - "addq %%rax, %%r9\n" - "adcq %%rdx, %%r10\n" - "adcq $0, %%r8\n" - /* Extract l2 */ - "movq %%r9, 16(%%rsi)\n" - "xorq %%r9, %%r9\n" - /* (r10,r8,r9) += 2 * a0 * a3 */ - "movq %%r11, %%rax\n" - "mulq %%r14\n" - "addq %%rax, %%r10\n" - "adcq %%rdx, %%r8\n" - "adcq $0, %%r9\n" - "addq %%rax, %%r10\n" - "adcq %%rdx, %%r8\n" - "adcq $0, %%r9\n" - /* (r10,r8,r9) += 2 * a1 * a2 */ - "movq %%r12, %%rax\n" - "mulq %%r13\n" - "addq %%rax, %%r10\n" - "adcq %%rdx, %%r8\n" - "adcq $0, %%r9\n" - "addq %%rax, %%r10\n" - "adcq %%rdx, %%r8\n" - "adcq $0, %%r9\n" - /* Extract l3 */ - "movq %%r10, 24(%%rsi)\n" - "xorq %%r10, %%r10\n" - /* (r8,r9,r10) += 2 * a1 * a3 */ - "movq %%r12, %%rax\n" - "mulq %%r14\n" - "addq %%rax, %%r8\n" - "adcq %%rdx, %%r9\n" - "adcq $0, %%r10\n" - "addq %%rax, %%r8\n" - "adcq %%rdx, %%r9\n" - "adcq $0, %%r10\n" - /* (r8,r9,r10) += a2 * a2 */ - "movq %%r13, %%rax\n" - "mulq %%r13\n" - "addq %%rax, %%r8\n" - "adcq %%rdx, %%r9\n" - "adcq $0, %%r10\n" - /* Extract l4 */ - "movq %%r8, 32(%%rsi)\n" - "xorq %%r8, %%r8\n" - /* (r9,r10,r8) += 2 * a2 * a3 */ - "movq %%r13, %%rax\n" - "mulq %%r14\n" - "addq %%rax, %%r9\n" - "adcq %%rdx, %%r10\n" - "adcq $0, %%r8\n" - "addq %%rax, %%r9\n" - "adcq %%rdx, %%r10\n" - "adcq $0, %%r8\n" - /* Extract l5 */ - "movq %%r9, 40(%%rsi)\n" - /* (r10,r8) += a3 * a3 */ - "movq %%r14, %%rax\n" - "mulq %%r14\n" - "addq %%rax, %%r10\n" - "adcq %%rdx, %%r8\n" - /* Extract l6 */ - "movq %%r10, 48(%%rsi)\n" - /* Extract l7 */ - "movq %%r8, 56(%%rsi)\n" - : - : "S"(l), "D"(a->d) - : "rax", "rdx", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "cc", "memory"); -#else - /* 160 bit accumulator. */ - uint64_t c0 = 0, c1 = 0; - uint32_t c2 = 0; - - /* l[0..7] = a[0..3] * b[0..3]. */ - muladd_fast(a->d[0], a->d[0]); - extract_fast(l[0]); - muladd2(a->d[0], a->d[1]); - extract(l[1]); - muladd2(a->d[0], a->d[2]); - muladd(a->d[1], a->d[1]); - extract(l[2]); - muladd2(a->d[0], a->d[3]); - muladd2(a->d[1], a->d[2]); - extract(l[3]); - muladd2(a->d[1], a->d[3]); - muladd(a->d[2], a->d[2]); - extract(l[4]); - muladd2(a->d[2], a->d[3]); - extract(l[5]); - muladd_fast(a->d[3], a->d[3]); - extract_fast(l[6]); - VERIFY_CHECK(c1 == 0); - l[7] = c0; -#endif -} - -#undef sumadd -#undef sumadd_fast -#undef muladd -#undef muladd_fast -#undef muladd2 -#undef extract -#undef extract_fast - -static void secp256k1_scalar_mul(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) { - uint64_t l[8]; - secp256k1_scalar_mul_512(l, a, b); - secp256k1_scalar_reduce_512(r, l); -} - -static void secp256k1_scalar_sqr(secp256k1_scalar_t *r, const secp256k1_scalar_t *a) { - uint64_t l[8]; - secp256k1_scalar_sqr_512(l, a); - secp256k1_scalar_reduce_512(r, l); -} - -static void secp256k1_scalar_split_128(secp256k1_scalar_t *r1, secp256k1_scalar_t *r2, const secp256k1_scalar_t *a) { - r1->d[0] = a->d[0]; - r1->d[1] = a->d[1]; - r1->d[2] = 0; - r1->d[3] = 0; - r2->d[0] = a->d[2]; - r2->d[1] = a->d[3]; - r2->d[2] = 0; - r2->d[3] = 0; -} - -SECP256K1_INLINE static int secp256k1_scalar_eq(const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) { - return ((a->d[0] ^ b->d[0]) | (a->d[1] ^ b->d[1]) | (a->d[2] ^ b->d[2]) | (a->d[3] ^ b->d[3])) == 0; -} - -SECP256K1_INLINE static void secp256k1_scalar_mul_shift_var(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b, unsigned int shift) { - uint64_t l[8]; - unsigned int shiftlimbs; - unsigned int shiftlow; - unsigned int shifthigh; - VERIFY_CHECK(shift >= 256); - secp256k1_scalar_mul_512(l, a, b); - shiftlimbs = shift >> 6; - shiftlow = shift & 0x3F; - shifthigh = 64 - shiftlow; - r->d[0] = shift < 512 ? (l[0 + shiftlimbs] >> shiftlow | (shift < 448 && shiftlow ? (l[1 + shiftlimbs] << shifthigh) : 0)) : 0; - r->d[1] = shift < 448 ? (l[1 + shiftlimbs] >> shiftlow | (shift < 384 && shiftlow ? (l[2 + shiftlimbs] << shifthigh) : 0)) : 0; - r->d[2] = shift < 384 ? (l[2 + shiftlimbs] >> shiftlow | (shift < 320 && shiftlow ? (l[3 + shiftlimbs] << shifthigh) : 0)) : 0; - r->d[3] = shift < 320 ? (l[3 + shiftlimbs] >> shiftlow) : 0; - if ((l[(shift - 1) >> 6] >> ((shift - 1) & 0x3f)) & 1) { - secp256k1_scalar_add_bit(r, 0); - } -} - -#endif diff --git a/crypto/secp256k1/secp256k1/src/scalar_8x32.h b/crypto/secp256k1/secp256k1/src/scalar_8x32.h deleted file mode 100644 index f17017e24..000000000 --- a/crypto/secp256k1/secp256k1/src/scalar_8x32.h +++ /dev/null @@ -1,19 +0,0 @@ -/********************************************************************** - * Copyright (c) 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_SCALAR_REPR_ -#define _SECP256K1_SCALAR_REPR_ - -#include - -/** A scalar modulo the group order of the secp256k1 curve. */ -typedef struct { - uint32_t d[8]; -} secp256k1_scalar_t; - -#define SECP256K1_SCALAR_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{(d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7)}} - -#endif diff --git a/crypto/secp256k1/secp256k1/src/scalar_8x32_impl.h b/crypto/secp256k1/secp256k1/src/scalar_8x32_impl.h deleted file mode 100644 index 22b31d411..000000000 --- a/crypto/secp256k1/secp256k1/src/scalar_8x32_impl.h +++ /dev/null @@ -1,681 +0,0 @@ -/********************************************************************** - * Copyright (c) 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_SCALAR_REPR_IMPL_H_ -#define _SECP256K1_SCALAR_REPR_IMPL_H_ - -/* Limbs of the secp256k1 order. */ -#define SECP256K1_N_0 ((uint32_t)0xD0364141UL) -#define SECP256K1_N_1 ((uint32_t)0xBFD25E8CUL) -#define SECP256K1_N_2 ((uint32_t)0xAF48A03BUL) -#define SECP256K1_N_3 ((uint32_t)0xBAAEDCE6UL) -#define SECP256K1_N_4 ((uint32_t)0xFFFFFFFEUL) -#define SECP256K1_N_5 ((uint32_t)0xFFFFFFFFUL) -#define SECP256K1_N_6 ((uint32_t)0xFFFFFFFFUL) -#define SECP256K1_N_7 ((uint32_t)0xFFFFFFFFUL) - -/* Limbs of 2^256 minus the secp256k1 order. */ -#define SECP256K1_N_C_0 (~SECP256K1_N_0 + 1) -#define SECP256K1_N_C_1 (~SECP256K1_N_1) -#define SECP256K1_N_C_2 (~SECP256K1_N_2) -#define SECP256K1_N_C_3 (~SECP256K1_N_3) -#define SECP256K1_N_C_4 (1) - -/* Limbs of half the secp256k1 order. */ -#define SECP256K1_N_H_0 ((uint32_t)0x681B20A0UL) -#define SECP256K1_N_H_1 ((uint32_t)0xDFE92F46UL) -#define SECP256K1_N_H_2 ((uint32_t)0x57A4501DUL) -#define SECP256K1_N_H_3 ((uint32_t)0x5D576E73UL) -#define SECP256K1_N_H_4 ((uint32_t)0xFFFFFFFFUL) -#define SECP256K1_N_H_5 ((uint32_t)0xFFFFFFFFUL) -#define SECP256K1_N_H_6 ((uint32_t)0xFFFFFFFFUL) -#define SECP256K1_N_H_7 ((uint32_t)0x7FFFFFFFUL) - -SECP256K1_INLINE static void secp256k1_scalar_clear(secp256k1_scalar_t *r) { - r->d[0] = 0; - r->d[1] = 0; - r->d[2] = 0; - r->d[3] = 0; - r->d[4] = 0; - r->d[5] = 0; - r->d[6] = 0; - r->d[7] = 0; -} - -SECP256K1_INLINE static void secp256k1_scalar_set_int(secp256k1_scalar_t *r, unsigned int v) { - r->d[0] = v; - r->d[1] = 0; - r->d[2] = 0; - r->d[3] = 0; - r->d[4] = 0; - r->d[5] = 0; - r->d[6] = 0; - r->d[7] = 0; -} - -SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits(const secp256k1_scalar_t *a, unsigned int offset, unsigned int count) { - VERIFY_CHECK((offset + count - 1) >> 5 == offset >> 5); - return (a->d[offset >> 5] >> (offset & 0x1F)) & ((1 << count) - 1); -} - -SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits_var(const secp256k1_scalar_t *a, unsigned int offset, unsigned int count) { - VERIFY_CHECK(count < 32); - VERIFY_CHECK(offset + count <= 256); - if ((offset + count - 1) >> 5 == offset >> 5) { - return secp256k1_scalar_get_bits(a, offset, count); - } else { - VERIFY_CHECK((offset >> 5) + 1 < 8); - return ((a->d[offset >> 5] >> (offset & 0x1F)) | (a->d[(offset >> 5) + 1] << (32 - (offset & 0x1F)))) & ((((uint32_t)1) << count) - 1); - } -} - -SECP256K1_INLINE static int secp256k1_scalar_check_overflow(const secp256k1_scalar_t *a) { - int yes = 0; - int no = 0; - no |= (a->d[7] < SECP256K1_N_7); /* No need for a > check. */ - no |= (a->d[6] < SECP256K1_N_6); /* No need for a > check. */ - no |= (a->d[5] < SECP256K1_N_5); /* No need for a > check. */ - no |= (a->d[4] < SECP256K1_N_4); - yes |= (a->d[4] > SECP256K1_N_4) & ~no; - no |= (a->d[3] < SECP256K1_N_3) & ~yes; - yes |= (a->d[3] > SECP256K1_N_3) & ~no; - no |= (a->d[2] < SECP256K1_N_2) & ~yes; - yes |= (a->d[2] > SECP256K1_N_2) & ~no; - no |= (a->d[1] < SECP256K1_N_1) & ~yes; - yes |= (a->d[1] > SECP256K1_N_1) & ~no; - yes |= (a->d[0] >= SECP256K1_N_0) & ~no; - return yes; -} - -SECP256K1_INLINE static int secp256k1_scalar_reduce(secp256k1_scalar_t *r, uint32_t overflow) { - uint64_t t; - VERIFY_CHECK(overflow <= 1); - t = (uint64_t)r->d[0] + overflow * SECP256K1_N_C_0; - r->d[0] = t & 0xFFFFFFFFUL; t >>= 32; - t += (uint64_t)r->d[1] + overflow * SECP256K1_N_C_1; - r->d[1] = t & 0xFFFFFFFFUL; t >>= 32; - t += (uint64_t)r->d[2] + overflow * SECP256K1_N_C_2; - r->d[2] = t & 0xFFFFFFFFUL; t >>= 32; - t += (uint64_t)r->d[3] + overflow * SECP256K1_N_C_3; - r->d[3] = t & 0xFFFFFFFFUL; t >>= 32; - t += (uint64_t)r->d[4] + overflow * SECP256K1_N_C_4; - r->d[4] = t & 0xFFFFFFFFUL; t >>= 32; - t += (uint64_t)r->d[5]; - r->d[5] = t & 0xFFFFFFFFUL; t >>= 32; - t += (uint64_t)r->d[6]; - r->d[6] = t & 0xFFFFFFFFUL; t >>= 32; - t += (uint64_t)r->d[7]; - r->d[7] = t & 0xFFFFFFFFUL; - return overflow; -} - -static int secp256k1_scalar_add(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) { - int overflow; - uint64_t t = (uint64_t)a->d[0] + b->d[0]; - r->d[0] = t & 0xFFFFFFFFULL; t >>= 32; - t += (uint64_t)a->d[1] + b->d[1]; - r->d[1] = t & 0xFFFFFFFFULL; t >>= 32; - t += (uint64_t)a->d[2] + b->d[2]; - r->d[2] = t & 0xFFFFFFFFULL; t >>= 32; - t += (uint64_t)a->d[3] + b->d[3]; - r->d[3] = t & 0xFFFFFFFFULL; t >>= 32; - t += (uint64_t)a->d[4] + b->d[4]; - r->d[4] = t & 0xFFFFFFFFULL; t >>= 32; - t += (uint64_t)a->d[5] + b->d[5]; - r->d[5] = t & 0xFFFFFFFFULL; t >>= 32; - t += (uint64_t)a->d[6] + b->d[6]; - r->d[6] = t & 0xFFFFFFFFULL; t >>= 32; - t += (uint64_t)a->d[7] + b->d[7]; - r->d[7] = t & 0xFFFFFFFFULL; t >>= 32; - overflow = t + secp256k1_scalar_check_overflow(r); - VERIFY_CHECK(overflow == 0 || overflow == 1); - secp256k1_scalar_reduce(r, overflow); - return overflow; -} - -static void secp256k1_scalar_add_bit(secp256k1_scalar_t *r, unsigned int bit) { - uint64_t t; - VERIFY_CHECK(bit < 256); - t = (uint64_t)r->d[0] + (((uint32_t)((bit >> 5) == 0)) << (bit & 0x1F)); - r->d[0] = t & 0xFFFFFFFFULL; t >>= 32; - t += (uint64_t)r->d[1] + (((uint32_t)((bit >> 5) == 1)) << (bit & 0x1F)); - r->d[1] = t & 0xFFFFFFFFULL; t >>= 32; - t += (uint64_t)r->d[2] + (((uint32_t)((bit >> 5) == 2)) << (bit & 0x1F)); - r->d[2] = t & 0xFFFFFFFFULL; t >>= 32; - t += (uint64_t)r->d[3] + (((uint32_t)((bit >> 5) == 3)) << (bit & 0x1F)); - r->d[3] = t & 0xFFFFFFFFULL; t >>= 32; - t += (uint64_t)r->d[4] + (((uint32_t)((bit >> 5) == 4)) << (bit & 0x1F)); - r->d[4] = t & 0xFFFFFFFFULL; t >>= 32; - t += (uint64_t)r->d[5] + (((uint32_t)((bit >> 5) == 5)) << (bit & 0x1F)); - r->d[5] = t & 0xFFFFFFFFULL; t >>= 32; - t += (uint64_t)r->d[6] + (((uint32_t)((bit >> 5) == 6)) << (bit & 0x1F)); - r->d[6] = t & 0xFFFFFFFFULL; t >>= 32; - t += (uint64_t)r->d[7] + (((uint32_t)((bit >> 5) == 7)) << (bit & 0x1F)); - r->d[7] = t & 0xFFFFFFFFULL; -#ifdef VERIFY - VERIFY_CHECK((t >> 32) == 0); - VERIFY_CHECK(secp256k1_scalar_check_overflow(r) == 0); -#endif -} - -static void secp256k1_scalar_set_b32(secp256k1_scalar_t *r, const unsigned char *b32, int *overflow) { - int over; - r->d[0] = (uint32_t)b32[31] | (uint32_t)b32[30] << 8 | (uint32_t)b32[29] << 16 | (uint32_t)b32[28] << 24; - r->d[1] = (uint32_t)b32[27] | (uint32_t)b32[26] << 8 | (uint32_t)b32[25] << 16 | (uint32_t)b32[24] << 24; - r->d[2] = (uint32_t)b32[23] | (uint32_t)b32[22] << 8 | (uint32_t)b32[21] << 16 | (uint32_t)b32[20] << 24; - r->d[3] = (uint32_t)b32[19] | (uint32_t)b32[18] << 8 | (uint32_t)b32[17] << 16 | (uint32_t)b32[16] << 24; - r->d[4] = (uint32_t)b32[15] | (uint32_t)b32[14] << 8 | (uint32_t)b32[13] << 16 | (uint32_t)b32[12] << 24; - r->d[5] = (uint32_t)b32[11] | (uint32_t)b32[10] << 8 | (uint32_t)b32[9] << 16 | (uint32_t)b32[8] << 24; - r->d[6] = (uint32_t)b32[7] | (uint32_t)b32[6] << 8 | (uint32_t)b32[5] << 16 | (uint32_t)b32[4] << 24; - r->d[7] = (uint32_t)b32[3] | (uint32_t)b32[2] << 8 | (uint32_t)b32[1] << 16 | (uint32_t)b32[0] << 24; - over = secp256k1_scalar_reduce(r, secp256k1_scalar_check_overflow(r)); - if (overflow) { - *overflow = over; - } -} - -static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar_t* a) { - bin[0] = a->d[7] >> 24; bin[1] = a->d[7] >> 16; bin[2] = a->d[7] >> 8; bin[3] = a->d[7]; - bin[4] = a->d[6] >> 24; bin[5] = a->d[6] >> 16; bin[6] = a->d[6] >> 8; bin[7] = a->d[6]; - bin[8] = a->d[5] >> 24; bin[9] = a->d[5] >> 16; bin[10] = a->d[5] >> 8; bin[11] = a->d[5]; - bin[12] = a->d[4] >> 24; bin[13] = a->d[4] >> 16; bin[14] = a->d[4] >> 8; bin[15] = a->d[4]; - bin[16] = a->d[3] >> 24; bin[17] = a->d[3] >> 16; bin[18] = a->d[3] >> 8; bin[19] = a->d[3]; - bin[20] = a->d[2] >> 24; bin[21] = a->d[2] >> 16; bin[22] = a->d[2] >> 8; bin[23] = a->d[2]; - bin[24] = a->d[1] >> 24; bin[25] = a->d[1] >> 16; bin[26] = a->d[1] >> 8; bin[27] = a->d[1]; - bin[28] = a->d[0] >> 24; bin[29] = a->d[0] >> 16; bin[30] = a->d[0] >> 8; bin[31] = a->d[0]; -} - -SECP256K1_INLINE static int secp256k1_scalar_is_zero(const secp256k1_scalar_t *a) { - return (a->d[0] | a->d[1] | a->d[2] | a->d[3] | a->d[4] | a->d[5] | a->d[6] | a->d[7]) == 0; -} - -static void secp256k1_scalar_negate(secp256k1_scalar_t *r, const secp256k1_scalar_t *a) { - uint32_t nonzero = 0xFFFFFFFFUL * (secp256k1_scalar_is_zero(a) == 0); - uint64_t t = (uint64_t)(~a->d[0]) + SECP256K1_N_0 + 1; - r->d[0] = t & nonzero; t >>= 32; - t += (uint64_t)(~a->d[1]) + SECP256K1_N_1; - r->d[1] = t & nonzero; t >>= 32; - t += (uint64_t)(~a->d[2]) + SECP256K1_N_2; - r->d[2] = t & nonzero; t >>= 32; - t += (uint64_t)(~a->d[3]) + SECP256K1_N_3; - r->d[3] = t & nonzero; t >>= 32; - t += (uint64_t)(~a->d[4]) + SECP256K1_N_4; - r->d[4] = t & nonzero; t >>= 32; - t += (uint64_t)(~a->d[5]) + SECP256K1_N_5; - r->d[5] = t & nonzero; t >>= 32; - t += (uint64_t)(~a->d[6]) + SECP256K1_N_6; - r->d[6] = t & nonzero; t >>= 32; - t += (uint64_t)(~a->d[7]) + SECP256K1_N_7; - r->d[7] = t & nonzero; -} - -SECP256K1_INLINE static int secp256k1_scalar_is_one(const secp256k1_scalar_t *a) { - return ((a->d[0] ^ 1) | a->d[1] | a->d[2] | a->d[3] | a->d[4] | a->d[5] | a->d[6] | a->d[7]) == 0; -} - -static int secp256k1_scalar_is_high(const secp256k1_scalar_t *a) { - int yes = 0; - int no = 0; - no |= (a->d[7] < SECP256K1_N_H_7); - yes |= (a->d[7] > SECP256K1_N_H_7) & ~no; - no |= (a->d[6] < SECP256K1_N_H_6) & ~yes; /* No need for a > check. */ - no |= (a->d[5] < SECP256K1_N_H_5) & ~yes; /* No need for a > check. */ - no |= (a->d[4] < SECP256K1_N_H_4) & ~yes; /* No need for a > check. */ - no |= (a->d[3] < SECP256K1_N_H_3) & ~yes; - yes |= (a->d[3] > SECP256K1_N_H_3) & ~no; - no |= (a->d[2] < SECP256K1_N_H_2) & ~yes; - yes |= (a->d[2] > SECP256K1_N_H_2) & ~no; - no |= (a->d[1] < SECP256K1_N_H_1) & ~yes; - yes |= (a->d[1] > SECP256K1_N_H_1) & ~no; - yes |= (a->d[0] > SECP256K1_N_H_0) & ~no; - return yes; -} - -/* Inspired by the macros in OpenSSL's crypto/bn/asm/x86_64-gcc.c. */ - -/** Add a*b to the number defined by (c0,c1,c2). c2 must never overflow. */ -#define muladd(a,b) { \ - uint32_t tl, th; \ - { \ - uint64_t t = (uint64_t)a * b; \ - th = t >> 32; /* at most 0xFFFFFFFE */ \ - tl = t; \ - } \ - c0 += tl; /* overflow is handled on the next line */ \ - th += (c0 < tl) ? 1 : 0; /* at most 0xFFFFFFFF */ \ - c1 += th; /* overflow is handled on the next line */ \ - c2 += (c1 < th) ? 1 : 0; /* never overflows by contract (verified in the next line) */ \ - VERIFY_CHECK((c1 >= th) || (c2 != 0)); \ -} - -/** Add a*b to the number defined by (c0,c1). c1 must never overflow. */ -#define muladd_fast(a,b) { \ - uint32_t tl, th; \ - { \ - uint64_t t = (uint64_t)a * b; \ - th = t >> 32; /* at most 0xFFFFFFFE */ \ - tl = t; \ - } \ - c0 += tl; /* overflow is handled on the next line */ \ - th += (c0 < tl) ? 1 : 0; /* at most 0xFFFFFFFF */ \ - c1 += th; /* never overflows by contract (verified in the next line) */ \ - VERIFY_CHECK(c1 >= th); \ -} - -/** Add 2*a*b to the number defined by (c0,c1,c2). c2 must never overflow. */ -#define muladd2(a,b) { \ - uint32_t tl, th, th2, tl2; \ - { \ - uint64_t t = (uint64_t)a * b; \ - th = t >> 32; /* at most 0xFFFFFFFE */ \ - tl = t; \ - } \ - th2 = th + th; /* at most 0xFFFFFFFE (in case th was 0x7FFFFFFF) */ \ - c2 += (th2 < th) ? 1 : 0; /* never overflows by contract (verified the next line) */ \ - VERIFY_CHECK((th2 >= th) || (c2 != 0)); \ - tl2 = tl + tl; /* at most 0xFFFFFFFE (in case the lowest 63 bits of tl were 0x7FFFFFFF) */ \ - th2 += (tl2 < tl) ? 1 : 0; /* at most 0xFFFFFFFF */ \ - c0 += tl2; /* overflow is handled on the next line */ \ - th2 += (c0 < tl2) ? 1 : 0; /* second overflow is handled on the next line */ \ - c2 += (c0 < tl2) & (th2 == 0); /* never overflows by contract (verified the next line) */ \ - VERIFY_CHECK((c0 >= tl2) || (th2 != 0) || (c2 != 0)); \ - c1 += th2; /* overflow is handled on the next line */ \ - c2 += (c1 < th2) ? 1 : 0; /* never overflows by contract (verified the next line) */ \ - VERIFY_CHECK((c1 >= th2) || (c2 != 0)); \ -} - -/** Add a to the number defined by (c0,c1,c2). c2 must never overflow. */ -#define sumadd(a) { \ - unsigned int over; \ - c0 += (a); /* overflow is handled on the next line */ \ - over = (c0 < (a)) ? 1 : 0; \ - c1 += over; /* overflow is handled on the next line */ \ - c2 += (c1 < over) ? 1 : 0; /* never overflows by contract */ \ -} - -/** Add a to the number defined by (c0,c1). c1 must never overflow, c2 must be zero. */ -#define sumadd_fast(a) { \ - c0 += (a); /* overflow is handled on the next line */ \ - c1 += (c0 < (a)) ? 1 : 0; /* never overflows by contract (verified the next line) */ \ - VERIFY_CHECK((c1 != 0) | (c0 >= (a))); \ - VERIFY_CHECK(c2 == 0); \ -} - -/** Extract the lowest 32 bits of (c0,c1,c2) into n, and left shift the number 32 bits. */ -#define extract(n) { \ - (n) = c0; \ - c0 = c1; \ - c1 = c2; \ - c2 = 0; \ -} - -/** Extract the lowest 32 bits of (c0,c1,c2) into n, and left shift the number 32 bits. c2 is required to be zero. */ -#define extract_fast(n) { \ - (n) = c0; \ - c0 = c1; \ - c1 = 0; \ - VERIFY_CHECK(c2 == 0); \ -} - -static void secp256k1_scalar_reduce_512(secp256k1_scalar_t *r, const uint32_t *l) { - uint64_t c; - uint32_t n0 = l[8], n1 = l[9], n2 = l[10], n3 = l[11], n4 = l[12], n5 = l[13], n6 = l[14], n7 = l[15]; - uint32_t m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12; - uint32_t p0, p1, p2, p3, p4, p5, p6, p7, p8; - - /* 96 bit accumulator. */ - uint32_t c0, c1, c2; - - /* Reduce 512 bits into 385. */ - /* m[0..12] = l[0..7] + n[0..7] * SECP256K1_N_C. */ - c0 = l[0]; c1 = 0; c2 = 0; - muladd_fast(n0, SECP256K1_N_C_0); - extract_fast(m0); - sumadd_fast(l[1]); - muladd(n1, SECP256K1_N_C_0); - muladd(n0, SECP256K1_N_C_1); - extract(m1); - sumadd(l[2]); - muladd(n2, SECP256K1_N_C_0); - muladd(n1, SECP256K1_N_C_1); - muladd(n0, SECP256K1_N_C_2); - extract(m2); - sumadd(l[3]); - muladd(n3, SECP256K1_N_C_0); - muladd(n2, SECP256K1_N_C_1); - muladd(n1, SECP256K1_N_C_2); - muladd(n0, SECP256K1_N_C_3); - extract(m3); - sumadd(l[4]); - muladd(n4, SECP256K1_N_C_0); - muladd(n3, SECP256K1_N_C_1); - muladd(n2, SECP256K1_N_C_2); - muladd(n1, SECP256K1_N_C_3); - sumadd(n0); - extract(m4); - sumadd(l[5]); - muladd(n5, SECP256K1_N_C_0); - muladd(n4, SECP256K1_N_C_1); - muladd(n3, SECP256K1_N_C_2); - muladd(n2, SECP256K1_N_C_3); - sumadd(n1); - extract(m5); - sumadd(l[6]); - muladd(n6, SECP256K1_N_C_0); - muladd(n5, SECP256K1_N_C_1); - muladd(n4, SECP256K1_N_C_2); - muladd(n3, SECP256K1_N_C_3); - sumadd(n2); - extract(m6); - sumadd(l[7]); - muladd(n7, SECP256K1_N_C_0); - muladd(n6, SECP256K1_N_C_1); - muladd(n5, SECP256K1_N_C_2); - muladd(n4, SECP256K1_N_C_3); - sumadd(n3); - extract(m7); - muladd(n7, SECP256K1_N_C_1); - muladd(n6, SECP256K1_N_C_2); - muladd(n5, SECP256K1_N_C_3); - sumadd(n4); - extract(m8); - muladd(n7, SECP256K1_N_C_2); - muladd(n6, SECP256K1_N_C_3); - sumadd(n5); - extract(m9); - muladd(n7, SECP256K1_N_C_3); - sumadd(n6); - extract(m10); - sumadd_fast(n7); - extract_fast(m11); - VERIFY_CHECK(c0 <= 1); - m12 = c0; - - /* Reduce 385 bits into 258. */ - /* p[0..8] = m[0..7] + m[8..12] * SECP256K1_N_C. */ - c0 = m0; c1 = 0; c2 = 0; - muladd_fast(m8, SECP256K1_N_C_0); - extract_fast(p0); - sumadd_fast(m1); - muladd(m9, SECP256K1_N_C_0); - muladd(m8, SECP256K1_N_C_1); - extract(p1); - sumadd(m2); - muladd(m10, SECP256K1_N_C_0); - muladd(m9, SECP256K1_N_C_1); - muladd(m8, SECP256K1_N_C_2); - extract(p2); - sumadd(m3); - muladd(m11, SECP256K1_N_C_0); - muladd(m10, SECP256K1_N_C_1); - muladd(m9, SECP256K1_N_C_2); - muladd(m8, SECP256K1_N_C_3); - extract(p3); - sumadd(m4); - muladd(m12, SECP256K1_N_C_0); - muladd(m11, SECP256K1_N_C_1); - muladd(m10, SECP256K1_N_C_2); - muladd(m9, SECP256K1_N_C_3); - sumadd(m8); - extract(p4); - sumadd(m5); - muladd(m12, SECP256K1_N_C_1); - muladd(m11, SECP256K1_N_C_2); - muladd(m10, SECP256K1_N_C_3); - sumadd(m9); - extract(p5); - sumadd(m6); - muladd(m12, SECP256K1_N_C_2); - muladd(m11, SECP256K1_N_C_3); - sumadd(m10); - extract(p6); - sumadd_fast(m7); - muladd_fast(m12, SECP256K1_N_C_3); - sumadd_fast(m11); - extract_fast(p7); - p8 = c0 + m12; - VERIFY_CHECK(p8 <= 2); - - /* Reduce 258 bits into 256. */ - /* r[0..7] = p[0..7] + p[8] * SECP256K1_N_C. */ - c = p0 + (uint64_t)SECP256K1_N_C_0 * p8; - r->d[0] = c & 0xFFFFFFFFUL; c >>= 32; - c += p1 + (uint64_t)SECP256K1_N_C_1 * p8; - r->d[1] = c & 0xFFFFFFFFUL; c >>= 32; - c += p2 + (uint64_t)SECP256K1_N_C_2 * p8; - r->d[2] = c & 0xFFFFFFFFUL; c >>= 32; - c += p3 + (uint64_t)SECP256K1_N_C_3 * p8; - r->d[3] = c & 0xFFFFFFFFUL; c >>= 32; - c += p4 + (uint64_t)p8; - r->d[4] = c & 0xFFFFFFFFUL; c >>= 32; - c += p5; - r->d[5] = c & 0xFFFFFFFFUL; c >>= 32; - c += p6; - r->d[6] = c & 0xFFFFFFFFUL; c >>= 32; - c += p7; - r->d[7] = c & 0xFFFFFFFFUL; c >>= 32; - - /* Final reduction of r. */ - secp256k1_scalar_reduce(r, c + secp256k1_scalar_check_overflow(r)); -} - -static void secp256k1_scalar_mul_512(uint32_t *l, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) { - /* 96 bit accumulator. */ - uint32_t c0 = 0, c1 = 0, c2 = 0; - - /* l[0..15] = a[0..7] * b[0..7]. */ - muladd_fast(a->d[0], b->d[0]); - extract_fast(l[0]); - muladd(a->d[0], b->d[1]); - muladd(a->d[1], b->d[0]); - extract(l[1]); - muladd(a->d[0], b->d[2]); - muladd(a->d[1], b->d[1]); - muladd(a->d[2], b->d[0]); - extract(l[2]); - muladd(a->d[0], b->d[3]); - muladd(a->d[1], b->d[2]); - muladd(a->d[2], b->d[1]); - muladd(a->d[3], b->d[0]); - extract(l[3]); - muladd(a->d[0], b->d[4]); - muladd(a->d[1], b->d[3]); - muladd(a->d[2], b->d[2]); - muladd(a->d[3], b->d[1]); - muladd(a->d[4], b->d[0]); - extract(l[4]); - muladd(a->d[0], b->d[5]); - muladd(a->d[1], b->d[4]); - muladd(a->d[2], b->d[3]); - muladd(a->d[3], b->d[2]); - muladd(a->d[4], b->d[1]); - muladd(a->d[5], b->d[0]); - extract(l[5]); - muladd(a->d[0], b->d[6]); - muladd(a->d[1], b->d[5]); - muladd(a->d[2], b->d[4]); - muladd(a->d[3], b->d[3]); - muladd(a->d[4], b->d[2]); - muladd(a->d[5], b->d[1]); - muladd(a->d[6], b->d[0]); - extract(l[6]); - muladd(a->d[0], b->d[7]); - muladd(a->d[1], b->d[6]); - muladd(a->d[2], b->d[5]); - muladd(a->d[3], b->d[4]); - muladd(a->d[4], b->d[3]); - muladd(a->d[5], b->d[2]); - muladd(a->d[6], b->d[1]); - muladd(a->d[7], b->d[0]); - extract(l[7]); - muladd(a->d[1], b->d[7]); - muladd(a->d[2], b->d[6]); - muladd(a->d[3], b->d[5]); - muladd(a->d[4], b->d[4]); - muladd(a->d[5], b->d[3]); - muladd(a->d[6], b->d[2]); - muladd(a->d[7], b->d[1]); - extract(l[8]); - muladd(a->d[2], b->d[7]); - muladd(a->d[3], b->d[6]); - muladd(a->d[4], b->d[5]); - muladd(a->d[5], b->d[4]); - muladd(a->d[6], b->d[3]); - muladd(a->d[7], b->d[2]); - extract(l[9]); - muladd(a->d[3], b->d[7]); - muladd(a->d[4], b->d[6]); - muladd(a->d[5], b->d[5]); - muladd(a->d[6], b->d[4]); - muladd(a->d[7], b->d[3]); - extract(l[10]); - muladd(a->d[4], b->d[7]); - muladd(a->d[5], b->d[6]); - muladd(a->d[6], b->d[5]); - muladd(a->d[7], b->d[4]); - extract(l[11]); - muladd(a->d[5], b->d[7]); - muladd(a->d[6], b->d[6]); - muladd(a->d[7], b->d[5]); - extract(l[12]); - muladd(a->d[6], b->d[7]); - muladd(a->d[7], b->d[6]); - extract(l[13]); - muladd_fast(a->d[7], b->d[7]); - extract_fast(l[14]); - VERIFY_CHECK(c1 == 0); - l[15] = c0; -} - -static void secp256k1_scalar_sqr_512(uint32_t *l, const secp256k1_scalar_t *a) { - /* 96 bit accumulator. */ - uint32_t c0 = 0, c1 = 0, c2 = 0; - - /* l[0..15] = a[0..7]^2. */ - muladd_fast(a->d[0], a->d[0]); - extract_fast(l[0]); - muladd2(a->d[0], a->d[1]); - extract(l[1]); - muladd2(a->d[0], a->d[2]); - muladd(a->d[1], a->d[1]); - extract(l[2]); - muladd2(a->d[0], a->d[3]); - muladd2(a->d[1], a->d[2]); - extract(l[3]); - muladd2(a->d[0], a->d[4]); - muladd2(a->d[1], a->d[3]); - muladd(a->d[2], a->d[2]); - extract(l[4]); - muladd2(a->d[0], a->d[5]); - muladd2(a->d[1], a->d[4]); - muladd2(a->d[2], a->d[3]); - extract(l[5]); - muladd2(a->d[0], a->d[6]); - muladd2(a->d[1], a->d[5]); - muladd2(a->d[2], a->d[4]); - muladd(a->d[3], a->d[3]); - extract(l[6]); - muladd2(a->d[0], a->d[7]); - muladd2(a->d[1], a->d[6]); - muladd2(a->d[2], a->d[5]); - muladd2(a->d[3], a->d[4]); - extract(l[7]); - muladd2(a->d[1], a->d[7]); - muladd2(a->d[2], a->d[6]); - muladd2(a->d[3], a->d[5]); - muladd(a->d[4], a->d[4]); - extract(l[8]); - muladd2(a->d[2], a->d[7]); - muladd2(a->d[3], a->d[6]); - muladd2(a->d[4], a->d[5]); - extract(l[9]); - muladd2(a->d[3], a->d[7]); - muladd2(a->d[4], a->d[6]); - muladd(a->d[5], a->d[5]); - extract(l[10]); - muladd2(a->d[4], a->d[7]); - muladd2(a->d[5], a->d[6]); - extract(l[11]); - muladd2(a->d[5], a->d[7]); - muladd(a->d[6], a->d[6]); - extract(l[12]); - muladd2(a->d[6], a->d[7]); - extract(l[13]); - muladd_fast(a->d[7], a->d[7]); - extract_fast(l[14]); - VERIFY_CHECK(c1 == 0); - l[15] = c0; -} - -#undef sumadd -#undef sumadd_fast -#undef muladd -#undef muladd_fast -#undef muladd2 -#undef extract -#undef extract_fast - -static void secp256k1_scalar_mul(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) { - uint32_t l[16]; - secp256k1_scalar_mul_512(l, a, b); - secp256k1_scalar_reduce_512(r, l); -} - -static void secp256k1_scalar_sqr(secp256k1_scalar_t *r, const secp256k1_scalar_t *a) { - uint32_t l[16]; - secp256k1_scalar_sqr_512(l, a); - secp256k1_scalar_reduce_512(r, l); -} - -#ifdef USE_ENDOMORPHISM -static void secp256k1_scalar_split_128(secp256k1_scalar_t *r1, secp256k1_scalar_t *r2, const secp256k1_scalar_t *a) { - r1->d[0] = a->d[0]; - r1->d[1] = a->d[1]; - r1->d[2] = a->d[2]; - r1->d[3] = a->d[3]; - r1->d[4] = 0; - r1->d[5] = 0; - r1->d[6] = 0; - r1->d[7] = 0; - r2->d[0] = a->d[4]; - r2->d[1] = a->d[5]; - r2->d[2] = a->d[6]; - r2->d[3] = a->d[7]; - r2->d[4] = 0; - r2->d[5] = 0; - r2->d[6] = 0; - r2->d[7] = 0; -} -#endif - -SECP256K1_INLINE static int secp256k1_scalar_eq(const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) { - return ((a->d[0] ^ b->d[0]) | (a->d[1] ^ b->d[1]) | (a->d[2] ^ b->d[2]) | (a->d[3] ^ b->d[3]) | (a->d[4] ^ b->d[4]) | (a->d[5] ^ b->d[5]) | (a->d[6] ^ b->d[6]) | (a->d[7] ^ b->d[7])) == 0; -} - -SECP256K1_INLINE static void secp256k1_scalar_mul_shift_var(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b, unsigned int shift) { - uint32_t l[16]; - unsigned int shiftlimbs; - unsigned int shiftlow; - unsigned int shifthigh; - VERIFY_CHECK(shift >= 256); - secp256k1_scalar_mul_512(l, a, b); - shiftlimbs = shift >> 5; - shiftlow = shift & 0x1F; - shifthigh = 32 - shiftlow; - r->d[0] = shift < 512 ? (l[0 + shiftlimbs] >> shiftlow | (shift < 480 && shiftlow ? (l[1 + shiftlimbs] << shifthigh) : 0)) : 0; - r->d[1] = shift < 480 ? (l[1 + shiftlimbs] >> shiftlow | (shift < 448 && shiftlow ? (l[2 + shiftlimbs] << shifthigh) : 0)) : 0; - r->d[2] = shift < 448 ? (l[2 + shiftlimbs] >> shiftlow | (shift < 416 && shiftlow ? (l[3 + shiftlimbs] << shifthigh) : 0)) : 0; - r->d[3] = shift < 416 ? (l[3 + shiftlimbs] >> shiftlow | (shift < 384 && shiftlow ? (l[4 + shiftlimbs] << shifthigh) : 0)) : 0; - r->d[4] = shift < 384 ? (l[4 + shiftlimbs] >> shiftlow | (shift < 352 && shiftlow ? (l[5 + shiftlimbs] << shifthigh) : 0)) : 0; - r->d[5] = shift < 352 ? (l[5 + shiftlimbs] >> shiftlow | (shift < 320 && shiftlow ? (l[6 + shiftlimbs] << shifthigh) : 0)) : 0; - r->d[6] = shift < 320 ? (l[6 + shiftlimbs] >> shiftlow | (shift < 288 && shiftlow ? (l[7 + shiftlimbs] << shifthigh) : 0)) : 0; - r->d[7] = shift < 288 ? (l[7 + shiftlimbs] >> shiftlow) : 0; - if ((l[(shift - 1) >> 5] >> ((shift - 1) & 0x1f)) & 1) { - secp256k1_scalar_add_bit(r, 0); - } -} - -#endif diff --git a/crypto/secp256k1/secp256k1/src/scalar_impl.h b/crypto/secp256k1/secp256k1/src/scalar_impl.h deleted file mode 100644 index 33824983e..000000000 --- a/crypto/secp256k1/secp256k1/src/scalar_impl.h +++ /dev/null @@ -1,327 +0,0 @@ -/********************************************************************** - * Copyright (c) 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_SCALAR_IMPL_H_ -#define _SECP256K1_SCALAR_IMPL_H_ - -#include - -#include "group.h" -#include "scalar.h" - -#if defined HAVE_CONFIG_H -#include "libsecp256k1-config.h" -#endif - -#if defined(USE_SCALAR_4X64) -#include "scalar_4x64_impl.h" -#elif defined(USE_SCALAR_8X32) -#include "scalar_8x32_impl.h" -#else -#error "Please select scalar implementation" -#endif - -#ifndef USE_NUM_NONE -static void secp256k1_scalar_get_num(secp256k1_num_t *r, const secp256k1_scalar_t *a) { - unsigned char c[32]; - secp256k1_scalar_get_b32(c, a); - secp256k1_num_set_bin(r, c, 32); -} - -/** secp256k1 curve order, see secp256k1_ecdsa_const_order_as_fe in ecdsa_impl.h */ -static void secp256k1_scalar_order_get_num(secp256k1_num_t *r) { - static const unsigned char order[32] = { - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE, - 0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B, - 0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x41 - }; - secp256k1_num_set_bin(r, order, 32); -} -#endif - -static void secp256k1_scalar_inverse(secp256k1_scalar_t *r, const secp256k1_scalar_t *x) { - secp256k1_scalar_t *t; - int i; - /* First compute x ^ (2^N - 1) for some values of N. */ - secp256k1_scalar_t x2, x3, x4, x6, x7, x8, x15, x30, x60, x120, x127; - - secp256k1_scalar_sqr(&x2, x); - secp256k1_scalar_mul(&x2, &x2, x); - - secp256k1_scalar_sqr(&x3, &x2); - secp256k1_scalar_mul(&x3, &x3, x); - - secp256k1_scalar_sqr(&x4, &x3); - secp256k1_scalar_mul(&x4, &x4, x); - - secp256k1_scalar_sqr(&x6, &x4); - secp256k1_scalar_sqr(&x6, &x6); - secp256k1_scalar_mul(&x6, &x6, &x2); - - secp256k1_scalar_sqr(&x7, &x6); - secp256k1_scalar_mul(&x7, &x7, x); - - secp256k1_scalar_sqr(&x8, &x7); - secp256k1_scalar_mul(&x8, &x8, x); - - secp256k1_scalar_sqr(&x15, &x8); - for (i = 0; i < 6; i++) { - secp256k1_scalar_sqr(&x15, &x15); - } - secp256k1_scalar_mul(&x15, &x15, &x7); - - secp256k1_scalar_sqr(&x30, &x15); - for (i = 0; i < 14; i++) { - secp256k1_scalar_sqr(&x30, &x30); - } - secp256k1_scalar_mul(&x30, &x30, &x15); - - secp256k1_scalar_sqr(&x60, &x30); - for (i = 0; i < 29; i++) { - secp256k1_scalar_sqr(&x60, &x60); - } - secp256k1_scalar_mul(&x60, &x60, &x30); - - secp256k1_scalar_sqr(&x120, &x60); - for (i = 0; i < 59; i++) { - secp256k1_scalar_sqr(&x120, &x120); - } - secp256k1_scalar_mul(&x120, &x120, &x60); - - secp256k1_scalar_sqr(&x127, &x120); - for (i = 0; i < 6; i++) { - secp256k1_scalar_sqr(&x127, &x127); - } - secp256k1_scalar_mul(&x127, &x127, &x7); - - /* Then accumulate the final result (t starts at x127). */ - t = &x127; - for (i = 0; i < 2; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, x); /* 1 */ - for (i = 0; i < 4; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, &x3); /* 111 */ - for (i = 0; i < 2; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, x); /* 1 */ - for (i = 0; i < 2; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, x); /* 1 */ - for (i = 0; i < 2; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, x); /* 1 */ - for (i = 0; i < 4; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, &x3); /* 111 */ - for (i = 0; i < 3; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, &x2); /* 11 */ - for (i = 0; i < 4; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, &x3); /* 111 */ - for (i = 0; i < 5; i++) { /* 00 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, &x3); /* 111 */ - for (i = 0; i < 4; i++) { /* 00 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, &x2); /* 11 */ - for (i = 0; i < 2; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, x); /* 1 */ - for (i = 0; i < 2; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, x); /* 1 */ - for (i = 0; i < 5; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, &x4); /* 1111 */ - for (i = 0; i < 2; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, x); /* 1 */ - for (i = 0; i < 3; i++) { /* 00 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, x); /* 1 */ - for (i = 0; i < 4; i++) { /* 000 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, x); /* 1 */ - for (i = 0; i < 2; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, x); /* 1 */ - for (i = 0; i < 10; i++) { /* 0000000 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, &x3); /* 111 */ - for (i = 0; i < 4; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, &x3); /* 111 */ - for (i = 0; i < 9; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, &x8); /* 11111111 */ - for (i = 0; i < 2; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, x); /* 1 */ - for (i = 0; i < 3; i++) { /* 00 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, x); /* 1 */ - for (i = 0; i < 3; i++) { /* 00 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, x); /* 1 */ - for (i = 0; i < 5; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, &x4); /* 1111 */ - for (i = 0; i < 2; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, x); /* 1 */ - for (i = 0; i < 5; i++) { /* 000 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, &x2); /* 11 */ - for (i = 0; i < 4; i++) { /* 00 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, &x2); /* 11 */ - for (i = 0; i < 2; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, x); /* 1 */ - for (i = 0; i < 8; i++) { /* 000000 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, &x2); /* 11 */ - for (i = 0; i < 3; i++) { /* 0 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, &x2); /* 11 */ - for (i = 0; i < 3; i++) { /* 00 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, x); /* 1 */ - for (i = 0; i < 6; i++) { /* 00000 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(t, t, x); /* 1 */ - for (i = 0; i < 8; i++) { /* 00 */ - secp256k1_scalar_sqr(t, t); - } - secp256k1_scalar_mul(r, t, &x6); /* 111111 */ -} - -static void secp256k1_scalar_inverse_var(secp256k1_scalar_t *r, const secp256k1_scalar_t *x) { -#if defined(USE_SCALAR_INV_BUILTIN) - secp256k1_scalar_inverse(r, x); -#elif defined(USE_SCALAR_INV_NUM) - unsigned char b[32]; - secp256k1_num_t n, m; - secp256k1_scalar_get_b32(b, x); - secp256k1_num_set_bin(&n, b, 32); - secp256k1_scalar_order_get_num(&m); - secp256k1_num_mod_inverse(&n, &n, &m); - secp256k1_num_get_bin(b, 32, &n); - secp256k1_scalar_set_b32(r, b, NULL); -#else -#error "Please select scalar inverse implementation" -#endif -} - -#ifdef USE_ENDOMORPHISM -/** - * The Secp256k1 curve has an endomorphism, where lambda * (x, y) = (beta * x, y), where - * lambda is {0x53,0x63,0xad,0x4c,0xc0,0x5c,0x30,0xe0,0xa5,0x26,0x1c,0x02,0x88,0x12,0x64,0x5a, - * 0x12,0x2e,0x22,0xea,0x20,0x81,0x66,0x78,0xdf,0x02,0x96,0x7c,0x1b,0x23,0xbd,0x72} - * - * "Guide to Elliptic Curve Cryptography" (Hankerson, Menezes, Vanstone) gives an algorithm - * (algorithm 3.74) to find k1 and k2 given k, such that k1 + k2 * lambda == k mod n, and k1 - * and k2 have a small size. - * It relies on constants a1, b1, a2, b2. These constants for the value of lambda above are: - * - * - a1 = {0x30,0x86,0xd2,0x21,0xa7,0xd4,0x6b,0xcd,0xe8,0x6c,0x90,0xe4,0x92,0x84,0xeb,0x15} - * - b1 = -{0xe4,0x43,0x7e,0xd6,0x01,0x0e,0x88,0x28,0x6f,0x54,0x7f,0xa9,0x0a,0xbf,0xe4,0xc3} - * - a2 = {0x01,0x14,0xca,0x50,0xf7,0xa8,0xe2,0xf3,0xf6,0x57,0xc1,0x10,0x8d,0x9d,0x44,0xcf,0xd8} - * - b2 = {0x30,0x86,0xd2,0x21,0xa7,0xd4,0x6b,0xcd,0xe8,0x6c,0x90,0xe4,0x92,0x84,0xeb,0x15} - * - * The algorithm then computes c1 = round(b1 * k / n) and c2 = round(b2 * k / n), and gives - * k1 = k - (c1*a1 + c2*a2) and k2 = -(c1*b1 + c2*b2). Instead, we use modular arithmetic, and - * compute k1 as k - k2 * lambda, avoiding the need for constants a1 and a2. - * - * g1, g2 are precomputed constants used to replace division with a rounded multiplication - * when decomposing the scalar for an endomorphism-based point multiplication. - * - * The possibility of using precomputed estimates is mentioned in "Guide to Elliptic Curve - * Cryptography" (Hankerson, Menezes, Vanstone) in section 3.5. - * - * The derivation is described in the paper "Efficient Software Implementation of Public-Key - * Cryptography on Sensor Networks Using the MSP430X Microcontroller" (Gouvea, Oliveira, Lopez), - * Section 4.3 (here we use a somewhat higher-precision estimate): - * d = a1*b2 - b1*a2 - * g1 = round((2^272)*b2/d) - * g2 = round((2^272)*b1/d) - * - * (Note that 'd' is also equal to the curve order here because [a1,b1] and [a2,b2] are found - * as outputs of the Extended Euclidean Algorithm on inputs 'order' and 'lambda'). - * - * The function below splits a in r1 and r2, such that r1 + lambda * r2 == a (mod order). - */ - -static void secp256k1_scalar_split_lambda_var(secp256k1_scalar_t *r1, secp256k1_scalar_t *r2, const secp256k1_scalar_t *a) { - secp256k1_scalar_t c1, c2; - static const secp256k1_scalar_t minus_lambda = SECP256K1_SCALAR_CONST( - 0xAC9C52B3UL, 0x3FA3CF1FUL, 0x5AD9E3FDUL, 0x77ED9BA4UL, - 0xA880B9FCUL, 0x8EC739C2UL, 0xE0CFC810UL, 0xB51283CFUL - ); - static const secp256k1_scalar_t minus_b1 = SECP256K1_SCALAR_CONST( - 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, - 0xE4437ED6UL, 0x010E8828UL, 0x6F547FA9UL, 0x0ABFE4C3UL - ); - static const secp256k1_scalar_t minus_b2 = SECP256K1_SCALAR_CONST( - 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFEUL, - 0x8A280AC5UL, 0x0774346DUL, 0xD765CDA8UL, 0x3DB1562CUL - ); - static const secp256k1_scalar_t g1 = SECP256K1_SCALAR_CONST( - 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00003086UL, - 0xD221A7D4UL, 0x6BCDE86CUL, 0x90E49284UL, 0xEB153DABUL - ); - static const secp256k1_scalar_t g2 = SECP256K1_SCALAR_CONST( - 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x0000E443UL, - 0x7ED6010EUL, 0x88286F54UL, 0x7FA90ABFUL, 0xE4C42212UL - ); - VERIFY_CHECK(r1 != a); - VERIFY_CHECK(r2 != a); - secp256k1_scalar_mul_shift_var(&c1, a, &g1, 272); - secp256k1_scalar_mul_shift_var(&c2, a, &g2, 272); - secp256k1_scalar_mul(&c1, &c1, &minus_b1); - secp256k1_scalar_mul(&c2, &c2, &minus_b2); - secp256k1_scalar_add(r2, &c1, &c2); - secp256k1_scalar_mul(r1, r2, &minus_lambda); - secp256k1_scalar_add(r1, r1, a); -} -#endif - -#endif diff --git a/crypto/secp256k1/secp256k1/src/secp256k1.c b/crypto/secp256k1/secp256k1/src/secp256k1.c deleted file mode 100644 index c1320172f..000000000 --- a/crypto/secp256k1/secp256k1/src/secp256k1.c +++ /dev/null @@ -1,372 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#define SECP256K1_BUILD (1) - -#include "include/secp256k1.h" - -#include "util.h" -#include "num_impl.h" -#include "field_impl.h" -#include "scalar_impl.h" -#include "group_impl.h" -#include "ecmult_impl.h" -#include "ecmult_gen_impl.h" -#include "ecdsa_impl.h" -#include "eckey_impl.h" -#include "hash_impl.h" - -void secp256k1_start(unsigned int flags) { - if (flags & SECP256K1_START_SIGN) { - secp256k1_ecmult_gen_start(); - } - if (flags & SECP256K1_START_VERIFY) { - secp256k1_ecmult_start(); - } -} - -void secp256k1_stop(void) { - secp256k1_ecmult_stop(); - secp256k1_ecmult_gen_stop(); -} - -int secp256k1_ecdsa_verify(const unsigned char *msg32, const unsigned char *sig, int siglen, const unsigned char *pubkey, int pubkeylen) { - secp256k1_ge_t q; - secp256k1_ecdsa_sig_t s; - secp256k1_scalar_t m; - int ret = -3; - DEBUG_CHECK(secp256k1_ecmult_consts != NULL); - DEBUG_CHECK(msg32 != NULL); - DEBUG_CHECK(sig != NULL); - DEBUG_CHECK(pubkey != NULL); - - secp256k1_scalar_set_b32(&m, msg32, NULL); - - if (secp256k1_eckey_pubkey_parse(&q, pubkey, pubkeylen)) { - if (secp256k1_ecdsa_sig_parse(&s, sig, siglen)) { - if (secp256k1_ecdsa_sig_verify(&s, &q, &m)) { - /* success is 1, all other values are fail */ - ret = 1; - } else { - ret = 0; - } - } else { - ret = -2; - } - } else { - ret = -1; - } - - return ret; -} - -static int nonce_function_rfc6979(unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, unsigned int counter, const void *data) { - secp256k1_rfc6979_hmac_sha256_t rng; - unsigned int i; - secp256k1_rfc6979_hmac_sha256_initialize(&rng, key32, 32, msg32, 32, (const unsigned char*)data, data != NULL ? 32 : 0); - for (i = 0; i <= counter; i++) { - secp256k1_rfc6979_hmac_sha256_generate(&rng, nonce32, 32); - } - secp256k1_rfc6979_hmac_sha256_finalize(&rng); - return 1; -} - -const secp256k1_nonce_function_t secp256k1_nonce_function_rfc6979 = nonce_function_rfc6979; -const secp256k1_nonce_function_t secp256k1_nonce_function_default = nonce_function_rfc6979; - -int secp256k1_ecdsa_sign(const unsigned char *msg32, unsigned char *signature, int *signaturelen, const unsigned char *seckey, secp256k1_nonce_function_t noncefp, const void* noncedata) { - secp256k1_ecdsa_sig_t sig; - secp256k1_scalar_t sec, non, msg; - int ret = 0; - int overflow = 0; - unsigned int count = 0; - DEBUG_CHECK(secp256k1_ecmult_gen_consts != NULL); - DEBUG_CHECK(msg32 != NULL); - DEBUG_CHECK(signature != NULL); - DEBUG_CHECK(signaturelen != NULL); - DEBUG_CHECK(seckey != NULL); - if (noncefp == NULL) { - noncefp = secp256k1_nonce_function_default; - } - - secp256k1_scalar_set_b32(&sec, seckey, &overflow); - /* Fail if the secret key is invalid. */ - if (!overflow && !secp256k1_scalar_is_zero(&sec)) { - secp256k1_scalar_set_b32(&msg, msg32, NULL); - while (1) { - unsigned char nonce32[32]; - ret = noncefp(nonce32, msg32, seckey, count, noncedata); - if (!ret) { - break; - } - secp256k1_scalar_set_b32(&non, nonce32, &overflow); - memset(nonce32, 0, 32); - if (!secp256k1_scalar_is_zero(&non) && !overflow) { - if (secp256k1_ecdsa_sig_sign(&sig, &sec, &msg, &non, NULL)) { - break; - } - } - count++; - } - if (ret) { - ret = secp256k1_ecdsa_sig_serialize(signature, signaturelen, &sig); - } - secp256k1_scalar_clear(&msg); - secp256k1_scalar_clear(&non); - secp256k1_scalar_clear(&sec); - } - if (!ret) { - *signaturelen = 0; - } - return ret; -} - -int secp256k1_ecdsa_sign_compact(const unsigned char *msg32, unsigned char *sig64, const unsigned char *seckey, secp256k1_nonce_function_t noncefp, const void* noncedata, int *recid) { - secp256k1_ecdsa_sig_t sig; - secp256k1_scalar_t sec, non, msg; - int ret = 0; - int overflow = 0; - unsigned int count = 0; - DEBUG_CHECK(secp256k1_ecmult_gen_consts != NULL); - DEBUG_CHECK(msg32 != NULL); - DEBUG_CHECK(sig64 != NULL); - DEBUG_CHECK(seckey != NULL); - if (noncefp == NULL) { - noncefp = secp256k1_nonce_function_default; - } - - secp256k1_scalar_set_b32(&sec, seckey, &overflow); - /* Fail if the secret key is invalid. */ - if (!overflow && !secp256k1_scalar_is_zero(&sec)) { - secp256k1_scalar_set_b32(&msg, msg32, NULL); - while (1) { - unsigned char nonce32[32]; - ret = noncefp(nonce32, msg32, seckey, count, noncedata); - if (!ret) { - break; - } - secp256k1_scalar_set_b32(&non, nonce32, &overflow); - memset(nonce32, 0, 32); - if (!secp256k1_scalar_is_zero(&non) && !overflow) { - if (secp256k1_ecdsa_sig_sign(&sig, &sec, &msg, &non, recid)) { - break; - } - } - count++; - } - if (ret) { - secp256k1_scalar_get_b32(sig64, &sig.r); - secp256k1_scalar_get_b32(sig64 + 32, &sig.s); - } - secp256k1_scalar_clear(&msg); - secp256k1_scalar_clear(&non); - secp256k1_scalar_clear(&sec); - } - if (!ret) { - memset(sig64, 0, 64); - } - return ret; -} - -int secp256k1_ecdsa_recover_compact(const unsigned char *msg32, const unsigned char *sig64, unsigned char *pubkey, int *pubkeylen, int compressed, int recid) { - secp256k1_ge_t q; - secp256k1_ecdsa_sig_t sig; - secp256k1_scalar_t m; - int ret = 0; - int overflow = 0; - DEBUG_CHECK(secp256k1_ecmult_consts != NULL); - DEBUG_CHECK(msg32 != NULL); - DEBUG_CHECK(sig64 != NULL); - DEBUG_CHECK(pubkey != NULL); - DEBUG_CHECK(pubkeylen != NULL); - DEBUG_CHECK(recid >= 0 && recid <= 3); - - secp256k1_scalar_set_b32(&sig.r, sig64, &overflow); - if (!overflow) { - secp256k1_scalar_set_b32(&sig.s, sig64 + 32, &overflow); - if (!overflow) { - secp256k1_scalar_set_b32(&m, msg32, NULL); - - if (secp256k1_ecdsa_sig_recover(&sig, &q, &m, recid)) { - ret = secp256k1_eckey_pubkey_serialize(&q, pubkey, pubkeylen, compressed); - } - } - } - return ret; -} - -int secp256k1_ec_seckey_verify(const unsigned char *seckey) { - secp256k1_scalar_t sec; - int ret; - int overflow; - DEBUG_CHECK(seckey != NULL); - - secp256k1_scalar_set_b32(&sec, seckey, &overflow); - ret = !secp256k1_scalar_is_zero(&sec) && !overflow; - secp256k1_scalar_clear(&sec); - return ret; -} - -int secp256k1_ec_pubkey_verify(const unsigned char *pubkey, int pubkeylen) { - secp256k1_ge_t q; - DEBUG_CHECK(pubkey != NULL); - - return secp256k1_eckey_pubkey_parse(&q, pubkey, pubkeylen); -} - -int secp256k1_ec_pubkey_create(unsigned char *pubkey, int *pubkeylen, const unsigned char *seckey, int compressed) { - secp256k1_gej_t pj; - secp256k1_ge_t p; - secp256k1_scalar_t sec; - int overflow; - int ret = 0; - DEBUG_CHECK(secp256k1_ecmult_gen_consts != NULL); - DEBUG_CHECK(pubkey != NULL); - DEBUG_CHECK(pubkeylen != NULL); - DEBUG_CHECK(seckey != NULL); - - secp256k1_scalar_set_b32(&sec, seckey, &overflow); - if (!overflow) { - secp256k1_ecmult_gen(&pj, &sec); - secp256k1_scalar_clear(&sec); - secp256k1_ge_set_gej(&p, &pj); - ret = secp256k1_eckey_pubkey_serialize(&p, pubkey, pubkeylen, compressed); - } - if (!ret) { - *pubkeylen = 0; - } - return ret; -} - -int secp256k1_ec_pubkey_decompress(unsigned char *pubkey, int *pubkeylen) { - secp256k1_ge_t p; - int ret = 0; - DEBUG_CHECK(pubkey != NULL); - DEBUG_CHECK(pubkeylen != NULL); - - if (secp256k1_eckey_pubkey_parse(&p, pubkey, *pubkeylen)) { - ret = secp256k1_eckey_pubkey_serialize(&p, pubkey, pubkeylen, 0); - } - return ret; -} - -int secp256k1_ec_privkey_tweak_add(unsigned char *seckey, const unsigned char *tweak) { - secp256k1_scalar_t term; - secp256k1_scalar_t sec; - int ret = 0; - int overflow = 0; - DEBUG_CHECK(seckey != NULL); - DEBUG_CHECK(tweak != NULL); - - secp256k1_scalar_set_b32(&term, tweak, &overflow); - secp256k1_scalar_set_b32(&sec, seckey, NULL); - - ret = secp256k1_eckey_privkey_tweak_add(&sec, &term) && !overflow; - if (ret) { - secp256k1_scalar_get_b32(seckey, &sec); - } - - secp256k1_scalar_clear(&sec); - secp256k1_scalar_clear(&term); - return ret; -} - -int secp256k1_ec_pubkey_tweak_add(unsigned char *pubkey, int pubkeylen, const unsigned char *tweak) { - secp256k1_ge_t p; - secp256k1_scalar_t term; - int ret = 0; - int overflow = 0; - DEBUG_CHECK(secp256k1_ecmult_consts != NULL); - DEBUG_CHECK(pubkey != NULL); - DEBUG_CHECK(tweak != NULL); - - secp256k1_scalar_set_b32(&term, tweak, &overflow); - if (!overflow) { - ret = secp256k1_eckey_pubkey_parse(&p, pubkey, pubkeylen); - if (ret) { - ret = secp256k1_eckey_pubkey_tweak_add(&p, &term); - } - if (ret) { - int oldlen = pubkeylen; - ret = secp256k1_eckey_pubkey_serialize(&p, pubkey, &pubkeylen, oldlen <= 33); - VERIFY_CHECK(pubkeylen == oldlen); - } - } - - return ret; -} - -int secp256k1_ec_privkey_tweak_mul(unsigned char *seckey, const unsigned char *tweak) { - secp256k1_scalar_t factor; - secp256k1_scalar_t sec; - int ret = 0; - int overflow = 0; - DEBUG_CHECK(seckey != NULL); - DEBUG_CHECK(tweak != NULL); - - secp256k1_scalar_set_b32(&factor, tweak, &overflow); - secp256k1_scalar_set_b32(&sec, seckey, NULL); - ret = secp256k1_eckey_privkey_tweak_mul(&sec, &factor) && !overflow; - if (ret) { - secp256k1_scalar_get_b32(seckey, &sec); - } - - secp256k1_scalar_clear(&sec); - secp256k1_scalar_clear(&factor); - return ret; -} - -int secp256k1_ec_pubkey_tweak_mul(unsigned char *pubkey, int pubkeylen, const unsigned char *tweak) { - secp256k1_ge_t p; - secp256k1_scalar_t factor; - int ret = 0; - int overflow = 0; - DEBUG_CHECK(secp256k1_ecmult_consts != NULL); - DEBUG_CHECK(pubkey != NULL); - DEBUG_CHECK(tweak != NULL); - - secp256k1_scalar_set_b32(&factor, tweak, &overflow); - if (!overflow) { - ret = secp256k1_eckey_pubkey_parse(&p, pubkey, pubkeylen); - if (ret) { - ret = secp256k1_eckey_pubkey_tweak_mul(&p, &factor); - } - if (ret) { - int oldlen = pubkeylen; - ret = secp256k1_eckey_pubkey_serialize(&p, pubkey, &pubkeylen, oldlen <= 33); - VERIFY_CHECK(pubkeylen == oldlen); - } - } - - return ret; -} - -int secp256k1_ec_privkey_export(const unsigned char *seckey, unsigned char *privkey, int *privkeylen, int compressed) { - secp256k1_scalar_t key; - int ret = 0; - DEBUG_CHECK(seckey != NULL); - DEBUG_CHECK(privkey != NULL); - DEBUG_CHECK(privkeylen != NULL); - - secp256k1_scalar_set_b32(&key, seckey, NULL); - ret = secp256k1_eckey_privkey_serialize(privkey, privkeylen, &key, compressed); - secp256k1_scalar_clear(&key); - return ret; -} - -int secp256k1_ec_privkey_import(unsigned char *seckey, const unsigned char *privkey, int privkeylen) { - secp256k1_scalar_t key; - int ret = 0; - DEBUG_CHECK(seckey != NULL); - DEBUG_CHECK(privkey != NULL); - - ret = secp256k1_eckey_privkey_parse(&key, privkey, privkeylen); - if (ret) { - secp256k1_scalar_get_b32(seckey, &key); - } - secp256k1_scalar_clear(&key); - return ret; -} diff --git a/crypto/secp256k1/secp256k1/src/testrand.h b/crypto/secp256k1/secp256k1/src/testrand.h deleted file mode 100644 index 041bb92c4..000000000 --- a/crypto/secp256k1/secp256k1/src/testrand.h +++ /dev/null @@ -1,28 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_TESTRAND_H_ -#define _SECP256K1_TESTRAND_H_ - -#if defined HAVE_CONFIG_H -#include "libsecp256k1-config.h" -#endif - -/* A non-cryptographic RNG used only for test infrastructure. */ - -/** Seed the pseudorandom number generator for testing. */ -SECP256K1_INLINE static void secp256k1_rand_seed(const unsigned char *seed16); - -/** Generate a pseudorandom 32-bit number. */ -static uint32_t secp256k1_rand32(void); - -/** Generate a pseudorandom 32-byte array. */ -static void secp256k1_rand256(unsigned char *b32); - -/** Generate a pseudorandom 32-byte array with long sequences of zero and one bits. */ -static void secp256k1_rand256_test(unsigned char *b32); - -#endif diff --git a/crypto/secp256k1/secp256k1/src/testrand_impl.h b/crypto/secp256k1/secp256k1/src/testrand_impl.h deleted file mode 100644 index 21c69f1c5..000000000 --- a/crypto/secp256k1/secp256k1/src/testrand_impl.h +++ /dev/null @@ -1,60 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_TESTRAND_IMPL_H_ -#define _SECP256K1_TESTRAND_IMPL_H_ - -#include -#include - -#include "testrand.h" -#include "hash.h" - -static secp256k1_rfc6979_hmac_sha256_t secp256k1_test_rng; -static uint32_t secp256k1_test_rng_precomputed[8]; -static int secp256k1_test_rng_precomputed_used = 8; - -SECP256K1_INLINE static void secp256k1_rand_seed(const unsigned char *seed16) { - secp256k1_rfc6979_hmac_sha256_initialize(&secp256k1_test_rng, (const unsigned char*)"TestRNG", 7, seed16, 16, NULL, 0); -} - -SECP256K1_INLINE static uint32_t secp256k1_rand32(void) { - if (secp256k1_test_rng_precomputed_used == 8) { - secp256k1_rfc6979_hmac_sha256_generate(&secp256k1_test_rng, (unsigned char*)(&secp256k1_test_rng_precomputed[0]), sizeof(secp256k1_test_rng_precomputed)); - secp256k1_test_rng_precomputed_used = 0; - } - return secp256k1_test_rng_precomputed[secp256k1_test_rng_precomputed_used++]; -} - -static void secp256k1_rand256(unsigned char *b32) { - secp256k1_rfc6979_hmac_sha256_generate(&secp256k1_test_rng, b32, 32); -} - -static void secp256k1_rand256_test(unsigned char *b32) { - int bits=0; - uint64_t ent = 0; - int entleft = 0; - memset(b32, 0, 32); - while (bits < 256) { - int now; - uint32_t val; - if (entleft < 12) { - ent |= ((uint64_t)secp256k1_rand32()) << entleft; - entleft += 32; - } - now = 1 + ((ent % 64)*((ent >> 6) % 32)+16)/31; - val = 1 & (ent >> 11); - ent >>= 12; - entleft -= 12; - while (now > 0 && bits < 256) { - b32[bits / 8] |= val << (bits % 8); - now--; - bits++; - } - } -} - -#endif diff --git a/crypto/secp256k1/secp256k1/src/tests.c b/crypto/secp256k1/secp256k1/src/tests.c deleted file mode 100644 index 6c473a0c1..000000000 --- a/crypto/secp256k1/secp256k1/src/tests.c +++ /dev/null @@ -1,1917 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#if defined HAVE_CONFIG_H -#include "libsecp256k1-config.h" -#endif - -#include -#include - -#include - -#include "secp256k1.c" -#include "testrand_impl.h" - -#ifdef ENABLE_OPENSSL_TESTS -#include "openssl/bn.h" -#include "openssl/ec.h" -#include "openssl/ecdsa.h" -#include "openssl/obj_mac.h" -#endif - -static int count = 64; - -void random_field_element_test(secp256k1_fe_t *fe) { - do { - unsigned char b32[32]; - secp256k1_rand256_test(b32); - if (secp256k1_fe_set_b32(fe, b32)) { - break; - } - } while(1); -} - -void random_field_element_magnitude(secp256k1_fe_t *fe) { - secp256k1_fe_t zero; - int n = secp256k1_rand32() % 9; - secp256k1_fe_normalize(fe); - if (n == 0) { - return; - } - secp256k1_fe_clear(&zero); - secp256k1_fe_negate(&zero, &zero, 0); - secp256k1_fe_mul_int(&zero, n - 1); - secp256k1_fe_add(fe, &zero); -#ifdef VERIFY - CHECK(fe->magnitude == n); -#endif -} - -void random_group_element_test(secp256k1_ge_t *ge) { - secp256k1_fe_t fe; - do { - random_field_element_test(&fe); - if (secp256k1_ge_set_xo_var(ge, &fe, secp256k1_rand32() & 1)) { - break; - } - } while(1); -} - -void random_group_element_jacobian_test(secp256k1_gej_t *gej, const secp256k1_ge_t *ge) { - secp256k1_fe_t z2, z3; - do { - random_field_element_test(&gej->z); - if (!secp256k1_fe_is_zero(&gej->z)) { - break; - } - } while(1); - secp256k1_fe_sqr(&z2, &gej->z); - secp256k1_fe_mul(&z3, &z2, &gej->z); - secp256k1_fe_mul(&gej->x, &ge->x, &z2); - secp256k1_fe_mul(&gej->y, &ge->y, &z3); - gej->infinity = ge->infinity; -} - -void random_scalar_order_test(secp256k1_scalar_t *num) { - do { - unsigned char b32[32]; - int overflow = 0; - secp256k1_rand256_test(b32); - secp256k1_scalar_set_b32(num, b32, &overflow); - if (overflow || secp256k1_scalar_is_zero(num)) { - continue; - } - break; - } while(1); -} - -void random_scalar_order(secp256k1_scalar_t *num) { - do { - unsigned char b32[32]; - int overflow = 0; - secp256k1_rand256(b32); - secp256k1_scalar_set_b32(num, b32, &overflow); - if (overflow || secp256k1_scalar_is_zero(num)) { - continue; - } - break; - } while(1); -} - -/***** HASH TESTS *****/ - -void run_sha256_tests(void) { - static const char *inputs[8] = { - "", "abc", "message digest", "secure hash algorithm", "SHA256 is considered to be safe", - "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", - "For this sample, this 63-byte string will be used as input data", - "This is exactly 64 bytes long, not counting the terminating byte" - }; - static const unsigned char outputs[8][32] = { - {0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}, - {0xba, 0x78, 0x16, 0xbf, 0x8f, 0x01, 0xcf, 0xea, 0x41, 0x41, 0x40, 0xde, 0x5d, 0xae, 0x22, 0x23, 0xb0, 0x03, 0x61, 0xa3, 0x96, 0x17, 0x7a, 0x9c, 0xb4, 0x10, 0xff, 0x61, 0xf2, 0x00, 0x15, 0xad}, - {0xf7, 0x84, 0x6f, 0x55, 0xcf, 0x23, 0xe1, 0x4e, 0xeb, 0xea, 0xb5, 0xb4, 0xe1, 0x55, 0x0c, 0xad, 0x5b, 0x50, 0x9e, 0x33, 0x48, 0xfb, 0xc4, 0xef, 0xa3, 0xa1, 0x41, 0x3d, 0x39, 0x3c, 0xb6, 0x50}, - {0xf3, 0x0c, 0xeb, 0x2b, 0xb2, 0x82, 0x9e, 0x79, 0xe4, 0xca, 0x97, 0x53, 0xd3, 0x5a, 0x8e, 0xcc, 0x00, 0x26, 0x2d, 0x16, 0x4c, 0xc0, 0x77, 0x08, 0x02, 0x95, 0x38, 0x1c, 0xbd, 0x64, 0x3f, 0x0d}, - {0x68, 0x19, 0xd9, 0x15, 0xc7, 0x3f, 0x4d, 0x1e, 0x77, 0xe4, 0xe1, 0xb5, 0x2d, 0x1f, 0xa0, 0xf9, 0xcf, 0x9b, 0xea, 0xea, 0xd3, 0x93, 0x9f, 0x15, 0x87, 0x4b, 0xd9, 0x88, 0xe2, 0xa2, 0x36, 0x30}, - {0x24, 0x8d, 0x6a, 0x61, 0xd2, 0x06, 0x38, 0xb8, 0xe5, 0xc0, 0x26, 0x93, 0x0c, 0x3e, 0x60, 0x39, 0xa3, 0x3c, 0xe4, 0x59, 0x64, 0xff, 0x21, 0x67, 0xf6, 0xec, 0xed, 0xd4, 0x19, 0xdb, 0x06, 0xc1}, - {0xf0, 0x8a, 0x78, 0xcb, 0xba, 0xee, 0x08, 0x2b, 0x05, 0x2a, 0xe0, 0x70, 0x8f, 0x32, 0xfa, 0x1e, 0x50, 0xc5, 0xc4, 0x21, 0xaa, 0x77, 0x2b, 0xa5, 0xdb, 0xb4, 0x06, 0xa2, 0xea, 0x6b, 0xe3, 0x42}, - {0xab, 0x64, 0xef, 0xf7, 0xe8, 0x8e, 0x2e, 0x46, 0x16, 0x5e, 0x29, 0xf2, 0xbc, 0xe4, 0x18, 0x26, 0xbd, 0x4c, 0x7b, 0x35, 0x52, 0xf6, 0xb3, 0x82, 0xa9, 0xe7, 0xd3, 0xaf, 0x47, 0xc2, 0x45, 0xf8} - }; - int i; - for (i = 0; i < 8; i++) { - unsigned char out[32]; - secp256k1_sha256_t hasher; - secp256k1_sha256_initialize(&hasher); - secp256k1_sha256_write(&hasher, (const unsigned char*)(inputs[i]), strlen(inputs[i])); - secp256k1_sha256_finalize(&hasher, out); - CHECK(memcmp(out, outputs[i], 32) == 0); - if (strlen(inputs[i]) > 0) { - int split = secp256k1_rand32() % strlen(inputs[i]); - secp256k1_sha256_initialize(&hasher); - secp256k1_sha256_write(&hasher, (const unsigned char*)(inputs[i]), split); - secp256k1_sha256_write(&hasher, (const unsigned char*)(inputs[i] + split), strlen(inputs[i]) - split); - secp256k1_sha256_finalize(&hasher, out); - CHECK(memcmp(out, outputs[i], 32) == 0); - } - } -} - -void run_hmac_sha256_tests(void) { - static const char *keys[6] = { - "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", - "\x4a\x65\x66\x65", - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", - "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19", - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", - "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" - }; - static const char *inputs[6] = { - "\x48\x69\x20\x54\x68\x65\x72\x65", - "\x77\x68\x61\x74\x20\x64\x6f\x20\x79\x61\x20\x77\x61\x6e\x74\x20\x66\x6f\x72\x20\x6e\x6f\x74\x68\x69\x6e\x67\x3f", - "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd", - "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd", - "\x54\x65\x73\x74\x20\x55\x73\x69\x6e\x67\x20\x4c\x61\x72\x67\x65\x72\x20\x54\x68\x61\x6e\x20\x42\x6c\x6f\x63\x6b\x2d\x53\x69\x7a\x65\x20\x4b\x65\x79\x20\x2d\x20\x48\x61\x73\x68\x20\x4b\x65\x79\x20\x46\x69\x72\x73\x74", - "\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x74\x65\x73\x74\x20\x75\x73\x69\x6e\x67\x20\x61\x20\x6c\x61\x72\x67\x65\x72\x20\x74\x68\x61\x6e\x20\x62\x6c\x6f\x63\x6b\x2d\x73\x69\x7a\x65\x20\x6b\x65\x79\x20\x61\x6e\x64\x20\x61\x20\x6c\x61\x72\x67\x65\x72\x20\x74\x68\x61\x6e\x20\x62\x6c\x6f\x63\x6b\x2d\x73\x69\x7a\x65\x20\x64\x61\x74\x61\x2e\x20\x54\x68\x65\x20\x6b\x65\x79\x20\x6e\x65\x65\x64\x73\x20\x74\x6f\x20\x62\x65\x20\x68\x61\x73\x68\x65\x64\x20\x62\x65\x66\x6f\x72\x65\x20\x62\x65\x69\x6e\x67\x20\x75\x73\x65\x64\x20\x62\x79\x20\x74\x68\x65\x20\x48\x4d\x41\x43\x20\x61\x6c\x67\x6f\x72\x69\x74\x68\x6d\x2e" - }; - static const unsigned char outputs[6][32] = { - {0xb0, 0x34, 0x4c, 0x61, 0xd8, 0xdb, 0x38, 0x53, 0x5c, 0xa8, 0xaf, 0xce, 0xaf, 0x0b, 0xf1, 0x2b, 0x88, 0x1d, 0xc2, 0x00, 0xc9, 0x83, 0x3d, 0xa7, 0x26, 0xe9, 0x37, 0x6c, 0x2e, 0x32, 0xcf, 0xf7}, - {0x5b, 0xdc, 0xc1, 0x46, 0xbf, 0x60, 0x75, 0x4e, 0x6a, 0x04, 0x24, 0x26, 0x08, 0x95, 0x75, 0xc7, 0x5a, 0x00, 0x3f, 0x08, 0x9d, 0x27, 0x39, 0x83, 0x9d, 0xec, 0x58, 0xb9, 0x64, 0xec, 0x38, 0x43}, - {0x77, 0x3e, 0xa9, 0x1e, 0x36, 0x80, 0x0e, 0x46, 0x85, 0x4d, 0xb8, 0xeb, 0xd0, 0x91, 0x81, 0xa7, 0x29, 0x59, 0x09, 0x8b, 0x3e, 0xf8, 0xc1, 0x22, 0xd9, 0x63, 0x55, 0x14, 0xce, 0xd5, 0x65, 0xfe}, - {0x82, 0x55, 0x8a, 0x38, 0x9a, 0x44, 0x3c, 0x0e, 0xa4, 0xcc, 0x81, 0x98, 0x99, 0xf2, 0x08, 0x3a, 0x85, 0xf0, 0xfa, 0xa3, 0xe5, 0x78, 0xf8, 0x07, 0x7a, 0x2e, 0x3f, 0xf4, 0x67, 0x29, 0x66, 0x5b}, - {0x60, 0xe4, 0x31, 0x59, 0x1e, 0xe0, 0xb6, 0x7f, 0x0d, 0x8a, 0x26, 0xaa, 0xcb, 0xf5, 0xb7, 0x7f, 0x8e, 0x0b, 0xc6, 0x21, 0x37, 0x28, 0xc5, 0x14, 0x05, 0x46, 0x04, 0x0f, 0x0e, 0xe3, 0x7f, 0x54}, - {0x9b, 0x09, 0xff, 0xa7, 0x1b, 0x94, 0x2f, 0xcb, 0x27, 0x63, 0x5f, 0xbc, 0xd5, 0xb0, 0xe9, 0x44, 0xbf, 0xdc, 0x63, 0x64, 0x4f, 0x07, 0x13, 0x93, 0x8a, 0x7f, 0x51, 0x53, 0x5c, 0x3a, 0x35, 0xe2} - }; - int i; - for (i = 0; i < 6; i++) { - secp256k1_hmac_sha256_t hasher; - unsigned char out[32]; - secp256k1_hmac_sha256_initialize(&hasher, (const unsigned char*)(keys[i]), strlen(keys[i])); - secp256k1_hmac_sha256_write(&hasher, (const unsigned char*)(inputs[i]), strlen(inputs[i])); - secp256k1_hmac_sha256_finalize(&hasher, out); - CHECK(memcmp(out, outputs[i], 32) == 0); - if (strlen(inputs[i]) > 0) { - int split = secp256k1_rand32() % strlen(inputs[i]); - secp256k1_hmac_sha256_initialize(&hasher, (const unsigned char*)(keys[i]), strlen(keys[i])); - secp256k1_hmac_sha256_write(&hasher, (const unsigned char*)(inputs[i]), split); - secp256k1_hmac_sha256_write(&hasher, (const unsigned char*)(inputs[i] + split), strlen(inputs[i]) - split); - secp256k1_hmac_sha256_finalize(&hasher, out); - CHECK(memcmp(out, outputs[i], 32) == 0); - } - } -} - -void run_rfc6979_hmac_sha256_tests(void) { - static const unsigned char key1[32] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x00}; - static const unsigned char msg1[32] = {0x4b, 0xf5, 0x12, 0x2f, 0x34, 0x45, 0x54, 0xc5, 0x3b, 0xde, 0x2e, 0xbb, 0x8c, 0xd2, 0xb7, 0xe3, 0xd1, 0x60, 0x0a, 0xd6, 0x31, 0xc3, 0x85, 0xa5, 0xd7, 0xcc, 0xe2, 0x3c, 0x77, 0x85, 0x45, 0x9a}; - static const unsigned char out1[3][32] = { - {0x4f, 0xe2, 0x95, 0x25, 0xb2, 0x08, 0x68, 0x09, 0x15, 0x9a, 0xcd, 0xf0, 0x50, 0x6e, 0xfb, 0x86, 0xb0, 0xec, 0x93, 0x2c, 0x7b, 0xa4, 0x42, 0x56, 0xab, 0x32, 0x1e, 0x42, 0x1e, 0x67, 0xe9, 0xfb}, - {0x2b, 0xf0, 0xff, 0xf1, 0xd3, 0xc3, 0x78, 0xa2, 0x2d, 0xc5, 0xde, 0x1d, 0x85, 0x65, 0x22, 0x32, 0x5c, 0x65, 0xb5, 0x04, 0x49, 0x1a, 0x0c, 0xbd, 0x01, 0xcb, 0x8f, 0x3a, 0xa6, 0x7f, 0xfd, 0x4a}, - {0xf5, 0x28, 0xb4, 0x10, 0xcb, 0x54, 0x1f, 0x77, 0x00, 0x0d, 0x7a, 0xfb, 0x6c, 0x5b, 0x53, 0xc5, 0xc4, 0x71, 0xea, 0xb4, 0x3e, 0x46, 0x6d, 0x9a, 0xc5, 0x19, 0x0c, 0x39, 0xc8, 0x2f, 0xd8, 0x2e} - }; - - static const unsigned char key2[32] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; - static const unsigned char msg2[32] = {0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}; - static const unsigned char out2[3][32] = { - {0x9c, 0x23, 0x6c, 0x16, 0x5b, 0x82, 0xae, 0x0c, 0xd5, 0x90, 0x65, 0x9e, 0x10, 0x0b, 0x6b, 0xab, 0x30, 0x36, 0xe7, 0xba, 0x8b, 0x06, 0x74, 0x9b, 0xaf, 0x69, 0x81, 0xe1, 0x6f, 0x1a, 0x2b, 0x95}, - {0xdf, 0x47, 0x10, 0x61, 0x62, 0x5b, 0xc0, 0xea, 0x14, 0xb6, 0x82, 0xfe, 0xee, 0x2c, 0x9c, 0x02, 0xf2, 0x35, 0xda, 0x04, 0x20, 0x4c, 0x1d, 0x62, 0xa1, 0x53, 0x6c, 0x6e, 0x17, 0xae, 0xd7, 0xa9}, - {0x75, 0x97, 0x88, 0x7c, 0xbd, 0x76, 0x32, 0x1f, 0x32, 0xe3, 0x04, 0x40, 0x67, 0x9a, 0x22, 0xcf, 0x7f, 0x8d, 0x9d, 0x2e, 0xac, 0x39, 0x0e, 0x58, 0x1f, 0xea, 0x09, 0x1c, 0xe2, 0x02, 0xba, 0x94} - }; - - secp256k1_rfc6979_hmac_sha256_t rng; - unsigned char out[32]; - unsigned char zero[1] = {0}; - int i; - - secp256k1_rfc6979_hmac_sha256_initialize(&rng, key1, 32, msg1, 32, NULL, 1); - for (i = 0; i < 3; i++) { - secp256k1_rfc6979_hmac_sha256_generate(&rng, out, 32); - CHECK(memcmp(out, out1[i], 32) == 0); - } - secp256k1_rfc6979_hmac_sha256_finalize(&rng); - - secp256k1_rfc6979_hmac_sha256_initialize(&rng, key1, 32, msg1, 32, zero, 1); - for (i = 0; i < 3; i++) { - secp256k1_rfc6979_hmac_sha256_generate(&rng, out, 32); - CHECK(memcmp(out, out1[i], 32) != 0); - } - secp256k1_rfc6979_hmac_sha256_finalize(&rng); - - secp256k1_rfc6979_hmac_sha256_initialize(&rng, key2, 32, msg2, 32, zero, 0); - for (i = 0; i < 3; i++) { - secp256k1_rfc6979_hmac_sha256_generate(&rng, out, 32); - CHECK(memcmp(out, out2[i], 32) == 0); - } - secp256k1_rfc6979_hmac_sha256_finalize(&rng); -} - -/***** NUM TESTS *****/ - -#ifndef USE_NUM_NONE -void random_num_negate(secp256k1_num_t *num) { - if (secp256k1_rand32() & 1) { - secp256k1_num_negate(num); - } -} - -void random_num_order_test(secp256k1_num_t *num) { - secp256k1_scalar_t sc; - random_scalar_order_test(&sc); - secp256k1_scalar_get_num(num, &sc); -} - -void random_num_order(secp256k1_num_t *num) { - secp256k1_scalar_t sc; - random_scalar_order(&sc); - secp256k1_scalar_get_num(num, &sc); -} - -void test_num_negate(void) { - secp256k1_num_t n1; - secp256k1_num_t n2; - random_num_order_test(&n1); /* n1 = R */ - random_num_negate(&n1); - secp256k1_num_copy(&n2, &n1); /* n2 = R */ - secp256k1_num_sub(&n1, &n2, &n1); /* n1 = n2-n1 = 0 */ - CHECK(secp256k1_num_is_zero(&n1)); - secp256k1_num_copy(&n1, &n2); /* n1 = R */ - secp256k1_num_negate(&n1); /* n1 = -R */ - CHECK(!secp256k1_num_is_zero(&n1)); - secp256k1_num_add(&n1, &n2, &n1); /* n1 = n2+n1 = 0 */ - CHECK(secp256k1_num_is_zero(&n1)); - secp256k1_num_copy(&n1, &n2); /* n1 = R */ - secp256k1_num_negate(&n1); /* n1 = -R */ - CHECK(secp256k1_num_is_neg(&n1) != secp256k1_num_is_neg(&n2)); - secp256k1_num_negate(&n1); /* n1 = R */ - CHECK(secp256k1_num_eq(&n1, &n2)); -} - -void test_num_add_sub(void) { - secp256k1_num_t n1; - secp256k1_num_t n2; - secp256k1_num_t n1p2, n2p1, n1m2, n2m1; - int r = secp256k1_rand32(); - random_num_order_test(&n1); /* n1 = R1 */ - if (r & 1) { - random_num_negate(&n1); - } - random_num_order_test(&n2); /* n2 = R2 */ - if (r & 2) { - random_num_negate(&n2); - } - secp256k1_num_add(&n1p2, &n1, &n2); /* n1p2 = R1 + R2 */ - secp256k1_num_add(&n2p1, &n2, &n1); /* n2p1 = R2 + R1 */ - secp256k1_num_sub(&n1m2, &n1, &n2); /* n1m2 = R1 - R2 */ - secp256k1_num_sub(&n2m1, &n2, &n1); /* n2m1 = R2 - R1 */ - CHECK(secp256k1_num_eq(&n1p2, &n2p1)); - CHECK(!secp256k1_num_eq(&n1p2, &n1m2)); - secp256k1_num_negate(&n2m1); /* n2m1 = -R2 + R1 */ - CHECK(secp256k1_num_eq(&n2m1, &n1m2)); - CHECK(!secp256k1_num_eq(&n2m1, &n1)); - secp256k1_num_add(&n2m1, &n2m1, &n2); /* n2m1 = -R2 + R1 + R2 = R1 */ - CHECK(secp256k1_num_eq(&n2m1, &n1)); - CHECK(!secp256k1_num_eq(&n2p1, &n1)); - secp256k1_num_sub(&n2p1, &n2p1, &n2); /* n2p1 = R2 + R1 - R2 = R1 */ - CHECK(secp256k1_num_eq(&n2p1, &n1)); -} - -void run_num_smalltests(void) { - int i; - for (i = 0; i < 100*count; i++) { - test_num_negate(); - test_num_add_sub(); - } -} -#endif - -/***** SCALAR TESTS *****/ - -void scalar_test(void) { - secp256k1_scalar_t s; - secp256k1_scalar_t s1; - secp256k1_scalar_t s2; -#ifndef USE_NUM_NONE - secp256k1_num_t snum, s1num, s2num; - secp256k1_num_t order, half_order; -#endif - unsigned char c[32]; - - /* Set 's' to a random scalar, with value 'snum'. */ - random_scalar_order_test(&s); - - /* Set 's1' to a random scalar, with value 's1num'. */ - random_scalar_order_test(&s1); - - /* Set 's2' to a random scalar, with value 'snum2', and byte array representation 'c'. */ - random_scalar_order_test(&s2); - secp256k1_scalar_get_b32(c, &s2); - -#ifndef USE_NUM_NONE - secp256k1_scalar_get_num(&snum, &s); - secp256k1_scalar_get_num(&s1num, &s1); - secp256k1_scalar_get_num(&s2num, &s2); - - secp256k1_scalar_order_get_num(&order); - half_order = order; - secp256k1_num_shift(&half_order, 1); -#endif - - { - int i; - /* Test that fetching groups of 4 bits from a scalar and recursing n(i)=16*n(i-1)+p(i) reconstructs it. */ - secp256k1_scalar_t n; - secp256k1_scalar_set_int(&n, 0); - for (i = 0; i < 256; i += 4) { - secp256k1_scalar_t t; - int j; - secp256k1_scalar_set_int(&t, secp256k1_scalar_get_bits(&s, 256 - 4 - i, 4)); - for (j = 0; j < 4; j++) { - secp256k1_scalar_add(&n, &n, &n); - } - secp256k1_scalar_add(&n, &n, &t); - } - CHECK(secp256k1_scalar_eq(&n, &s)); - } - - { - /* Test that fetching groups of randomly-sized bits from a scalar and recursing n(i)=b*n(i-1)+p(i) reconstructs it. */ - secp256k1_scalar_t n; - int i = 0; - secp256k1_scalar_set_int(&n, 0); - while (i < 256) { - secp256k1_scalar_t t; - int j; - int now = (secp256k1_rand32() % 15) + 1; - if (now + i > 256) { - now = 256 - i; - } - secp256k1_scalar_set_int(&t, secp256k1_scalar_get_bits_var(&s, 256 - now - i, now)); - for (j = 0; j < now; j++) { - secp256k1_scalar_add(&n, &n, &n); - } - secp256k1_scalar_add(&n, &n, &t); - i += now; - } - CHECK(secp256k1_scalar_eq(&n, &s)); - } - -#ifndef USE_NUM_NONE - { - /* Test that adding the scalars together is equal to adding their numbers together modulo the order. */ - secp256k1_num_t rnum; - secp256k1_num_t r2num; - secp256k1_scalar_t r; - secp256k1_num_add(&rnum, &snum, &s2num); - secp256k1_num_mod(&rnum, &order); - secp256k1_scalar_add(&r, &s, &s2); - secp256k1_scalar_get_num(&r2num, &r); - CHECK(secp256k1_num_eq(&rnum, &r2num)); - } - - { - /* Test that multipying the scalars is equal to multiplying their numbers modulo the order. */ - secp256k1_scalar_t r; - secp256k1_num_t r2num; - secp256k1_num_t rnum; - secp256k1_num_mul(&rnum, &snum, &s2num); - secp256k1_num_mod(&rnum, &order); - secp256k1_scalar_mul(&r, &s, &s2); - secp256k1_scalar_get_num(&r2num, &r); - CHECK(secp256k1_num_eq(&rnum, &r2num)); - /* The result can only be zero if at least one of the factors was zero. */ - CHECK(secp256k1_scalar_is_zero(&r) == (secp256k1_scalar_is_zero(&s) || secp256k1_scalar_is_zero(&s2))); - /* The results can only be equal to one of the factors if that factor was zero, or the other factor was one. */ - CHECK(secp256k1_num_eq(&rnum, &snum) == (secp256k1_scalar_is_zero(&s) || secp256k1_scalar_is_one(&s2))); - CHECK(secp256k1_num_eq(&rnum, &s2num) == (secp256k1_scalar_is_zero(&s2) || secp256k1_scalar_is_one(&s))); - } - - { - secp256k1_scalar_t neg; - secp256k1_num_t negnum; - secp256k1_num_t negnum2; - /* Check that comparison with zero matches comparison with zero on the number. */ - CHECK(secp256k1_num_is_zero(&snum) == secp256k1_scalar_is_zero(&s)); - /* Check that comparison with the half order is equal to testing for high scalar. */ - CHECK(secp256k1_scalar_is_high(&s) == (secp256k1_num_cmp(&snum, &half_order) > 0)); - secp256k1_scalar_negate(&neg, &s); - secp256k1_num_sub(&negnum, &order, &snum); - secp256k1_num_mod(&negnum, &order); - /* Check that comparison with the half order is equal to testing for high scalar after negation. */ - CHECK(secp256k1_scalar_is_high(&neg) == (secp256k1_num_cmp(&negnum, &half_order) > 0)); - /* Negating should change the high property, unless the value was already zero. */ - CHECK((secp256k1_scalar_is_high(&s) == secp256k1_scalar_is_high(&neg)) == secp256k1_scalar_is_zero(&s)); - secp256k1_scalar_get_num(&negnum2, &neg); - /* Negating a scalar should be equal to (order - n) mod order on the number. */ - CHECK(secp256k1_num_eq(&negnum, &negnum2)); - secp256k1_scalar_add(&neg, &neg, &s); - /* Adding a number to its negation should result in zero. */ - CHECK(secp256k1_scalar_is_zero(&neg)); - secp256k1_scalar_negate(&neg, &neg); - /* Negating zero should still result in zero. */ - CHECK(secp256k1_scalar_is_zero(&neg)); - } - - { - /* Test secp256k1_scalar_mul_shift_var. */ - secp256k1_scalar_t r; - secp256k1_num_t one; - secp256k1_num_t rnum; - secp256k1_num_t rnum2; - unsigned char cone[1] = {0x01}; - unsigned int shift = 256 + (secp256k1_rand32() % 257); - secp256k1_scalar_mul_shift_var(&r, &s1, &s2, shift); - secp256k1_num_mul(&rnum, &s1num, &s2num); - secp256k1_num_shift(&rnum, shift - 1); - secp256k1_num_set_bin(&one, cone, 1); - secp256k1_num_add(&rnum, &rnum, &one); - secp256k1_num_shift(&rnum, 1); - secp256k1_scalar_get_num(&rnum2, &r); - CHECK(secp256k1_num_eq(&rnum, &rnum2)); - } -#endif - - { - /* Test that scalar inverses are equal to the inverse of their number modulo the order. */ - if (!secp256k1_scalar_is_zero(&s)) { - secp256k1_scalar_t inv; -#ifndef USE_NUM_NONE - secp256k1_num_t invnum; - secp256k1_num_t invnum2; -#endif - secp256k1_scalar_inverse(&inv, &s); -#ifndef USE_NUM_NONE - secp256k1_num_mod_inverse(&invnum, &snum, &order); - secp256k1_scalar_get_num(&invnum2, &inv); - CHECK(secp256k1_num_eq(&invnum, &invnum2)); -#endif - secp256k1_scalar_mul(&inv, &inv, &s); - /* Multiplying a scalar with its inverse must result in one. */ - CHECK(secp256k1_scalar_is_one(&inv)); - secp256k1_scalar_inverse(&inv, &inv); - /* Inverting one must result in one. */ - CHECK(secp256k1_scalar_is_one(&inv)); - } - } - - { - /* Test commutativity of add. */ - secp256k1_scalar_t r1, r2; - secp256k1_scalar_add(&r1, &s1, &s2); - secp256k1_scalar_add(&r2, &s2, &s1); - CHECK(secp256k1_scalar_eq(&r1, &r2)); - } - - { - secp256k1_scalar_t r1, r2; - secp256k1_scalar_t b; - int i; - /* Test add_bit. */ - int bit = secp256k1_rand32() % 256; - secp256k1_scalar_set_int(&b, 1); - CHECK(secp256k1_scalar_is_one(&b)); - for (i = 0; i < bit; i++) { - secp256k1_scalar_add(&b, &b, &b); - } - r1 = s1; - r2 = s1; - if (!secp256k1_scalar_add(&r1, &r1, &b)) { - /* No overflow happened. */ - secp256k1_scalar_add_bit(&r2, bit); - CHECK(secp256k1_scalar_eq(&r1, &r2)); - } - } - - { - /* Test commutativity of mul. */ - secp256k1_scalar_t r1, r2; - secp256k1_scalar_mul(&r1, &s1, &s2); - secp256k1_scalar_mul(&r2, &s2, &s1); - CHECK(secp256k1_scalar_eq(&r1, &r2)); - } - - { - /* Test associativity of add. */ - secp256k1_scalar_t r1, r2; - secp256k1_scalar_add(&r1, &s1, &s2); - secp256k1_scalar_add(&r1, &r1, &s); - secp256k1_scalar_add(&r2, &s2, &s); - secp256k1_scalar_add(&r2, &s1, &r2); - CHECK(secp256k1_scalar_eq(&r1, &r2)); - } - - { - /* Test associativity of mul. */ - secp256k1_scalar_t r1, r2; - secp256k1_scalar_mul(&r1, &s1, &s2); - secp256k1_scalar_mul(&r1, &r1, &s); - secp256k1_scalar_mul(&r2, &s2, &s); - secp256k1_scalar_mul(&r2, &s1, &r2); - CHECK(secp256k1_scalar_eq(&r1, &r2)); - } - - { - /* Test distributitivity of mul over add. */ - secp256k1_scalar_t r1, r2, t; - secp256k1_scalar_add(&r1, &s1, &s2); - secp256k1_scalar_mul(&r1, &r1, &s); - secp256k1_scalar_mul(&r2, &s1, &s); - secp256k1_scalar_mul(&t, &s2, &s); - secp256k1_scalar_add(&r2, &r2, &t); - CHECK(secp256k1_scalar_eq(&r1, &r2)); - } - - { - /* Test square. */ - secp256k1_scalar_t r1, r2; - secp256k1_scalar_sqr(&r1, &s1); - secp256k1_scalar_mul(&r2, &s1, &s1); - CHECK(secp256k1_scalar_eq(&r1, &r2)); - } - - { - /* Test multiplicative identity. */ - secp256k1_scalar_t r1, v1; - secp256k1_scalar_set_int(&v1,1); - secp256k1_scalar_mul(&r1, &s1, &v1); - CHECK(secp256k1_scalar_eq(&r1, &s1)); - } - - { - /* Test additive identity. */ - secp256k1_scalar_t r1, v0; - secp256k1_scalar_set_int(&v0,0); - secp256k1_scalar_add(&r1, &s1, &v0); - CHECK(secp256k1_scalar_eq(&r1, &s1)); - } - - { - /* Test zero product property. */ - secp256k1_scalar_t r1, v0; - secp256k1_scalar_set_int(&v0,0); - secp256k1_scalar_mul(&r1, &s1, &v0); - CHECK(secp256k1_scalar_eq(&r1, &v0)); - } - -} - -void run_scalar_tests(void) { - int i; - for (i = 0; i < 128 * count; i++) { - scalar_test(); - } - - { - /* (-1)+1 should be zero. */ - secp256k1_scalar_t s, o; - secp256k1_scalar_set_int(&s, 1); - CHECK(secp256k1_scalar_is_one(&s)); - secp256k1_scalar_negate(&o, &s); - secp256k1_scalar_add(&o, &o, &s); - CHECK(secp256k1_scalar_is_zero(&o)); - secp256k1_scalar_negate(&o, &o); - CHECK(secp256k1_scalar_is_zero(&o)); - } - -#ifndef USE_NUM_NONE - { - /* A scalar with value of the curve order should be 0. */ - secp256k1_num_t order; - secp256k1_scalar_t zero; - unsigned char bin[32]; - int overflow = 0; - secp256k1_scalar_order_get_num(&order); - secp256k1_num_get_bin(bin, 32, &order); - secp256k1_scalar_set_b32(&zero, bin, &overflow); - CHECK(overflow == 1); - CHECK(secp256k1_scalar_is_zero(&zero)); - } -#endif -} - -/***** FIELD TESTS *****/ - -void random_fe(secp256k1_fe_t *x) { - unsigned char bin[32]; - do { - secp256k1_rand256(bin); - if (secp256k1_fe_set_b32(x, bin)) { - return; - } - } while(1); -} - -void random_fe_non_zero(secp256k1_fe_t *nz) { - int tries = 10; - while (--tries >= 0) { - random_fe(nz); - secp256k1_fe_normalize(nz); - if (!secp256k1_fe_is_zero(nz)) { - break; - } - } - /* Infinitesimal probability of spurious failure here */ - CHECK(tries >= 0); -} - -void random_fe_non_square(secp256k1_fe_t *ns) { - secp256k1_fe_t r; - random_fe_non_zero(ns); - if (secp256k1_fe_sqrt_var(&r, ns)) { - secp256k1_fe_negate(ns, ns, 1); - } -} - -int check_fe_equal(const secp256k1_fe_t *a, const secp256k1_fe_t *b) { - secp256k1_fe_t an = *a; - secp256k1_fe_t bn = *b; - secp256k1_fe_normalize_weak(&an); - secp256k1_fe_normalize_var(&bn); - return secp256k1_fe_equal_var(&an, &bn); -} - -int check_fe_inverse(const secp256k1_fe_t *a, const secp256k1_fe_t *ai) { - secp256k1_fe_t x; - secp256k1_fe_t one = SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 1); - secp256k1_fe_mul(&x, a, ai); - return check_fe_equal(&x, &one); -} - -void run_field_convert(void) { - static const unsigned char b32[32] = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, - 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, - 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x40 - }; - static const secp256k1_fe_storage_t fes = SECP256K1_FE_STORAGE_CONST( - 0x00010203UL, 0x04050607UL, 0x11121314UL, 0x15161718UL, - 0x22232425UL, 0x26272829UL, 0x33343536UL, 0x37383940UL - ); - static const secp256k1_fe_t fe = SECP256K1_FE_CONST( - 0x00010203UL, 0x04050607UL, 0x11121314UL, 0x15161718UL, - 0x22232425UL, 0x26272829UL, 0x33343536UL, 0x37383940UL - ); - secp256k1_fe_t fe2; - unsigned char b322[32]; - secp256k1_fe_storage_t fes2; - /* Check conversions to fe. */ - CHECK(secp256k1_fe_set_b32(&fe2, b32)); - CHECK(secp256k1_fe_equal_var(&fe, &fe2)); - secp256k1_fe_from_storage(&fe2, &fes); - CHECK(secp256k1_fe_equal_var(&fe, &fe2)); - /* Check conversion from fe. */ - secp256k1_fe_get_b32(b322, &fe); - CHECK(memcmp(b322, b32, 32) == 0); - secp256k1_fe_to_storage(&fes2, &fe); - CHECK(memcmp(&fes2, &fes, sizeof(fes)) == 0); -} - -void run_field_misc(void) { - secp256k1_fe_t x; - secp256k1_fe_t y; - secp256k1_fe_t z; - secp256k1_fe_t q; - secp256k1_fe_t fe5 = SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 5); - int i; - for (i = 0; i < 5*count; i++) { - secp256k1_fe_storage_t xs, ys, zs; - random_fe(&x); - random_fe_non_zero(&y); - /* Test the fe equality and comparison operations. */ - CHECK(secp256k1_fe_cmp_var(&x, &x) == 0); - CHECK(secp256k1_fe_equal_var(&x, &x)); - z = x; - secp256k1_fe_add(&z,&y); - secp256k1_fe_normalize(&z); - /* Test storage conversion and conditional moves. */ - secp256k1_fe_to_storage(&xs, &x); - secp256k1_fe_to_storage(&ys, &y); - secp256k1_fe_to_storage(&zs, &z); - secp256k1_fe_storage_cmov(&zs, &xs, 0); - CHECK(memcmp(&xs, &zs, sizeof(xs)) != 0); - secp256k1_fe_storage_cmov(&ys, &xs, 1); - CHECK(memcmp(&xs, &ys, sizeof(xs)) == 0); - secp256k1_fe_from_storage(&x, &xs); - secp256k1_fe_from_storage(&y, &ys); - secp256k1_fe_from_storage(&z, &zs); - /* Test that mul_int, mul, and add agree. */ - secp256k1_fe_add(&y, &x); - secp256k1_fe_add(&y, &x); - z = x; - secp256k1_fe_mul_int(&z, 3); - CHECK(check_fe_equal(&y, &z)); - secp256k1_fe_add(&y, &x); - secp256k1_fe_add(&z, &x); - CHECK(check_fe_equal(&z, &y)); - z = x; - secp256k1_fe_mul_int(&z, 5); - secp256k1_fe_mul(&q, &x, &fe5); - CHECK(check_fe_equal(&z, &q)); - secp256k1_fe_negate(&x, &x, 1); - secp256k1_fe_add(&z, &x); - secp256k1_fe_add(&q, &x); - CHECK(check_fe_equal(&y, &z)); - CHECK(check_fe_equal(&q, &y)); - } -} - -void run_field_inv(void) { - secp256k1_fe_t x, xi, xii; - int i; - for (i = 0; i < 10*count; i++) { - random_fe_non_zero(&x); - secp256k1_fe_inv(&xi, &x); - CHECK(check_fe_inverse(&x, &xi)); - secp256k1_fe_inv(&xii, &xi); - CHECK(check_fe_equal(&x, &xii)); - } -} - -void run_field_inv_var(void) { - secp256k1_fe_t x, xi, xii; - int i; - for (i = 0; i < 10*count; i++) { - random_fe_non_zero(&x); - secp256k1_fe_inv_var(&xi, &x); - CHECK(check_fe_inverse(&x, &xi)); - secp256k1_fe_inv_var(&xii, &xi); - CHECK(check_fe_equal(&x, &xii)); - } -} - -void run_field_inv_all_var(void) { - secp256k1_fe_t x[16], xi[16], xii[16]; - int i; - /* Check it's safe to call for 0 elements */ - secp256k1_fe_inv_all_var(0, xi, x); - for (i = 0; i < count; i++) { - size_t j; - size_t len = (secp256k1_rand32() & 15) + 1; - for (j = 0; j < len; j++) { - random_fe_non_zero(&x[j]); - } - secp256k1_fe_inv_all_var(len, xi, x); - for (j = 0; j < len; j++) { - CHECK(check_fe_inverse(&x[j], &xi[j])); - } - secp256k1_fe_inv_all_var(len, xii, xi); - for (j = 0; j < len; j++) { - CHECK(check_fe_equal(&x[j], &xii[j])); - } - } -} - -void run_sqr(void) { - secp256k1_fe_t x, s; - - { - int i; - secp256k1_fe_set_int(&x, 1); - secp256k1_fe_negate(&x, &x, 1); - - for (i = 1; i <= 512; ++i) { - secp256k1_fe_mul_int(&x, 2); - secp256k1_fe_normalize(&x); - secp256k1_fe_sqr(&s, &x); - } - } -} - -void test_sqrt(const secp256k1_fe_t *a, const secp256k1_fe_t *k) { - secp256k1_fe_t r1, r2; - int v = secp256k1_fe_sqrt_var(&r1, a); - CHECK((v == 0) == (k == NULL)); - - if (k != NULL) { - /* Check that the returned root is +/- the given known answer */ - secp256k1_fe_negate(&r2, &r1, 1); - secp256k1_fe_add(&r1, k); secp256k1_fe_add(&r2, k); - secp256k1_fe_normalize(&r1); secp256k1_fe_normalize(&r2); - CHECK(secp256k1_fe_is_zero(&r1) || secp256k1_fe_is_zero(&r2)); - } -} - -void run_sqrt(void) { - secp256k1_fe_t ns, x, s, t; - int i; - - /* Check sqrt(0) is 0 */ - secp256k1_fe_set_int(&x, 0); - secp256k1_fe_sqr(&s, &x); - test_sqrt(&s, &x); - - /* Check sqrt of small squares (and their negatives) */ - for (i = 1; i <= 100; i++) { - secp256k1_fe_set_int(&x, i); - secp256k1_fe_sqr(&s, &x); - test_sqrt(&s, &x); - secp256k1_fe_negate(&t, &s, 1); - test_sqrt(&t, NULL); - } - - /* Consistency checks for large random values */ - for (i = 0; i < 10; i++) { - int j; - random_fe_non_square(&ns); - for (j = 0; j < count; j++) { - random_fe(&x); - secp256k1_fe_sqr(&s, &x); - test_sqrt(&s, &x); - secp256k1_fe_negate(&t, &s, 1); - test_sqrt(&t, NULL); - secp256k1_fe_mul(&t, &s, &ns); - test_sqrt(&t, NULL); - } - } -} - -/***** GROUP TESTS *****/ - -void ge_equals_ge(const secp256k1_ge_t *a, const secp256k1_ge_t *b) { - CHECK(a->infinity == b->infinity); - if (a->infinity) { - return; - } - CHECK(secp256k1_fe_equal_var(&a->x, &b->x)); - CHECK(secp256k1_fe_equal_var(&b->y, &b->y)); -} - -void ge_equals_gej(const secp256k1_ge_t *a, const secp256k1_gej_t *b) { - secp256k1_fe_t z2s; - secp256k1_fe_t u1, u2, s1, s2; - CHECK(a->infinity == b->infinity); - if (a->infinity) { - return; - } - /* Check a.x * b.z^2 == b.x && a.y * b.z^3 == b.y, to avoid inverses. */ - secp256k1_fe_sqr(&z2s, &b->z); - secp256k1_fe_mul(&u1, &a->x, &z2s); - u2 = b->x; secp256k1_fe_normalize_weak(&u2); - secp256k1_fe_mul(&s1, &a->y, &z2s); secp256k1_fe_mul(&s1, &s1, &b->z); - s2 = b->y; secp256k1_fe_normalize_weak(&s2); - CHECK(secp256k1_fe_equal_var(&u1, &u2)); - CHECK(secp256k1_fe_equal_var(&s1, &s2)); -} - -void test_ge(void) { - int i, i1; - int runs = 4; - /* Points: (infinity, p1, p1, -p1, -p1, p2, p2, -p2, -p2, p3, p3, -p3, -p3, p4, p4, -p4, -p4). - * The second in each pair of identical points uses a random Z coordinate in the Jacobian form. - * All magnitudes are randomized. - * All 17*17 combinations of points are added to eachother, using all applicable methods. - */ - secp256k1_ge_t *ge = (secp256k1_ge_t *)malloc(sizeof(secp256k1_ge_t) * (1 + 4 * runs)); - secp256k1_gej_t *gej = (secp256k1_gej_t *)malloc(sizeof(secp256k1_gej_t) * (1 + 4 * runs)); - secp256k1_gej_set_infinity(&gej[0]); - secp256k1_ge_clear(&ge[0]); - secp256k1_ge_set_gej_var(&ge[0], &gej[0]); - for (i = 0; i < runs; i++) { - int j; - secp256k1_ge_t g; - random_group_element_test(&g); - ge[1 + 4 * i] = g; - ge[2 + 4 * i] = g; - secp256k1_ge_neg(&ge[3 + 4 * i], &g); - secp256k1_ge_neg(&ge[4 + 4 * i], &g); - secp256k1_gej_set_ge(&gej[1 + 4 * i], &ge[1 + 4 * i]); - random_group_element_jacobian_test(&gej[2 + 4 * i], &ge[2 + 4 * i]); - secp256k1_gej_set_ge(&gej[3 + 4 * i], &ge[3 + 4 * i]); - random_group_element_jacobian_test(&gej[4 + 4 * i], &ge[4 + 4 * i]); - for (j = 0; j < 4; j++) { - random_field_element_magnitude(&ge[1 + j + 4 * i].x); - random_field_element_magnitude(&ge[1 + j + 4 * i].y); - random_field_element_magnitude(&gej[1 + j + 4 * i].x); - random_field_element_magnitude(&gej[1 + j + 4 * i].y); - random_field_element_magnitude(&gej[1 + j + 4 * i].z); - } - } - - for (i1 = 0; i1 < 1 + 4 * runs; i1++) { - int i2; - for (i2 = 0; i2 < 1 + 4 * runs; i2++) { - /* Compute reference result using gej + gej (var). */ - secp256k1_gej_t refj, resj; - secp256k1_ge_t ref; - secp256k1_gej_add_var(&refj, &gej[i1], &gej[i2]); - secp256k1_ge_set_gej_var(&ref, &refj); - - /* Test gej + ge (var). */ - secp256k1_gej_add_ge_var(&resj, &gej[i1], &ge[i2]); - ge_equals_gej(&ref, &resj); - - /* Test gej + ge (const). */ - if (i2 != 0) { - /* secp256k1_gej_add_ge does not support its second argument being infinity. */ - secp256k1_gej_add_ge(&resj, &gej[i1], &ge[i2]); - ge_equals_gej(&ref, &resj); - } - - /* Test doubling (var). */ - if ((i1 == 0 && i2 == 0) || ((i1 + 3)/4 == (i2 + 3)/4 && ((i1 + 3)%4)/2 == ((i2 + 3)%4)/2)) { - /* Normal doubling. */ - secp256k1_gej_double_var(&resj, &gej[i1]); - ge_equals_gej(&ref, &resj); - secp256k1_gej_double_var(&resj, &gej[i2]); - ge_equals_gej(&ref, &resj); - } - - /* Test adding opposites. */ - if ((i1 == 0 && i2 == 0) || ((i1 + 3)/4 == (i2 + 3)/4 && ((i1 + 3)%4)/2 != ((i2 + 3)%4)/2)) { - CHECK(secp256k1_ge_is_infinity(&ref)); - } - - /* Test adding infinity. */ - if (i1 == 0) { - CHECK(secp256k1_ge_is_infinity(&ge[i1])); - CHECK(secp256k1_gej_is_infinity(&gej[i1])); - ge_equals_gej(&ref, &gej[i2]); - } - if (i2 == 0) { - CHECK(secp256k1_ge_is_infinity(&ge[i2])); - CHECK(secp256k1_gej_is_infinity(&gej[i2])); - ge_equals_gej(&ref, &gej[i1]); - } - } - } - - /* Test adding all points together in random order equals infinity. */ - { - secp256k1_gej_t sum = SECP256K1_GEJ_CONST_INFINITY; - secp256k1_gej_t *gej_shuffled = (secp256k1_gej_t *)malloc((4 * runs + 1) * sizeof(secp256k1_gej_t)); - for (i = 0; i < 4 * runs + 1; i++) { - gej_shuffled[i] = gej[i]; - } - for (i = 0; i < 4 * runs + 1; i++) { - int swap = i + secp256k1_rand32() % (4 * runs + 1 - i); - if (swap != i) { - secp256k1_gej_t t = gej_shuffled[i]; - gej_shuffled[i] = gej_shuffled[swap]; - gej_shuffled[swap] = t; - } - } - for (i = 0; i < 4 * runs + 1; i++) { - secp256k1_gej_add_var(&sum, &sum, &gej_shuffled[i]); - } - CHECK(secp256k1_gej_is_infinity(&sum)); - free(gej_shuffled); - } - - /* Test batch gej -> ge conversion. */ - { - secp256k1_ge_t *ge_set_all = (secp256k1_ge_t *)malloc((4 * runs + 1) * sizeof(secp256k1_ge_t)); - secp256k1_ge_set_all_gej_var(4 * runs + 1, ge_set_all, gej); - for (i = 0; i < 4 * runs + 1; i++) { - ge_equals_gej(&ge_set_all[i], &gej[i]); - } - free(ge_set_all); - } - - free(ge); - free(gej); -} - -void run_ge(void) { - int i; - for (i = 0; i < count * 32; i++) { - test_ge(); - } -} - -/***** ECMULT TESTS *****/ - -void run_ecmult_chain(void) { - /* random starting point A (on the curve) */ - secp256k1_gej_t a = SECP256K1_GEJ_CONST( - 0x8b30bbe9, 0xae2a9906, 0x96b22f67, 0x0709dff3, - 0x727fd8bc, 0x04d3362c, 0x6c7bf458, 0xe2846004, - 0xa357ae91, 0x5c4a6528, 0x1309edf2, 0x0504740f, - 0x0eb33439, 0x90216b4f, 0x81063cb6, 0x5f2f7e0f - ); - /* two random initial factors xn and gn */ - secp256k1_scalar_t xn = SECP256K1_SCALAR_CONST( - 0x84cc5452, 0xf7fde1ed, 0xb4d38a8c, 0xe9b1b84c, - 0xcef31f14, 0x6e569be9, 0x705d357a, 0x42985407 - ); - secp256k1_scalar_t gn = SECP256K1_SCALAR_CONST( - 0xa1e58d22, 0x553dcd42, 0xb2398062, 0x5d4c57a9, - 0x6e9323d4, 0x2b3152e5, 0xca2c3990, 0xedc7c9de - ); - /* two small multipliers to be applied to xn and gn in every iteration: */ - static const secp256k1_scalar_t xf = SECP256K1_SCALAR_CONST(0, 0, 0, 0, 0, 0, 0, 0x1337); - static const secp256k1_scalar_t gf = SECP256K1_SCALAR_CONST(0, 0, 0, 0, 0, 0, 0, 0x7113); - /* accumulators with the resulting coefficients to A and G */ - secp256k1_scalar_t ae = SECP256K1_SCALAR_CONST(0, 0, 0, 0, 0, 0, 0, 1); - secp256k1_scalar_t ge = SECP256K1_SCALAR_CONST(0, 0, 0, 0, 0, 0, 0, 0); - /* actual points */ - secp256k1_gej_t x = a; - secp256k1_gej_t x2; - int i; - - /* the point being computed */ - x = a; - for (i = 0; i < 200*count; i++) { - /* in each iteration, compute X = xn*X + gn*G; */ - secp256k1_ecmult(&x, &x, &xn, &gn); - /* also compute ae and ge: the actual accumulated factors for A and G */ - /* if X was (ae*A+ge*G), xn*X + gn*G results in (xn*ae*A + (xn*ge+gn)*G) */ - secp256k1_scalar_mul(&ae, &ae, &xn); - secp256k1_scalar_mul(&ge, &ge, &xn); - secp256k1_scalar_add(&ge, &ge, &gn); - /* modify xn and gn */ - secp256k1_scalar_mul(&xn, &xn, &xf); - secp256k1_scalar_mul(&gn, &gn, &gf); - - /* verify */ - if (i == 19999) { - /* expected result after 19999 iterations */ - secp256k1_gej_t rp = SECP256K1_GEJ_CONST( - 0xD6E96687, 0xF9B10D09, 0x2A6F3543, 0x9D86CEBE, - 0xA4535D0D, 0x409F5358, 0x6440BD74, 0xB933E830, - 0xB95CBCA2, 0xC77DA786, 0x539BE8FD, 0x53354D2D, - 0x3B4F566A, 0xE6580454, 0x07ED6015, 0xEE1B2A88 - ); - - secp256k1_gej_neg(&rp, &rp); - secp256k1_gej_add_var(&rp, &rp, &x); - CHECK(secp256k1_gej_is_infinity(&rp)); - } - } - /* redo the computation, but directly with the resulting ae and ge coefficients: */ - secp256k1_ecmult(&x2, &a, &ae, &ge); - secp256k1_gej_neg(&x2, &x2); - secp256k1_gej_add_var(&x2, &x2, &x); - CHECK(secp256k1_gej_is_infinity(&x2)); -} - -void test_point_times_order(const secp256k1_gej_t *point) { - /* X * (point + G) + (order-X) * (pointer + G) = 0 */ - secp256k1_scalar_t x; - secp256k1_scalar_t nx; - secp256k1_gej_t res1, res2; - secp256k1_ge_t res3; - unsigned char pub[65]; - int psize = 65; - random_scalar_order_test(&x); - secp256k1_scalar_negate(&nx, &x); - secp256k1_ecmult(&res1, point, &x, &x); /* calc res1 = x * point + x * G; */ - secp256k1_ecmult(&res2, point, &nx, &nx); /* calc res2 = (order - x) * point + (order - x) * G; */ - secp256k1_gej_add_var(&res1, &res1, &res2); - CHECK(secp256k1_gej_is_infinity(&res1)); - CHECK(secp256k1_gej_is_valid_var(&res1) == 0); - secp256k1_ge_set_gej(&res3, &res1); - CHECK(secp256k1_ge_is_infinity(&res3)); - CHECK(secp256k1_ge_is_valid_var(&res3) == 0); - CHECK(secp256k1_eckey_pubkey_serialize(&res3, pub, &psize, 0) == 0); - psize = 65; - CHECK(secp256k1_eckey_pubkey_serialize(&res3, pub, &psize, 1) == 0); -} - -void run_point_times_order(void) { - int i; - secp256k1_fe_t x = SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 2); - static const secp256k1_fe_t xr = SECP256K1_FE_CONST( - 0x7603CB59, 0xB0EF6C63, 0xFE608479, 0x2A0C378C, - 0xDB3233A8, 0x0F8A9A09, 0xA877DEAD, 0x31B38C45 - ); - for (i = 0; i < 500; i++) { - secp256k1_ge_t p; - if (secp256k1_ge_set_xo_var(&p, &x, 1)) { - secp256k1_gej_t j; - CHECK(secp256k1_ge_is_valid_var(&p)); - secp256k1_gej_set_ge(&j, &p); - CHECK(secp256k1_gej_is_valid_var(&j)); - test_point_times_order(&j); - } - secp256k1_fe_sqr(&x, &x); - } - secp256k1_fe_normalize_var(&x); - CHECK(secp256k1_fe_equal_var(&x, &xr)); -} - -void test_wnaf(const secp256k1_scalar_t *number, int w) { - secp256k1_scalar_t x, two, t; - int wnaf[256]; - int zeroes = -1; - int i; - int bits; - secp256k1_scalar_set_int(&x, 0); - secp256k1_scalar_set_int(&two, 2); - bits = secp256k1_ecmult_wnaf(wnaf, number, w); - CHECK(bits <= 256); - for (i = bits-1; i >= 0; i--) { - int v = wnaf[i]; - secp256k1_scalar_mul(&x, &x, &two); - if (v) { - CHECK(zeroes == -1 || zeroes >= w-1); /* check that distance between non-zero elements is at least w-1 */ - zeroes=0; - CHECK((v & 1) == 1); /* check non-zero elements are odd */ - CHECK(v <= (1 << (w-1)) - 1); /* check range below */ - CHECK(v >= -(1 << (w-1)) - 1); /* check range above */ - } else { - CHECK(zeroes != -1); /* check that no unnecessary zero padding exists */ - zeroes++; - } - if (v >= 0) { - secp256k1_scalar_set_int(&t, v); - } else { - secp256k1_scalar_set_int(&t, -v); - secp256k1_scalar_negate(&t, &t); - } - secp256k1_scalar_add(&x, &x, &t); - } - CHECK(secp256k1_scalar_eq(&x, number)); /* check that wnaf represents number */ -} - -void run_wnaf(void) { - int i; - secp256k1_scalar_t n; - for (i = 0; i < count; i++) { - random_scalar_order(&n); - test_wnaf(&n, 4+(i%10)); - } -} - -void random_sign(secp256k1_ecdsa_sig_t *sig, const secp256k1_scalar_t *key, const secp256k1_scalar_t *msg, int *recid) { - secp256k1_scalar_t nonce; - do { - random_scalar_order_test(&nonce); - } while(!secp256k1_ecdsa_sig_sign(sig, key, msg, &nonce, recid)); -} - -void test_ecdsa_sign_verify(void) { - secp256k1_gej_t pubj; - secp256k1_ge_t pub; - secp256k1_scalar_t one; - secp256k1_scalar_t msg, key; - secp256k1_ecdsa_sig_t sig; - int recid; - int getrec; - random_scalar_order_test(&msg); - random_scalar_order_test(&key); - secp256k1_ecmult_gen(&pubj, &key); - secp256k1_ge_set_gej(&pub, &pubj); - getrec = secp256k1_rand32()&1; - random_sign(&sig, &key, &msg, getrec?&recid:NULL); - if (getrec) { - CHECK(recid >= 0 && recid < 4); - } - CHECK(secp256k1_ecdsa_sig_verify(&sig, &pub, &msg)); - secp256k1_scalar_set_int(&one, 1); - secp256k1_scalar_add(&msg, &msg, &one); - CHECK(!secp256k1_ecdsa_sig_verify(&sig, &pub, &msg)); -} - -void run_ecdsa_sign_verify(void) { - int i; - for (i = 0; i < 10*count; i++) { - test_ecdsa_sign_verify(); - } -} - -/** Dummy nonce generation function that just uses a precomputed nonce, and fails if it is not accepted. Use only for testing. */ -static int precomputed_nonce_function(unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, unsigned int counter, const void *data) { - (void)msg32; - (void)key32; - memcpy(nonce32, data, 32); - return (counter == 0); -} - -static int nonce_function_test_fail(unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, unsigned int counter, const void *data) { - /* Dummy nonce generator that has a fatal error on the first counter value. */ - if (counter == 0) { - return 0; - } - return nonce_function_rfc6979(nonce32, msg32, key32, counter - 1, data); -} - -static int nonce_function_test_retry(unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, unsigned int counter, const void *data) { - /* Dummy nonce generator that produces unacceptable nonces for the first several counter values. */ - if (counter < 3) { - memset(nonce32, counter==0 ? 0 : 255, 32); - if (counter == 2) { - nonce32[31]--; - } - return 1; - } - if (counter < 5) { - static const unsigned char order[] = { - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE, - 0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B, - 0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x41 - }; - memcpy(nonce32, order, 32); - if (counter == 4) { - nonce32[31]++; - } - return 1; - } - /* Retry rate of 6979 is negligible esp. as we only call this in determinstic tests. */ - /* If someone does fine a case where it retries for secp256k1, we'd like to know. */ - if (counter > 5) { - return 0; - } - return nonce_function_rfc6979(nonce32, msg32, key32, counter - 5, data); -} - -int is_empty_compact_signature(const unsigned char *sig64) { - static const unsigned char res[64] = {0}; - return memcmp(sig64, res, 64) == 0; -} - -void test_ecdsa_end_to_end(void) { - unsigned char extra[32] = {0x00}; - unsigned char privkey[32]; - unsigned char message[32]; - unsigned char privkey2[32]; - unsigned char csignature[64]; - unsigned char signature[72]; - unsigned char signature2[72]; - unsigned char signature3[72]; - unsigned char signature4[72]; - unsigned char pubkey[65]; - unsigned char recpubkey[65]; - unsigned char seckey[300]; - int signaturelen = 72; - int signaturelen2 = 72; - int signaturelen3 = 72; - int signaturelen4 = 72; - int recid = 0; - int recpubkeylen = 0; - int pubkeylen = 65; - int seckeylen = 300; - - /* Generate a random key and message. */ - { - secp256k1_scalar_t msg, key; - random_scalar_order_test(&msg); - random_scalar_order_test(&key); - secp256k1_scalar_get_b32(privkey, &key); - secp256k1_scalar_get_b32(message, &msg); - } - - /* Construct and verify corresponding public key. */ - CHECK(secp256k1_ec_seckey_verify(privkey) == 1); - CHECK(secp256k1_ec_pubkey_create(pubkey, &pubkeylen, privkey, (secp256k1_rand32() & 3) != 0) == 1); - if (secp256k1_rand32() & 1) { - CHECK(secp256k1_ec_pubkey_decompress(pubkey, &pubkeylen)); - } - CHECK(secp256k1_ec_pubkey_verify(pubkey, pubkeylen)); - - /* Verify private key import and export. */ - CHECK(secp256k1_ec_privkey_export(privkey, seckey, &seckeylen, secp256k1_rand32() % 2) == 1); - CHECK(secp256k1_ec_privkey_import(privkey2, seckey, seckeylen) == 1); - CHECK(memcmp(privkey, privkey2, 32) == 0); - - /* Optionally tweak the keys using addition. */ - if (secp256k1_rand32() % 3 == 0) { - int ret1; - int ret2; - unsigned char rnd[32]; - unsigned char pubkey2[65]; - int pubkeylen2 = 65; - secp256k1_rand256_test(rnd); - ret1 = secp256k1_ec_privkey_tweak_add(privkey, rnd); - ret2 = secp256k1_ec_pubkey_tweak_add(pubkey, pubkeylen, rnd); - CHECK(ret1 == ret2); - if (ret1 == 0) { - return; - } - CHECK(secp256k1_ec_pubkey_create(pubkey2, &pubkeylen2, privkey, pubkeylen == 33) == 1); - CHECK(memcmp(pubkey, pubkey2, pubkeylen) == 0); - } - - /* Optionally tweak the keys using multiplication. */ - if (secp256k1_rand32() % 3 == 0) { - int ret1; - int ret2; - unsigned char rnd[32]; - unsigned char pubkey2[65]; - int pubkeylen2 = 65; - secp256k1_rand256_test(rnd); - ret1 = secp256k1_ec_privkey_tweak_mul(privkey, rnd); - ret2 = secp256k1_ec_pubkey_tweak_mul(pubkey, pubkeylen, rnd); - CHECK(ret1 == ret2); - if (ret1 == 0) { - return; - } - CHECK(secp256k1_ec_pubkey_create(pubkey2, &pubkeylen2, privkey, pubkeylen == 33) == 1); - CHECK(memcmp(pubkey, pubkey2, pubkeylen) == 0); - } - - /* Sign. */ - CHECK(secp256k1_ecdsa_sign(message, signature, &signaturelen, privkey, NULL, NULL) == 1); - CHECK(signaturelen > 0); - CHECK(secp256k1_ecdsa_sign(message, signature2, &signaturelen2, privkey, NULL, extra) == 1); - CHECK(signaturelen2 > 0); - extra[31] = 1; - CHECK(secp256k1_ecdsa_sign(message, signature3, &signaturelen3, privkey, NULL, extra) == 1); - CHECK(signaturelen3 > 0); - extra[31] = 0; - extra[0] = 1; - CHECK(secp256k1_ecdsa_sign(message, signature4, &signaturelen4, privkey, NULL, extra) == 1); - CHECK(signaturelen3 > 0); - CHECK((signaturelen != signaturelen2) || (memcmp(signature, signature2, signaturelen) != 0)); - CHECK((signaturelen != signaturelen3) || (memcmp(signature, signature3, signaturelen) != 0)); - CHECK((signaturelen3 != signaturelen2) || (memcmp(signature3, signature2, signaturelen3) != 0)); - CHECK((signaturelen4 != signaturelen3) || (memcmp(signature4, signature3, signaturelen4) != 0)); - CHECK((signaturelen4 != signaturelen2) || (memcmp(signature4, signature2, signaturelen4) != 0)); - CHECK((signaturelen4 != signaturelen) || (memcmp(signature4, signature, signaturelen4) != 0)); - /* Verify. */ - CHECK(secp256k1_ecdsa_verify(message, signature, signaturelen, pubkey, pubkeylen) == 1); - CHECK(secp256k1_ecdsa_verify(message, signature2, signaturelen2, pubkey, pubkeylen) == 1); - CHECK(secp256k1_ecdsa_verify(message, signature3, signaturelen3, pubkey, pubkeylen) == 1); - CHECK(secp256k1_ecdsa_verify(message, signature4, signaturelen4, pubkey, pubkeylen) == 1); - /* Destroy signature and verify again. */ - signature[signaturelen - 1 - secp256k1_rand32() % 20] += 1 + (secp256k1_rand32() % 255); - CHECK(secp256k1_ecdsa_verify(message, signature, signaturelen, pubkey, pubkeylen) != 1); - - /* Compact sign. */ - CHECK(secp256k1_ecdsa_sign_compact(message, csignature, privkey, NULL, NULL, &recid) == 1); - CHECK(!is_empty_compact_signature(csignature)); - /* Recover. */ - CHECK(secp256k1_ecdsa_recover_compact(message, csignature, recpubkey, &recpubkeylen, pubkeylen == 33, recid) == 1); - CHECK(recpubkeylen == pubkeylen); - CHECK(memcmp(pubkey, recpubkey, pubkeylen) == 0); - /* Destroy signature and verify again. */ - csignature[secp256k1_rand32() % 64] += 1 + (secp256k1_rand32() % 255); - CHECK(secp256k1_ecdsa_recover_compact(message, csignature, recpubkey, &recpubkeylen, pubkeylen == 33, recid) != 1 || - memcmp(pubkey, recpubkey, pubkeylen) != 0); - CHECK(recpubkeylen == pubkeylen); - -} - -void test_random_pubkeys(void) { - secp256k1_ge_t elem; - secp256k1_ge_t elem2; - unsigned char in[65]; - /* Generate some randomly sized pubkeys. */ - uint32_t r = secp256k1_rand32(); - int len = (r & 3) == 0 ? 65 : 33; - r>>=2; - if ((r & 3) == 0) { - len = (r & 252) >> 3; - } - r>>=8; - if (len == 65) { - in[0] = (r & 2) ? 4 : (r & 1? 6 : 7); - } else { - in[0] = (r & 1) ? 2 : 3; - } - r>>=2; - if ((r & 7) == 0) { - in[0] = (r & 2040) >> 3; - } - r>>=11; - if (len > 1) { - secp256k1_rand256(&in[1]); - } - if (len > 33) { - secp256k1_rand256(&in[33]); - } - if (secp256k1_eckey_pubkey_parse(&elem, in, len)) { - unsigned char out[65]; - unsigned char firstb; - int res; - int size = len; - firstb = in[0]; - /* If the pubkey can be parsed, it should round-trip... */ - CHECK(secp256k1_eckey_pubkey_serialize(&elem, out, &size, len == 33)); - CHECK(size == len); - CHECK(memcmp(&in[1], &out[1], len-1) == 0); - /* ... except for the type of hybrid inputs. */ - if ((in[0] != 6) && (in[0] != 7)) { - CHECK(in[0] == out[0]); - } - size = 65; - CHECK(secp256k1_eckey_pubkey_serialize(&elem, in, &size, 0)); - CHECK(size == 65); - CHECK(secp256k1_eckey_pubkey_parse(&elem2, in, size)); - ge_equals_ge(&elem,&elem2); - /* Check that the X9.62 hybrid type is checked. */ - in[0] = (r & 1) ? 6 : 7; - res = secp256k1_eckey_pubkey_parse(&elem2, in, size); - if (firstb == 2 || firstb == 3) { - if (in[0] == firstb + 4) { - CHECK(res); - } else { - CHECK(!res); - } - } - if (res) { - ge_equals_ge(&elem,&elem2); - CHECK(secp256k1_eckey_pubkey_serialize(&elem, out, &size, 0)); - CHECK(memcmp(&in[1], &out[1], 64) == 0); - } - } -} - -void run_random_pubkeys(void) { - int i; - for (i = 0; i < 10*count; i++) { - test_random_pubkeys(); - } -} - -void run_ecdsa_end_to_end(void) { - int i; - for (i = 0; i < 64*count; i++) { - test_ecdsa_end_to_end(); - } -} - -/* Tests several edge cases. */ -void test_ecdsa_edge_cases(void) { - const unsigned char msg32[32] = { - 'T', 'h', 'i', 's', ' ', 'i', 's', ' ', - 'a', ' ', 'v', 'e', 'r', 'y', ' ', 's', - 'e', 'c', 'r', 'e', 't', ' ', 'm', 'e', - 's', 's', 'a', 'g', 'e', '.', '.', '.' - }; - const unsigned char sig64[64] = { - /* Generated by signing the above message with nonce 'This is the nonce we will use...' - * and secret key 0 (which is not valid), resulting in recid 0. */ - 0x67, 0xCB, 0x28, 0x5F, 0x9C, 0xD1, 0x94, 0xE8, - 0x40, 0xD6, 0x29, 0x39, 0x7A, 0xF5, 0x56, 0x96, - 0x62, 0xFD, 0xE4, 0x46, 0x49, 0x99, 0x59, 0x63, - 0x17, 0x9A, 0x7D, 0xD1, 0x7B, 0xD2, 0x35, 0x32, - 0x4B, 0x1B, 0x7D, 0xF3, 0x4C, 0xE1, 0xF6, 0x8E, - 0x69, 0x4F, 0xF6, 0xF1, 0x1A, 0xC7, 0x51, 0xDD, - 0x7D, 0xD7, 0x3E, 0x38, 0x7E, 0xE4, 0xFC, 0x86, - 0x6E, 0x1B, 0xE8, 0xEC, 0xC7, 0xDD, 0x95, 0x57 - }; - unsigned char pubkey[65]; - int t; - int pubkeylen = 65; - /* signature (r,s) = (4,4), which can be recovered with all 4 recids. */ - const unsigned char sigb64[64] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, - }; - unsigned char pubkeyb[33]; - int pubkeyblen = 33; - int recid; - - CHECK(!secp256k1_ecdsa_recover_compact(msg32, sig64, pubkey, &pubkeylen, 0, 0)); - CHECK(secp256k1_ecdsa_recover_compact(msg32, sig64, pubkey, &pubkeylen, 0, 1)); - CHECK(!secp256k1_ecdsa_recover_compact(msg32, sig64, pubkey, &pubkeylen, 0, 2)); - CHECK(!secp256k1_ecdsa_recover_compact(msg32, sig64, pubkey, &pubkeylen, 0, 3)); - - for (recid = 0; recid < 4; recid++) { - int i; - int recid2; - /* (4,4) encoded in DER. */ - unsigned char sigbder[8] = {0x30, 0x06, 0x02, 0x01, 0x04, 0x02, 0x01, 0x04}; - unsigned char sigcder_zr[7] = {0x30, 0x05, 0x02, 0x00, 0x02, 0x01, 0x01}; - unsigned char sigcder_zs[7] = {0x30, 0x05, 0x02, 0x01, 0x01, 0x02, 0x00}; - unsigned char sigbderalt1[39] = { - 0x30, 0x25, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0x04, - }; - unsigned char sigbderalt2[39] = { - 0x30, 0x25, 0x02, 0x01, 0x04, 0x02, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, - }; - unsigned char sigbderalt3[40] = { - 0x30, 0x26, 0x02, 0x21, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0x04, - }; - unsigned char sigbderalt4[40] = { - 0x30, 0x26, 0x02, 0x01, 0x04, 0x02, 0x21, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, - }; - /* (order + r,4) encoded in DER. */ - unsigned char sigbderlong[40] = { - 0x30, 0x26, 0x02, 0x21, 0x00, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBA, 0xAE, 0xDC, - 0xE6, 0xAF, 0x48, 0xA0, 0x3B, 0xBF, 0xD2, 0x5E, - 0x8C, 0xD0, 0x36, 0x41, 0x45, 0x02, 0x01, 0x04 - }; - CHECK(secp256k1_ecdsa_recover_compact(msg32, sigb64, pubkeyb, &pubkeyblen, 1, recid)); - CHECK(secp256k1_ecdsa_verify(msg32, sigbder, sizeof(sigbder), pubkeyb, pubkeyblen) == 1); - for (recid2 = 0; recid2 < 4; recid2++) { - unsigned char pubkey2b[33]; - int pubkey2blen = 33; - CHECK(secp256k1_ecdsa_recover_compact(msg32, sigb64, pubkey2b, &pubkey2blen, 1, recid2)); - /* Verifying with (order + r,4) should always fail. */ - CHECK(secp256k1_ecdsa_verify(msg32, sigbderlong, sizeof(sigbderlong), pubkey2b, pubkey2blen) != 1); - } - /* DER parsing tests. */ - /* Zero length r/s. */ - CHECK(secp256k1_ecdsa_verify(msg32, sigcder_zr, sizeof(sigcder_zr), pubkeyb, pubkeyblen) == -2); - CHECK(secp256k1_ecdsa_verify(msg32, sigcder_zs, sizeof(sigcder_zs), pubkeyb, pubkeyblen) == -2); - /* Leading zeros. */ - CHECK(secp256k1_ecdsa_verify(msg32, sigbderalt1, sizeof(sigbderalt1), pubkeyb, pubkeyblen) == 1); - CHECK(secp256k1_ecdsa_verify(msg32, sigbderalt2, sizeof(sigbderalt2), pubkeyb, pubkeyblen) == 1); - CHECK(secp256k1_ecdsa_verify(msg32, sigbderalt3, sizeof(sigbderalt3), pubkeyb, pubkeyblen) == 1); - CHECK(secp256k1_ecdsa_verify(msg32, sigbderalt4, sizeof(sigbderalt4), pubkeyb, pubkeyblen) == 1); - sigbderalt3[4] = 1; - CHECK(secp256k1_ecdsa_verify(msg32, sigbderalt3, sizeof(sigbderalt3), pubkeyb, pubkeyblen) == -2); - sigbderalt4[7] = 1; - CHECK(secp256k1_ecdsa_verify(msg32, sigbderalt4, sizeof(sigbderalt4), pubkeyb, pubkeyblen) == -2); - /* Damage signature. */ - sigbder[7]++; - CHECK(secp256k1_ecdsa_verify(msg32, sigbder, sizeof(sigbder), pubkeyb, pubkeyblen) == 0); - sigbder[7]--; - CHECK(secp256k1_ecdsa_verify(msg32, sigbder, 6, pubkeyb, pubkeyblen) == -2); - CHECK(secp256k1_ecdsa_verify(msg32, sigbder, sizeof(sigbder)-1, pubkeyb, pubkeyblen) == -2); - for(i = 0; i < 8; i++) { - int c; - unsigned char orig = sigbder[i]; - /*Try every single-byte change.*/ - for (c = 0; c < 256; c++) { - if (c == orig ) { - continue; - } - sigbder[i] = c; - CHECK(secp256k1_ecdsa_verify(msg32, sigbder, sizeof(sigbder), pubkeyb, pubkeyblen) == - (i==4 || i==7) ? 0 : -2 ); - } - sigbder[i] = orig; - } - } - - /* Test the case where ECDSA recomputes a point that is infinity. */ - { - secp256k1_gej_t keyj; - secp256k1_ge_t key; - secp256k1_scalar_t msg; - secp256k1_ecdsa_sig_t sig; - secp256k1_scalar_set_int(&sig.s, 1); - secp256k1_scalar_negate(&sig.s, &sig.s); - secp256k1_scalar_inverse(&sig.s, &sig.s); - secp256k1_scalar_set_int(&sig.r, 1); - secp256k1_ecmult_gen(&keyj, &sig.r); - secp256k1_ge_set_gej(&key, &keyj); - msg = sig.s; - CHECK(secp256k1_ecdsa_sig_verify(&sig, &key, &msg) == 0); - } - - /* Test r/s equal to zero */ - { - /* (1,1) encoded in DER. */ - unsigned char sigcder[8] = {0x30, 0x06, 0x02, 0x01, 0x01, 0x02, 0x01, 0x01}; - unsigned char sigc64[64] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - }; - unsigned char pubkeyc[65]; - int pubkeyclen = 65; - CHECK(secp256k1_ecdsa_recover_compact(msg32, sigc64, pubkeyc, &pubkeyclen, 0, 0) == 1); - CHECK(secp256k1_ecdsa_verify(msg32, sigcder, sizeof(sigcder), pubkeyc, pubkeyclen) == 1); - sigcder[4] = 0; - sigc64[31] = 0; - CHECK(secp256k1_ecdsa_recover_compact(msg32, sigc64, pubkeyb, &pubkeyblen, 1, 0) == 0); - CHECK(secp256k1_ecdsa_verify(msg32, sigcder, sizeof(sigcder), pubkeyc, pubkeyclen) == 0); - sigcder[4] = 1; - sigcder[7] = 0; - sigc64[31] = 1; - sigc64[63] = 0; - CHECK(secp256k1_ecdsa_recover_compact(msg32, sigc64, pubkeyb, &pubkeyblen, 1, 0) == 0); - CHECK(secp256k1_ecdsa_verify(msg32, sigcder, sizeof(sigcder), pubkeyc, pubkeyclen) == 0); - } - - /*Signature where s would be zero.*/ - { - const unsigned char nonce[32] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - }; - static const unsigned char nonce2[32] = { - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE, - 0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B, - 0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x40 - }; - const unsigned char key[32] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - }; - unsigned char msg[32] = { - 0x86, 0x41, 0x99, 0x81, 0x06, 0x23, 0x44, 0x53, - 0xaa, 0x5f, 0x9d, 0x6a, 0x31, 0x78, 0xf4, 0xf7, - 0xb8, 0x12, 0xe0, 0x0b, 0x81, 0x7a, 0x77, 0x62, - 0x65, 0xdf, 0xdd, 0x31, 0xb9, 0x3e, 0x29, 0xa9, - }; - unsigned char sig[72]; - int siglen = 72; - CHECK(secp256k1_ecdsa_sign(msg, sig, &siglen, key, precomputed_nonce_function, nonce) == 0); - CHECK(siglen == 0); - CHECK(secp256k1_ecdsa_sign(msg, sig, &siglen, key, precomputed_nonce_function, nonce2) == 0); - CHECK(siglen == 0); - msg[31] = 0xaa; - siglen = 72; - CHECK(secp256k1_ecdsa_sign(msg, sig, &siglen, key, precomputed_nonce_function, nonce) == 1); - CHECK(siglen > 0); - CHECK(secp256k1_ecdsa_sign(msg, sig, &siglen, key, precomputed_nonce_function, nonce2) == 1); - CHECK(siglen > 0); - siglen = 10; - CHECK(secp256k1_ecdsa_sign(msg, sig, &siglen, key, precomputed_nonce_function, nonce) != 1); - CHECK(siglen == 0); - } - - /* Nonce function corner cases. */ - for (t = 0; t < 2; t++) { - static const unsigned char zero[32] = {0x00}; - int i; - unsigned char key[32]; - unsigned char msg[32]; - unsigned char sig[72]; - unsigned char sig2[72]; - secp256k1_ecdsa_sig_t s[512]; - int siglen = 72; - int siglen2 = 72; - int recid2; - const unsigned char *extra; - extra = t == 0 ? NULL : zero; - memset(msg, 0, 32); - msg[31] = 1; - /* High key results in signature failure. */ - memset(key, 0xFF, 32); - CHECK(secp256k1_ecdsa_sign(msg, sig, &siglen, key, NULL, extra) == 0); - CHECK(siglen == 0); - /* Zero key results in signature failure. */ - memset(key, 0, 32); - CHECK(secp256k1_ecdsa_sign(msg, sig, &siglen, key, NULL, extra) == 0); - CHECK(siglen == 0); - /* Nonce function failure results in signature failure. */ - key[31] = 1; - CHECK(secp256k1_ecdsa_sign(msg, sig, &siglen, key, nonce_function_test_fail, extra) == 0); - CHECK(siglen == 0); - CHECK(secp256k1_ecdsa_sign_compact(msg, sig, key, nonce_function_test_fail, extra, &recid) == 0); - CHECK(is_empty_compact_signature(sig)); - /* The retry loop successfully makes its way to the first good value. */ - siglen = 72; - CHECK(secp256k1_ecdsa_sign(msg, sig, &siglen, key, nonce_function_test_retry, extra) == 1); - CHECK(siglen > 0); - CHECK(secp256k1_ecdsa_sign(msg, sig2, &siglen2, key, nonce_function_rfc6979, extra) == 1); - CHECK(siglen > 0); - CHECK((siglen == siglen2) && (memcmp(sig, sig2, siglen) == 0)); - CHECK(secp256k1_ecdsa_sign_compact(msg, sig, key, nonce_function_test_retry, extra, &recid) == 1); - CHECK(!is_empty_compact_signature(sig)); - CHECK(secp256k1_ecdsa_sign_compact(msg, sig2, key, nonce_function_rfc6979, extra, &recid2) == 1); - CHECK(!is_empty_compact_signature(sig2)); - CHECK((recid == recid2) && (memcmp(sig, sig2, 64) == 0)); - /* The default nonce function is determinstic. */ - siglen = 72; - siglen2 = 72; - CHECK(secp256k1_ecdsa_sign(msg, sig, &siglen, key, NULL, extra) == 1); - CHECK(siglen > 0); - CHECK(secp256k1_ecdsa_sign(msg, sig2, &siglen2, key, NULL, extra) == 1); - CHECK(siglen2 > 0); - CHECK((siglen == siglen2) && (memcmp(sig, sig2, siglen) == 0)); - CHECK(secp256k1_ecdsa_sign_compact(msg, sig, key, NULL, extra, &recid) == 1); - CHECK(!is_empty_compact_signature(sig)); - CHECK(secp256k1_ecdsa_sign_compact(msg, sig2, key, NULL, extra, &recid2) == 1); - CHECK(!is_empty_compact_signature(sig)); - CHECK((recid == recid2) && (memcmp(sig, sig2, 64) == 0)); - /* The default nonce function changes output with different messages. */ - for(i = 0; i < 256; i++) { - int j; - siglen2 = 72; - msg[0] = i; - CHECK(secp256k1_ecdsa_sign(msg, sig2, &siglen2, key, NULL, extra) == 1); - CHECK(!is_empty_compact_signature(sig)); - CHECK(secp256k1_ecdsa_sig_parse(&s[i], sig2, siglen2)); - for (j = 0; j < i; j++) { - CHECK(!secp256k1_scalar_eq(&s[i].r, &s[j].r)); - } - } - msg[0] = 0; - msg[31] = 2; - /* The default nonce function changes output with different keys. */ - for(i = 256; i < 512; i++) { - int j; - siglen2 = 72; - key[0] = i - 256; - CHECK(secp256k1_ecdsa_sign(msg, sig2, &siglen2, key, NULL, extra) == 1); - CHECK(secp256k1_ecdsa_sig_parse(&s[i], sig2, siglen2)); - for (j = 0; j < i; j++) { - CHECK(!secp256k1_scalar_eq(&s[i].r, &s[j].r)); - } - } - key[0] = 0; - } - - /* Privkey export where pubkey is the point at infinity. */ - { - unsigned char privkey[300]; - unsigned char seckey[32] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, - 0xba, 0xae, 0xdc, 0xe6, 0xaf, 0x48, 0xa0, 0x3b, - 0xbf, 0xd2, 0x5e, 0x8c, 0xd0, 0x36, 0x41, 0x41, - }; - int outlen = 300; - CHECK(!secp256k1_ec_privkey_export(seckey, privkey, &outlen, 0)); - CHECK(!secp256k1_ec_privkey_export(seckey, privkey, &outlen, 1)); - } -} - -void run_ecdsa_edge_cases(void) { - test_ecdsa_edge_cases(); -} - -#ifdef ENABLE_OPENSSL_TESTS -EC_KEY *get_openssl_key(const secp256k1_scalar_t *key) { - unsigned char privkey[300]; - int privkeylen; - const unsigned char* pbegin = privkey; - int compr = secp256k1_rand32() & 1; - EC_KEY *ec_key = EC_KEY_new_by_curve_name(NID_secp256k1); - CHECK(secp256k1_eckey_privkey_serialize(privkey, &privkeylen, key, compr)); - CHECK(d2i_ECPrivateKey(&ec_key, &pbegin, privkeylen)); - CHECK(EC_KEY_check_key(ec_key)); - return ec_key; -} - -void test_ecdsa_openssl(void) { - secp256k1_gej_t qj; - secp256k1_ge_t q; - secp256k1_ecdsa_sig_t sig; - secp256k1_scalar_t one; - secp256k1_scalar_t msg2; - secp256k1_scalar_t key, msg; - EC_KEY *ec_key; - unsigned int sigsize = 80; - int secp_sigsize = 80; - unsigned char message[32]; - unsigned char signature[80]; - secp256k1_rand256_test(message); - secp256k1_scalar_set_b32(&msg, message, NULL); - random_scalar_order_test(&key); - secp256k1_ecmult_gen(&qj, &key); - secp256k1_ge_set_gej(&q, &qj); - ec_key = get_openssl_key(&key); - CHECK(ec_key); - CHECK(ECDSA_sign(0, message, sizeof(message), signature, &sigsize, ec_key)); - CHECK(secp256k1_ecdsa_sig_parse(&sig, signature, sigsize)); - CHECK(secp256k1_ecdsa_sig_verify(&sig, &q, &msg)); - secp256k1_scalar_set_int(&one, 1); - secp256k1_scalar_add(&msg2, &msg, &one); - CHECK(!secp256k1_ecdsa_sig_verify(&sig, &q, &msg2)); - - random_sign(&sig, &key, &msg, NULL); - CHECK(secp256k1_ecdsa_sig_serialize(signature, &secp_sigsize, &sig)); - CHECK(ECDSA_verify(0, message, sizeof(message), signature, secp_sigsize, ec_key) == 1); - - EC_KEY_free(ec_key); -} - -void run_ecdsa_openssl(void) { - int i; - for (i = 0; i < 10*count; i++) { - test_ecdsa_openssl(); - } -} -#endif - -int main(int argc, char **argv) { - unsigned char seed16[16] = {0}; - unsigned char run32[32] = {0}; - /* find iteration count */ - if (argc > 1) { - count = strtol(argv[1], NULL, 0); - } - - /* find random seed */ - if (argc > 2) { - int pos = 0; - const char* ch = argv[2]; - while (pos < 16 && ch[0] != 0 && ch[1] != 0) { - unsigned short sh; - if (sscanf(ch, "%2hx", &sh)) { - seed16[pos] = sh; - } else { - break; - } - ch += 2; - pos++; - } - } else { - FILE *frand = fopen("/dev/urandom", "r"); - if (!frand || !fread(&seed16, sizeof(seed16), 1, frand)) { - uint64_t t = time(NULL) * (uint64_t)1337; - seed16[0] ^= t; - seed16[1] ^= t >> 8; - seed16[2] ^= t >> 16; - seed16[3] ^= t >> 24; - seed16[4] ^= t >> 32; - seed16[5] ^= t >> 40; - seed16[6] ^= t >> 48; - seed16[7] ^= t >> 56; - } - fclose(frand); - } - secp256k1_rand_seed(seed16); - - printf("test count = %i\n", count); - printf("random seed = %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n", seed16[0], seed16[1], seed16[2], seed16[3], seed16[4], seed16[5], seed16[6], seed16[7], seed16[8], seed16[9], seed16[10], seed16[11], seed16[12], seed16[13], seed16[14], seed16[15]); - - /* initialize */ - secp256k1_start(SECP256K1_START_SIGN | SECP256K1_START_VERIFY); - - /* initializing a second time shouldn't cause any harm or memory leaks. */ - secp256k1_start(SECP256K1_START_SIGN | SECP256K1_START_VERIFY); - - run_sha256_tests(); - run_hmac_sha256_tests(); - run_rfc6979_hmac_sha256_tests(); - -#ifndef USE_NUM_NONE - /* num tests */ - run_num_smalltests(); -#endif - - /* scalar tests */ - run_scalar_tests(); - - /* field tests */ - run_field_inv(); - run_field_inv_var(); - run_field_inv_all_var(); - run_field_misc(); - run_field_convert(); - run_sqr(); - run_sqrt(); - - /* group tests */ - run_ge(); - - /* ecmult tests */ - run_wnaf(); - run_point_times_order(); - run_ecmult_chain(); - - /* ecdsa tests */ - run_random_pubkeys(); - run_ecdsa_sign_verify(); - run_ecdsa_end_to_end(); - run_ecdsa_edge_cases(); -#ifdef ENABLE_OPENSSL_TESTS - run_ecdsa_openssl(); -#endif - - secp256k1_rand256(run32); - printf("random run = %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n", run32[0], run32[1], run32[2], run32[3], run32[4], run32[5], run32[6], run32[7], run32[8], run32[9], run32[10], run32[11], run32[12], run32[13], run32[14], run32[15]); - - /* shutdown */ - secp256k1_stop(); - - /* shutting down twice shouldn't cause any double frees. */ - secp256k1_stop(); - return 0; -} diff --git a/crypto/secp256k1/secp256k1/src/util.h b/crypto/secp256k1/secp256k1/src/util.h deleted file mode 100644 index ae98639f7..000000000 --- a/crypto/secp256k1/secp256k1/src/util.h +++ /dev/null @@ -1,104 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_UTIL_H_ -#define _SECP256K1_UTIL_H_ - -#if defined HAVE_CONFIG_H -#include "libsecp256k1-config.h" -#endif - -#include -#include -#include - -#ifdef DETERMINISTIC -#define TEST_FAILURE(msg) do { \ - fprintf(stderr, "%s\n", msg); \ - abort(); \ -} while(0); -#else -#define TEST_FAILURE(msg) do { \ - fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, msg); \ - abort(); \ -} while(0) -#endif - -#ifdef HAVE_BUILTIN_EXPECT -#define EXPECT(x,c) __builtin_expect((x),(c)) -#else -#define EXPECT(x,c) (x) -#endif - -#ifdef DETERMINISTIC -#define CHECK(cond) do { \ - if (EXPECT(!(cond), 0)) { \ - TEST_FAILURE("test condition failed"); \ - } \ -} while(0) -#else -#define CHECK(cond) do { \ - if (EXPECT(!(cond), 0)) { \ - TEST_FAILURE("test condition failed: " #cond); \ - } \ -} while(0) -#endif - -/* Like assert(), but safe to use on expressions with side effects. */ -#ifndef NDEBUG -#define DEBUG_CHECK CHECK -#else -#define DEBUG_CHECK(cond) do { (void)(cond); } while(0) -#endif - -/* Like DEBUG_CHECK(), but when VERIFY is defined instead of NDEBUG not defined. */ -#ifdef VERIFY -#define VERIFY_CHECK CHECK -#else -#define VERIFY_CHECK(cond) do { (void)(cond); } while(0) -#endif - -static SECP256K1_INLINE void *checked_malloc(size_t size) { - void *ret = malloc(size); - CHECK(ret != NULL); - return ret; -} - -/* Macro for restrict, when available and not in a VERIFY build. */ -#if defined(SECP256K1_BUILD) && defined(VERIFY) -# define SECP256K1_RESTRICT -#else -# if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) ) -# if SECP256K1_GNUC_PREREQ(3,0) -# define SECP256K1_RESTRICT __restrict__ -# elif (defined(_MSC_VER) && _MSC_VER >= 1400) -# define SECP256K1_RESTRICT __restrict -# else -# define SECP256K1_RESTRICT -# endif -# else -# define SECP256K1_RESTRICT restrict -# endif -#endif - -#if defined(_WIN32) -# define I64FORMAT "I64d" -# define I64uFORMAT "I64u" -#else -# define I64FORMAT "lld" -# define I64uFORMAT "llu" -#endif - -#if defined(HAVE___INT128) -# if defined(__GNUC__) -# define SECP256K1_GNUC_EXT __extension__ -# else -# define SECP256K1_GNUC_EXT -# endif -SECP256K1_GNUC_EXT typedef unsigned __int128 uint128_t; -#endif - -#endif -- cgit v1.2.3 From 74578ab22b24af99ff774927a18153f464334706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 29 Sep 2015 17:16:00 +0300 Subject: common: fix #1818, secondary datadir paths to fall back to --- cmd/geth/main.go | 24 ++++++++++++------------ cmd/utils/flags.go | 16 +++++++++++++--- common/path.go | 22 ++++++++++++++++------ 3 files changed, 41 insertions(+), 21 deletions(-) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index daffda30c..a9aa9f61f 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -390,7 +390,7 @@ func makeDefaultExtra() []byte { } func run(ctx *cli.Context) { - utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + utils.CheckLegalese(utils.MustDataDir(ctx)) if ctx.GlobalBool(utils.OlympicFlag.Name) { utils.InitOlympic() } @@ -409,7 +409,7 @@ func run(ctx *cli.Context) { } func attach(ctx *cli.Context) { - utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + utils.CheckLegalese(utils.MustDataDir(ctx)) var client comms.EthereumClient var err error @@ -441,7 +441,7 @@ func attach(ctx *cli.Context) { } func console(ctx *cli.Context) { - utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + utils.CheckLegalese(utils.MustDataDir(ctx)) cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx) cfg.ExtraData = makeExtra(ctx) @@ -475,7 +475,7 @@ func console(ctx *cli.Context) { } func execJSFiles(ctx *cli.Context) { - utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + utils.CheckLegalese(utils.MustDataDir(ctx)) cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx) ethereum, err := eth.New(cfg) @@ -502,7 +502,7 @@ func execJSFiles(ctx *cli.Context) { } func unlockAccount(ctx *cli.Context, am *accounts.Manager, addr string, i int) (addrHex, auth string) { - utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + utils.CheckLegalese(utils.MustDataDir(ctx)) var err error addrHex, err = utils.ParamToAddress(addr, am) @@ -527,7 +527,7 @@ func unlockAccount(ctx *cli.Context, am *accounts.Manager, addr string, i int) ( } func blockRecovery(ctx *cli.Context) { - utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + utils.CheckLegalese(utils.MustDataDir(ctx)) arg := ctx.Args().First() if len(ctx.Args()) < 1 && len(arg) > 0 { @@ -593,7 +593,7 @@ func startEth(ctx *cli.Context, eth *eth.Ethereum) { } func accountList(ctx *cli.Context) { - utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + utils.CheckLegalese(utils.MustDataDir(ctx)) am := utils.MakeAccountManager(ctx) accts, err := am.Accounts() @@ -643,7 +643,7 @@ func getPassPhrase(ctx *cli.Context, desc string, confirmation bool, i int) (pas } func accountCreate(ctx *cli.Context) { - utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + utils.CheckLegalese(utils.MustDataDir(ctx)) am := utils.MakeAccountManager(ctx) passphrase := getPassPhrase(ctx, "Your new account is locked with a password. Please give a password. Do not forget this password.", true, 0) @@ -655,7 +655,7 @@ func accountCreate(ctx *cli.Context) { } func accountUpdate(ctx *cli.Context) { - utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + utils.CheckLegalese(utils.MustDataDir(ctx)) am := utils.MakeAccountManager(ctx) arg := ctx.Args().First() @@ -672,7 +672,7 @@ func accountUpdate(ctx *cli.Context) { } func importWallet(ctx *cli.Context) { - utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + utils.CheckLegalese(utils.MustDataDir(ctx)) keyfile := ctx.Args().First() if len(keyfile) == 0 { @@ -694,7 +694,7 @@ func importWallet(ctx *cli.Context) { } func accountImport(ctx *cli.Context) { - utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + utils.CheckLegalese(utils.MustDataDir(ctx)) keyfile := ctx.Args().First() if len(keyfile) == 0 { @@ -710,7 +710,7 @@ func accountImport(ctx *cli.Context) { } func makedag(ctx *cli.Context) { - utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + utils.CheckLegalese(utils.MustDataDir(ctx)) args := ctx.Args() wrongArgs := func() { diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index b45ef0af2..ad474f17d 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -416,7 +416,7 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config { cfg := ð.Config{ Name: common.MakeName(clientID, version), - DataDir: ctx.GlobalString(DataDirFlag.Name), + DataDir: MustDataDir(ctx), GenesisNonce: ctx.GlobalInt(GenesisNonceFlag.Name), GenesisFile: ctx.GlobalString(GenesisFileFlag.Name), BlockChainVersion: ctx.GlobalInt(BlockchainVersionFlag.Name), @@ -509,7 +509,7 @@ func SetupEth(ctx *cli.Context) { // MakeChain creates a chain manager from set command line flags. func MakeChain(ctx *cli.Context) (chain *core.ChainManager, chainDb ethdb.Database) { - datadir := ctx.GlobalString(DataDirFlag.Name) + datadir := MustDataDir(ctx) cache := ctx.GlobalInt(CacheFlag.Name) var err error @@ -539,11 +539,21 @@ func MakeChain(ctx *cli.Context) (chain *core.ChainManager, chainDb ethdb.Databa // MakeChain creates an account manager from set command line flags. func MakeAccountManager(ctx *cli.Context) *accounts.Manager { - dataDir := ctx.GlobalString(DataDirFlag.Name) + dataDir := MustDataDir(ctx) ks := crypto.NewKeyStorePassphrase(filepath.Join(dataDir, "keystore")) return accounts.NewManager(ks) } +// MustDataDir retrieves the currently requested data directory, terminating if +// none (or the empty string) is specified. +func MustDataDir(ctx *cli.Context) string { + if path := ctx.GlobalString(DataDirFlag.Name); path != "" { + return path + } + Fatalf("Cannot determine default data directory, please set manually (--datadir)") + return "" +} + func IpcSocketPath(ctx *cli.Context) (ipcpath string) { if runtime.GOOS == "windows" { ipcpath = common.DefaultIpcPath() diff --git a/common/path.go b/common/path.go index 8b3c7d14b..1253c424c 100644 --- a/common/path.go +++ b/common/path.go @@ -100,14 +100,24 @@ func DefaultAssetPath() string { } func DefaultDataDir() string { - usr, _ := user.Current() - if runtime.GOOS == "darwin" { - return filepath.Join(usr.HomeDir, "Library", "Ethereum") - } else if runtime.GOOS == "windows" { - return filepath.Join(usr.HomeDir, "AppData", "Roaming", "Ethereum") + // Try to place the data folder in the user's home dir + var home string + if usr, err := user.Current(); err == nil { + home = usr.HomeDir } else { - return filepath.Join(usr.HomeDir, ".ethereum") + home = os.Getenv("HOME") } + if home != "" { + if runtime.GOOS == "darwin" { + return filepath.Join(home, "Library", "Ethereum") + } else if runtime.GOOS == "windows" { + return filepath.Join(home, "AppData", "Roaming", "Ethereum") + } else { + return filepath.Join(home, ".ethereum") + } + } + // As we cannot guess a stable location, return empty and handle later + return "" } func DefaultIpcPath() string { -- cgit v1.2.3 From a6cc02f68fb13167b861efa72690538e7cf5b177 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Fri, 2 Oct 2015 12:20:18 +0200 Subject: core: deadlock in chainmanager after posting RemovedTransactionEvent This PR solves an issue with the chain manager posting a `RemovedTransactionEvent`, the tx pool will try to acquire the chainmanager lock which has previously been locked prior to posting `RemovedTransactionEvent`. This results in a deadlock in the core. --- core/chain_manager.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/chain_manager.go b/core/chain_manager.go index 55ef3fcad..49f831a59 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -804,7 +804,9 @@ func (self *ChainManager) reorg(oldBlock, newBlock *types.Block) error { DeleteReceipt(self.chainDb, tx.Hash()) DeleteTransaction(self.chainDb, tx.Hash()) } - self.eventMux.Post(RemovedTransactionEvent{diff}) + // Must be posted in a goroutine because of the transaction pool trying + // to acquire the chain manager lock + go self.eventMux.Post(RemovedTransactionEvent{diff}) return nil } -- cgit v1.2.3 From 47f62a67aa8a033d8a81dc16104018369325897d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Fri, 2 Oct 2015 13:20:41 +0300 Subject: eth/downloader: match capabilities when querying idle peers --- eth/downloader/downloader.go | 4 ++-- eth/downloader/downloader_test.go | 49 ++++++++++++++++++++++++++++++++++++--- eth/downloader/peer.go | 8 ++++--- 3 files changed, 53 insertions(+), 8 deletions(-) diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index d1a716c5f..64fb1b57b 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -816,7 +816,7 @@ func (d *Downloader) fetchBlocks61(from uint64) error { } // Send a download request to all idle peers, until throttled throttled := false - for _, peer := range d.peers.IdlePeers() { + for _, peer := range d.peers.IdlePeers(eth61) { // Short circuit if throttling activated if d.queue.Throttle() { throttled = true @@ -1255,7 +1255,7 @@ func (d *Downloader) fetchBodies(from uint64) error { } // Send a download request to all idle peers, until throttled queuedEmptyBlocks, throttled := false, false - for _, peer := range d.peers.IdlePeers() { + for _, peer := range d.peers.IdlePeers(eth62) { // Short circuit if throttling activated if d.queue.Throttle() { throttled = true diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index 885fab8bd..96096527e 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -205,9 +205,17 @@ func (dl *downloadTester) newSlowPeer(id string, version int, hashes []common.Ha dl.lock.Lock() defer dl.lock.Unlock() - err := dl.downloader.RegisterPeer(id, version, hashes[0], - dl.peerGetRelHashesFn(id, delay), dl.peerGetAbsHashesFn(id, delay), dl.peerGetBlocksFn(id, delay), - dl.peerGetRelHeadersFn(id, delay), dl.peerGetAbsHeadersFn(id, delay), dl.peerGetBodiesFn(id, delay)) + var err error + switch version { + case 61: + err = dl.downloader.RegisterPeer(id, version, hashes[0], dl.peerGetRelHashesFn(id, delay), dl.peerGetAbsHashesFn(id, delay), dl.peerGetBlocksFn(id, delay), nil, nil, nil) + case 62: + err = dl.downloader.RegisterPeer(id, version, hashes[0], nil, nil, nil, dl.peerGetRelHeadersFn(id, delay), dl.peerGetAbsHeadersFn(id, delay), dl.peerGetBodiesFn(id, delay)) + case 63: + err = dl.downloader.RegisterPeer(id, version, hashes[0], nil, nil, nil, dl.peerGetRelHeadersFn(id, delay), dl.peerGetAbsHeadersFn(id, delay), dl.peerGetBodiesFn(id, delay)) + case 64: + err = dl.downloader.RegisterPeer(id, version, hashes[0], nil, nil, nil, dl.peerGetRelHeadersFn(id, delay), dl.peerGetAbsHeadersFn(id, delay), dl.peerGetBodiesFn(id, delay)) + } if err == nil { // Assign the owned hashes and blocks to the peer (deep copy) dl.peerHashes[id] = make([]common.Hash, len(hashes)) @@ -618,6 +626,41 @@ func testMultiSynchronisation(t *testing.T, protocol int) { } } +// Tests that synchronisations behave well in multi-version protocol environments +// and not wreak havok on other nodes in the network. +func TestMultiProtocolSynchronisation61(t *testing.T) { testMultiProtocolSynchronisation(t, 61) } +func TestMultiProtocolSynchronisation62(t *testing.T) { testMultiProtocolSynchronisation(t, 62) } +func TestMultiProtocolSynchronisation63(t *testing.T) { testMultiProtocolSynchronisation(t, 63) } +func TestMultiProtocolSynchronisation64(t *testing.T) { testMultiProtocolSynchronisation(t, 64) } + +func testMultiProtocolSynchronisation(t *testing.T, protocol int) { + // Create a small enough block chain to download + targetBlocks := blockCacheLimit - 15 + hashes, blocks := makeChain(targetBlocks, 0, genesis) + + // Create peers of every type + tester := newTester() + tester.newPeer("peer 61", 61, hashes, blocks) + tester.newPeer("peer 62", 62, hashes, blocks) + tester.newPeer("peer 63", 63, hashes, blocks) + tester.newPeer("peer 64", 64, hashes, blocks) + + // Synchronise with the requestd peer and make sure all blocks were retrieved + if err := tester.sync(fmt.Sprintf("peer %d", protocol), nil); err != nil { + t.Fatalf("failed to synchronise blocks: %v", err) + } + if imported := len(tester.ownBlocks); imported != targetBlocks+1 { + t.Fatalf("synchronised block mismatch: have %v, want %v", imported, targetBlocks+1) + } + // Check that no peers have been dropped off + for _, version := range []int{61, 62, 63, 64} { + peer := fmt.Sprintf("peer %d", version) + if _, ok := tester.peerHashes[peer]; !ok { + t.Errorf("%s dropped", peer) + } + } +} + // Tests that if a block is empty (i.e. header only), no body request should be // made, and instead the header should be assembled into a whole block in itself. func TestEmptyBlockShortCircuit62(t *testing.T) { testEmptyBlockShortCircuit(t, 62) } diff --git a/eth/downloader/peer.go b/eth/downloader/peer.go index 8fd1f9a99..c1d20ac61 100644 --- a/eth/downloader/peer.go +++ b/eth/downloader/peer.go @@ -312,14 +312,16 @@ func (ps *peerSet) AllPeers() []*peer { // IdlePeers retrieves a flat list of all the currently idle peers within the // active peer set, ordered by their reputation. -func (ps *peerSet) IdlePeers() []*peer { +func (ps *peerSet) IdlePeers(version int) []*peer { ps.lock.RLock() defer ps.lock.RUnlock() list := make([]*peer, 0, len(ps.peers)) for _, p := range ps.peers { - if atomic.LoadInt32(&p.idle) == 0 { - list = append(list, p) + if (version == eth61 && p.version == eth61) || (version >= eth62 && p.version >= eth62) { + if atomic.LoadInt32(&p.idle) == 0 { + list = append(list, p) + } } } for i := 0; i < len(list); i++ { -- cgit v1.2.3 From f7a71996fbbe9cea4445600ffa3c232a6cf42803 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Sun, 30 Aug 2015 10:04:59 +0200 Subject: core, event/filter, xeth: refactored filter system Moved the filtering system from `event` to `eth/filters` package and removed the `core.Filter` object. The `filters.Filter` object now requires a `common.Database` rather than a `eth.Backend` and invokes the `core.GetBlockByX` directly rather than thru a "manager". --- core/filter.go | 212 ------------------------------------------- eth/filters/filter.go | 211 ++++++++++++++++++++++++++++++++++++++++++ eth/filters/filter_system.go | 133 +++++++++++++++++++++++++++ event/filter/eth_filter.go | 127 -------------------------- xeth/xeth.go | 31 +++---- 5 files changed, 359 insertions(+), 355 deletions(-) delete mode 100644 core/filter.go create mode 100644 eth/filters/filter.go create mode 100644 eth/filters/filter_system.go delete mode 100644 event/filter/eth_filter.go diff --git a/core/filter.go b/core/filter.go deleted file mode 100644 index b328ffff3..000000000 --- a/core/filter.go +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package core - -import ( - "math" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" -) - -type AccountChange struct { - Address, StateAddress []byte -} - -// Filtering interface -type Filter struct { - eth Backend - earliest int64 - latest int64 - skip int - address []common.Address - max int - topics [][]common.Hash - - BlockCallback func(*types.Block, state.Logs) - TransactionCallback func(*types.Transaction) - LogsCallback func(state.Logs) -} - -// Create a new filter which uses a bloom filter on blocks to figure out whether a particular block -// is interesting or not. -func NewFilter(eth Backend) *Filter { - return &Filter{eth: eth} -} - -// Set the earliest and latest block for filtering. -// -1 = latest block (i.e., the current block) -// hash = particular hash from-to -func (self *Filter) SetEarliestBlock(earliest int64) { - self.earliest = earliest -} - -func (self *Filter) SetLatestBlock(latest int64) { - self.latest = latest -} - -func (self *Filter) SetAddress(addr []common.Address) { - self.address = addr -} - -func (self *Filter) SetTopics(topics [][]common.Hash) { - self.topics = topics -} - -func (self *Filter) SetMax(max int) { - self.max = max -} - -func (self *Filter) SetSkip(skip int) { - self.skip = skip -} - -// Run filters logs with the current parameters set -func (self *Filter) Find() state.Logs { - earliestBlock := self.eth.ChainManager().CurrentBlock() - var earliestBlockNo uint64 = uint64(self.earliest) - if self.earliest == -1 { - earliestBlockNo = earliestBlock.NumberU64() - } - var latestBlockNo uint64 = uint64(self.latest) - if self.latest == -1 { - latestBlockNo = earliestBlock.NumberU64() - } - - var ( - logs state.Logs - block = self.eth.ChainManager().GetBlockByNumber(latestBlockNo) - ) - -done: - for i := 0; block != nil; i++ { - // Quit on latest - switch { - case block.NumberU64() == 0: - break done - case block.NumberU64() < earliestBlockNo: - break done - case self.max <= len(logs): - break done - } - - // Use bloom filtering to see if this block is interesting given the - // current parameters - if self.bloomFilter(block) { - // Get the logs of the block - unfiltered, err := self.eth.BlockProcessor().GetLogs(block) - if err != nil { - glog.V(logger.Warn).Infoln("err: filter get logs ", err) - - break - } - - logs = append(logs, self.FilterLogs(unfiltered)...) - } - - block = self.eth.ChainManager().GetBlock(block.ParentHash()) - } - - skip := int(math.Min(float64(len(logs)), float64(self.skip))) - - return logs[skip:] -} - -func includes(addresses []common.Address, a common.Address) bool { - for _, addr := range addresses { - if addr == a { - return true - } - } - - return false -} - -func (self *Filter) FilterLogs(logs state.Logs) state.Logs { - var ret state.Logs - - // Filter the logs for interesting stuff -Logs: - for _, log := range logs { - if len(self.address) > 0 && !includes(self.address, log.Address) { - continue - } - - logTopics := make([]common.Hash, len(self.topics)) - copy(logTopics, log.Topics) - - // If the to filtered topics is greater than the amount of topics in - // logs, skip. - if len(self.topics) > len(log.Topics) { - continue Logs - } - - for i, topics := range self.topics { - var match bool - for _, topic := range topics { - // common.Hash{} is a match all (wildcard) - if (topic == common.Hash{}) || log.Topics[i] == topic { - match = true - break - } - } - - if !match { - continue Logs - } - - } - - ret = append(ret, log) - } - - return ret -} - -func (self *Filter) bloomFilter(block *types.Block) bool { - if len(self.address) > 0 { - var included bool - for _, addr := range self.address { - if types.BloomLookup(block.Bloom(), addr) { - included = true - break - } - } - - if !included { - return false - } - } - - for _, sub := range self.topics { - var included bool - for _, topic := range sub { - if (topic == common.Hash{}) || types.BloomLookup(block.Bloom(), topic) { - included = true - break - } - } - if !included { - return false - } - } - - return true -} diff --git a/eth/filters/filter.go b/eth/filters/filter.go new file mode 100644 index 000000000..b7f795607 --- /dev/null +++ b/eth/filters/filter.go @@ -0,0 +1,211 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package filters + +import ( + "math" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/core/types" +) + +type AccountChange struct { + Address, StateAddress []byte +} + +// Filtering interface +type Filter struct { + db common.Database + earliest int64 + latest int64 + skip int + address []common.Address + max int + topics [][]common.Hash + + BlockCallback func(*types.Block, state.Logs) + TransactionCallback func(*types.Transaction) + LogsCallback func(state.Logs) +} + +// Create a new filter which uses a bloom filter on blocks to figure out whether a particular block +// is interesting or not. +func New(db common.Database) *Filter { + return &Filter{db: db} +} + +// Set the earliest and latest block for filtering. +// -1 = latest block (i.e., the current block) +// hash = particular hash from-to +func (self *Filter) SetEarliestBlock(earliest int64) { + self.earliest = earliest +} + +func (self *Filter) SetLatestBlock(latest int64) { + self.latest = latest +} + +func (self *Filter) SetAddress(addr []common.Address) { + self.address = addr +} + +func (self *Filter) SetTopics(topics [][]common.Hash) { + self.topics = topics +} + +func (self *Filter) SetMax(max int) { + self.max = max +} + +func (self *Filter) SetSkip(skip int) { + self.skip = skip +} + +// Run filters logs with the current parameters set +func (self *Filter) Find() state.Logs { + earliestBlock := core.GetCurrentBlock(self.db) + var earliestBlockNo uint64 = uint64(self.earliest) + if self.earliest == -1 { + earliestBlockNo = earliestBlock.NumberU64() + } + var latestBlockNo uint64 = uint64(self.latest) + if self.latest == -1 { + latestBlockNo = earliestBlock.NumberU64() + } + + var ( + logs state.Logs + block = core.GetBlockByNumber(self.db, latestBlockNo) + ) + +done: + for i := 0; block != nil; i++ { + // Quit on latest + switch { + case block.NumberU64() == 0: + break done + case block.NumberU64() < earliestBlockNo: + break done + case self.max <= len(logs): + break done + } + + // Use bloom filtering to see if this block is interesting given the + // current parameters + if self.bloomFilter(block) { + // Get the logs of the block + var ( + receipts = core.GetBlockReceipts(self.db, block.Hash()) + unfiltered state.Logs + ) + for _, receipt := range receipts { + unfiltered = append(unfiltered, receipt.Logs()...) + } + logs = append(logs, self.FilterLogs(unfiltered)...) + } + + block = core.GetBlockByHash(self.db, block.ParentHash()) + } + + skip := int(math.Min(float64(len(logs)), float64(self.skip))) + + return logs[skip:] +} + +func includes(addresses []common.Address, a common.Address) bool { + for _, addr := range addresses { + if addr == a { + return true + } + } + + return false +} + +func (self *Filter) FilterLogs(logs state.Logs) state.Logs { + var ret state.Logs + + // Filter the logs for interesting stuff +Logs: + for _, log := range logs { + if len(self.address) > 0 && !includes(self.address, log.Address) { + continue + } + + logTopics := make([]common.Hash, len(self.topics)) + copy(logTopics, log.Topics) + + // If the to filtered topics is greater than the amount of topics in + // logs, skip. + if len(self.topics) > len(log.Topics) { + continue Logs + } + + for i, topics := range self.topics { + var match bool + for _, topic := range topics { + // common.Hash{} is a match all (wildcard) + if (topic == common.Hash{}) || log.Topics[i] == topic { + match = true + break + } + } + + if !match { + continue Logs + } + + } + + ret = append(ret, log) + } + + return ret +} + +func (self *Filter) bloomFilter(block *types.Block) bool { + if len(self.address) > 0 { + var included bool + for _, addr := range self.address { + if types.BloomLookup(block.Bloom(), addr) { + included = true + break + } + } + + if !included { + return false + } + } + + for _, sub := range self.topics { + var included bool + for _, topic := range sub { + if (topic == common.Hash{}) || types.BloomLookup(block.Bloom(), topic) { + included = true + break + } + } + if !included { + return false + } + } + + return true +} diff --git a/eth/filters/filter_system.go b/eth/filters/filter_system.go new file mode 100644 index 000000000..9ad73a896 --- /dev/null +++ b/eth/filters/filter_system.go @@ -0,0 +1,133 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +// package filters implements an ethereum filtering system for block, +// transactions and log events. +package filters + +import ( + "sync" + + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/event" +) + +// FilterSystem manages filters that filter specific events such as +// block, transaction and log events. The Filtering system can be used to listen +// for specific LOG events fires by the EVM (Ethereum Virtual Machine). +type FilterSystem struct { + eventMux *event.TypeMux + + filterMu sync.RWMutex + filterId int + filters map[int]*Filter + + quit chan struct{} +} + +// NewFilterSystem returns a newly allocated filter manager +func NewFilterSystem(mux *event.TypeMux) *FilterSystem { + fs := &FilterSystem{ + eventMux: mux, + filters: make(map[int]*Filter), + } + go fs.filterLoop() + return fs +} + +// Stop quits the filter loop required for polling events +func (fs *FilterSystem) Stop() { + close(fs.quit) +} + +// Add adds a filter to the filter manager +func (fs *FilterSystem) Add(filter *Filter) (id int) { + fs.filterMu.Lock() + defer fs.filterMu.Unlock() + id = fs.filterId + fs.filters[id] = filter + fs.filterId++ + + return id +} + +// Remove removes a filter by filter id +func (fs *FilterSystem) Remove(id int) { + fs.filterMu.Lock() + defer fs.filterMu.Unlock() + if _, ok := fs.filters[id]; ok { + delete(fs.filters, id) + } +} + +// Get retrieves a filter installed using Add The filter may not be modified. +func (fs *FilterSystem) Get(id int) *Filter { + fs.filterMu.RLock() + defer fs.filterMu.RUnlock() + return fs.filters[id] +} + +// filterLoop waits for specific events from ethereum and fires their handlers +// when the filter matches the requirements. +func (fs *FilterSystem) filterLoop() { + // Subscribe to events + events := fs.eventMux.Subscribe( + //core.PendingBlockEvent{}, + core.ChainEvent{}, + core.TxPreEvent{}, + state.Logs(nil)) + +out: + for { + select { + case <-fs.quit: + break out + case event := <-events.Chan(): + switch event := event.(type) { + case core.ChainEvent: + fs.filterMu.RLock() + for _, filter := range fs.filters { + if filter.BlockCallback != nil { + filter.BlockCallback(event.Block, event.Logs) + } + } + fs.filterMu.RUnlock() + + case core.TxPreEvent: + fs.filterMu.RLock() + for _, filter := range fs.filters { + if filter.TransactionCallback != nil { + filter.TransactionCallback(event.Tx) + } + } + fs.filterMu.RUnlock() + + case state.Logs: + fs.filterMu.RLock() + for _, filter := range fs.filters { + if filter.LogsCallback != nil { + msgs := filter.FilterLogs(event) + if len(msgs) > 0 { + filter.LogsCallback(msgs) + } + } + } + fs.filterMu.RUnlock() + } + } + } +} diff --git a/event/filter/eth_filter.go b/event/filter/eth_filter.go deleted file mode 100644 index 6f61e2b60..000000000 --- a/event/filter/eth_filter.go +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package filter - -// TODO make use of the generic filtering system - -import ( - "sync" - - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/event" -) - -type FilterManager struct { - eventMux *event.TypeMux - - filterMu sync.RWMutex - filterId int - filters map[int]*core.Filter - - quit chan struct{} -} - -func NewFilterManager(mux *event.TypeMux) *FilterManager { - return &FilterManager{ - eventMux: mux, - filters: make(map[int]*core.Filter), - } -} - -func (self *FilterManager) Start() { - go self.filterLoop() -} - -func (self *FilterManager) Stop() { - close(self.quit) -} - -func (self *FilterManager) InstallFilter(filter *core.Filter) (id int) { - self.filterMu.Lock() - defer self.filterMu.Unlock() - id = self.filterId - self.filters[id] = filter - self.filterId++ - - return id -} - -func (self *FilterManager) UninstallFilter(id int) { - self.filterMu.Lock() - defer self.filterMu.Unlock() - if _, ok := self.filters[id]; ok { - delete(self.filters, id) - } -} - -// GetFilter retrieves a filter installed using InstallFilter. -// The filter may not be modified. -func (self *FilterManager) GetFilter(id int) *core.Filter { - self.filterMu.RLock() - defer self.filterMu.RUnlock() - return self.filters[id] -} - -func (self *FilterManager) filterLoop() { - // Subscribe to events - events := self.eventMux.Subscribe( - //core.PendingBlockEvent{}, - core.ChainEvent{}, - core.TxPreEvent{}, - state.Logs(nil)) - -out: - for { - select { - case <-self.quit: - break out - case event := <-events.Chan(): - switch event := event.(type) { - case core.ChainEvent: - self.filterMu.RLock() - for _, filter := range self.filters { - if filter.BlockCallback != nil { - filter.BlockCallback(event.Block, event.Logs) - } - } - self.filterMu.RUnlock() - - case core.TxPreEvent: - self.filterMu.RLock() - for _, filter := range self.filters { - if filter.TransactionCallback != nil { - filter.TransactionCallback(event.Tx) - } - } - self.filterMu.RUnlock() - - case state.Logs: - self.filterMu.RLock() - for _, filter := range self.filters { - if filter.LogsCallback != nil { - msgs := filter.FilterLogs(event) - if len(msgs) > 0 { - filter.LogsCallback(msgs) - } - } - } - self.filterMu.RUnlock() - } - } - } -} diff --git a/xeth/xeth.go b/xeth/xeth.go index 623b3a963..0494342a3 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -35,7 +35,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/event/filter" + "github.com/ethereum/go-ethereum/eth/filters" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/miner" @@ -75,7 +75,7 @@ type XEth struct { whisper *Whisper quit chan struct{} - filterManager *filter.FilterManager + filterManager *filters.FilterSystem logMu sync.RWMutex logQueue map[int]*logQueue @@ -111,7 +111,7 @@ func New(ethereum *eth.Ethereum, frontend Frontend) *XEth { backend: ethereum, frontend: frontend, quit: make(chan struct{}), - filterManager: filter.NewFilterManager(ethereum.EventMux()), + filterManager: filters.NewFilterSystem(ethereum.EventMux()), logQueue: make(map[int]*logQueue), blockQueue: make(map[int]*hashQueue), transactionQueue: make(map[int]*hashQueue), @@ -128,7 +128,6 @@ func New(ethereum *eth.Ethereum, frontend Frontend) *XEth { xeth.state = NewState(xeth, xeth.backend.ChainManager().State()) go xeth.start() - go xeth.filterManager.Start() return xeth } @@ -142,7 +141,7 @@ done: self.logMu.Lock() for id, filter := range self.logQueue { if time.Since(filter.timeout) > filterTickerTime { - self.filterManager.UninstallFilter(id) + self.filterManager.Remove(id) delete(self.logQueue, id) } } @@ -151,7 +150,7 @@ done: self.blockMu.Lock() for id, filter := range self.blockQueue { if time.Since(filter.timeout) > filterTickerTime { - self.filterManager.UninstallFilter(id) + self.filterManager.Remove(id) delete(self.blockQueue, id) } } @@ -160,7 +159,7 @@ done: self.transactionMu.Lock() for id, filter := range self.transactionQueue { if time.Since(filter.timeout) > filterTickerTime { - self.filterManager.UninstallFilter(id) + self.filterManager.Remove(id) delete(self.transactionQueue, id) } } @@ -504,7 +503,7 @@ func (self *XEth) IsContract(address string) bool { } func (self *XEth) UninstallFilter(id int) bool { - defer self.filterManager.UninstallFilter(id) + defer self.filterManager.Remove(id) if _, ok := self.logQueue[id]; ok { self.logMu.Lock() @@ -532,8 +531,8 @@ func (self *XEth) NewLogFilter(earliest, latest int64, skip, max int, address [] self.logMu.Lock() defer self.logMu.Unlock() - filter := core.NewFilter(self.backend) - id := self.filterManager.InstallFilter(filter) + filter := filters.New(self.backend.ChainDb()) + id := self.filterManager.Add(filter) self.logQueue[id] = &logQueue{timeout: time.Now()} filter.SetEarliestBlock(earliest) @@ -558,8 +557,8 @@ func (self *XEth) NewTransactionFilter() int { self.transactionMu.Lock() defer self.transactionMu.Unlock() - filter := core.NewFilter(self.backend) - id := self.filterManager.InstallFilter(filter) + filter := filters.New(self.backend.ChainDb()) + id := self.filterManager.Add(filter) self.transactionQueue[id] = &hashQueue{timeout: time.Now()} filter.TransactionCallback = func(tx *types.Transaction) { @@ -577,8 +576,8 @@ func (self *XEth) NewBlockFilter() int { self.blockMu.Lock() defer self.blockMu.Unlock() - filter := core.NewFilter(self.backend) - id := self.filterManager.InstallFilter(filter) + filter := filters.New(self.backend.ChainDb()) + id := self.filterManager.Add(filter) self.blockQueue[id] = &hashQueue{timeout: time.Now()} filter.BlockCallback = func(block *types.Block, logs state.Logs) { @@ -635,7 +634,7 @@ func (self *XEth) TransactionFilterChanged(id int) []common.Hash { } func (self *XEth) Logs(id int) state.Logs { - filter := self.filterManager.GetFilter(id) + filter := self.filterManager.Get(id) if filter != nil { return filter.Find() } @@ -644,7 +643,7 @@ func (self *XEth) Logs(id int) state.Logs { } func (self *XEth) AllLogs(earliest, latest int64, skip, max int, address []string, topics [][]string) state.Logs { - filter := core.NewFilter(self.backend) + filter := filters.New(self.backend.ChainDb()) filter.SetEarliestBlock(earliest) filter.SetLatestBlock(latest) filter.SetSkip(skip) -- cgit v1.2.3 From 361082ec4b942aea7c01fcb1be1782cb68b6fe3a Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Sun, 30 Aug 2015 10:19:10 +0200 Subject: cmd/evm, core/vm, test: refactored VM and core * Moved `vm.Transfer` to `core` package and changed execution to call `env.Transfer` instead of `core.Transfer` directly. * core/vm: byte code VM moved to jump table instead of switch * Moved `vm.Transfer` to `core` package and changed execution to call `env.Transfer` instead of `core.Transfer` directly. * Byte code VM now shares the same code as the JITVM * Renamed Context to Contract * Changed initialiser of state transition & unexported methods * Removed the Execution object and refactor `Call`, `CallCode` & `Create` in to their own functions instead of being methods. * Removed the hard dep on the state for the VM. The VM now depends on a Database interface returned by the environment. In the process the core now depends less on the statedb by usage of the env * Moved `Log` from package `core/state` to package `core/vm`. --- cmd/evm/main.go | 64 ++-- core/block_processor.go | 9 +- core/block_processor_test.go | 3 +- core/chain_manager_test.go | 4 +- core/events.go | 10 +- core/execution.go | 114 ++++---- core/state/log.go | 66 ----- core/state/statedb.go | 41 ++- core/state_transition.go | 67 +++-- core/types/bloom9.go | 4 +- core/types/common.go | 8 +- core/types/receipt.go | 14 +- core/vm/asm.go | 2 + core/vm/common.go | 55 +++- core/vm/context.go | 120 -------- core/vm/contract.go | 126 ++++++++ core/vm/contracts.go | 10 +- core/vm/doc.go | 32 ++ core/vm/environment.go | 83 ++++-- core/vm/gas.go | 2 + core/vm/instructions.go | 257 +++++++++------- core/vm/jit.go | 111 +++---- core/vm/jit_test.go | 92 ++++-- core/vm/jump_table.go | 143 +++++++++ core/vm/log.go | 66 +++++ core/vm/logger.go | 1 + core/vm/memory.go | 7 + core/vm/opcodes.go | 2 +- core/vm/settings.go | 25 -- core/vm/virtual_machine.go | 3 +- core/vm/vm.go | 683 +++++++------------------------------------ core/vm/vm_jit.go | 3 +- core/vm_env.go | 34 ++- eth/filters/filter.go | 16 +- eth/filters/filter_system.go | 6 +- miner/worker.go | 3 +- rpc/api/eth_args.go | 6 +- tests/state_test_util.go | 4 +- tests/util.go | 47 ++- tests/vm_test.go | 4 +- tests/vm_test_util.go | 4 +- xeth/xeth.go | 17 +- 42 files changed, 1126 insertions(+), 1242 deletions(-) delete mode 100644 core/state/log.go delete mode 100644 core/vm/context.go create mode 100644 core/vm/contract.go create mode 100644 core/vm/doc.go create mode 100644 core/vm/jump_table.go create mode 100644 core/vm/log.go delete mode 100644 core/vm/settings.go diff --git a/cmd/evm/main.go b/cmd/evm/main.go index 243dd6266..bf24da982 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -80,12 +80,17 @@ var ( Name: "sysstat", Usage: "display system stats", } + VerbosityFlag = cli.IntFlag{ + Name: "verbosity", + Usage: "sets the verbosity level", + } ) func init() { app = utils.NewApp("0.2", "the evm command line interface") app.Flags = []cli.Flag{ DebugFlag, + VerbosityFlag, ForceJitFlag, DisableJitFlag, SysStatFlag, @@ -105,6 +110,7 @@ func run(ctx *cli.Context) { vm.EnableJit = !ctx.GlobalBool(DisableJitFlag.Name) glog.SetToStderr(true) + glog.SetV(ctx.GlobalInt(VerbosityFlag.Name)) db, _ := ethdb.NewMemDatabase() statedb := state.New(common.Hash{}, db) @@ -179,18 +185,20 @@ func NewEnv(state *state.StateDB, transactor common.Address, value *big.Int) *VM } } -func (self *VMEnv) State() *state.StateDB { return self.state } -func (self *VMEnv) Origin() common.Address { return *self.transactor } -func (self *VMEnv) BlockNumber() *big.Int { return common.Big0 } -func (self *VMEnv) Coinbase() common.Address { return *self.transactor } -func (self *VMEnv) Time() *big.Int { return self.time } -func (self *VMEnv) Difficulty() *big.Int { return common.Big1 } -func (self *VMEnv) BlockHash() []byte { return make([]byte, 32) } -func (self *VMEnv) Value() *big.Int { return self.value } -func (self *VMEnv) GasLimit() *big.Int { return big.NewInt(1000000000) } -func (self *VMEnv) VmType() vm.Type { return vm.StdVmTy } -func (self *VMEnv) Depth() int { return 0 } -func (self *VMEnv) SetDepth(i int) { self.depth = i } +func (self *VMEnv) Db() vm.Database { return self.state } +func (self *VMEnv) MakeSnapshot() vm.Database { return self.state.Copy() } +func (self *VMEnv) SetSnapshot(db vm.Database) { self.state.Set(db.(*state.StateDB)) } +func (self *VMEnv) Origin() common.Address { return *self.transactor } +func (self *VMEnv) BlockNumber() *big.Int { return common.Big0 } +func (self *VMEnv) Coinbase() common.Address { return *self.transactor } +func (self *VMEnv) Time() *big.Int { return self.time } +func (self *VMEnv) Difficulty() *big.Int { return common.Big1 } +func (self *VMEnv) BlockHash() []byte { return make([]byte, 32) } +func (self *VMEnv) Value() *big.Int { return self.value } +func (self *VMEnv) GasLimit() *big.Int { return big.NewInt(1000000000) } +func (self *VMEnv) VmType() vm.Type { return vm.StdVmTy } +func (self *VMEnv) Depth() int { return 0 } +func (self *VMEnv) SetDepth(i int) { self.depth = i } func (self *VMEnv) GetHash(n uint64) common.Hash { if self.block.Number().Cmp(big.NewInt(int64(n))) == 0 { return self.block.Hash() @@ -203,34 +211,24 @@ func (self *VMEnv) AddStructLog(log vm.StructLog) { func (self *VMEnv) StructLogs() []vm.StructLog { return self.logs } -func (self *VMEnv) AddLog(log *state.Log) { +func (self *VMEnv) AddLog(log *vm.Log) { self.state.AddLog(log) } -func (self *VMEnv) CanTransfer(from vm.Account, balance *big.Int) bool { - return from.Balance().Cmp(balance) >= 0 +func (self *VMEnv) CanTransfer(from common.Address, balance *big.Int) bool { + return self.state.GetBalance(from).Cmp(balance) >= 0 } func (self *VMEnv) Transfer(from, to vm.Account, amount *big.Int) error { - return vm.Transfer(from, to, amount) -} - -func (self *VMEnv) vm(addr *common.Address, data []byte, gas, price, value *big.Int) *core.Execution { - return core.NewExecution(self, addr, data, gas, price, value) + return core.Transfer(from, to, amount) } -func (self *VMEnv) Call(caller vm.ContextRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { - exe := self.vm(&addr, data, gas, price, value) - ret, err := exe.Call(addr, caller) - self.Gas = exe.Gas - - return ret, err +func (self *VMEnv) Call(caller vm.ContractRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { + self.Gas = gas + return core.Call(self, caller, addr, data, gas, price, value) } -func (self *VMEnv) CallCode(caller vm.ContextRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { - a := caller.Address() - exe := self.vm(&a, data, gas, price, value) - return exe.Call(addr, caller) +func (self *VMEnv) CallCode(caller vm.ContractRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { + return core.CallCode(self, caller, addr, data, gas, price, value) } -func (self *VMEnv) Create(caller vm.ContextRef, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ContextRef) { - exe := self.vm(nil, data, gas, price, value) - return exe.Create(caller) +func (self *VMEnv) Create(caller vm.ContractRef, data []byte, gas, price, value *big.Int) ([]byte, common.Address, error) { + return core.Create(self, caller, data, gas, price, value) } diff --git a/core/block_processor.go b/core/block_processor.go index 40590bdc5..40e3931ba 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -25,6 +25,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" @@ -163,7 +164,7 @@ func (self *BlockProcessor) ApplyTransactions(gp GasPool, statedb *state.StateDB return receipts, err } -func (sm *BlockProcessor) RetryProcess(block *types.Block) (logs state.Logs, err error) { +func (sm *BlockProcessor) RetryProcess(block *types.Block) (logs vm.Logs, err error) { // Processing a blocks may never happen simultaneously sm.mutex.Lock() defer sm.mutex.Unlock() @@ -188,7 +189,7 @@ func (sm *BlockProcessor) RetryProcess(block *types.Block) (logs state.Logs, err // Process block will attempt to process the given block's transactions and applies them // on top of the block's parent state (given it exists) and will return wether it was // successful or not. -func (sm *BlockProcessor) Process(block *types.Block) (logs state.Logs, receipts types.Receipts, err error) { +func (sm *BlockProcessor) Process(block *types.Block) (logs vm.Logs, receipts types.Receipts, err error) { // Processing a blocks may never happen simultaneously sm.mutex.Lock() defer sm.mutex.Unlock() @@ -204,7 +205,7 @@ func (sm *BlockProcessor) Process(block *types.Block) (logs state.Logs, receipts return sm.processWithParent(block, parent) } -func (sm *BlockProcessor) processWithParent(block, parent *types.Block) (logs state.Logs, receipts types.Receipts, err error) { +func (sm *BlockProcessor) processWithParent(block, parent *types.Block) (logs vm.Logs, receipts types.Receipts, err error) { // Create a new state based on the parent's root (e.g., create copy) state := state.New(parent.Root(), sm.chainDb) header := block.Header() @@ -356,7 +357,7 @@ func (sm *BlockProcessor) GetBlockReceipts(bhash common.Hash) types.Receipts { // GetLogs returns the logs of the given block. This method is using a two step approach // where it tries to get it from the (updated) method which gets them from the receipts or // the depricated way by re-processing the block. -func (sm *BlockProcessor) GetLogs(block *types.Block) (logs state.Logs, err error) { +func (sm *BlockProcessor) GetLogs(block *types.Block) (logs vm.Logs, err error) { receipts := GetBlockReceipts(sm.chainDb, block.Hash()) // coalesce logs for _, receipt := range receipts { diff --git a/core/block_processor_test.go b/core/block_processor_test.go index 538cf4ee5..5735b8d0a 100644 --- a/core/block_processor_test.go +++ b/core/block_processor_test.go @@ -24,6 +24,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/pow/ezp" @@ -69,7 +70,7 @@ func TestPutReceipt(t *testing.T) { hash[0] = 2 receipt := new(types.Receipt) - receipt.SetLogs(state.Logs{&state.Log{ + receipt.SetLogs(vm.Logs{&vm.Log{ Address: addr, Topics: []common.Hash{hash}, Data: []byte("hi"), diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index 6cfafb8c0..40286190b 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -28,8 +28,8 @@ import ( "github.com/ethereum/ethash" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" @@ -361,7 +361,7 @@ func TestChainMultipleInsertions(t *testing.T) { type bproc struct{} -func (bproc) Process(*types.Block) (state.Logs, types.Receipts, error) { return nil, nil, nil } +func (bproc) Process(*types.Block) (vm.Logs, types.Receipts, error) { return nil, nil, nil } func makeChainWithDiff(genesis *types.Block, d []int, seed byte) []*types.Block { var chain []*types.Block diff --git a/core/events.go b/core/events.go index e142b6dba..8cf230dda 100644 --- a/core/events.go +++ b/core/events.go @@ -20,8 +20,8 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" ) // TxPreEvent is posted when a transaction enters the transaction pool. @@ -42,23 +42,23 @@ type RemovedTransactionEvent struct{ Txs types.Transactions } // ChainSplit is posted when a new head is detected type ChainSplitEvent struct { Block *types.Block - Logs state.Logs + Logs vm.Logs } type ChainEvent struct { Block *types.Block Hash common.Hash - Logs state.Logs + Logs vm.Logs } type ChainSideEvent struct { Block *types.Block - Logs state.Logs + Logs vm.Logs } type PendingBlockEvent struct { Block *types.Block - Logs state.Logs + Logs vm.Logs } type ChainUncleEvent struct { diff --git a/core/execution.go b/core/execution.go index 3a136515d..e3c00a2ea 100644 --- a/core/execution.go +++ b/core/execution.go @@ -17,108 +17,104 @@ package core import ( + "errors" "math/big" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" ) -// Execution is the execution environment for the given call or create action. -type Execution struct { - env vm.Environment - address *common.Address - input []byte - evm vm.VirtualMachine - - Gas, price, value *big.Int +// Call executes within the given contract +func Call(env vm.Environment, caller vm.ContractRef, addr common.Address, input []byte, gas, gasPrice, value *big.Int) (ret []byte, err error) { + ret, _, err = exec(env, caller, &addr, &addr, input, env.Db().GetCode(addr), gas, gasPrice, value) + return ret, err } -// NewExecution returns a new execution environment that handles all calling -// and creation logic defined by the YP. -func NewExecution(env vm.Environment, address *common.Address, input []byte, gas, gasPrice, value *big.Int) *Execution { - exe := &Execution{env: env, address: address, input: input, Gas: gas, price: gasPrice, value: value} - exe.evm = vm.NewVm(env) - return exe +// CallCode executes the given address' code as the given contract address +func CallCode(env vm.Environment, caller vm.ContractRef, addr common.Address, input []byte, gas, gasPrice, value *big.Int) (ret []byte, err error) { + prev := caller.Address() + ret, _, err = exec(env, caller, &prev, &addr, input, env.Db().GetCode(addr), gas, gasPrice, value) + return ret, err } -// Call executes within the given context -func (self *Execution) Call(codeAddr common.Address, caller vm.ContextRef) ([]byte, error) { - // Retrieve the executing code - code := self.env.State().GetCode(codeAddr) - - return self.exec(&codeAddr, code, caller) -} - -// Create creates a new contract and runs the initialisation procedure of the -// contract. This returns the returned code for the contract and is stored -// elsewhere. -func (self *Execution) Create(caller vm.ContextRef) (ret []byte, err error, account *state.StateObject) { - // Input must be nil for create - code := self.input - self.input = nil - ret, err = self.exec(nil, code, caller) +// Create creates a new contract with the given code +func Create(env vm.Environment, caller vm.ContractRef, code []byte, gas, gasPrice, value *big.Int) (ret []byte, address common.Address, err error) { + ret, address, err = exec(env, caller, nil, nil, nil, code, gas, gasPrice, value) // Here we get an error if we run into maximum stack depth, // See: https://github.com/ethereum/yellowpaper/pull/131 // and YP definitions for CREATE instruction if err != nil { - return nil, err, nil + return nil, address, err } - account = self.env.State().GetStateObject(*self.address) - return + return ret, address, err } -// exec executes the given code and executes within the contextAddr context. -func (self *Execution) exec(contextAddr *common.Address, code []byte, caller vm.ContextRef) (ret []byte, err error) { - env := self.env - evm := self.evm +func exec(env vm.Environment, caller vm.ContractRef, address, codeAddr *common.Address, input, code []byte, gas, gasPrice, value *big.Int) (ret []byte, addr common.Address, err error) { + evm := vm.NewVm(env) + // Depth check execution. Fail if we're trying to execute above the // limit. if env.Depth() > int(params.CallCreateDepth.Int64()) { - caller.ReturnGas(self.Gas, self.price) + caller.ReturnGas(gas, gasPrice) - return nil, vm.DepthError + return nil, common.Address{}, vm.DepthError } - if !env.CanTransfer(env.State().GetStateObject(caller.Address()), self.value) { - caller.ReturnGas(self.Gas, self.price) + if !env.CanTransfer(caller.Address(), value) { + caller.ReturnGas(gas, gasPrice) - return nil, ValueTransferErr("insufficient funds to transfer value. Req %v, has %v", self.value, env.State().GetBalance(caller.Address())) + return nil, common.Address{}, ValueTransferErr("insufficient funds to transfer value. Req %v, has %v", value, env.Db().GetBalance(caller.Address())) } var createAccount bool - if self.address == nil { + if address == nil { // Generate a new address - nonce := env.State().GetNonce(caller.Address()) - env.State().SetNonce(caller.Address(), nonce+1) + nonce := env.Db().GetNonce(caller.Address()) + env.Db().SetNonce(caller.Address(), nonce+1) - addr := crypto.CreateAddress(caller.Address(), nonce) + addr = crypto.CreateAddress(caller.Address(), nonce) - self.address = &addr + address = &addr createAccount = true } - snapshot := env.State().Copy() + snapshot := env.MakeSnapshot() var ( - from = env.State().GetStateObject(caller.Address()) - to *state.StateObject + from = env.Db().GetAccount(caller.Address()) + to vm.Account ) if createAccount { - to = env.State().CreateAccount(*self.address) + to = env.Db().CreateAccount(*address) } else { - to = env.State().GetOrNewStateObject(*self.address) + if !env.Db().Exist(*address) { + to = env.Db().CreateAccount(*address) + } else { + to = env.Db().GetAccount(*address) + } } - vm.Transfer(from, to, self.value) + env.Transfer(from, to, value) - context := vm.NewContext(caller, to, self.value, self.Gas, self.price) - context.SetCallCode(contextAddr, code) + contract := vm.NewContract(caller, to, value, gas, gasPrice) + contract.SetCallCode(codeAddr, code) - ret, err = evm.Run(context, self.input) + ret, err = evm.Run(contract, input) if err != nil { - env.State().Set(snapshot) + env.SetSnapshot(snapshot) //env.Db().Set(snapshot) } - return + return ret, addr, err +} + +// generic transfer method +func Transfer(from, to vm.Account, amount *big.Int) error { + if from.Balance().Cmp(amount) < 0 { + return errors.New("Insufficient balance in account") + } + + from.SubBalance(amount) + to.AddBalance(amount) + + return nil } diff --git a/core/state/log.go b/core/state/log.go deleted file mode 100644 index 5d7d7357d..000000000 --- a/core/state/log.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package state - -import ( - "fmt" - "io" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" -) - -type Log struct { - Address common.Address - Topics []common.Hash - Data []byte - Number uint64 - - TxHash common.Hash - TxIndex uint - BlockHash common.Hash - Index uint -} - -func NewLog(address common.Address, topics []common.Hash, data []byte, number uint64) *Log { - return &Log{Address: address, Topics: topics, Data: data, Number: number} -} - -func (self *Log) EncodeRLP(w io.Writer) error { - return rlp.Encode(w, []interface{}{self.Address, self.Topics, self.Data}) -} - -func (self *Log) String() string { - return fmt.Sprintf(`log: %x %x %x %x %d %x %d`, self.Address, self.Topics, self.Data, self.TxHash, self.TxIndex, self.BlockHash, self.Index) -} - -type Logs []*Log - -type LogForStorage Log - -func (self *LogForStorage) EncodeRLP(w io.Writer) error { - return rlp.Encode(w, []interface{}{ - self.Address, - self.Topics, - self.Data, - self.Number, - self.TxHash, - self.TxIndex, - self.BlockHash, - self.Index, - }) -} diff --git a/core/state/statedb.go b/core/state/statedb.go index 4233c763b..499ea5f52 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -21,6 +21,7 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" @@ -42,7 +43,7 @@ type StateDB struct { thash, bhash common.Hash txIndex int - logs map[common.Hash]Logs + logs map[common.Hash]vm.Logs logSize uint } @@ -59,7 +60,7 @@ func New(root common.Hash, db ethdb.Database) *StateDB { trie: tr, stateObjects: make(map[string]*StateObject), refund: new(big.Int), - logs: make(map[common.Hash]Logs), + logs: make(map[common.Hash]vm.Logs), } } @@ -69,7 +70,7 @@ func (self *StateDB) StartRecord(thash, bhash common.Hash, ti int) { self.txIndex = ti } -func (self *StateDB) AddLog(log *Log) { +func (self *StateDB) AddLog(log *vm.Log) { log.TxHash = self.thash log.BlockHash = self.bhash log.TxIndex = uint(self.txIndex) @@ -78,30 +79,34 @@ func (self *StateDB) AddLog(log *Log) { self.logSize++ } -func (self *StateDB) GetLogs(hash common.Hash) Logs { +func (self *StateDB) GetLogs(hash common.Hash) vm.Logs { return self.logs[hash] } -func (self *StateDB) Logs() Logs { - var logs Logs +func (self *StateDB) Logs() vm.Logs { + var logs vm.Logs for _, lgs := range self.logs { logs = append(logs, lgs...) } return logs } -func (self *StateDB) Refund(gas *big.Int) { +func (self *StateDB) AddRefund(gas *big.Int) { self.refund.Add(self.refund, gas) } -/* - * GETTERS - */ - func (self *StateDB) HasAccount(addr common.Address) bool { return self.GetStateObject(addr) != nil } +func (self *StateDB) Exist(addr common.Address) bool { + return self.GetStateObject(addr) != nil +} + +func (self *StateDB) GetAccount(addr common.Address) vm.Account { + return self.GetStateObject(addr) +} + // Retrieve the balance from the given address or 0 if object not found func (self *StateDB) GetBalance(addr common.Address) *big.Int { stateObject := self.GetStateObject(addr) @@ -245,7 +250,7 @@ func (self *StateDB) SetStateObject(object *StateObject) { func (self *StateDB) GetOrNewStateObject(addr common.Address) *StateObject { stateObject := self.GetStateObject(addr) if stateObject == nil || stateObject.deleted { - stateObject = self.CreateAccount(addr) + stateObject = self.CreateStateObject(addr) } return stateObject @@ -264,7 +269,7 @@ func (self *StateDB) newStateObject(addr common.Address) *StateObject { } // Creates creates a new state object and takes ownership. This is different from "NewStateObject" -func (self *StateDB) CreateAccount(addr common.Address) *StateObject { +func (self *StateDB) CreateStateObject(addr common.Address) *StateObject { // Get previous (if any) so := self.GetStateObject(addr) // Create a new one @@ -278,6 +283,10 @@ func (self *StateDB) CreateAccount(addr common.Address) *StateObject { return newSo } +func (self *StateDB) CreateAccount(addr common.Address) vm.Account { + return self.CreateStateObject(addr) +} + // // Setting, copying of the state methods // @@ -292,7 +301,7 @@ func (self *StateDB) Copy() *StateDB { state.refund.Set(self.refund) for hash, logs := range self.logs { - state.logs[hash] = make(Logs, len(logs)) + state.logs[hash] = make(vm.Logs, len(logs)) copy(state.logs[hash], logs) } state.logSize = self.logSize @@ -309,6 +318,10 @@ func (self *StateDB) Set(state *StateDB) { self.logSize = state.logSize } +func (self *StateDB) GetRefund() *big.Int { + return self.refund +} + // IntermediateRoot computes the current root hash of the state trie. // It is called in between transactions to get the root hash that // goes into transaction receipts. diff --git a/core/state_transition.go b/core/state_transition.go index 6ff7fa1ff..e83019229 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -51,7 +51,7 @@ type StateTransition struct { initialGas *big.Int value *big.Int data []byte - state *state.StateDB + state vm.Database env vm.Environment } @@ -95,11 +95,7 @@ func IntrinsicGas(data []byte) *big.Int { } func ApplyMessage(env vm.Environment, msg Message, gp GasPool) ([]byte, *big.Int, error) { - return NewStateTransition(env, msg, gp).transitionState() -} - -func NewStateTransition(env vm.Environment, msg Message, gp GasPool) *StateTransition { - return &StateTransition{ + var st = StateTransition{ gp: gp, env: env, msg: msg, @@ -108,18 +104,22 @@ func NewStateTransition(env vm.Environment, msg Message, gp GasPool) *StateTrans initialGas: new(big.Int), value: msg.Value(), data: msg.Data(), - state: env.State(), + state: env.Db(), } + return st.transitionDb() } -func (self *StateTransition) From() (*state.StateObject, error) { +func (self *StateTransition) from() (vm.Account, error) { f, err := self.msg.From() if err != nil { return nil, err } - return self.state.GetOrNewStateObject(f), nil + if !self.state.Exist(f) { + return self.state.CreateAccount(f), nil + } + return self.state.GetAccount(f), nil } -func (self *StateTransition) To() *state.StateObject { +func (self *StateTransition) to() vm.Account { if self.msg == nil { return nil } @@ -127,10 +127,14 @@ func (self *StateTransition) To() *state.StateObject { if to == nil { return nil // contract creation } - return self.state.GetOrNewStateObject(*to) + + if !self.state.Exist(*to) { + return self.state.CreateAccount(*to) + } + return self.state.GetAccount(*to) } -func (self *StateTransition) UseGas(amount *big.Int) error { +func (self *StateTransition) useGas(amount *big.Int) error { if self.gas.Cmp(amount) < 0 { return vm.OutOfGasError } @@ -139,15 +143,15 @@ func (self *StateTransition) UseGas(amount *big.Int) error { return nil } -func (self *StateTransition) AddGas(amount *big.Int) { +func (self *StateTransition) addGas(amount *big.Int) { self.gas.Add(self.gas, amount) } -func (self *StateTransition) BuyGas() error { +func (self *StateTransition) buyGas() error { mgas := self.msg.Gas() mgval := new(big.Int).Mul(mgas, self.gasPrice) - sender, err := self.From() + sender, err := self.from() if err != nil { return err } @@ -157,7 +161,7 @@ func (self *StateTransition) BuyGas() error { if err = self.gp.SubGas(mgas, self.gasPrice); err != nil { return err } - self.AddGas(mgas) + self.addGas(mgas) self.initialGas.Set(mgas) sender.SubBalance(mgval) return nil @@ -165,18 +169,19 @@ func (self *StateTransition) BuyGas() error { func (self *StateTransition) preCheck() (err error) { msg := self.msg - sender, err := self.From() + sender, err := self.from() if err != nil { return err } // Make sure this transaction's nonce is correct - if sender.Nonce() != msg.Nonce() { - return NonceError(msg.Nonce(), sender.Nonce()) + //if sender.Nonce() != msg.Nonce() { + if n := self.state.GetNonce(sender.Address()); n != msg.Nonce() { + return NonceError(msg.Nonce(), n) } // Pre-pay gas / Buy gas of the coinbase account - if err = self.BuyGas(); err != nil { + if err = self.buyGas(); err != nil { if state.IsGasLimitErr(err) { return err } @@ -186,28 +191,28 @@ func (self *StateTransition) preCheck() (err error) { return nil } -func (self *StateTransition) transitionState() (ret []byte, usedGas *big.Int, err error) { +func (self *StateTransition) transitionDb() (ret []byte, usedGas *big.Int, err error) { if err = self.preCheck(); err != nil { return } msg := self.msg - sender, _ := self.From() // err checked in preCheck + sender, _ := self.from() // err checked in preCheck // Pay intrinsic gas - if err = self.UseGas(IntrinsicGas(self.data)); err != nil { + if err = self.useGas(IntrinsicGas(self.data)); err != nil { return nil, nil, InvalidTxError(err) } vmenv := self.env - var ref vm.ContextRef + var addr common.Address if MessageCreatesContract(msg) { - ret, err, ref = vmenv.Create(sender, self.data, self.gas, self.gasPrice, self.value) + ret, addr, err = vmenv.Create(sender, self.data, self.gas, self.gasPrice, self.value) if err == nil { dataGas := big.NewInt(int64(len(ret))) dataGas.Mul(dataGas, params.CreateDataGas) - if err := self.UseGas(dataGas); err == nil { - ref.SetCode(ret) + if err := self.useGas(dataGas); err == nil { + self.state.SetCode(addr, ret) } else { ret = nil // does not affect consensus but useful for StateTests validations glog.V(logger.Core).Infoln("Insufficient gas for creating code. Require", dataGas, "and have", self.gas) @@ -216,8 +221,8 @@ func (self *StateTransition) transitionState() (ret []byte, usedGas *big.Int, er glog.V(logger.Core).Infoln("VM create err:", err) } else { // Increment the nonce for the next transaction - self.state.SetNonce(sender.Address(), sender.Nonce()+1) - ret, err = vmenv.Call(sender, self.To().Address(), self.data, self.gas, self.gasPrice, self.value) + self.state.SetNonce(sender.Address(), self.state.GetNonce(sender.Address())+1) + ret, err = vmenv.Call(sender, self.to().Address(), self.data, self.gas, self.gasPrice, self.value) glog.V(logger.Core).Infoln("VM call err:", err) } @@ -241,13 +246,13 @@ func (self *StateTransition) transitionState() (ret []byte, usedGas *big.Int, er } func (self *StateTransition) refundGas() { - sender, _ := self.From() // err already checked + sender, _ := self.from() // err already checked // Return remaining gas remaining := new(big.Int).Mul(self.gas, self.gasPrice) sender.AddBalance(remaining) uhalf := remaining.Div(self.gasUsed(), common.Big2) - refund := common.BigMin(uhalf, self.state.Refunds()) + refund := common.BigMin(uhalf, self.state.GetRefund()) self.gas.Add(self.gas, refund) self.state.AddBalance(sender.Address(), refund.Mul(refund, self.gasPrice)) diff --git a/core/types/bloom9.go b/core/types/bloom9.go index 0629b31d4..f87ae58e6 100644 --- a/core/types/bloom9.go +++ b/core/types/bloom9.go @@ -20,7 +20,7 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" ) @@ -37,7 +37,7 @@ func CreateBloom(receipts Receipts) Bloom { return BytesToBloom(bin.Bytes()) } -func LogsBloom(logs state.Logs) *big.Int { +func LogsBloom(logs vm.Logs) *big.Int { bin := new(big.Int) for _, log := range logs { data := make([]common.Hash, len(log.Topics)) diff --git a/core/types/common.go b/core/types/common.go index de6efcd86..dc428c00c 100644 --- a/core/types/common.go +++ b/core/types/common.go @@ -19,14 +19,14 @@ package types import ( "math/big" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "fmt" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/vm" ) type BlockProcessor interface { - Process(*Block) (state.Logs, Receipts, error) + Process(*Block) (vm.Logs, Receipts, error) } const bloomLength = 256 diff --git a/core/types/receipt.go b/core/types/receipt.go index e01d69005..bcb4bd8a5 100644 --- a/core/types/receipt.go +++ b/core/types/receipt.go @@ -23,7 +23,7 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/rlp" ) @@ -33,7 +33,7 @@ type Receipt struct { Bloom Bloom TxHash common.Hash ContractAddress common.Address - logs state.Logs + logs vm.Logs GasUsed *big.Int } @@ -41,11 +41,11 @@ func NewReceipt(root []byte, cumalativeGasUsed *big.Int) *Receipt { return &Receipt{PostState: common.CopyBytes(root), CumulativeGasUsed: new(big.Int).Set(cumalativeGasUsed)} } -func (self *Receipt) SetLogs(logs state.Logs) { +func (self *Receipt) SetLogs(logs vm.Logs) { self.logs = logs } -func (self *Receipt) Logs() state.Logs { +func (self *Receipt) Logs() vm.Logs { return self.logs } @@ -60,7 +60,7 @@ func (self *Receipt) DecodeRLP(s *rlp.Stream) error { Bloom Bloom TxHash common.Hash ContractAddress common.Address - Logs state.Logs + Logs vm.Logs GasUsed *big.Int } if err := s.Decode(&r); err != nil { @@ -74,9 +74,9 @@ func (self *Receipt) DecodeRLP(s *rlp.Stream) error { type ReceiptForStorage Receipt func (self *ReceiptForStorage) EncodeRLP(w io.Writer) error { - storageLogs := make([]*state.LogForStorage, len(self.logs)) + storageLogs := make([]*vm.LogForStorage, len(self.logs)) for i, log := range self.logs { - storageLogs[i] = (*state.LogForStorage)(log) + storageLogs[i] = (*vm.LogForStorage)(log) } return rlp.Encode(w, []interface{}{self.PostState, self.CumulativeGasUsed, self.Bloom, self.TxHash, self.ContractAddress, storageLogs, self.GasUsed}) } diff --git a/core/vm/asm.go b/core/vm/asm.go index 639201e50..065d3eb97 100644 --- a/core/vm/asm.go +++ b/core/vm/asm.go @@ -23,6 +23,8 @@ import ( "github.com/ethereum/go-ethereum/common" ) +// Dissassemble dissassembles the byte code and returns the string +// representation (human readable opcodes). func Disassemble(script []byte) (asm []string) { pc := new(big.Int) for { diff --git a/core/vm/common.go b/core/vm/common.go index 2e03ec80b..b52b598ba 100644 --- a/core/vm/common.go +++ b/core/vm/common.go @@ -22,34 +22,34 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/logger/glog" + "github.com/ethereum/go-ethereum/params" ) // Global Debug flag indicating Debug VM (full logging) var Debug bool +// Type is the VM type accepted by **NewVm** type Type byte const ( - StdVmTy Type = iota - JitVmTy + StdVmTy Type = iota // Default standard VM + JitVmTy // LLVM JIT VM MaxVmTy - - LogTyPretty byte = 0x1 - LogTyDiff byte = 0x2 ) var ( - Pow256 = common.BigPow(2, 256) + Pow256 = common.BigPow(2, 256) // Pew256 is 2**256 - U256 = common.U256 - S256 = common.S256 + U256 = common.U256 // Shortcut to common.U256 + S256 = common.S256 // Shortcut to common.S256 - Zero = common.Big0 - One = common.Big1 + Zero = common.Big0 // Shortcut to common.Big0 + One = common.Big1 // Shortcut to common.Big1 - max = big.NewInt(math.MaxInt64) + max = big.NewInt(math.MaxInt64) // Maximum 256 bit integer ) +// NewVm returns a new VM based on the Environment func NewVm(env Environment) VirtualMachine { switch env.VmType() { case JitVmTy: @@ -62,6 +62,7 @@ func NewVm(env Environment) VirtualMachine { } } +// calculates the memory size required for a step func calcMemSize(off, l *big.Int) *big.Int { if l.Cmp(common.Big0) == 0 { return common.Big0 @@ -70,6 +71,32 @@ func calcMemSize(off, l *big.Int) *big.Int { return new(big.Int).Add(off, l) } +// calculates the quadratic gas +func quadMemGas(mem *Memory, newMemSize, gas *big.Int) { + if newMemSize.Cmp(common.Big0) > 0 { + newMemSizeWords := toWordSize(newMemSize) + newMemSize.Mul(newMemSizeWords, u256(32)) + + if newMemSize.Cmp(u256(int64(mem.Len()))) > 0 { + // be careful reusing variables here when changing. + // The order has been optimised to reduce allocation + oldSize := toWordSize(big.NewInt(int64(mem.Len()))) + pow := new(big.Int).Exp(oldSize, common.Big2, Zero) + linCoef := oldSize.Mul(oldSize, params.MemoryGas) + quadCoef := new(big.Int).Div(pow, params.QuadCoeffDiv) + oldTotalFee := new(big.Int).Add(linCoef, quadCoef) + + pow.Exp(newMemSizeWords, common.Big2, Zero) + linCoef = linCoef.Mul(newMemSizeWords, params.MemoryGas) + quadCoef = quadCoef.Div(pow, params.QuadCoeffDiv) + newTotalFee := linCoef.Add(linCoef, quadCoef) + + fee := newTotalFee.Sub(newTotalFee, oldTotalFee) + gas.Add(gas, fee) + } + } +} + // Simple helper func u256(n int64) *big.Int { return big.NewInt(n) @@ -86,6 +113,8 @@ func toValue(val *big.Int) interface{} { return val } +// getData returns a slice from the data based on the start and size and pads +// up to size with zero's. This function is overflow safe. func getData(data []byte, start, size *big.Int) []byte { dlen := big.NewInt(int64(len(data))) @@ -94,7 +123,9 @@ func getData(data []byte, start, size *big.Int) []byte { return common.RightPadBytes(data[s.Uint64():e.Uint64()], int(size.Uint64())) } -func UseGas(gas, amount *big.Int) bool { +// useGas attempts to subtract the amount of gas and returns whether it was +// successful +func useGas(gas, amount *big.Int) bool { if gas.Cmp(amount) < 0 { return false } diff --git a/core/vm/context.go b/core/vm/context.go deleted file mode 100644 index d17934ba5..000000000 --- a/core/vm/context.go +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "math/big" - - "github.com/ethereum/go-ethereum/common" -) - -type ContextRef interface { - ReturnGas(*big.Int, *big.Int) - Address() common.Address - SetCode([]byte) -} - -type Context struct { - caller ContextRef - self ContextRef - - jumpdests destinations // result of JUMPDEST analysis. - - Code []byte - Input []byte - CodeAddr *common.Address - - value, Gas, UsedGas, Price *big.Int - - Args []byte -} - -// Create a new context for the given data items. -func NewContext(caller ContextRef, object ContextRef, value, gas, price *big.Int) *Context { - c := &Context{caller: caller, self: object, Args: nil} - - if parent, ok := caller.(*Context); ok { - // Reuse JUMPDEST analysis from parent context if available. - c.jumpdests = parent.jumpdests - } else { - c.jumpdests = make(destinations) - } - - // Gas should be a pointer so it can safely be reduced through the run - // This pointer will be off the state transition - c.Gas = gas //new(big.Int).Set(gas) - c.value = new(big.Int).Set(value) - // In most cases price and value are pointers to transaction objects - // and we don't want the transaction's values to change. - c.Price = new(big.Int).Set(price) - c.UsedGas = new(big.Int) - - return c -} - -func (c *Context) GetOp(n uint64) OpCode { - return OpCode(c.GetByte(n)) -} - -func (c *Context) GetByte(n uint64) byte { - if n < uint64(len(c.Code)) { - return c.Code[n] - } - - return 0 -} - -func (c *Context) Return(ret []byte) []byte { - // Return the remaining gas to the caller - c.caller.ReturnGas(c.Gas, c.Price) - - return ret -} - -/* - * Gas functions - */ -func (c *Context) UseGas(gas *big.Int) (ok bool) { - ok = UseGas(c.Gas, gas) - if ok { - c.UsedGas.Add(c.UsedGas, gas) - } - return -} - -// Implement the caller interface -func (c *Context) ReturnGas(gas, price *big.Int) { - // Return the gas to the context - c.Gas.Add(c.Gas, gas) - c.UsedGas.Sub(c.UsedGas, gas) -} - -/* - * Set / Get - */ -func (c *Context) Address() common.Address { - return c.self.Address() -} - -func (self *Context) SetCode(code []byte) { - self.Code = code -} - -func (self *Context) SetCallCode(addr *common.Address, code []byte) { - self.Code = code - self.CodeAddr = addr -} diff --git a/core/vm/contract.go b/core/vm/contract.go new file mode 100644 index 000000000..8460cc47b --- /dev/null +++ b/core/vm/contract.go @@ -0,0 +1,126 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/common" +) + +// ContractRef is a reference to the contract's backing object +type ContractRef interface { + ReturnGas(*big.Int, *big.Int) + Address() common.Address + SetCode([]byte) +} + +// Contract represents an ethereum contract in the state database. It contains +// the the contract code, calling arguments. Contract implements ContractReg +type Contract struct { + caller ContractRef + self ContractRef + + jumpdests destinations // result of JUMPDEST analysis. + + Code []byte + Input []byte + CodeAddr *common.Address + + value, Gas, UsedGas, Price *big.Int + + Args []byte +} + +// Create a new context for the given data items. +func NewContract(caller ContractRef, object ContractRef, value, gas, price *big.Int) *Contract { + c := &Contract{caller: caller, self: object, Args: nil} + + if parent, ok := caller.(*Contract); ok { + // Reuse JUMPDEST analysis from parent context if available. + c.jumpdests = parent.jumpdests + } else { + c.jumpdests = make(destinations) + } + + // Gas should be a pointer so it can safely be reduced through the run + // This pointer will be off the state transition + c.Gas = gas //new(big.Int).Set(gas) + c.value = new(big.Int).Set(value) + // In most cases price and value are pointers to transaction objects + // and we don't want the transaction's values to change. + c.Price = new(big.Int).Set(price) + c.UsedGas = new(big.Int) + + return c +} + +// GetOp returns the n'th element in the contract's byte array +func (c *Contract) GetOp(n uint64) OpCode { + return OpCode(c.GetByte(n)) +} + +// GetByte returns the n'th byte in the contract's byte array +func (c *Contract) GetByte(n uint64) byte { + if n < uint64(len(c.Code)) { + return c.Code[n] + } + + return 0 +} + +// Return returns the given ret argument and returns any remaining gas to the +// caller +func (c *Contract) Return(ret []byte) []byte { + // Return the remaining gas to the caller + c.caller.ReturnGas(c.Gas, c.Price) + + return ret +} + +// UseGas attempts the use gas and subtracts it and returns true on success +func (c *Contract) UseGas(gas *big.Int) (ok bool) { + ok = useGas(c.Gas, gas) + if ok { + c.UsedGas.Add(c.UsedGas, gas) + } + return +} + +// ReturnGas adds the given gas back to itself. +func (c *Contract) ReturnGas(gas, price *big.Int) { + // Return the gas to the context + c.Gas.Add(c.Gas, gas) + c.UsedGas.Sub(c.UsedGas, gas) +} + +// Address returns the contracts address +func (c *Contract) Address() common.Address { + return c.self.Address() +} + +// SetCode sets the code to the contract +func (self *Contract) SetCode(code []byte) { + self.Code = code +} + +// SetCallCode sets the address of the code address and sets the code +// of the contract according to the backing database. +func (self *Contract) SetCallCode(addr *common.Address, code []byte) { + self.Code = code + self.CodeAddr = addr +} diff --git a/core/vm/contracts.go b/core/vm/contracts.go index b965fa095..22cb9eab2 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -26,22 +26,22 @@ import ( "github.com/ethereum/go-ethereum/params" ) -type Address interface { - Call(in []byte) []byte -} - +// PrecompiledAccount represents a native ethereum contract type PrecompiledAccount struct { Gas func(l int) *big.Int fn func(in []byte) []byte } +// Call calls the native function func (self PrecompiledAccount) Call(in []byte) []byte { return self.fn(in) } +// Precompiled contains the default set of ethereum contracts var Precompiled = PrecompiledContracts() -// XXX Could set directly. Testing requires resetting and setting of pre compiled contracts. +// PrecompiledContracts returns the default set of precompiled ethereum +// contracts defined by the ethereum yellow paper. func PrecompiledContracts() map[string]*PrecompiledAccount { return map[string]*PrecompiledAccount{ // ECRECOVER diff --git a/core/vm/doc.go b/core/vm/doc.go new file mode 100644 index 000000000..4deb7761d --- /dev/null +++ b/core/vm/doc.go @@ -0,0 +1,32 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +/* +Package vm implements the Ethereum Virtual Machine. + +The vm package implements two EVMs, a byte code VM and a JIT VM. The BC +(Byte Code) VM loops over a set of bytes and executes them according to a set +of rules defined in the Ethereum yellow paper. When the BC VM is invokes it +invokes the JIT VM in a seperate goroutine and compiles the byte code in JIT +instructions. + +The JIT VM, when invoked, loops around a set of pre-defined instructions until +it either runs of gas, causes an internel error, returns or stops. At a later +stage the JIT VM will see some additional features that will cause sets of +instructions to be compiled down to segments. Segments are sets of instructions +that can be ran in one go saving precious time during execution. +*/ +package vm diff --git a/core/vm/environment.go b/core/vm/environment.go index 916081f51..606518fd4 100644 --- a/core/vm/environment.go +++ b/core/vm/environment.go @@ -17,39 +17,86 @@ package vm import ( - "errors" "math/big" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" ) // Environment is is required by the virtual machine to get information from -// it's own isolated environment. For an example see `core.VMEnv` -type Environment interface { - State() *state.StateDB +// it's own isolated environment. +// Environment is an EVM requirement and helper which allows access to outside +// information such like states. +type Environment interface { + // The state database + Db() Database + // Creates a restorable snapshot + MakeSnapshot() Database + // Set database to previous snapshot + SetSnapshot(Database) + // Address of the original invoker (first occurance of the VM invoker) Origin() common.Address + // The block number this VM is invoken on BlockNumber() *big.Int + // The n'th hash ago from this block number GetHash(n uint64) common.Hash + // The handler's address Coinbase() common.Address + // The current time (block time) Time() *big.Int + // Difficulty set on the current block Difficulty() *big.Int + // The gas limit of the block GasLimit() *big.Int - CanTransfer(from Account, balance *big.Int) bool + // Determines whether it's possible to transact + CanTransfer(from common.Address, balance *big.Int) bool + // Transfer from to to with amount set Transfer(from, to Account, amount *big.Int) error - AddLog(*state.Log) + // Adds a LOG to the state + AddLog(*Log) + // Adds a structured log to the env AddStructLog(StructLog) + // Returns all coalesced structured logs StructLogs() []StructLog + // Type of the VM VmType() Type + // Current calling depth Depth() int SetDepth(i int) - Call(me ContextRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) - CallCode(me ContextRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) - Create(me ContextRef, data []byte, gas, price, value *big.Int) ([]byte, error, ContextRef) + // Call another contract + Call(me ContractRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) + // Take another's contract code and execute within our own context + CallCode(me ContractRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) + // Create a new contract + Create(me ContractRef, data []byte, gas, price, value *big.Int) ([]byte, common.Address, error) +} + +// Database is a EVM database for full state querying +type Database interface { + GetAccount(common.Address) Account + CreateAccount(common.Address) Account + + AddBalance(common.Address, *big.Int) + GetBalance(common.Address) *big.Int + + GetNonce(common.Address) uint64 + SetNonce(common.Address, uint64) + + GetCode(common.Address) []byte + SetCode(common.Address, []byte) + + AddRefund(*big.Int) + GetRefund() *big.Int + + GetState(common.Address, common.Hash) common.Hash + SetState(common.Address, common.Hash, common.Hash) + + Delete(common.Address) bool + Exist(common.Address) bool + IsDeleted(common.Address) bool } // StructLog is emited to the Environment each cycle and lists information about the curent internal state @@ -68,18 +115,10 @@ type StructLog struct { type Account interface { SubBalance(amount *big.Int) AddBalance(amount *big.Int) + SetBalance(*big.Int) + SetNonce(uint64) Balance() *big.Int Address() common.Address -} - -// generic transfer method -func Transfer(from, to Account, amount *big.Int) error { - if from.Balance().Cmp(amount) < 0 { - return errors.New("Insufficient balance in account") - } - - from.SubBalance(amount) - to.AddBalance(amount) - - return nil + ReturnGas(*big.Int, *big.Int) + SetCode([]byte) } diff --git a/core/vm/gas.go b/core/vm/gas.go index b2f068e6e..bff0ac91b 100644 --- a/core/vm/gas.go +++ b/core/vm/gas.go @@ -37,6 +37,7 @@ var ( GasContractByte = big.NewInt(200) ) +// baseCheck checks for any stack error underflows func baseCheck(op OpCode, stack *stack, gas *big.Int) error { // PUSH and DUP are a bit special. They all cost the same but we do want to have checking on stack push limit // PUSH is also allowed to calculate the same price for all PUSHes @@ -63,6 +64,7 @@ func baseCheck(op OpCode, stack *stack, gas *big.Int) error { return nil } +// casts a arbitrary number to the amount of words (sets of 32 bytes) func toWordSize(size *big.Int) *big.Int { tmp := new(big.Int) tmp.Add(size, u256(31)) diff --git a/core/vm/instructions.go b/core/vm/instructions.go index aa0117cc8..6c6039f74 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -20,46 +20,52 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" ) -type instrFn func(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) -type instrExFn func(instr instruction, ret *big.Int, env Environment, context *Context, memory *Memory, stack *stack) +type programInstruction interface { + Do(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) +} + +type instrFn func(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) + +// Do executes the function. This implements programInstruction +func (fn instrFn) Do(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { + fn(instr, pc, env, contract, memory, stack) +} type instruction struct { - op OpCode - pc uint64 - fn instrFn - specFn instrExFn - data *big.Int + op OpCode + pc uint64 + fn instrFn + data *big.Int gas *big.Int spop int spush int } -func opStaticJump(instr instruction, ret *big.Int, env Environment, context *Context, memory *Memory, stack *stack) { +func opStaticJump(instr instruction, pc *uint64, ret *big.Int, env Environment, contract *Contract, memory *Memory, stack *stack) { ret.Set(instr.data) } -func opAdd(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opAdd(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x, y := stack.pop(), stack.pop() stack.push(U256(x.Add(x, y))) } -func opSub(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opSub(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x, y := stack.pop(), stack.pop() stack.push(U256(x.Sub(x, y))) } -func opMul(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opMul(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x, y := stack.pop(), stack.pop() stack.push(U256(x.Mul(x, y))) } -func opDiv(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opDiv(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x, y := stack.pop(), stack.pop() if y.Cmp(common.Big0) != 0 { stack.push(U256(x.Div(x, y))) @@ -68,7 +74,7 @@ func opDiv(instr instruction, env Environment, context *Context, memory *Memory, } } -func opSdiv(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opSdiv(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x, y := S256(stack.pop()), S256(stack.pop()) if y.Cmp(common.Big0) == 0 { stack.push(new(big.Int)) @@ -88,7 +94,7 @@ func opSdiv(instr instruction, env Environment, context *Context, memory *Memory } } -func opMod(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opMod(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x, y := stack.pop(), stack.pop() if y.Cmp(common.Big0) == 0 { stack.push(new(big.Int)) @@ -97,7 +103,7 @@ func opMod(instr instruction, env Environment, context *Context, memory *Memory, } } -func opSmod(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opSmod(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x, y := S256(stack.pop()), S256(stack.pop()) if y.Cmp(common.Big0) == 0 { @@ -117,12 +123,12 @@ func opSmod(instr instruction, env Environment, context *Context, memory *Memory } } -func opExp(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opExp(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x, y := stack.pop(), stack.pop() stack.push(U256(x.Exp(x, y, Pow256))) } -func opSignExtend(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opSignExtend(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { back := stack.pop() if back.Cmp(big.NewInt(31)) < 0 { bit := uint(back.Uint64()*8 + 7) @@ -139,12 +145,12 @@ func opSignExtend(instr instruction, env Environment, context *Context, memory * } } -func opNot(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opNot(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x := stack.pop() stack.push(U256(x.Not(x))) } -func opLt(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opLt(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x, y := stack.pop(), stack.pop() if x.Cmp(y) < 0 { stack.push(big.NewInt(1)) @@ -153,7 +159,7 @@ func opLt(instr instruction, env Environment, context *Context, memory *Memory, } } -func opGt(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opGt(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x, y := stack.pop(), stack.pop() if x.Cmp(y) > 0 { stack.push(big.NewInt(1)) @@ -162,7 +168,7 @@ func opGt(instr instruction, env Environment, context *Context, memory *Memory, } } -func opSlt(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opSlt(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x, y := S256(stack.pop()), S256(stack.pop()) if x.Cmp(S256(y)) < 0 { stack.push(big.NewInt(1)) @@ -171,7 +177,7 @@ func opSlt(instr instruction, env Environment, context *Context, memory *Memory, } } -func opSgt(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opSgt(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x, y := S256(stack.pop()), S256(stack.pop()) if x.Cmp(y) > 0 { stack.push(big.NewInt(1)) @@ -180,7 +186,7 @@ func opSgt(instr instruction, env Environment, context *Context, memory *Memory, } } -func opEq(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opEq(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x, y := stack.pop(), stack.pop() if x.Cmp(y) == 0 { stack.push(big.NewInt(1)) @@ -189,7 +195,7 @@ func opEq(instr instruction, env Environment, context *Context, memory *Memory, } } -func opIszero(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opIszero(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x := stack.pop() if x.Cmp(common.Big0) > 0 { stack.push(new(big.Int)) @@ -198,19 +204,19 @@ func opIszero(instr instruction, env Environment, context *Context, memory *Memo } } -func opAnd(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opAnd(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x, y := stack.pop(), stack.pop() stack.push(x.And(x, y)) } -func opOr(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opOr(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x, y := stack.pop(), stack.pop() stack.push(x.Or(x, y)) } -func opXor(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opXor(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x, y := stack.pop(), stack.pop() stack.push(x.Xor(x, y)) } -func opByte(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opByte(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { th, val := stack.pop(), stack.pop() if th.Cmp(big.NewInt(32)) < 0 { byte := big.NewInt(int64(common.LeftPadBytes(val.Bytes(), 32)[th.Int64()])) @@ -219,7 +225,7 @@ func opByte(instr instruction, env Environment, context *Context, memory *Memory stack.push(new(big.Int)) } } -func opAddmod(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opAddmod(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x, y, z := stack.pop(), stack.pop(), stack.pop() if z.Cmp(Zero) > 0 { add := x.Add(x, y) @@ -229,7 +235,7 @@ func opAddmod(instr instruction, env Environment, context *Context, memory *Memo stack.push(new(big.Int)) } } -func opMulmod(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opMulmod(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { x, y, z := stack.pop(), stack.pop(), stack.pop() if z.Cmp(Zero) > 0 { mul := x.Mul(x, y) @@ -240,92 +246,92 @@ func opMulmod(instr instruction, env Environment, context *Context, memory *Memo } } -func opSha3(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opSha3(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { offset, size := stack.pop(), stack.pop() hash := crypto.Sha3(memory.Get(offset.Int64(), size.Int64())) stack.push(common.BytesToBig(hash)) } -func opAddress(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { - stack.push(common.Bytes2Big(context.Address().Bytes())) +func opAddress(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { + stack.push(common.Bytes2Big(contract.Address().Bytes())) } -func opBalance(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opBalance(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { addr := common.BigToAddress(stack.pop()) - balance := env.State().GetBalance(addr) + balance := env.Db().GetBalance(addr) stack.push(new(big.Int).Set(balance)) } -func opOrigin(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opOrigin(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { stack.push(env.Origin().Big()) } -func opCaller(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { - stack.push(common.Bytes2Big(context.caller.Address().Bytes())) +func opCaller(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { + stack.push(common.Bytes2Big(contract.caller.Address().Bytes())) } -func opCallValue(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { - stack.push(new(big.Int).Set(context.value)) +func opCallValue(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { + stack.push(new(big.Int).Set(contract.value)) } -func opCalldataLoad(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { - stack.push(common.Bytes2Big(getData(context.Input, stack.pop(), common.Big32))) +func opCalldataLoad(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { + stack.push(common.Bytes2Big(getData(contract.Input, stack.pop(), common.Big32))) } -func opCalldataSize(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { - stack.push(big.NewInt(int64(len(context.Input)))) +func opCalldataSize(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { + stack.push(big.NewInt(int64(len(contract.Input)))) } -func opCalldataCopy(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opCalldataCopy(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { var ( mOff = stack.pop() cOff = stack.pop() l = stack.pop() ) - memory.Set(mOff.Uint64(), l.Uint64(), getData(context.Input, cOff, l)) + memory.Set(mOff.Uint64(), l.Uint64(), getData(contract.Input, cOff, l)) } -func opExtCodeSize(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opExtCodeSize(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { addr := common.BigToAddress(stack.pop()) - l := big.NewInt(int64(len(env.State().GetCode(addr)))) + l := big.NewInt(int64(len(env.Db().GetCode(addr)))) stack.push(l) } -func opCodeSize(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { - l := big.NewInt(int64(len(context.Code))) +func opCodeSize(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { + l := big.NewInt(int64(len(contract.Code))) stack.push(l) } -func opCodeCopy(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opCodeCopy(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { var ( mOff = stack.pop() cOff = stack.pop() l = stack.pop() ) - codeCopy := getData(context.Code, cOff, l) + codeCopy := getData(contract.Code, cOff, l) memory.Set(mOff.Uint64(), l.Uint64(), codeCopy) } -func opExtCodeCopy(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opExtCodeCopy(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { var ( addr = common.BigToAddress(stack.pop()) mOff = stack.pop() cOff = stack.pop() l = stack.pop() ) - codeCopy := getData(env.State().GetCode(addr), cOff, l) + codeCopy := getData(env.Db().GetCode(addr), cOff, l) memory.Set(mOff.Uint64(), l.Uint64(), codeCopy) } -func opGasprice(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { - stack.push(new(big.Int).Set(context.Price)) +func opGasprice(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { + stack.push(new(big.Int).Set(contract.Price)) } -func opBlockhash(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opBlockhash(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { num := stack.pop() n := new(big.Int).Sub(env.BlockNumber(), common.Big257) @@ -336,43 +342,43 @@ func opBlockhash(instr instruction, env Environment, context *Context, memory *M } } -func opCoinbase(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opCoinbase(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { stack.push(env.Coinbase().Big()) } -func opTimestamp(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opTimestamp(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { stack.push(U256(new(big.Int).Set(env.Time()))) } -func opNumber(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opNumber(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { stack.push(U256(new(big.Int).Set(env.BlockNumber()))) } -func opDifficulty(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opDifficulty(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { stack.push(U256(new(big.Int).Set(env.Difficulty()))) } -func opGasLimit(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opGasLimit(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { stack.push(U256(new(big.Int).Set(env.GasLimit()))) } -func opPop(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opPop(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { stack.pop() } -func opPush(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opPush(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { stack.push(new(big.Int).Set(instr.data)) } -func opDup(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opDup(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { stack.dup(int(instr.data.Int64())) } -func opSwap(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opSwap(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { stack.swap(int(instr.data.Int64())) } -func opLog(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opLog(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { n := int(instr.data.Int64()) topics := make([]common.Hash, n) mStart, mSize := stack.pop(), stack.pop() @@ -381,85 +387,88 @@ func opLog(instr instruction, env Environment, context *Context, memory *Memory, } d := memory.Get(mStart.Int64(), mSize.Int64()) - log := state.NewLog(context.Address(), topics, d, env.BlockNumber().Uint64()) + log := NewLog(contract.Address(), topics, d, env.BlockNumber().Uint64()) env.AddLog(log) } -func opMload(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opMload(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { offset := stack.pop() val := common.BigD(memory.Get(offset.Int64(), 32)) stack.push(val) } -func opMstore(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opMstore(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { // pop value of the stack mStart, val := stack.pop(), stack.pop() memory.Set(mStart.Uint64(), 32, common.BigToBytes(val, 256)) } -func opMstore8(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opMstore8(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { off, val := stack.pop().Int64(), stack.pop().Int64() memory.store[off] = byte(val & 0xff) } -func opSload(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opSload(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { loc := common.BigToHash(stack.pop()) - val := env.State().GetState(context.Address(), loc).Big() + val := env.Db().GetState(contract.Address(), loc).Big() stack.push(val) } -func opSstore(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opSstore(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { loc := common.BigToHash(stack.pop()) val := stack.pop() - env.State().SetState(context.Address(), loc, common.BigToHash(val)) + env.Db().SetState(contract.Address(), loc, common.BigToHash(val)) } -func opJump(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) {} -func opJumpi(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) {} -func opJumpdest(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) {} +func opJump(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { +} +func opJumpi(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { +} +func opJumpdest(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { +} -func opPc(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opPc(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { stack.push(new(big.Int).Set(instr.data)) } -func opMsize(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opMsize(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { stack.push(big.NewInt(int64(memory.Len()))) } -func opGas(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { - stack.push(new(big.Int).Set(context.Gas)) +func opGas(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { + stack.push(new(big.Int).Set(contract.Gas)) } -func opCreate(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opCreate(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { var ( value = stack.pop() offset, size = stack.pop(), stack.pop() input = memory.Get(offset.Int64(), size.Int64()) - gas = new(big.Int).Set(context.Gas) + gas = new(big.Int).Set(contract.Gas) addr common.Address + ret []byte + suberr error ) - context.UseGas(context.Gas) - ret, suberr, ref := env.Create(context, input, gas, context.Price, value) + contract.UseGas(contract.Gas) + ret, addr, suberr = env.Create(contract, input, gas, contract.Price, value) if suberr != nil { stack.push(new(big.Int)) - } else { // gas < len(ret) * Createinstr.dataGas == NO_CODE dataGas := big.NewInt(int64(len(ret))) dataGas.Mul(dataGas, params.CreateDataGas) - if context.UseGas(dataGas) { - ref.SetCode(ret) + if contract.UseGas(dataGas) { + env.Db().SetCode(addr, ret) } - addr = ref.Address() stack.push(addr.Big()) } } -func opCall(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opCall(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { gas := stack.pop() // pop gas and value of the stack. addr, value := stack.pop(), stack.pop() @@ -478,7 +487,7 @@ func opCall(instr instruction, env Environment, context *Context, memory *Memory gas.Add(gas, params.CallStipend) } - ret, err := env.Call(context, address, args, gas, context.Price, value) + ret, err := env.Call(contract, address, args, gas, contract.Price, value) if err != nil { stack.push(new(big.Int)) @@ -490,7 +499,7 @@ func opCall(instr instruction, env Environment, context *Context, memory *Memory } } -func opCallCode(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { +func opCallCode(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { gas := stack.pop() // pop gas and value of the stack. addr, value := stack.pop(), stack.pop() @@ -509,7 +518,7 @@ func opCallCode(instr instruction, env Environment, context *Context, memory *Me gas.Add(gas, params.CallStipend) } - ret, err := env.CallCode(context, address, args, gas, context.Price, value) + ret, err := env.CallCode(contract, address, args, gas, contract.Price, value) if err != nil { stack.push(new(big.Int)) @@ -521,14 +530,58 @@ func opCallCode(instr instruction, env Environment, context *Context, memory *Me } } -func opReturn(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) {} -func opStop(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) {} +func opReturn(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { +} +func opStop(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { +} + +func opSuicide(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { + //receiver := env.Db().GetOrNewStateObject(common.BigToAddress(stack.pop())) + //receiver.AddBalance(balance) + balance := env.Db().GetBalance(contract.Address()) + env.Db().AddBalance(common.BigToAddress(stack.pop()), balance) + + env.Db().Delete(contract.Address()) +} + +// following functions are used by the instruction jump table + +// make log instruction function +func makeLog(size int) instrFn { + return func(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { + topics := make([]common.Hash, size) + mStart, mSize := stack.pop(), stack.pop() + for i := 0; i < size; i++ { + topics[i] = common.BigToHash(stack.pop()) + } + + d := memory.Get(mStart.Int64(), mSize.Int64()) + log := NewLog(contract.Address(), topics, d, env.BlockNumber().Uint64()) + env.AddLog(log) + } +} -func opSuicide(instr instruction, env Environment, context *Context, memory *Memory, stack *stack) { - receiver := env.State().GetOrNewStateObject(common.BigToAddress(stack.pop())) - balance := env.State().GetBalance(context.Address()) +// make push instruction function +func makePush(size uint64, bsize *big.Int) instrFn { + return func(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { + byts := getData(contract.Code, new(big.Int).SetUint64(*pc+1), bsize) + stack.push(common.Bytes2Big(byts)) + *pc += size + } +} - receiver.AddBalance(balance) +// make push instruction function +func makeDup(size int64) instrFn { + return func(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { + stack.dup(int(size)) + } +} - env.State().Delete(context.Address()) +// make swap instruction function +func makeSwap(size int64) instrFn { + // switch n + 1 otherwise n would be swapped with n + size += 1 + return func(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { + stack.swap(int(size)) + } } diff --git a/core/vm/jit.go b/core/vm/jit.go index 084d2a3f3..6ad574917 100644 --- a/core/vm/jit.go +++ b/core/vm/jit.go @@ -20,10 +20,12 @@ import ( "fmt" "math/big" "sync/atomic" + "time" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/params" "github.com/hashicorp/golang-lru" ) @@ -35,6 +37,14 @@ const ( progCompile progReady progError + + defaultJitMaxCache int = 64 +) + +var ( + EnableJit bool // Enables the JIT VM + ForceJit bool // Force the JIT, skip byte VM + MaxProgSize int // Max cache size for JIT Programs ) var programs *lru.Cache @@ -74,7 +84,7 @@ type Program struct { Id common.Hash // Id of the program status int32 // status should be accessed atomically - context *Context + contract *Contract instructions []instruction // instruction set mapping map[uint64]int // real PC mapping to array indices @@ -108,7 +118,7 @@ func (p *Program) addInstr(op OpCode, pc uint64, fn instrFn, data *big.Int) { baseOp = DUP1 } base := _baseCheck[baseOp] - instr := instruction{op, pc, fn, nil, data, base.gas, base.stackPop, base.stackPush} + instr := instruction{op, pc, fn, data, base.gas, base.stackPop, base.stackPush} p.instructions = append(p.instructions, instr) p.mapping[pc] = len(p.instructions) - 1 @@ -127,6 +137,13 @@ func CompileProgram(program *Program) (err error) { atomic.StoreInt32(&program.status, int32(progReady)) } }() + if glog.V(logger.Debug) { + glog.Infof("compiling %x\n", program.Id[:4]) + tstart := time.Now() + defer func() { + glog.Infof("compiled %x instrc: %d time: %v\n", program.Id[:4], len(program.instructions), time.Since(tstart)) + }() + } // loop thru the opcodes and "compile" in to instructions for pc := uint64(0); pc < uint64(len(program.code)); pc++ { @@ -264,7 +281,7 @@ func CompileProgram(program *Program) (err error) { program.addInstr(op, pc, opReturn, nil) case SUICIDE: program.addInstr(op, pc, opSuicide, nil) - case STOP: // Stop the context + case STOP: // Stop the contract program.addInstr(op, pc, opStop, nil) default: program.addInstr(op, pc, nil, nil) @@ -274,23 +291,24 @@ func CompileProgram(program *Program) (err error) { return nil } -// RunProgram runs the program given the enviroment and context and returns an +// RunProgram runs the program given the enviroment and contract and returns an // error if the execution failed (non-consensus) -func RunProgram(program *Program, env Environment, context *Context, input []byte) ([]byte, error) { - return runProgram(program, 0, NewMemory(), newstack(), env, context, input) +func RunProgram(program *Program, env Environment, contract *Contract, input []byte) ([]byte, error) { + return runProgram(program, 0, NewMemory(), newstack(), env, contract, input) } -func runProgram(program *Program, pcstart uint64, mem *Memory, stack *stack, env Environment, context *Context, input []byte) ([]byte, error) { - context.Input = input +func runProgram(program *Program, pcstart uint64, mem *Memory, stack *stack, env Environment, contract *Contract, input []byte) ([]byte, error) { + contract.Input = input var ( - caller = context.caller - statedb = env.State() - pc int = program.mapping[pcstart] + caller = contract.caller + statedb = env.Db() + pc int = program.mapping[pcstart] + instrCount = 0 jump = func(to *big.Int) error { if !validDest(program.destinations, to) { - nop := context.GetOp(to.Uint64()) + nop := contract.GetOp(to.Uint64()) return fmt.Errorf("invalid jump destination (%v) %v", nop, to) } @@ -300,18 +318,28 @@ func runProgram(program *Program, pcstart uint64, mem *Memory, stack *stack, env } ) + if glog.V(logger.Debug) { + glog.Infof("running JIT program %x\n", program.Id[:4]) + tstart := time.Now() + defer func() { + glog.Infof("JIT program %x done. time: %v instrc: %v\n", program.Id[:4], time.Since(tstart), instrCount) + }() + } + for pc < len(program.instructions) { + instrCount++ + instr := program.instructions[pc] // calculate the new memory size and gas price for the current executing opcode - newMemSize, cost, err := jitCalculateGasAndSize(env, context, caller, instr, statedb, mem, stack) + newMemSize, cost, err := jitCalculateGasAndSize(env, contract, caller, instr, statedb, mem, stack) if err != nil { return nil, err } // Use the calculated gas. When insufficient gas is present, use all gas and return an // Out Of Gas error - if !context.UseGas(cost) { + if !contract.UseGas(cost) { return nil, OutOfGasError } // Resize the memory calculated previously @@ -338,27 +366,27 @@ func runProgram(program *Program, pcstart uint64, mem *Memory, stack *stack, env offset, size := stack.pop(), stack.pop() ret := mem.GetPtr(offset.Int64(), size.Int64()) - return context.Return(ret), nil + return contract.Return(ret), nil case SUICIDE: - instr.fn(instr, env, context, mem, stack) + instr.fn(instr, nil, env, contract, mem, stack) - return context.Return(nil), nil + return contract.Return(nil), nil case STOP: - return context.Return(nil), nil + return contract.Return(nil), nil default: if instr.fn == nil { return nil, fmt.Errorf("Invalid opcode %x", instr.op) } - instr.fn(instr, env, context, mem, stack) + instr.fn(instr, nil, env, contract, mem, stack) } pc++ } - context.Input = nil + contract.Input = nil - return context.Return(nil), nil + return contract.Return(nil), nil } // validDest checks if the given distination is a valid one given the @@ -375,7 +403,7 @@ func validDest(dests map[uint64]struct{}, dest *big.Int) bool { // jitCalculateGasAndSize calculates the required given the opcode and stack items calculates the new memorysize for // the operation. This does not reduce gas or resizes the memory. -func jitCalculateGasAndSize(env Environment, context *Context, caller ContextRef, instr instruction, statedb *state.StateDB, mem *Memory, stack *stack) (*big.Int, *big.Int, error) { +func jitCalculateGasAndSize(env Environment, contract *Contract, caller ContractRef, instr instruction, statedb Database, mem *Memory, stack *stack) (*big.Int, *big.Int, error) { var ( gas = new(big.Int) newMemSize *big.Int = new(big.Int) @@ -426,27 +454,25 @@ func jitCalculateGasAndSize(env Environment, context *Context, caller ContextRef var g *big.Int y, x := stack.data[stack.len()-2], stack.data[stack.len()-1] - val := statedb.GetState(context.Address(), common.BigToHash(x)) + val := statedb.GetState(contract.Address(), common.BigToHash(x)) // This checks for 3 scenario's and calculates gas accordingly // 1. From a zero-value address to a non-zero value (NEW VALUE) // 2. From a non-zero value address to a zero-value address (DELETE) // 3. From a nen-zero to a non-zero (CHANGE) if common.EmptyHash(val) && !common.EmptyHash(common.BigToHash(y)) { - // 0 => non 0 g = params.SstoreSetGas } else if !common.EmptyHash(val) && common.EmptyHash(common.BigToHash(y)) { - statedb.Refund(params.SstoreRefundGas) + statedb.AddRefund(params.SstoreRefundGas) g = params.SstoreClearGas } else { - // non 0 => non 0 (or 0 => 0) g = params.SstoreClearGas } gas.Set(g) case SUICIDE: - if !statedb.IsDeleted(context.Address()) { - statedb.Refund(params.SuicideRefundGas) + if !statedb.IsDeleted(contract.Address()) { + statedb.AddRefund(params.SuicideRefundGas) } case MLOAD: newMemSize = calcMemSize(stack.peek(), u256(32)) @@ -483,7 +509,8 @@ func jitCalculateGasAndSize(env Environment, context *Context, caller ContextRef gas.Add(gas, stack.data[stack.len()-1]) if op == CALL { - if env.State().GetStateObject(common.BigToAddress(stack.data[stack.len()-2])) == nil { + //if env.Db().GetStateObject(common.BigToAddress(stack.data[stack.len()-2])) == nil { + if !env.Db().Exist(common.BigToAddress(stack.data[stack.len()-2])) { gas.Add(gas, params.CallNewAccountGas) } } @@ -497,29 +524,7 @@ func jitCalculateGasAndSize(env Environment, context *Context, caller ContextRef newMemSize = common.BigMax(x, y) } - - if newMemSize.Cmp(common.Big0) > 0 { - newMemSizeWords := toWordSize(newMemSize) - newMemSize.Mul(newMemSizeWords, u256(32)) - - if newMemSize.Cmp(u256(int64(mem.Len()))) > 0 { - // be careful reusing variables here when changing. - // The order has been optimised to reduce allocation - oldSize := toWordSize(big.NewInt(int64(mem.Len()))) - pow := new(big.Int).Exp(oldSize, common.Big2, Zero) - linCoef := oldSize.Mul(oldSize, params.MemoryGas) - quadCoef := new(big.Int).Div(pow, params.QuadCoeffDiv) - oldTotalFee := new(big.Int).Add(linCoef, quadCoef) - - pow.Exp(newMemSizeWords, common.Big2, Zero) - linCoef = linCoef.Mul(newMemSizeWords, params.MemoryGas) - quadCoef = quadCoef.Div(pow, params.QuadCoeffDiv) - newTotalFee := linCoef.Add(linCoef, quadCoef) - - fee := newTotalFee.Sub(newTotalFee, oldTotalFee) - gas.Add(gas, fee) - } - } + quadMemGas(mem, newMemSize, gas) return newMemSize, gas, nil } diff --git a/core/vm/jit_test.go b/core/vm/jit_test.go index d8e442637..8c45f2ce7 100644 --- a/core/vm/jit_test.go +++ b/core/vm/jit_test.go @@ -21,13 +21,56 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" ) const maxRun = 1000 +func TestCompiling(t *testing.T) { + prog := NewProgram([]byte{0x60, 0x10}) + err := CompileProgram(prog) + if err != nil { + t.Error("didn't expect compile error") + } + + if len(prog.instructions) != 1 { + t.Error("exected 1 compiled instruction, got", len(prog.instructions)) + } +} + +func TestResetInput(t *testing.T) { + var sender account + + env := NewEnv() + contract := NewContract(sender, sender, big.NewInt(100), big.NewInt(10000), big.NewInt(0)) + contract.CodeAddr = &common.Address{} + + program := NewProgram([]byte{}) + RunProgram(program, env, contract, []byte{0xbe, 0xef}) + if contract.Input != nil { + t.Errorf("expected input to be nil, got %x", contract.Input) + } +} + +func TestPcMappingToInstruction(t *testing.T) { + program := NewProgram([]byte{byte(PUSH2), 0xbe, 0xef, byte(ADD)}) + CompileProgram(program) + if program.mapping[3] != 1 { + t.Error("expected mapping PC 4 to me instr no. 2, got", program.mapping[4]) + } +} + +var benchmarks = map[string]vmBench{ + "pushes": vmBench{ + false, false, false, + common.Hex2Bytes("600a600a01600a600a01600a600a01600a600a01600a600a01600a600a01600a600a01600a600a01600a600a01600a600a01"), nil, + }, +} + +func BenchmarkPushes(b *testing.B) { + runVmBench(benchmarks["pushes"], b) +} + type vmBench struct { precompile bool // compile prior to executing nojit bool // ignore jit (sets DisbaleJit = true @@ -37,9 +80,19 @@ type vmBench struct { input []byte } +type account struct{} + +func (account) SubBalance(amount *big.Int) {} +func (account) AddBalance(amount *big.Int) {} +func (account) SetBalance(*big.Int) {} +func (account) SetNonce(uint64) {} +func (account) Balance() *big.Int { return nil } +func (account) Address() common.Address { return common.Address{} } +func (account) ReturnGas(*big.Int, *big.Int) {} +func (account) SetCode([]byte) {} + func runVmBench(test vmBench, b *testing.B) { - db, _ := ethdb.NewMemDatabase() - sender := state.NewStateObject(common.Address{}, db) + var sender account if test.precompile && !test.forcejit { NewProgram(test.code) @@ -52,7 +105,7 @@ func runVmBench(test vmBench, b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ { - context := NewContext(sender, sender, big.NewInt(100), big.NewInt(10000), big.NewInt(0)) + context := NewContract(sender, sender, big.NewInt(100), big.NewInt(10000), big.NewInt(0)) context.Code = test.code context.CodeAddr = &common.Address{} _, err := New(env).Run(context, test.input) @@ -63,17 +116,6 @@ func runVmBench(test vmBench, b *testing.B) { } } -var benchmarks = map[string]vmBench{ - "pushes": vmBench{ - false, false, false, - common.Hex2Bytes("600a600a01600a600a01600a600a01600a600a01600a600a01600a600a01600a600a01600a600a01600a600a01600a600a01"), nil, - }, -} - -func BenchmarkPushes(b *testing.B) { - runVmBench(benchmarks["pushes"], b) -} - type Env struct { gasLimit *big.Int depth int @@ -93,30 +135,32 @@ func (self *Env) StructLogs() []StructLog { //func (self *Env) PrevHash() []byte { return self.parent } func (self *Env) Coinbase() common.Address { return common.Address{} } +func (self *Env) MakeSnapshot() Database { return nil } +func (self *Env) SetSnapshot(Database) {} func (self *Env) Time() *big.Int { return big.NewInt(time.Now().Unix()) } func (self *Env) Difficulty() *big.Int { return big.NewInt(0) } -func (self *Env) State() *state.StateDB { return nil } +func (self *Env) Db() Database { return nil } func (self *Env) GasLimit() *big.Int { return self.gasLimit } func (self *Env) VmType() Type { return StdVmTy } func (self *Env) GetHash(n uint64) common.Hash { return common.BytesToHash(crypto.Sha3([]byte(big.NewInt(int64(n)).String()))) } -func (self *Env) AddLog(log *state.Log) { +func (self *Env) AddLog(log *Log) { } func (self *Env) Depth() int { return self.depth } func (self *Env) SetDepth(i int) { self.depth = i } -func (self *Env) CanTransfer(from Account, balance *big.Int) bool { - return from.Balance().Cmp(balance) >= 0 +func (self *Env) CanTransfer(from common.Address, balance *big.Int) bool { + return true } func (self *Env) Transfer(from, to Account, amount *big.Int) error { return nil } -func (self *Env) Call(caller ContextRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { +func (self *Env) Call(caller ContractRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { return nil, nil } -func (self *Env) CallCode(caller ContextRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { +func (self *Env) CallCode(caller ContractRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { return nil, nil } -func (self *Env) Create(caller ContextRef, data []byte, gas, price, value *big.Int) ([]byte, error, ContextRef) { - return nil, nil, nil +func (self *Env) Create(caller ContractRef, data []byte, gas, price, value *big.Int) ([]byte, common.Address, error) { + return nil, common.Address{}, nil } diff --git a/core/vm/jump_table.go b/core/vm/jump_table.go new file mode 100644 index 000000000..ab899647f --- /dev/null +++ b/core/vm/jump_table.go @@ -0,0 +1,143 @@ +package vm + +import "math/big" + +type jumpPtr struct { + fn instrFn + valid bool +} + +var jumpTable [256]jumpPtr + +func init() { + jumpTable[ADD] = jumpPtr{opAdd, true} + jumpTable[SUB] = jumpPtr{opSub, true} + jumpTable[MUL] = jumpPtr{opMul, true} + jumpTable[DIV] = jumpPtr{opDiv, true} + jumpTable[SDIV] = jumpPtr{opSdiv, true} + jumpTable[MOD] = jumpPtr{opMod, true} + jumpTable[SMOD] = jumpPtr{opSmod, true} + jumpTable[EXP] = jumpPtr{opExp, true} + jumpTable[SIGNEXTEND] = jumpPtr{opSignExtend, true} + jumpTable[NOT] = jumpPtr{opNot, true} + jumpTable[LT] = jumpPtr{opLt, true} + jumpTable[GT] = jumpPtr{opGt, true} + jumpTable[SLT] = jumpPtr{opSlt, true} + jumpTable[SGT] = jumpPtr{opSgt, true} + jumpTable[EQ] = jumpPtr{opEq, true} + jumpTable[ISZERO] = jumpPtr{opIszero, true} + jumpTable[AND] = jumpPtr{opAnd, true} + jumpTable[OR] = jumpPtr{opOr, true} + jumpTable[XOR] = jumpPtr{opXor, true} + jumpTable[BYTE] = jumpPtr{opByte, true} + jumpTable[ADDMOD] = jumpPtr{opAddmod, true} + jumpTable[MULMOD] = jumpPtr{opMulmod, true} + jumpTable[SHA3] = jumpPtr{opSha3, true} + jumpTable[ADDRESS] = jumpPtr{opAddress, true} + jumpTable[BALANCE] = jumpPtr{opBalance, true} + jumpTable[ORIGIN] = jumpPtr{opOrigin, true} + jumpTable[CALLER] = jumpPtr{opCaller, true} + jumpTable[CALLVALUE] = jumpPtr{opCallValue, true} + jumpTable[CALLDATALOAD] = jumpPtr{opCalldataLoad, true} + jumpTable[CALLDATASIZE] = jumpPtr{opCalldataSize, true} + jumpTable[CALLDATACOPY] = jumpPtr{opCalldataCopy, true} + jumpTable[CODESIZE] = jumpPtr{opCodeSize, true} + jumpTable[EXTCODESIZE] = jumpPtr{opExtCodeSize, true} + jumpTable[CODECOPY] = jumpPtr{opCodeCopy, true} + jumpTable[EXTCODECOPY] = jumpPtr{opExtCodeCopy, true} + jumpTable[GASPRICE] = jumpPtr{opGasprice, true} + jumpTable[BLOCKHASH] = jumpPtr{opBlockhash, true} + jumpTable[COINBASE] = jumpPtr{opCoinbase, true} + jumpTable[TIMESTAMP] = jumpPtr{opTimestamp, true} + jumpTable[NUMBER] = jumpPtr{opNumber, true} + jumpTable[DIFFICULTY] = jumpPtr{opDifficulty, true} + jumpTable[GASLIMIT] = jumpPtr{opGasLimit, true} + jumpTable[POP] = jumpPtr{opPop, true} + jumpTable[MLOAD] = jumpPtr{opMload, true} + jumpTable[MSTORE] = jumpPtr{opMstore, true} + jumpTable[MSTORE8] = jumpPtr{opMstore8, true} + jumpTable[SLOAD] = jumpPtr{opSload, true} + jumpTable[SSTORE] = jumpPtr{opSstore, true} + jumpTable[JUMPDEST] = jumpPtr{opJumpdest, true} + jumpTable[PC] = jumpPtr{nil, true} + jumpTable[MSIZE] = jumpPtr{opMsize, true} + jumpTable[GAS] = jumpPtr{opGas, true} + jumpTable[CREATE] = jumpPtr{opCreate, true} + jumpTable[CALL] = jumpPtr{opCall, true} + jumpTable[CALLCODE] = jumpPtr{opCallCode, true} + jumpTable[LOG0] = jumpPtr{makeLog(0), true} + jumpTable[LOG1] = jumpPtr{makeLog(1), true} + jumpTable[LOG2] = jumpPtr{makeLog(2), true} + jumpTable[LOG3] = jumpPtr{makeLog(3), true} + jumpTable[LOG4] = jumpPtr{makeLog(4), true} + jumpTable[SWAP1] = jumpPtr{makeSwap(1), true} + jumpTable[SWAP2] = jumpPtr{makeSwap(2), true} + jumpTable[SWAP3] = jumpPtr{makeSwap(3), true} + jumpTable[SWAP4] = jumpPtr{makeSwap(4), true} + jumpTable[SWAP5] = jumpPtr{makeSwap(5), true} + jumpTable[SWAP6] = jumpPtr{makeSwap(6), true} + jumpTable[SWAP7] = jumpPtr{makeSwap(7), true} + jumpTable[SWAP8] = jumpPtr{makeSwap(8), true} + jumpTable[SWAP9] = jumpPtr{makeSwap(9), true} + jumpTable[SWAP10] = jumpPtr{makeSwap(10), true} + jumpTable[SWAP11] = jumpPtr{makeSwap(11), true} + jumpTable[SWAP12] = jumpPtr{makeSwap(12), true} + jumpTable[SWAP13] = jumpPtr{makeSwap(13), true} + jumpTable[SWAP14] = jumpPtr{makeSwap(14), true} + jumpTable[SWAP15] = jumpPtr{makeSwap(15), true} + jumpTable[SWAP16] = jumpPtr{makeSwap(16), true} + jumpTable[PUSH1] = jumpPtr{makePush(1, big.NewInt(1)), true} + jumpTable[PUSH2] = jumpPtr{makePush(2, big.NewInt(2)), true} + jumpTable[PUSH3] = jumpPtr{makePush(3, big.NewInt(3)), true} + jumpTable[PUSH4] = jumpPtr{makePush(4, big.NewInt(4)), true} + jumpTable[PUSH5] = jumpPtr{makePush(5, big.NewInt(5)), true} + jumpTable[PUSH6] = jumpPtr{makePush(6, big.NewInt(6)), true} + jumpTable[PUSH7] = jumpPtr{makePush(7, big.NewInt(7)), true} + jumpTable[PUSH8] = jumpPtr{makePush(8, big.NewInt(8)), true} + jumpTable[PUSH9] = jumpPtr{makePush(9, big.NewInt(9)), true} + jumpTable[PUSH10] = jumpPtr{makePush(10, big.NewInt(10)), true} + jumpTable[PUSH11] = jumpPtr{makePush(11, big.NewInt(11)), true} + jumpTable[PUSH12] = jumpPtr{makePush(12, big.NewInt(12)), true} + jumpTable[PUSH13] = jumpPtr{makePush(13, big.NewInt(13)), true} + jumpTable[PUSH14] = jumpPtr{makePush(14, big.NewInt(14)), true} + jumpTable[PUSH15] = jumpPtr{makePush(15, big.NewInt(15)), true} + jumpTable[PUSH16] = jumpPtr{makePush(16, big.NewInt(16)), true} + jumpTable[PUSH17] = jumpPtr{makePush(17, big.NewInt(17)), true} + jumpTable[PUSH18] = jumpPtr{makePush(18, big.NewInt(18)), true} + jumpTable[PUSH19] = jumpPtr{makePush(19, big.NewInt(19)), true} + jumpTable[PUSH20] = jumpPtr{makePush(20, big.NewInt(20)), true} + jumpTable[PUSH21] = jumpPtr{makePush(21, big.NewInt(21)), true} + jumpTable[PUSH22] = jumpPtr{makePush(22, big.NewInt(22)), true} + jumpTable[PUSH23] = jumpPtr{makePush(23, big.NewInt(23)), true} + jumpTable[PUSH24] = jumpPtr{makePush(24, big.NewInt(24)), true} + jumpTable[PUSH25] = jumpPtr{makePush(25, big.NewInt(25)), true} + jumpTable[PUSH26] = jumpPtr{makePush(26, big.NewInt(26)), true} + jumpTable[PUSH27] = jumpPtr{makePush(27, big.NewInt(27)), true} + jumpTable[PUSH28] = jumpPtr{makePush(28, big.NewInt(28)), true} + jumpTable[PUSH29] = jumpPtr{makePush(29, big.NewInt(29)), true} + jumpTable[PUSH30] = jumpPtr{makePush(30, big.NewInt(30)), true} + jumpTable[PUSH31] = jumpPtr{makePush(31, big.NewInt(31)), true} + jumpTable[PUSH32] = jumpPtr{makePush(32, big.NewInt(32)), true} + jumpTable[DUP1] = jumpPtr{makeDup(1), true} + jumpTable[DUP2] = jumpPtr{makeDup(2), true} + jumpTable[DUP3] = jumpPtr{makeDup(3), true} + jumpTable[DUP4] = jumpPtr{makeDup(4), true} + jumpTable[DUP5] = jumpPtr{makeDup(5), true} + jumpTable[DUP6] = jumpPtr{makeDup(6), true} + jumpTable[DUP7] = jumpPtr{makeDup(7), true} + jumpTable[DUP8] = jumpPtr{makeDup(8), true} + jumpTable[DUP9] = jumpPtr{makeDup(9), true} + jumpTable[DUP10] = jumpPtr{makeDup(10), true} + jumpTable[DUP11] = jumpPtr{makeDup(11), true} + jumpTable[DUP12] = jumpPtr{makeDup(12), true} + jumpTable[DUP13] = jumpPtr{makeDup(13), true} + jumpTable[DUP14] = jumpPtr{makeDup(14), true} + jumpTable[DUP15] = jumpPtr{makeDup(15), true} + jumpTable[DUP16] = jumpPtr{makeDup(16), true} + + jumpTable[RETURN] = jumpPtr{nil, true} + jumpTable[SUICIDE] = jumpPtr{nil, true} + jumpTable[JUMP] = jumpPtr{nil, true} + jumpTable[JUMPI] = jumpPtr{nil, true} + jumpTable[STOP] = jumpPtr{nil, true} +} diff --git a/core/vm/log.go b/core/vm/log.go new file mode 100644 index 000000000..354f0ad35 --- /dev/null +++ b/core/vm/log.go @@ -0,0 +1,66 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "fmt" + "io" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/rlp" +) + +type Log struct { + Address common.Address + Topics []common.Hash + Data []byte + Number uint64 + + TxHash common.Hash + TxIndex uint + BlockHash common.Hash + Index uint +} + +func NewLog(address common.Address, topics []common.Hash, data []byte, number uint64) *Log { + return &Log{Address: address, Topics: topics, Data: data, Number: number} +} + +func (self *Log) EncodeRLP(w io.Writer) error { + return rlp.Encode(w, []interface{}{self.Address, self.Topics, self.Data}) +} + +func (self *Log) String() string { + return fmt.Sprintf(`log: %x %x %x %x %d %x %d`, self.Address, self.Topics, self.Data, self.TxHash, self.TxIndex, self.BlockHash, self.Index) +} + +type Logs []*Log + +type LogForStorage Log + +func (self *LogForStorage) EncodeRLP(w io.Writer) error { + return rlp.Encode(w, []interface{}{ + self.Address, + self.Topics, + self.Data, + self.Number, + self.TxHash, + self.TxIndex, + self.BlockHash, + self.Index, + }) +} diff --git a/core/vm/logger.go b/core/vm/logger.go index 736f595f6..2bd02319f 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -24,6 +24,7 @@ import ( "github.com/ethereum/go-ethereum/common" ) +// StdErrFormat formats a slice of StructLogs to human readable format func StdErrFormat(logs []StructLog) { fmt.Fprintf(os.Stderr, "VM STAT %d OPs\n", len(logs)) for _, log := range logs { diff --git a/core/vm/memory.go b/core/vm/memory.go index 0109050d7..101ec75cb 100644 --- a/core/vm/memory.go +++ b/core/vm/memory.go @@ -18,6 +18,7 @@ package vm import "fmt" +// Memory implements ethereum RAM backed by a simple byte slice type Memory struct { store []byte } @@ -26,6 +27,7 @@ func NewMemory() *Memory { return &Memory{nil} } +// Set sets offset + size to value func (m *Memory) Set(offset, size uint64, value []byte) { // length of store may never be less than offset + size. // The store should be resized PRIOR to setting the memory @@ -40,12 +42,14 @@ func (m *Memory) Set(offset, size uint64, value []byte) { } } +// Resize resizes the memory to size func (m *Memory) Resize(size uint64) { if uint64(m.Len()) < size { m.store = append(m.store, make([]byte, size-uint64(m.Len()))...) } } +// Get returns offset + size as a new slice func (self *Memory) Get(offset, size int64) (cpy []byte) { if size == 0 { return nil @@ -61,6 +65,7 @@ func (self *Memory) Get(offset, size int64) (cpy []byte) { return } +// GetPtr returns the offset + size func (self *Memory) GetPtr(offset, size int64) []byte { if size == 0 { return nil @@ -73,10 +78,12 @@ func (self *Memory) GetPtr(offset, size int64) []byte { return nil } +// Len returns the length of the backing slice func (m *Memory) Len() int { return len(m.store) } +// Data returns the backing slice func (m *Memory) Data() []byte { return m.store } diff --git a/core/vm/opcodes.go b/core/vm/opcodes.go index ecced3650..986c35ef8 100644 --- a/core/vm/opcodes.go +++ b/core/vm/opcodes.go @@ -20,9 +20,9 @@ import ( "fmt" ) +// OpCode is an EVM opcode type OpCode byte -// Op codes const ( // 0x0 range - arithmetic ops STOP OpCode = iota diff --git a/core/vm/settings.go b/core/vm/settings.go deleted file mode 100644 index f9296f6c8..000000000 --- a/core/vm/settings.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -var ( - EnableJit bool // Enables the JIT VM - ForceJit bool // Force the JIT, skip byte VM - MaxProgSize int // Max cache size for JIT Programs -) - -const defaultJitMaxCache int = 64 diff --git a/core/vm/virtual_machine.go b/core/vm/virtual_machine.go index 047723744..9b3340bb2 100644 --- a/core/vm/virtual_machine.go +++ b/core/vm/virtual_machine.go @@ -16,7 +16,8 @@ package vm +// VirtualMachine is an EVM interface type VirtualMachine interface { Env() Environment - Run(context *Context, data []byte) ([]byte, error) + Run(*Contract, []byte) ([]byte, error) } diff --git a/core/vm/vm.go b/core/vm/vm.go index d9e1a0ce5..57dd4dac3 100644 --- a/core/vm/vm.go +++ b/core/vm/vm.go @@ -14,33 +14,32 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . -// Package vm implements the Ethereum Virtual Machine. package vm import ( "fmt" "math/big" + "time" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/params" ) -// Vm implements VirtualMachine +// Vm is an EVM and implements VirtualMachine type Vm struct { env Environment } -// New returns a new Virtual Machine +// New returns a new Vm func New(env Environment) *Vm { return &Vm{env: env} } // Run loops and evaluates the contract's code with the given input data -func (self *Vm) Run(context *Context, input []byte) (ret []byte, err error) { +func (self *Vm) Run(contract *Contract, input []byte) (ret []byte, err error) { self.env.SetDepth(self.env.Depth() + 1) defer self.env.SetDepth(self.env.Depth() - 1) @@ -48,42 +47,48 @@ func (self *Vm) Run(context *Context, input []byte) (ret []byte, err error) { defer func() { if err != nil { // In case of a VM exception (known exceptions) all gas consumed (panics NOT included). - context.UseGas(context.Gas) + contract.UseGas(contract.Gas) - ret = context.Return(nil) + ret = contract.Return(nil) } }() - if context.CodeAddr != nil { - if p := Precompiled[context.CodeAddr.Str()]; p != nil { - return self.RunPrecompiled(p, input, context) + if contract.CodeAddr != nil { + if p := Precompiled[contract.CodeAddr.Str()]; p != nil { + return self.RunPrecompiled(p, input, contract) } } + // Don't bother with the execution if there's no code. + if len(contract.Code) == 0 { + return contract.Return(nil), nil + } + var ( - codehash = crypto.Sha3Hash(context.Code) // codehash is used when doing jump dest caching + codehash = crypto.Sha3Hash(contract.Code) // codehash is used when doing jump dest caching program *Program ) if EnableJit { - // Fetch program status. - // * If ready run using JIT - // * If unknown, compile in a seperate goroutine - // * If forced wait for compilation and run once done - if status := GetProgramStatus(codehash); status == progReady { - return RunProgram(GetProgram(codehash), self.env, context, input) - } else if status == progUnknown { + // If the JIT is enabled check the status of the JIT program, + // if it doesn't exist compile a new program in a seperate + // goroutine or wait for compilation to finish if the JIT is + // forced. + switch GetProgramStatus(codehash) { + case progReady: + return RunProgram(GetProgram(codehash), self.env, contract, input) + case progUnknown: if ForceJit { // Create and compile program - program = NewProgram(context.Code) + program = NewProgram(contract.Code) perr := CompileProgram(program) if perr == nil { - return RunProgram(program, self.env, context, input) + return RunProgram(program, self.env, contract, input) } glog.V(logger.Info).Infoln("error compiling program", err) } else { // create and compile the program. Compilation // is done in a seperate goroutine - program = NewProgram(context.Code) + program = NewProgram(contract.Code) go func() { err := CompileProgram(program) if err != nil { @@ -96,15 +101,14 @@ func (self *Vm) Run(context *Context, input []byte) (ret []byte, err error) { } var ( - caller = context.caller - code = context.Code - value = context.value - price = context.Price - - op OpCode // current opcode - mem = NewMemory() // bound memory - stack = newstack() // local stack - statedb = self.env.State() // current state + caller = contract.caller + code = contract.Code + instrCount = 0 + + op OpCode // current opcode + mem = NewMemory() // bound memory + stack = newstack() // local stack + statedb = self.env.Db() // current state // For optimisation reason we're using uint64 as the program counter. // It's theoretically possible to go above 2^64. The YP defines the PC to be uint256. Pratically much less so feasible. pc = uint64(0) // program counter @@ -112,8 +116,8 @@ func (self *Vm) Run(context *Context, input []byte) (ret []byte, err error) { // jump evaluates and checks whether the given jump destination is a valid one // if valid move the `pc` otherwise return an error. jump = func(from uint64, to *big.Int) error { - if !context.jumpdests.has(codehash, code, to) { - nop := context.GetOp(to.Uint64()) + if !contract.jumpdests.has(codehash, code, to) { + nop := contract.GetOp(to.Uint64()) return fmt.Errorf("invalid jump destination (%v) %v", nop, to) } @@ -125,552 +129,92 @@ func (self *Vm) Run(context *Context, input []byte) (ret []byte, err error) { newMemSize *big.Int cost *big.Int ) + contract.Input = input // User defer pattern to check for an error and, based on the error being nil or not, use all gas and return. defer func() { if err != nil { - self.log(pc, op, context.Gas, cost, mem, stack, context, err) + self.log(pc, op, contract.Gas, cost, mem, stack, contract, err) } }() - // Don't bother with the execution if there's no code. - if len(code) == 0 { - return context.Return(nil), nil + if glog.V(logger.Debug) { + glog.Infof("running byte VM %x\n", codehash[:4]) + tstart := time.Now() + defer func() { + glog.Infof("byte VM %x done. time: %v instrc: %v\n", codehash[:4], time.Since(tstart), instrCount) + }() } - for { - // Overhead of the atomic read might not be worth it - /* TODO this still causes a few issues in the tests - if program != nil && progStatus(atomic.LoadInt32(&program.status)) == progReady { - // move execution - glog.V(logger.Info).Infoln("Moved execution to JIT") - return runProgram(program, pc, mem, stack, self.env, context, input) - } + for ; ; instrCount++ { + /* + if EnableJit && it%100 == 0 { + if program != nil && progStatus(atomic.LoadInt32(&program.status)) == progReady { + // move execution + fmt.Println("moved", it) + glog.V(logger.Info).Infoln("Moved execution to JIT") + return runProgram(program, pc, mem, stack, self.env, contract, input) + } + } */ - // The base for all big integer arithmetic - base := new(big.Int) // Get the memory location of pc - op = context.GetOp(pc) + op = contract.GetOp(pc) // calculate the new memory size and gas price for the current executing opcode - newMemSize, cost, err = calculateGasAndSize(self.env, context, caller, op, statedb, mem, stack) + newMemSize, cost, err = calculateGasAndSize(self.env, contract, caller, op, statedb, mem, stack) if err != nil { return nil, err } // Use the calculated gas. When insufficient gas is present, use all gas and return an // Out Of Gas error - if !context.UseGas(cost) { + if !contract.UseGas(cost) { return nil, OutOfGasError } // Resize the memory calculated previously mem.Resize(newMemSize.Uint64()) // Add a log message - self.log(pc, op, context.Gas, cost, mem, stack, context, nil) - - switch op { - case ADD: - x, y := stack.pop(), stack.pop() - - base.Add(x, y) - - U256(base) - - // pop result back on the stack - stack.push(base) - case SUB: - x, y := stack.pop(), stack.pop() - - base.Sub(x, y) - - U256(base) - - // pop result back on the stack - stack.push(base) - case MUL: - x, y := stack.pop(), stack.pop() - - base.Mul(x, y) - - U256(base) - - // pop result back on the stack - stack.push(base) - case DIV: - x, y := stack.pop(), stack.pop() - - if y.Cmp(common.Big0) != 0 { - base.Div(x, y) - } - - U256(base) - - // pop result back on the stack - stack.push(base) - case SDIV: - x, y := S256(stack.pop()), S256(stack.pop()) - - if y.Cmp(common.Big0) == 0 { - base.Set(common.Big0) - } else { - n := new(big.Int) - if new(big.Int).Mul(x, y).Cmp(common.Big0) < 0 { - n.SetInt64(-1) - } else { - n.SetInt64(1) - } - - base.Div(x.Abs(x), y.Abs(y)).Mul(base, n) - - U256(base) - } - - stack.push(base) - case MOD: - x, y := stack.pop(), stack.pop() - - if y.Cmp(common.Big0) == 0 { - base.Set(common.Big0) - } else { - base.Mod(x, y) - } - - U256(base) - - stack.push(base) - case SMOD: - x, y := S256(stack.pop()), S256(stack.pop()) - - if y.Cmp(common.Big0) == 0 { - base.Set(common.Big0) - } else { - n := new(big.Int) - if x.Cmp(common.Big0) < 0 { - n.SetInt64(-1) - } else { - n.SetInt64(1) - } - - base.Mod(x.Abs(x), y.Abs(y)).Mul(base, n) - - U256(base) - } - - stack.push(base) - - case EXP: - x, y := stack.pop(), stack.pop() - - base.Exp(x, y, Pow256) - - U256(base) - - stack.push(base) - case SIGNEXTEND: - back := stack.pop() - if back.Cmp(big.NewInt(31)) < 0 { - bit := uint(back.Uint64()*8 + 7) - num := stack.pop() - mask := new(big.Int).Lsh(common.Big1, bit) - mask.Sub(mask, common.Big1) - if common.BitTest(num, int(bit)) { - num.Or(num, mask.Not(mask)) - } else { - num.And(num, mask) - } - - num = U256(num) - - stack.push(num) - } - case NOT: - stack.push(U256(new(big.Int).Not(stack.pop()))) - case LT: - x, y := stack.pop(), stack.pop() - - // x < y - if x.Cmp(y) < 0 { - stack.push(common.BigTrue) - } else { - stack.push(common.BigFalse) - } - case GT: - x, y := stack.pop(), stack.pop() - - // x > y - if x.Cmp(y) > 0 { - stack.push(common.BigTrue) - } else { - stack.push(common.BigFalse) - } - - case SLT: - x, y := S256(stack.pop()), S256(stack.pop()) - - // x < y - if x.Cmp(S256(y)) < 0 { - stack.push(common.BigTrue) - } else { - stack.push(common.BigFalse) - } - case SGT: - x, y := S256(stack.pop()), S256(stack.pop()) - - // x > y - if x.Cmp(y) > 0 { - stack.push(common.BigTrue) - } else { - stack.push(common.BigFalse) - } - - case EQ: - x, y := stack.pop(), stack.pop() - - // x == y - if x.Cmp(y) == 0 { - stack.push(common.BigTrue) - } else { - stack.push(common.BigFalse) - } - case ISZERO: - x := stack.pop() - if x.Cmp(common.BigFalse) > 0 { - stack.push(common.BigFalse) - } else { - stack.push(common.BigTrue) - } - - case AND: - x, y := stack.pop(), stack.pop() - - stack.push(base.And(x, y)) - case OR: - x, y := stack.pop(), stack.pop() - - stack.push(base.Or(x, y)) - case XOR: - x, y := stack.pop(), stack.pop() - - stack.push(base.Xor(x, y)) - case BYTE: - th, val := stack.pop(), stack.pop() - - if th.Cmp(big.NewInt(32)) < 0 { - byt := big.NewInt(int64(common.LeftPadBytes(val.Bytes(), 32)[th.Int64()])) - - base.Set(byt) - } else { - base.Set(common.BigFalse) - } - - stack.push(base) - case ADDMOD: - x := stack.pop() - y := stack.pop() - z := stack.pop() - - if z.Cmp(Zero) > 0 { - add := new(big.Int).Add(x, y) - base.Mod(add, z) - - base = U256(base) - } - - stack.push(base) - case MULMOD: - x := stack.pop() - y := stack.pop() - z := stack.pop() - - if z.Cmp(Zero) > 0 { - mul := new(big.Int).Mul(x, y) - base.Mod(mul, z) - - U256(base) - } - - stack.push(base) - - case SHA3: - offset, size := stack.pop(), stack.pop() - data := crypto.Sha3(mem.Get(offset.Int64(), size.Int64())) - - stack.push(common.BigD(data)) + self.log(pc, op, contract.Gas, cost, mem, stack, contract, nil) - case ADDRESS: - stack.push(common.Bytes2Big(context.Address().Bytes())) - - case BALANCE: - addr := common.BigToAddress(stack.pop()) - balance := statedb.GetBalance(addr) - - stack.push(new(big.Int).Set(balance)) - - case ORIGIN: - origin := self.env.Origin() - - stack.push(origin.Big()) - - case CALLER: - caller := context.caller.Address() - stack.push(common.Bytes2Big(caller.Bytes())) - - case CALLVALUE: - stack.push(new(big.Int).Set(value)) - - case CALLDATALOAD: - data := getData(input, stack.pop(), common.Big32) - - stack.push(common.Bytes2Big(data)) - case CALLDATASIZE: - l := int64(len(input)) - stack.push(big.NewInt(l)) - - case CALLDATACOPY: - var ( - mOff = stack.pop() - cOff = stack.pop() - l = stack.pop() - ) - data := getData(input, cOff, l) - - mem.Set(mOff.Uint64(), l.Uint64(), data) - - case CODESIZE, EXTCODESIZE: - var code []byte - if op == EXTCODESIZE { - addr := common.BigToAddress(stack.pop()) - - code = statedb.GetCode(addr) - } else { - code = context.Code - } - - l := big.NewInt(int64(len(code))) - stack.push(l) - - case CODECOPY, EXTCODECOPY: - var code []byte - if op == EXTCODECOPY { - addr := common.BigToAddress(stack.pop()) - code = statedb.GetCode(addr) + if opPtr := jumpTable[op]; opPtr.valid { + if opPtr.fn != nil { + opPtr.fn(instruction{}, &pc, self.env, contract, mem, stack) } else { - code = context.Code - } - - var ( - mOff = stack.pop() - cOff = stack.pop() - l = stack.pop() - ) - - codeCopy := getData(code, cOff, l) - - mem.Set(mOff.Uint64(), l.Uint64(), codeCopy) - - case GASPRICE: - stack.push(new(big.Int).Set(context.Price)) - - case BLOCKHASH: - num := stack.pop() - - n := new(big.Int).Sub(self.env.BlockNumber(), common.Big257) - if num.Cmp(n) > 0 && num.Cmp(self.env.BlockNumber()) < 0 { - stack.push(self.env.GetHash(num.Uint64()).Big()) - } else { - stack.push(common.Big0) - } - - case COINBASE: - coinbase := self.env.Coinbase() - - stack.push(coinbase.Big()) - - case TIMESTAMP: - time := self.env.Time() - - stack.push(new(big.Int).Set(time)) - - case NUMBER: - number := self.env.BlockNumber() - - stack.push(U256(number)) - - case DIFFICULTY: - difficulty := self.env.Difficulty() - - stack.push(new(big.Int).Set(difficulty)) - - case GASLIMIT: - - stack.push(new(big.Int).Set(self.env.GasLimit())) - - case PUSH1, PUSH2, PUSH3, PUSH4, PUSH5, PUSH6, PUSH7, PUSH8, PUSH9, PUSH10, PUSH11, PUSH12, PUSH13, PUSH14, PUSH15, PUSH16, PUSH17, PUSH18, PUSH19, PUSH20, PUSH21, PUSH22, PUSH23, PUSH24, PUSH25, PUSH26, PUSH27, PUSH28, PUSH29, PUSH30, PUSH31, PUSH32: - size := uint64(op - PUSH1 + 1) - byts := getData(code, new(big.Int).SetUint64(pc+1), new(big.Int).SetUint64(size)) - // push value to stack - stack.push(common.Bytes2Big(byts)) - pc += size - - case POP: - stack.pop() - case DUP1, DUP2, DUP3, DUP4, DUP5, DUP6, DUP7, DUP8, DUP9, DUP10, DUP11, DUP12, DUP13, DUP14, DUP15, DUP16: - n := int(op - DUP1 + 1) - stack.dup(n) - - case SWAP1, SWAP2, SWAP3, SWAP4, SWAP5, SWAP6, SWAP7, SWAP8, SWAP9, SWAP10, SWAP11, SWAP12, SWAP13, SWAP14, SWAP15, SWAP16: - n := int(op - SWAP1 + 2) - stack.swap(n) - - case LOG0, LOG1, LOG2, LOG3, LOG4: - n := int(op - LOG0) - topics := make([]common.Hash, n) - mStart, mSize := stack.pop(), stack.pop() - for i := 0; i < n; i++ { - topics[i] = common.BigToHash(stack.pop()) - } - - data := mem.Get(mStart.Int64(), mSize.Int64()) - log := state.NewLog(context.Address(), topics, data, self.env.BlockNumber().Uint64()) - self.env.AddLog(log) - - case MLOAD: - offset := stack.pop() - val := common.BigD(mem.Get(offset.Int64(), 32)) - stack.push(val) - - case MSTORE: - // pop value of the stack - mStart, val := stack.pop(), stack.pop() - mem.Set(mStart.Uint64(), 32, common.BigToBytes(val, 256)) - - case MSTORE8: - off, val := stack.pop().Int64(), stack.pop().Int64() - - mem.store[off] = byte(val & 0xff) - - case SLOAD: - loc := common.BigToHash(stack.pop()) - val := statedb.GetState(context.Address(), loc).Big() - stack.push(val) + switch op { + case PC: + opPc(instruction{data: new(big.Int).SetUint64(pc)}, &pc, self.env, contract, mem, stack) + case JUMP: + if err := jump(pc, stack.pop()); err != nil { + return nil, err + } - case SSTORE: - loc := common.BigToHash(stack.pop()) - val := stack.pop() + continue + case JUMPI: + pos, cond := stack.pop(), stack.pop() - statedb.SetState(context.Address(), loc, common.BigToHash(val)) + if cond.Cmp(common.BigTrue) >= 0 { + if err := jump(pc, pos); err != nil { + return nil, err + } - case JUMP: - if err := jump(pc, stack.pop()); err != nil { - return nil, err - } + continue + } + case RETURN: + offset, size := stack.pop(), stack.pop() + ret := mem.GetPtr(offset.Int64(), size.Int64()) - continue - case JUMPI: - pos, cond := stack.pop(), stack.pop() + return contract.Return(ret), nil + case SUICIDE: + opSuicide(instruction{}, nil, self.env, contract, mem, stack) - if cond.Cmp(common.BigTrue) >= 0 { - if err := jump(pc, pos); err != nil { - return nil, err + fallthrough + case STOP: // Stop the contract + return contract.Return(nil), nil } - - continue - } - - case JUMPDEST: - case PC: - stack.push(new(big.Int).SetUint64(pc)) - case MSIZE: - stack.push(big.NewInt(int64(mem.Len()))) - case GAS: - stack.push(new(big.Int).Set(context.Gas)) - case CREATE: - - var ( - value = stack.pop() - offset, size = stack.pop(), stack.pop() - input = mem.Get(offset.Int64(), size.Int64()) - gas = new(big.Int).Set(context.Gas) - addr common.Address - ) - - context.UseGas(context.Gas) - ret, suberr, ref := self.env.Create(context, input, gas, price, value) - if suberr != nil { - stack.push(common.BigFalse) - - } else { - // gas < len(ret) * CreateDataGas == NO_CODE - dataGas := big.NewInt(int64(len(ret))) - dataGas.Mul(dataGas, params.CreateDataGas) - if context.UseGas(dataGas) { - ref.SetCode(ret) - } - addr = ref.Address() - - stack.push(addr.Big()) - - } - - case CALL, CALLCODE: - gas := stack.pop() - // pop gas and value of the stack. - addr, value := stack.pop(), stack.pop() - value = U256(value) - // pop input size and offset - inOffset, inSize := stack.pop(), stack.pop() - // pop return size and offset - retOffset, retSize := stack.pop(), stack.pop() - - address := common.BigToAddress(addr) - - // Get the arguments from the memory - args := mem.Get(inOffset.Int64(), inSize.Int64()) - - if len(value.Bytes()) > 0 { - gas.Add(gas, params.CallStipend) - } - - var ( - ret []byte - err error - ) - if op == CALLCODE { - ret, err = self.env.CallCode(context, address, args, gas, price, value) - } else { - ret, err = self.env.Call(context, address, args, gas, price, value) - } - - if err != nil { - stack.push(common.BigFalse) - - } else { - stack.push(common.BigTrue) - - mem.Set(retOffset.Uint64(), retSize.Uint64(), ret) } - - case RETURN: - offset, size := stack.pop(), stack.pop() - ret := mem.GetPtr(offset.Int64(), size.Int64()) - - return context.Return(ret), nil - case SUICIDE: - receiver := statedb.GetOrNewStateObject(common.BigToAddress(stack.pop())) - balance := statedb.GetBalance(context.Address()) - - receiver.AddBalance(balance) - - statedb.Delete(context.Address()) - - fallthrough - case STOP: // Stop the context - - return context.Return(nil), nil - default: - + } else { return nil, fmt.Errorf("Invalid opcode %x", op) } @@ -681,7 +225,7 @@ func (self *Vm) Run(context *Context, input []byte) (ret []byte, err error) { // calculateGasAndSize calculates the required given the opcode and stack items calculates the new memorysize for // the operation. This does not reduce gas or resizes the memory. -func calculateGasAndSize(env Environment, context *Context, caller ContextRef, op OpCode, statedb *state.StateDB, mem *Memory, stack *stack) (*big.Int, *big.Int, error) { +func calculateGasAndSize(env Environment, contract *Contract, caller ContractRef, op OpCode, statedb Database, mem *Memory, stack *stack) (*big.Int, *big.Int, error) { var ( gas = new(big.Int) newMemSize *big.Int = new(big.Int) @@ -731,7 +275,7 @@ func calculateGasAndSize(env Environment, context *Context, caller ContextRef, o var g *big.Int y, x := stack.data[stack.len()-2], stack.data[stack.len()-1] - val := statedb.GetState(context.Address(), common.BigToHash(x)) + val := statedb.GetState(contract.Address(), common.BigToHash(x)) // This checks for 3 scenario's and calculates gas accordingly // 1. From a zero-value address to a non-zero value (NEW VALUE) @@ -741,7 +285,7 @@ func calculateGasAndSize(env Environment, context *Context, caller ContextRef, o // 0 => non 0 g = params.SstoreSetGas } else if !common.EmptyHash(val) && common.EmptyHash(common.BigToHash(y)) { - statedb.Refund(params.SstoreRefundGas) + statedb.AddRefund(params.SstoreRefundGas) g = params.SstoreClearGas } else { @@ -750,8 +294,8 @@ func calculateGasAndSize(env Environment, context *Context, caller ContextRef, o } gas.Set(g) case SUICIDE: - if !statedb.IsDeleted(context.Address()) { - statedb.Refund(params.SuicideRefundGas) + if !statedb.IsDeleted(contract.Address()) { + statedb.AddRefund(params.SuicideRefundGas) } case MLOAD: newMemSize = calcMemSize(stack.peek(), u256(32)) @@ -788,7 +332,8 @@ func calculateGasAndSize(env Environment, context *Context, caller ContextRef, o gas.Add(gas, stack.data[stack.len()-1]) if op == CALL { - if env.State().GetStateObject(common.BigToAddress(stack.data[stack.len()-2])) == nil { + //if env.Db().GetStateObject(common.BigToAddress(stack.data[stack.len()-2])) == nil { + if !env.Db().Exist(common.BigToAddress(stack.data[stack.len()-2])) { gas.Add(gas, params.CallNewAccountGas) } } @@ -802,38 +347,18 @@ func calculateGasAndSize(env Environment, context *Context, caller ContextRef, o newMemSize = common.BigMax(x, y) } - - if newMemSize.Cmp(common.Big0) > 0 { - newMemSizeWords := toWordSize(newMemSize) - newMemSize.Mul(newMemSizeWords, u256(32)) - - if newMemSize.Cmp(u256(int64(mem.Len()))) > 0 { - oldSize := toWordSize(big.NewInt(int64(mem.Len()))) - pow := new(big.Int).Exp(oldSize, common.Big2, Zero) - linCoef := new(big.Int).Mul(oldSize, params.MemoryGas) - quadCoef := new(big.Int).Div(pow, params.QuadCoeffDiv) - oldTotalFee := new(big.Int).Add(linCoef, quadCoef) - - pow.Exp(newMemSizeWords, common.Big2, Zero) - linCoef = new(big.Int).Mul(newMemSizeWords, params.MemoryGas) - quadCoef = new(big.Int).Div(pow, params.QuadCoeffDiv) - newTotalFee := new(big.Int).Add(linCoef, quadCoef) - - fee := new(big.Int).Sub(newTotalFee, oldTotalFee) - gas.Add(gas, fee) - } - } + quadMemGas(mem, newMemSize, gas) return newMemSize, gas, nil } // RunPrecompile runs and evaluate the output of a precompiled contract defined in contracts.go -func (self *Vm) RunPrecompiled(p *PrecompiledAccount, input []byte, context *Context) (ret []byte, err error) { +func (self *Vm) RunPrecompiled(p *PrecompiledAccount, input []byte, contract *Contract) (ret []byte, err error) { gas := p.Gas(len(input)) - if context.UseGas(gas) { + if contract.UseGas(gas) { ret = p.Call(input) - return context.Return(ret), nil + return contract.Return(ret), nil } else { return nil, OutOfGasError } @@ -841,18 +366,20 @@ func (self *Vm) RunPrecompiled(p *PrecompiledAccount, input []byte, context *Con // log emits a log event to the environment for each opcode encountered. This is not to be confused with the // LOG* opcode. -func (self *Vm) log(pc uint64, op OpCode, gas, cost *big.Int, memory *Memory, stack *stack, context *Context, err error) { +func (self *Vm) log(pc uint64, op OpCode, gas, cost *big.Int, memory *Memory, stack *stack, contract *Contract, err error) { if Debug { mem := make([]byte, len(memory.Data())) copy(mem, memory.Data()) stck := make([]*big.Int, len(stack.Data())) copy(stck, stack.Data()) - object := context.self.(*state.StateObject) storage := make(map[common.Hash][]byte) - object.EachStorage(func(k, v []byte) { - storage[common.BytesToHash(k)] = v - }) + /* + object := contract.self.(*state.StateObject) + object.EachStorage(func(k, v []byte) { + storage[common.BytesToHash(k)] = v + }) + */ self.env.AddStructLog(StructLog{pc, op, new(big.Int).Set(gas), cost, mem, stck, storage, err}) } diff --git a/core/vm/vm_jit.go b/core/vm/vm_jit.go index 339cb8ea8..07cb52d4a 100644 --- a/core/vm/vm_jit.go +++ b/core/vm/vm_jit.go @@ -30,6 +30,7 @@ void evmjit_destroy(void* _jit); */ import "C" +/* import ( "bytes" "errors" @@ -385,4 +386,4 @@ func env_extcode(_vm unsafe.Pointer, _addr unsafe.Pointer, o_size *uint64) *byte code := vm.Env().State().GetCode(addr) *o_size = uint64(len(code)) return getDataPtr(code) -} +}*/ diff --git a/core/vm_env.go b/core/vm_env.go index a08f024fe..dea280746 100644 --- a/core/vm_env.go +++ b/core/vm_env.go @@ -53,7 +53,7 @@ func (self *VMEnv) Time() *big.Int { return self.header.Time } func (self *VMEnv) Difficulty() *big.Int { return self.header.Difficulty } func (self *VMEnv) GasLimit() *big.Int { return self.header.GasLimit } func (self *VMEnv) Value() *big.Int { return self.msg.Value() } -func (self *VMEnv) State() *state.StateDB { return self.state } +func (self *VMEnv) Db() vm.Database { return self.state } func (self *VMEnv) Depth() int { return self.depth } func (self *VMEnv) SetDepth(i int) { self.depth = i } func (self *VMEnv) VmType() vm.Type { return self.typ } @@ -66,30 +66,34 @@ func (self *VMEnv) GetHash(n uint64) common.Hash { return common.Hash{} } -func (self *VMEnv) AddLog(log *state.Log) { +func (self *VMEnv) AddLog(log *vm.Log) { self.state.AddLog(log) } -func (self *VMEnv) CanTransfer(from vm.Account, balance *big.Int) bool { - return from.Balance().Cmp(balance) >= 0 +func (self *VMEnv) CanTransfer(from common.Address, balance *big.Int) bool { + return self.state.GetBalance(from).Cmp(balance) >= 0 +} + +func (self *VMEnv) MakeSnapshot() vm.Database { + return self.state.Copy() +} + +func (self *VMEnv) SetSnapshot(copy vm.Database) { + self.state.Set(copy.(*state.StateDB)) } func (self *VMEnv) Transfer(from, to vm.Account, amount *big.Int) error { - return vm.Transfer(from, to, amount) + return Transfer(from, to, amount) } -func (self *VMEnv) Call(me vm.ContextRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { - exe := NewExecution(self, &addr, data, gas, price, value) - return exe.Call(addr, me) +func (self *VMEnv) Call(me vm.ContractRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { + return Call(self, me, addr, data, gas, price, value) } -func (self *VMEnv) CallCode(me vm.ContextRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { - maddr := me.Address() - exe := NewExecution(self, &maddr, data, gas, price, value) - return exe.Call(addr, me) +func (self *VMEnv) CallCode(me vm.ContractRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { + return CallCode(self, me, addr, data, gas, price, value) } -func (self *VMEnv) Create(me vm.ContextRef, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ContextRef) { - exe := NewExecution(self, nil, data, gas, price, value) - return exe.Create(me) +func (self *VMEnv) Create(me vm.ContractRef, data []byte, gas, price, value *big.Int) ([]byte, common.Address, error) { + return Create(self, me, data, gas, price, value) } func (self *VMEnv) StructLogs() []vm.StructLog { diff --git a/eth/filters/filter.go b/eth/filters/filter.go index b7f795607..0b4911629 100644 --- a/eth/filters/filter.go +++ b/eth/filters/filter.go @@ -21,8 +21,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" ) type AccountChange struct { @@ -39,9 +39,9 @@ type Filter struct { max int topics [][]common.Hash - BlockCallback func(*types.Block, state.Logs) + BlockCallback func(*types.Block, vm.Logs) TransactionCallback func(*types.Transaction) - LogsCallback func(state.Logs) + LogsCallback func(vm.Logs) } // Create a new filter which uses a bloom filter on blocks to figure out whether a particular block @@ -78,7 +78,7 @@ func (self *Filter) SetSkip(skip int) { } // Run filters logs with the current parameters set -func (self *Filter) Find() state.Logs { +func (self *Filter) Find() vm.Logs { earliestBlock := core.GetCurrentBlock(self.db) var earliestBlockNo uint64 = uint64(self.earliest) if self.earliest == -1 { @@ -90,7 +90,7 @@ func (self *Filter) Find() state.Logs { } var ( - logs state.Logs + logs vm.Logs block = core.GetBlockByNumber(self.db, latestBlockNo) ) @@ -112,7 +112,7 @@ done: // Get the logs of the block var ( receipts = core.GetBlockReceipts(self.db, block.Hash()) - unfiltered state.Logs + unfiltered vm.Logs ) for _, receipt := range receipts { unfiltered = append(unfiltered, receipt.Logs()...) @@ -138,8 +138,8 @@ func includes(addresses []common.Address, a common.Address) bool { return false } -func (self *Filter) FilterLogs(logs state.Logs) state.Logs { - var ret state.Logs +func (self *Filter) FilterLogs(logs vm.Logs) vm.Logs { + var ret vm.Logs // Filter the logs for interesting stuff Logs: diff --git a/eth/filters/filter_system.go b/eth/filters/filter_system.go index 9ad73a896..1c27c7be4 100644 --- a/eth/filters/filter_system.go +++ b/eth/filters/filter_system.go @@ -22,7 +22,7 @@ import ( "sync" "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/event" ) @@ -89,7 +89,7 @@ func (fs *FilterSystem) filterLoop() { //core.PendingBlockEvent{}, core.ChainEvent{}, core.TxPreEvent{}, - state.Logs(nil)) + vm.Logs(nil)) out: for { @@ -116,7 +116,7 @@ out: } fs.filterMu.RUnlock() - case state.Logs: + case vm.Logs: fs.filterMu.RLock() for _, filter := range fs.filters { if filter.LogsCallback != nil { diff --git a/miner/worker.go b/miner/worker.go index 098f42a72..470f1f676 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -29,6 +29,7 @@ import ( "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" @@ -298,7 +299,7 @@ func (self *worker) wait() { } // broadcast before waiting for validation - go func(block *types.Block, logs state.Logs, receipts []*types.Receipt) { + go func(block *types.Block, logs vm.Logs, receipts []*types.Receipt) { self.mux.Post(core.NewMinedBlockEvent{block}) self.mux.Post(core.ChainEvent{block, block.Hash(), logs}) if stat == core.CanonStatTy { diff --git a/rpc/api/eth_args.go b/rpc/api/eth_args.go index 8bd077e20..66c190a51 100644 --- a/rpc/api/eth_args.go +++ b/rpc/api/eth_args.go @@ -24,8 +24,8 @@ import ( "strings" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/rpc/shared" ) @@ -830,7 +830,7 @@ type LogRes struct { TransactionIndex *hexnum `json:"transactionIndex"` } -func NewLogRes(log *state.Log) LogRes { +func NewLogRes(log *vm.Log) LogRes { var l LogRes l.Topics = make([]*hexdata, len(log.Topics)) for j, topic := range log.Topics { @@ -847,7 +847,7 @@ func NewLogRes(log *state.Log) LogRes { return l } -func NewLogsRes(logs state.Logs) (ls []LogRes) { +func NewLogsRes(logs vm.Logs) (ls []LogRes) { ls = make([]LogRes, len(logs)) for i, log := range logs { diff --git a/tests/state_test_util.go b/tests/state_test_util.go index 3d8dfca31..a1c066c82 100644 --- a/tests/state_test_util.go +++ b/tests/state_test_util.go @@ -168,7 +168,7 @@ func runStateTest(test VmTest) error { ret []byte // gas *big.Int // err error - logs state.Logs + logs vm.Logs ) ret, logs, _, _ = RunState(statedb, env, test.Transaction) @@ -216,7 +216,7 @@ func runStateTest(test VmTest) error { return nil } -func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state.Logs, *big.Int, error) { +func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, vm.Logs, *big.Int, error) { var ( data = common.FromHex(tx["data"]) gas = common.Big(tx["gasLimit"]) diff --git a/tests/util.go b/tests/util.go index 72d927ada..fb9e518c8 100644 --- a/tests/util.go +++ b/tests/util.go @@ -30,7 +30,7 @@ import ( "github.com/ethereum/go-ethereum/ethdb" ) -func checkLogs(tlog []Log, logs state.Logs) error { +func checkLogs(tlog []Log, logs vm.Logs) error { if len(tlog) != len(logs) { return fmt.Errorf("log length mismatch. Expected %d, got %d", len(tlog), len(logs)) @@ -53,7 +53,7 @@ func checkLogs(tlog []Log, logs state.Logs) error { } } } - genBloom := common.LeftPadBytes(types.LogsBloom(state.Logs{logs[i]}).Bytes(), 256) + genBloom := common.LeftPadBytes(types.LogsBloom(vm.Logs{logs[i]}).Bytes(), 256) if !bytes.Equal(genBloom, common.Hex2Bytes(log.BloomF)) { return fmt.Errorf("bloom mismatch") @@ -181,18 +181,18 @@ func (self *Env) BlockNumber() *big.Int { return self.number } func (self *Env) Coinbase() common.Address { return self.coinbase } func (self *Env) Time() *big.Int { return self.time } func (self *Env) Difficulty() *big.Int { return self.difficulty } -func (self *Env) State() *state.StateDB { return self.state } +func (self *Env) Db() vm.Database { return self.state } func (self *Env) GasLimit() *big.Int { return self.gasLimit } func (self *Env) VmType() vm.Type { return vm.StdVmTy } func (self *Env) GetHash(n uint64) common.Hash { return common.BytesToHash(crypto.Sha3([]byte(big.NewInt(int64(n)).String()))) } -func (self *Env) AddLog(log *state.Log) { +func (self *Env) AddLog(log *vm.Log) { self.state.AddLog(log) } func (self *Env) Depth() int { return self.depth } func (self *Env) SetDepth(i int) { self.depth = i } -func (self *Env) CanTransfer(from vm.Account, balance *big.Int) bool { +func (self *Env) CanTransfer(from common.Address, balance *big.Int) bool { if self.skipTransfer { if self.initial { self.initial = false @@ -200,58 +200,53 @@ func (self *Env) CanTransfer(from vm.Account, balance *big.Int) bool { } } - return from.Balance().Cmp(balance) >= 0 + return self.state.GetBalance(from).Cmp(balance) >= 0 +} +func (self *Env) MakeSnapshot() vm.Database { + return self.state.Copy() +} +func (self *Env) SetSnapshot(copy vm.Database) { + self.state.Set(copy.(*state.StateDB)) } func (self *Env) Transfer(from, to vm.Account, amount *big.Int) error { if self.skipTransfer { return nil } - return vm.Transfer(from, to, amount) -} - -func (self *Env) vm(addr *common.Address, data []byte, gas, price, value *big.Int) *core.Execution { - exec := core.NewExecution(self, addr, data, gas, price, value) - - return exec + return core.Transfer(from, to, amount) } -func (self *Env) Call(caller vm.ContextRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { +func (self *Env) Call(caller vm.ContractRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { if self.vmTest && self.depth > 0 { caller.ReturnGas(gas, price) return nil, nil } - exe := self.vm(&addr, data, gas, price, value) - ret, err := exe.Call(addr, caller) - self.Gas = exe.Gas + ret, err := core.Call(self, caller, addr, data, gas, price, value) + self.Gas = gas return ret, err } -func (self *Env) CallCode(caller vm.ContextRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { +func (self *Env) CallCode(caller vm.ContractRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { if self.vmTest && self.depth > 0 { caller.ReturnGas(gas, price) return nil, nil } - - caddr := caller.Address() - exe := self.vm(&caddr, data, gas, price, value) - return exe.Call(addr, caller) + return core.CallCode(self, caller, addr, data, gas, price, value) } -func (self *Env) Create(caller vm.ContextRef, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ContextRef) { - exe := self.vm(nil, data, gas, price, value) +func (self *Env) Create(caller vm.ContractRef, data []byte, gas, price, value *big.Int) ([]byte, common.Address, error) { if self.vmTest { caller.ReturnGas(gas, price) nonce := self.state.GetNonce(caller.Address()) obj := self.state.GetOrNewStateObject(crypto.CreateAddress(caller.Address(), nonce)) - return nil, nil, obj + return nil, obj.Address(), nil } else { - return exe.Create(caller) + return core.Create(self, caller, data, gas, price, value) } } diff --git a/tests/vm_test.go b/tests/vm_test.go index 96718db3c..34beb85e5 100644 --- a/tests/vm_test.go +++ b/tests/vm_test.go @@ -24,14 +24,14 @@ import ( func BenchmarkVmAckermann32Tests(b *testing.B) { fn := filepath.Join(vmTestDir, "vmPerformanceTest.json") - if err := BenchVmTest(fn, bconf{"ackermann32", true, os.Getenv("JITVM") == "true"}, b); err != nil { + if err := BenchVmTest(fn, bconf{"ackermann32", os.Getenv("JITFORCE") == "true", os.Getenv("JITVM") == "true"}, b); err != nil { b.Error(err) } } func BenchmarkVmFibonacci16Tests(b *testing.B) { fn := filepath.Join(vmTestDir, "vmPerformanceTest.json") - if err := BenchVmTest(fn, bconf{"fibonacci16", true, os.Getenv("JITVM") == "true"}, b); err != nil { + if err := BenchVmTest(fn, bconf{"fibonacci16", os.Getenv("JITFORCE") == "true", os.Getenv("JITVM") == "true"}, b); err != nil { b.Error(err) } } diff --git a/tests/vm_test_util.go b/tests/vm_test_util.go index 71a4f5e33..b61995e31 100644 --- a/tests/vm_test_util.go +++ b/tests/vm_test_util.go @@ -185,7 +185,7 @@ func runVmTest(test VmTest) error { ret []byte gas *big.Int err error - logs state.Logs + logs vm.Logs ) ret, logs, gas, err = RunVm(statedb, env, test.Exec) @@ -234,7 +234,7 @@ func runVmTest(test VmTest) error { return nil } -func RunVm(state *state.StateDB, env, exec map[string]string) ([]byte, state.Logs, *big.Int, error) { +func RunVm(state *state.StateDB, env, exec map[string]string) ([]byte, vm.Logs, *big.Int, error) { var ( to = common.HexToAddress(exec["address"]) from = common.HexToAddress(exec["caller"]) diff --git a/xeth/xeth.go b/xeth/xeth.go index 0494342a3..9d366d215 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -33,6 +33,7 @@ import ( "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/eth/filters" @@ -541,7 +542,7 @@ func (self *XEth) NewLogFilter(earliest, latest int64, skip, max int, address [] filter.SetMax(max) filter.SetAddress(cAddress(address)) filter.SetTopics(cTopics(topics)) - filter.LogsCallback = func(logs state.Logs) { + filter.LogsCallback = func(logs vm.Logs) { self.logMu.Lock() defer self.logMu.Unlock() @@ -580,7 +581,7 @@ func (self *XEth) NewBlockFilter() int { id := self.filterManager.Add(filter) self.blockQueue[id] = &hashQueue{timeout: time.Now()} - filter.BlockCallback = func(block *types.Block, logs state.Logs) { + filter.BlockCallback = func(block *types.Block, logs vm.Logs) { self.blockMu.Lock() defer self.blockMu.Unlock() @@ -603,7 +604,7 @@ func (self *XEth) GetFilterType(id int) byte { return UnknownFilterTy } -func (self *XEth) LogFilterChanged(id int) state.Logs { +func (self *XEth) LogFilterChanged(id int) vm.Logs { self.logMu.Lock() defer self.logMu.Unlock() @@ -633,7 +634,7 @@ func (self *XEth) TransactionFilterChanged(id int) []common.Hash { return nil } -func (self *XEth) Logs(id int) state.Logs { +func (self *XEth) Logs(id int) vm.Logs { filter := self.filterManager.Get(id) if filter != nil { return filter.Find() @@ -642,7 +643,7 @@ func (self *XEth) Logs(id int) state.Logs { return nil } -func (self *XEth) AllLogs(earliest, latest int64, skip, max int, address []string, topics [][]string) state.Logs { +func (self *XEth) AllLogs(earliest, latest int64, skip, max int, address []string, topics [][]string) vm.Logs { filter := filters.New(self.backend.ChainDb()) filter.SetEarliestBlock(earliest) filter.SetLatestBlock(latest) @@ -1029,19 +1030,19 @@ func (m callmsg) Data() []byte { return m.data } type logQueue struct { mu sync.Mutex - logs state.Logs + logs vm.Logs timeout time.Time id int } -func (l *logQueue) add(logs ...*state.Log) { +func (l *logQueue) add(logs ...*vm.Log) { l.mu.Lock() defer l.mu.Unlock() l.logs = append(l.logs, logs...) } -func (l *logQueue) get() state.Logs { +func (l *logQueue) get() vm.Logs { l.mu.Lock() defer l.mu.Unlock() -- cgit v1.2.3 From 7c7692933c21b77328a94eed714f66c276776197 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Mon, 31 Aug 2015 17:09:50 +0200 Subject: cmd/geth, cmd/utils, core, rpc: renamed to blockchain * Renamed ChainManager to BlockChain * Checkpointing is no longer required and never really properly worked when the state was corrupted. --- cmd/geth/blocktestcmd.go | 2 +- cmd/geth/js_test.go | 2 +- cmd/geth/main.go | 2 +- cmd/utils/cmd.go | 12 +- cmd/utils/flags.go | 4 +- core/bench_test.go | 2 +- core/block_processor.go | 10 +- core/block_processor_test.go | 6 +- core/blockchain.go | 809 +++++++++++++++++++++++++++++++++++++++++ core/blockchain_test.go | 652 +++++++++++++++++++++++++++++++++ core/chain_makers.go | 4 +- core/chain_makers_test.go | 2 +- core/chain_manager.go | 849 ------------------------------------------- core/chain_manager_test.go | 652 --------------------------------- core/helper_test.go | 6 +- core/manager.go | 2 +- core/vm/common.go | 4 +- core/vm/contract.go | 4 +- core/vm/doc.go | 8 +- core/vm/environment.go | 4 +- core/vm/memory.go | 2 +- core/vm_env.go | 4 +- eth/backend.go | 22 +- eth/filters/filter.go | 17 +- eth/filters/filter_system.go | 2 +- eth/gasprice.go | 4 +- eth/handler.go | 66 ++-- eth/handler_test.go | 158 ++++---- eth/helper_test.go | 20 +- eth/protocol_test.go | 2 +- eth/sync.go | 2 +- miner/worker.go | 4 +- rpc/api/admin.go | 8 +- rpc/api/debug.go | 2 +- rpc/api/eth.go | 2 +- tests/block_test_util.go | 8 +- xeth/xeth.go | 18 +- 37 files changed, 1671 insertions(+), 1706 deletions(-) create mode 100644 core/blockchain.go create mode 100644 core/blockchain_test.go delete mode 100644 core/chain_manager.go delete mode 100644 core/chain_manager_test.go diff --git a/cmd/geth/blocktestcmd.go b/cmd/geth/blocktestcmd.go index d6195e025..e0a5becdc 100644 --- a/cmd/geth/blocktestcmd.go +++ b/cmd/geth/blocktestcmd.go @@ -118,7 +118,7 @@ func runOneBlockTest(ctx *cli.Context, test *tests.BlockTest) (*eth.Ethereum, er return ethereum, fmt.Errorf("InsertPreState: %v", err) } - cm := ethereum.ChainManager() + cm := ethereum.BlockChain() validBlocks, err := test.TryBlocksInsert(cm) if err != nil { return ethereum, fmt.Errorf("Block Test load error: %v", err) diff --git a/cmd/geth/js_test.go b/cmd/geth/js_test.go index 1f5b28e3a..2ad3d669c 100644 --- a/cmd/geth/js_test.go +++ b/cmd/geth/js_test.go @@ -196,7 +196,7 @@ func TestBlockChain(t *testing.T) { tmpfile := filepath.Join(extmp, "export.chain") tmpfileq := strconv.Quote(tmpfile) - ethereum.ChainManager().Reset() + ethereum.BlockChain().Reset() checkEvalJSON(t, repl, `admin.exportChain(`+tmpfileq+`)`, `true`) if _, err := os.Stat(tmpfile); err != nil { diff --git a/cmd/geth/main.go b/cmd/geth/main.go index a9aa9f61f..e8292fdf2 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -48,7 +48,7 @@ import ( const ( ClientIdentifier = "Geth" - Version = "1.2.0" + Version = "1.2.0-dev" VersionMajor = 1 VersionMinor = 2 VersionPatch = 0 diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index 983762db8..5e4bfc937 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -169,7 +169,7 @@ func FormatTransactionData(data string) []byte { return d } -func ImportChain(chain *core.ChainManager, fn string) error { +func ImportChain(chain *core.BlockChain, fn string) error { // Watch for Ctrl-C while the import is running. // If a signal is received, the import will stop at the next batch. interrupt := make(chan os.Signal, 1) @@ -244,7 +244,7 @@ func ImportChain(chain *core.ChainManager, fn string) error { return nil } -func hasAllBlocks(chain *core.ChainManager, bs []*types.Block) bool { +func hasAllBlocks(chain *core.BlockChain, bs []*types.Block) bool { for _, b := range bs { if !chain.HasBlock(b.Hash()) { return false @@ -253,21 +253,21 @@ func hasAllBlocks(chain *core.ChainManager, bs []*types.Block) bool { return true } -func ExportChain(chainmgr *core.ChainManager, fn string) error { +func ExportChain(blockchain *core.BlockChain, fn string) error { glog.Infoln("Exporting blockchain to", fn) fh, err := os.OpenFile(fn, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, os.ModePerm) if err != nil { return err } defer fh.Close() - if err := chainmgr.Export(fh); err != nil { + if err := blockchain.Export(fh); err != nil { return err } glog.Infoln("Exported blockchain to", fn) return nil } -func ExportAppendChain(chainmgr *core.ChainManager, fn string, first uint64, last uint64) error { +func ExportAppendChain(blockchain *core.BlockChain, fn string, first uint64, last uint64) error { glog.Infoln("Exporting blockchain to", fn) // TODO verify mode perms fh, err := os.OpenFile(fn, os.O_CREATE|os.O_APPEND|os.O_WRONLY, os.ModePerm) @@ -275,7 +275,7 @@ func ExportAppendChain(chainmgr *core.ChainManager, fn string, first uint64, las return err } defer fh.Close() - if err := chainmgr.ExportN(fh, first, last); err != nil { + if err := blockchain.ExportN(fh, first, last); err != nil { return err } glog.Infoln("Exported blockchain to", fn) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index ad474f17d..dea43bc5c 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -508,7 +508,7 @@ func SetupEth(ctx *cli.Context) { } // MakeChain creates a chain manager from set command line flags. -func MakeChain(ctx *cli.Context) (chain *core.ChainManager, chainDb ethdb.Database) { +func MakeChain(ctx *cli.Context) (chain *core.BlockChain, chainDb ethdb.Database) { datadir := MustDataDir(ctx) cache := ctx.GlobalInt(CacheFlag.Name) @@ -527,7 +527,7 @@ func MakeChain(ctx *cli.Context) (chain *core.ChainManager, chainDb ethdb.Databa eventMux := new(event.TypeMux) pow := ethash.New() //genesis := core.GenesisBlock(uint64(ctx.GlobalInt(GenesisNonceFlag.Name)), blockDB) - chain, err = core.NewChainManager(chainDb, pow, eventMux) + chain, err = core.NewBlockChain(chainDb, pow, eventMux) if err != nil { Fatalf("Could not start chainmanager: %v", err) } diff --git a/core/bench_test.go b/core/bench_test.go index def4f0d2a..27f3e3158 100644 --- a/core/bench_test.go +++ b/core/bench_test.go @@ -168,7 +168,7 @@ func benchInsertChain(b *testing.B, disk bool, gen func(int, *BlockGen)) { // Time the insertion of the new chain. // State and blocks are stored in the same DB. evmux := new(event.TypeMux) - chainman, _ := NewChainManager(db, FakePow{}, evmux) + chainman, _ := NewBlockChain(db, FakePow{}, evmux) chainman.SetProcessor(NewBlockProcessor(db, FakePow{}, chainman, evmux)) defer chainman.Stop() b.ReportAllocs() diff --git a/core/block_processor.go b/core/block_processor.go index 40e3931ba..783e15687 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -47,7 +47,7 @@ type BlockProcessor struct { // Mutex for locking the block processor. Blocks can only be handled one at a time mutex sync.Mutex // Canonical block chain - bc *ChainManager + bc *BlockChain // non-persistent key/value memory storage mem map[string]*big.Int // Proof of work used for validating @@ -70,12 +70,12 @@ type GasPool interface { SubGas(gas, price *big.Int) error } -func NewBlockProcessor(db ethdb.Database, pow pow.PoW, chainManager *ChainManager, eventMux *event.TypeMux) *BlockProcessor { +func NewBlockProcessor(db ethdb.Database, pow pow.PoW, blockchain *BlockChain, eventMux *event.TypeMux) *BlockProcessor { sm := &BlockProcessor{ chainDb: db, mem: make(map[string]*big.Int), Pow: pow, - bc: chainManager, + bc: blockchain, eventMux: eventMux, } return sm @@ -124,7 +124,7 @@ func (self *BlockProcessor) ApplyTransaction(gp GasPool, statedb *state.StateDB, return receipt, gas, err } -func (self *BlockProcessor) ChainManager() *ChainManager { +func (self *BlockProcessor) BlockChain() *BlockChain { return self.bc } @@ -347,7 +347,7 @@ func (sm *BlockProcessor) VerifyUncles(statedb *state.StateDB, block, parent *ty // GetBlockReceipts returns the receipts beloniging to the block hash func (sm *BlockProcessor) GetBlockReceipts(bhash common.Hash) types.Receipts { - if block := sm.ChainManager().GetBlock(bhash); block != nil { + if block := sm.BlockChain().GetBlock(bhash); block != nil { return GetBlockReceipts(sm.chainDb, block.Hash()) } diff --git a/core/block_processor_test.go b/core/block_processor_test.go index 5735b8d0a..ba8bd7bcd 100644 --- a/core/block_processor_test.go +++ b/core/block_processor_test.go @@ -30,16 +30,16 @@ import ( "github.com/ethereum/go-ethereum/pow/ezp" ) -func proc() (*BlockProcessor, *ChainManager) { +func proc() (*BlockProcessor, *BlockChain) { db, _ := ethdb.NewMemDatabase() var mux event.TypeMux WriteTestNetGenesisBlock(db, 0) - chainMan, err := NewChainManager(db, thePow(), &mux) + blockchain, err := NewBlockChain(db, thePow(), &mux) if err != nil { fmt.Println(err) } - return NewBlockProcessor(db, ezp.New(), chainMan, &mux), chainMan + return NewBlockProcessor(db, ezp.New(), blockchain, &mux), blockchain } func TestNumber(t *testing.T) { diff --git a/core/blockchain.go b/core/blockchain.go new file mode 100644 index 000000000..e8209f8e3 --- /dev/null +++ b/core/blockchain.go @@ -0,0 +1,809 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +// Package core implements the Ethereum consensus protocol. +package core + +import ( + "errors" + "fmt" + "io" + "math/big" + "sync" + "sync/atomic" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/ethdb" + "github.com/ethereum/go-ethereum/event" + "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/logger/glog" + "github.com/ethereum/go-ethereum/metrics" + "github.com/ethereum/go-ethereum/pow" + "github.com/ethereum/go-ethereum/rlp" + "github.com/hashicorp/golang-lru" +) + +var ( + chainlogger = logger.NewLogger("CHAIN") + jsonlogger = logger.NewJsonLogger() + + blockInsertTimer = metrics.NewTimer("chain/inserts") + + ErrNoGenesis = errors.New("Genesis not found in chain") +) + +const ( + headerCacheLimit = 512 + bodyCacheLimit = 256 + tdCacheLimit = 1024 + blockCacheLimit = 256 + maxFutureBlocks = 256 + maxTimeFutureBlocks = 30 +) + +type BlockChain struct { + chainDb ethdb.Database + processor types.BlockProcessor + eventMux *event.TypeMux + genesisBlock *types.Block + // Last known total difficulty + mu sync.RWMutex + chainmu sync.RWMutex + tsmu sync.RWMutex + + td *big.Int + currentBlock *types.Block + currentGasLimit *big.Int + + headerCache *lru.Cache // Cache for the most recent block headers + bodyCache *lru.Cache // Cache for the most recent block bodies + bodyRLPCache *lru.Cache // Cache for the most recent block bodies in RLP encoded format + tdCache *lru.Cache // Cache for the most recent block total difficulties + blockCache *lru.Cache // Cache for the most recent entire blocks + futureBlocks *lru.Cache // future blocks are blocks added for later processing + + quit chan struct{} + running int32 // running must be called automically + // procInterrupt must be atomically called + procInterrupt int32 // interrupt signaler for block processing + wg sync.WaitGroup + + pow pow.PoW +} + +func NewBlockChain(chainDb ethdb.Database, pow pow.PoW, mux *event.TypeMux) (*BlockChain, error) { + headerCache, _ := lru.New(headerCacheLimit) + bodyCache, _ := lru.New(bodyCacheLimit) + bodyRLPCache, _ := lru.New(bodyCacheLimit) + tdCache, _ := lru.New(tdCacheLimit) + blockCache, _ := lru.New(blockCacheLimit) + futureBlocks, _ := lru.New(maxFutureBlocks) + + bc := &BlockChain{ + chainDb: chainDb, + eventMux: mux, + quit: make(chan struct{}), + headerCache: headerCache, + bodyCache: bodyCache, + bodyRLPCache: bodyRLPCache, + tdCache: tdCache, + blockCache: blockCache, + futureBlocks: futureBlocks, + pow: pow, + } + + bc.genesisBlock = bc.GetBlockByNumber(0) + if bc.genesisBlock == nil { + reader, err := NewDefaultGenesisReader() + if err != nil { + return nil, err + } + bc.genesisBlock, err = WriteGenesisBlock(chainDb, reader) + if err != nil { + return nil, err + } + glog.V(logger.Info).Infoln("WARNING: Wrote default ethereum genesis block") + } + if err := bc.setLastState(); err != nil { + return nil, err + } + // Check the current state of the block hashes and make sure that we do not have any of the bad blocks in our chain + for hash, _ := range BadHashes { + if block := bc.GetBlock(hash); block != nil { + glog.V(logger.Error).Infof("Found bad hash. Reorganising chain to state %x\n", block.ParentHash().Bytes()[:4]) + block = bc.GetBlock(block.ParentHash()) + if block == nil { + glog.Fatal("Unable to complete. Parent block not found. Corrupted DB?") + } + bc.SetHead(block) + + glog.V(logger.Error).Infoln("Chain reorg was successfull. Resuming normal operation") + } + } + // Take ownership of this particular state + go bc.update() + return bc, nil +} + +func (bc *BlockChain) SetHead(head *types.Block) { + bc.mu.Lock() + defer bc.mu.Unlock() + + for block := bc.currentBlock; block != nil && block.Hash() != head.Hash(); block = bc.GetBlock(block.ParentHash()) { + DeleteBlock(bc.chainDb, block.Hash()) + } + bc.headerCache.Purge() + bc.bodyCache.Purge() + bc.bodyRLPCache.Purge() + bc.blockCache.Purge() + bc.futureBlocks.Purge() + + bc.currentBlock = head + bc.setTotalDifficulty(bc.GetTd(head.Hash())) + bc.insert(head) + bc.setLastState() +} + +func (self *BlockChain) Td() *big.Int { + self.mu.RLock() + defer self.mu.RUnlock() + + return new(big.Int).Set(self.td) +} + +func (self *BlockChain) GasLimit() *big.Int { + self.mu.RLock() + defer self.mu.RUnlock() + + return self.currentBlock.GasLimit() +} + +func (self *BlockChain) LastBlockHash() common.Hash { + self.mu.RLock() + defer self.mu.RUnlock() + + return self.currentBlock.Hash() +} + +func (self *BlockChain) CurrentBlock() *types.Block { + self.mu.RLock() + defer self.mu.RUnlock() + + return self.currentBlock +} + +func (self *BlockChain) Status() (td *big.Int, currentBlock common.Hash, genesisBlock common.Hash) { + self.mu.RLock() + defer self.mu.RUnlock() + + return new(big.Int).Set(self.td), self.currentBlock.Hash(), self.genesisBlock.Hash() +} + +func (self *BlockChain) SetProcessor(proc types.BlockProcessor) { + self.processor = proc +} + +func (self *BlockChain) State() *state.StateDB { + return state.New(self.CurrentBlock().Root(), self.chainDb) +} + +func (bc *BlockChain) setLastState() error { + head := GetHeadBlockHash(bc.chainDb) + if head != (common.Hash{}) { + block := bc.GetBlock(head) + if block != nil { + bc.currentBlock = block + } + } else { + bc.Reset() + } + bc.td = bc.GetTd(bc.currentBlock.Hash()) + bc.currentGasLimit = CalcGasLimit(bc.currentBlock) + + if glog.V(logger.Info) { + glog.Infof("Last block (#%v) %x TD=%v\n", bc.currentBlock.Number(), bc.currentBlock.Hash(), bc.td) + } + + return nil +} + +// Reset purges the entire blockchain, restoring it to its genesis state. +func (bc *BlockChain) Reset() { + bc.ResetWithGenesisBlock(bc.genesisBlock) +} + +// ResetWithGenesisBlock purges the entire blockchain, restoring it to the +// specified genesis state. +func (bc *BlockChain) ResetWithGenesisBlock(genesis *types.Block) { + bc.mu.Lock() + defer bc.mu.Unlock() + + // Dump the entire block chain and purge the caches + for block := bc.currentBlock; block != nil; block = bc.GetBlock(block.ParentHash()) { + DeleteBlock(bc.chainDb, block.Hash()) + } + bc.headerCache.Purge() + bc.bodyCache.Purge() + bc.bodyRLPCache.Purge() + bc.blockCache.Purge() + bc.futureBlocks.Purge() + + // Prepare the genesis block and reinitialize the chain + if err := WriteTd(bc.chainDb, genesis.Hash(), genesis.Difficulty()); err != nil { + glog.Fatalf("failed to write genesis block TD: %v", err) + } + if err := WriteBlock(bc.chainDb, genesis); err != nil { + glog.Fatalf("failed to write genesis block: %v", err) + } + bc.genesisBlock = genesis + bc.insert(bc.genesisBlock) + bc.currentBlock = bc.genesisBlock + bc.setTotalDifficulty(genesis.Difficulty()) +} + +// Export writes the active chain to the given writer. +func (self *BlockChain) Export(w io.Writer) error { + if err := self.ExportN(w, uint64(0), self.currentBlock.NumberU64()); err != nil { + return err + } + return nil +} + +// ExportN writes a subset of the active chain to the given writer. +func (self *BlockChain) ExportN(w io.Writer, first uint64, last uint64) error { + self.mu.RLock() + defer self.mu.RUnlock() + + if first > last { + return fmt.Errorf("export failed: first (%d) is greater than last (%d)", first, last) + } + + glog.V(logger.Info).Infof("exporting %d blocks...\n", last-first+1) + + for nr := first; nr <= last; nr++ { + block := self.GetBlockByNumber(nr) + if block == nil { + return fmt.Errorf("export failed on #%d: not found", nr) + } + + if err := block.EncodeRLP(w); err != nil { + return err + } + } + + return nil +} + +// insert injects a block into the current chain block chain. Note, this function +// assumes that the `mu` mutex is held! +func (bc *BlockChain) insert(block *types.Block) { + // Add the block to the canonical chain number scheme and mark as the head + if err := WriteCanonicalHash(bc.chainDb, block.Hash(), block.NumberU64()); err != nil { + glog.Fatalf("failed to insert block number: %v", err) + } + bc.currentBlock = block +} + +// Accessors +func (bc *BlockChain) Genesis() *types.Block { + return bc.genesisBlock +} + +// HasHeader checks if a block header is present in the database or not, caching +// it if present. +func (bc *BlockChain) HasHeader(hash common.Hash) bool { + return bc.GetHeader(hash) != nil +} + +// GetHeader retrieves a block header from the database by hash, caching it if +// found. +func (self *BlockChain) GetHeader(hash common.Hash) *types.Header { + // Short circuit if the header's already in the cache, retrieve otherwise + if header, ok := self.headerCache.Get(hash); ok { + return header.(*types.Header) + } + header := GetHeader(self.chainDb, hash) + if header == nil { + return nil + } + // Cache the found header for next time and return + self.headerCache.Add(header.Hash(), header) + return header +} + +// GetHeaderByNumber retrieves a block header from the database by number, +// caching it (associated with its hash) if found. +func (self *BlockChain) GetHeaderByNumber(number uint64) *types.Header { + hash := GetCanonicalHash(self.chainDb, number) + if hash == (common.Hash{}) { + return nil + } + return self.GetHeader(hash) +} + +// GetBody retrieves a block body (transactions and uncles) from the database by +// hash, caching it if found. +func (self *BlockChain) GetBody(hash common.Hash) *types.Body { + // Short circuit if the body's already in the cache, retrieve otherwise + if cached, ok := self.bodyCache.Get(hash); ok { + body := cached.(*types.Body) + return body + } + body := GetBody(self.chainDb, hash) + if body == nil { + return nil + } + // Cache the found body for next time and return + self.bodyCache.Add(hash, body) + return body +} + +// GetBodyRLP retrieves a block body in RLP encoding from the database by hash, +// caching it if found. +func (self *BlockChain) GetBodyRLP(hash common.Hash) rlp.RawValue { + // Short circuit if the body's already in the cache, retrieve otherwise + if cached, ok := self.bodyRLPCache.Get(hash); ok { + return cached.(rlp.RawValue) + } + body := GetBodyRLP(self.chainDb, hash) + if len(body) == 0 { + return nil + } + // Cache the found body for next time and return + self.bodyRLPCache.Add(hash, body) + return body +} + +// GetTd retrieves a block's total difficulty in the canonical chain from the +// database by hash, caching it if found. +func (self *BlockChain) GetTd(hash common.Hash) *big.Int { + // Short circuit if the td's already in the cache, retrieve otherwise + if cached, ok := self.tdCache.Get(hash); ok { + return cached.(*big.Int) + } + td := GetTd(self.chainDb, hash) + if td == nil { + return nil + } + // Cache the found body for next time and return + self.tdCache.Add(hash, td) + return td +} + +// HasBlock checks if a block is fully present in the database or not, caching +// it if present. +func (bc *BlockChain) HasBlock(hash common.Hash) bool { + return bc.GetBlock(hash) != nil +} + +// GetBlock retrieves a block from the database by hash, caching it if found. +func (self *BlockChain) GetBlock(hash common.Hash) *types.Block { + // Short circuit if the block's already in the cache, retrieve otherwise + if block, ok := self.blockCache.Get(hash); ok { + return block.(*types.Block) + } + block := GetBlock(self.chainDb, hash) + if block == nil { + return nil + } + // Cache the found block for next time and return + self.blockCache.Add(block.Hash(), block) + return block +} + +// GetBlockByNumber retrieves a block from the database by number, caching it +// (associated with its hash) if found. +func (self *BlockChain) GetBlockByNumber(number uint64) *types.Block { + hash := GetCanonicalHash(self.chainDb, number) + if hash == (common.Hash{}) { + return nil + } + return self.GetBlock(hash) +} + +// GetBlockHashesFromHash retrieves a number of block hashes starting at a given +// hash, fetching towards the genesis block. +func (self *BlockChain) GetBlockHashesFromHash(hash common.Hash, max uint64) []common.Hash { + // Get the origin header from which to fetch + header := self.GetHeader(hash) + if header == nil { + return nil + } + // Iterate the headers until enough is collected or the genesis reached + chain := make([]common.Hash, 0, max) + for i := uint64(0); i < max; i++ { + if header = self.GetHeader(header.ParentHash); header == nil { + break + } + chain = append(chain, header.Hash()) + if header.Number.Cmp(common.Big0) == 0 { + break + } + } + return chain +} + +// [deprecated by eth/62] +// GetBlocksFromHash returns the block corresponding to hash and up to n-1 ancestors. +func (self *BlockChain) GetBlocksFromHash(hash common.Hash, n int) (blocks []*types.Block) { + for i := 0; i < n; i++ { + block := self.GetBlock(hash) + if block == nil { + break + } + blocks = append(blocks, block) + hash = block.ParentHash() + } + return +} + +func (self *BlockChain) GetUnclesInChain(block *types.Block, length int) (uncles []*types.Header) { + for i := 0; block != nil && i < length; i++ { + uncles = append(uncles, block.Uncles()...) + block = self.GetBlock(block.ParentHash()) + } + + return +} + +// setTotalDifficulty updates the TD of the chain manager. Note, this function +// assumes that the `mu` mutex is held! +func (bc *BlockChain) setTotalDifficulty(td *big.Int) { + bc.td = new(big.Int).Set(td) +} + +func (bc *BlockChain) Stop() { + if !atomic.CompareAndSwapInt32(&bc.running, 0, 1) { + return + } + close(bc.quit) + atomic.StoreInt32(&bc.procInterrupt, 1) + + bc.wg.Wait() + + glog.V(logger.Info).Infoln("Chain manager stopped") +} + +type queueEvent struct { + queue []interface{} + canonicalCount int + sideCount int + splitCount int +} + +func (self *BlockChain) procFutureBlocks() { + blocks := make([]*types.Block, self.futureBlocks.Len()) + for i, hash := range self.futureBlocks.Keys() { + block, _ := self.futureBlocks.Get(hash) + blocks[i] = block.(*types.Block) + } + if len(blocks) > 0 { + types.BlockBy(types.Number).Sort(blocks) + self.InsertChain(blocks) + } +} + +type writeStatus byte + +const ( + NonStatTy writeStatus = iota + CanonStatTy + SplitStatTy + SideStatTy +) + +// WriteBlock writes the block to the chain. +func (self *BlockChain) WriteBlock(block *types.Block) (status writeStatus, err error) { + self.wg.Add(1) + defer self.wg.Done() + + // Calculate the total difficulty of the block + ptd := self.GetTd(block.ParentHash()) + if ptd == nil { + return NonStatTy, ParentError(block.ParentHash()) + } + td := new(big.Int).Add(block.Difficulty(), ptd) + + self.mu.RLock() + cblock := self.currentBlock + self.mu.RUnlock() + + // Compare the TD of the last known block in the canonical chain to make sure it's greater. + // At this point it's possible that a different chain (fork) becomes the new canonical chain. + if td.Cmp(self.Td()) > 0 { + // chain fork + if block.ParentHash() != cblock.Hash() { + // during split we merge two different chains and create the new canonical chain + err := self.reorg(cblock, block) + if err != nil { + return NonStatTy, err + } + } + status = CanonStatTy + + self.mu.Lock() + self.setTotalDifficulty(td) + self.insert(block) + self.mu.Unlock() + } else { + status = SideStatTy + } + + if err := WriteTd(self.chainDb, block.Hash(), td); err != nil { + glog.Fatalf("failed to write block total difficulty: %v", err) + } + if err := WriteBlock(self.chainDb, block); err != nil { + glog.Fatalf("filed to write block contents: %v", err) + } + // Delete from future blocks + self.futureBlocks.Remove(block.Hash()) + + return +} + +// InsertChain will attempt to insert the given chain in to the canonical chain or, otherwise, create a fork. It an error is returned +// it will return the index number of the failing block as well an error describing what went wrong (for possible errors see core/errors.go). +func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) { + self.wg.Add(1) + defer self.wg.Done() + + self.chainmu.Lock() + defer self.chainmu.Unlock() + + // A queued approach to delivering events. This is generally + // faster than direct delivery and requires much less mutex + // acquiring. + var ( + queue = make([]interface{}, len(chain)) + queueEvent = queueEvent{queue: queue} + stats struct{ queued, processed, ignored int } + tstart = time.Now() + + nonceChecked = make([]bool, len(chain)) + ) + + // Start the parallel nonce verifier. + nonceAbort, nonceResults := verifyNoncesFromBlocks(self.pow, chain) + defer close(nonceAbort) + + txcount := 0 + for i, block := range chain { + if atomic.LoadInt32(&self.procInterrupt) == 1 { + glog.V(logger.Debug).Infoln("Premature abort during chain processing") + break + } + + bstart := time.Now() + // Wait for block i's nonce to be verified before processing + // its state transition. + for !nonceChecked[i] { + r := <-nonceResults + nonceChecked[r.index] = true + if !r.valid { + block := chain[r.index] + return r.index, &BlockNonceErr{Hash: block.Hash(), Number: block.Number(), Nonce: block.Nonce()} + } + } + + if BadHashes[block.Hash()] { + err := BadHashError(block.Hash()) + blockErr(block, err) + return i, err + } + // Call in to the block processor and check for errors. It's likely that if one block fails + // all others will fail too (unless a known block is returned). + logs, receipts, err := self.processor.Process(block) + if err != nil { + if IsKnownBlockErr(err) { + stats.ignored++ + continue + } + + if err == BlockFutureErr { + // Allow up to MaxFuture second in the future blocks. If this limit + // is exceeded the chain is discarded and processed at a later time + // if given. + max := big.NewInt(time.Now().Unix() + maxTimeFutureBlocks) + if block.Time().Cmp(max) == 1 { + return i, fmt.Errorf("%v: BlockFutureErr, %v > %v", BlockFutureErr, block.Time(), max) + } + + self.futureBlocks.Add(block.Hash(), block) + stats.queued++ + continue + } + + if IsParentErr(err) && self.futureBlocks.Contains(block.ParentHash()) { + self.futureBlocks.Add(block.Hash(), block) + stats.queued++ + continue + } + + blockErr(block, err) + + go ReportBlock(block, err) + + return i, err + } + if err := PutBlockReceipts(self.chainDb, block, receipts); err != nil { + glog.V(logger.Warn).Infoln("error writing block receipts:", err) + } + + txcount += len(block.Transactions()) + // write the block to the chain and get the status + status, err := self.WriteBlock(block) + if err != nil { + return i, err + } + switch status { + case CanonStatTy: + if glog.V(logger.Debug) { + glog.Infof("[%v] inserted block #%d (%d TXs %v G %d UNCs) (%x...). Took %v\n", time.Now().UnixNano(), block.Number(), len(block.Transactions()), block.GasUsed(), len(block.Uncles()), block.Hash().Bytes()[0:4], time.Since(bstart)) + } + queue[i] = ChainEvent{block, block.Hash(), logs} + queueEvent.canonicalCount++ + + // This puts transactions in a extra db for rpc + PutTransactions(self.chainDb, block, block.Transactions()) + // store the receipts + PutReceipts(self.chainDb, receipts) + case SideStatTy: + if glog.V(logger.Detail) { + glog.Infof("inserted forked block #%d (TD=%v) (%d TXs %d UNCs) (%x...). Took %v\n", block.Number(), block.Difficulty(), len(block.Transactions()), len(block.Uncles()), block.Hash().Bytes()[0:4], time.Since(bstart)) + } + queue[i] = ChainSideEvent{block, logs} + queueEvent.sideCount++ + case SplitStatTy: + queue[i] = ChainSplitEvent{block, logs} + queueEvent.splitCount++ + } + stats.processed++ + } + + if (stats.queued > 0 || stats.processed > 0 || stats.ignored > 0) && bool(glog.V(logger.Info)) { + tend := time.Since(tstart) + start, end := chain[0], chain[len(chain)-1] + glog.Infof("imported %d block(s) (%d queued %d ignored) including %d txs in %v. #%v [%x / %x]\n", stats.processed, stats.queued, stats.ignored, txcount, tend, end.Number(), start.Hash().Bytes()[:4], end.Hash().Bytes()[:4]) + } + + go self.eventMux.Post(queueEvent) + + return 0, nil +} + +// reorgs takes two blocks, an old chain and a new chain and will reconstruct the blocks and inserts them +// to be part of the new canonical chain and accumulates potential missing transactions and post an +// event about them +func (self *BlockChain) reorg(oldBlock, newBlock *types.Block) error { + self.mu.Lock() + defer self.mu.Unlock() + + var ( + newChain types.Blocks + commonBlock *types.Block + oldStart = oldBlock + newStart = newBlock + deletedTxs types.Transactions + ) + + // first reduce whoever is higher bound + if oldBlock.NumberU64() > newBlock.NumberU64() { + // reduce old chain + for oldBlock = oldBlock; oldBlock != nil && oldBlock.NumberU64() != newBlock.NumberU64(); oldBlock = self.GetBlock(oldBlock.ParentHash()) { + deletedTxs = append(deletedTxs, oldBlock.Transactions()...) + } + } else { + // reduce new chain and append new chain blocks for inserting later on + for newBlock = newBlock; newBlock != nil && newBlock.NumberU64() != oldBlock.NumberU64(); newBlock = self.GetBlock(newBlock.ParentHash()) { + newChain = append(newChain, newBlock) + } + } + if oldBlock == nil { + return fmt.Errorf("Invalid old chain") + } + if newBlock == nil { + return fmt.Errorf("Invalid new chain") + } + + numSplit := newBlock.Number() + for { + if oldBlock.Hash() == newBlock.Hash() { + commonBlock = oldBlock + break + } + newChain = append(newChain, newBlock) + deletedTxs = append(deletedTxs, oldBlock.Transactions()...) + + oldBlock, newBlock = self.GetBlock(oldBlock.ParentHash()), self.GetBlock(newBlock.ParentHash()) + if oldBlock == nil { + return fmt.Errorf("Invalid old chain") + } + if newBlock == nil { + return fmt.Errorf("Invalid new chain") + } + } + + if glog.V(logger.Debug) { + commonHash := commonBlock.Hash() + glog.Infof("Chain split detected @ %x. Reorganising chain from #%v %x to %x", commonHash[:4], numSplit, oldStart.Hash().Bytes()[:4], newStart.Hash().Bytes()[:4]) + } + + var addedTxs types.Transactions + // insert blocks. Order does not matter. Last block will be written in ImportChain itself which creates the new head properly + for _, block := range newChain { + // insert the block in the canonical way, re-writing history + self.insert(block) + // write canonical receipts and transactions + PutTransactions(self.chainDb, block, block.Transactions()) + PutReceipts(self.chainDb, GetBlockReceipts(self.chainDb, block.Hash())) + + addedTxs = append(addedTxs, block.Transactions()...) + } + + // calculate the difference between deleted and added transactions + diff := types.TxDifference(deletedTxs, addedTxs) + // When transactions get deleted from the database that means the + // receipts that were created in the fork must also be deleted + for _, tx := range diff { + DeleteReceipt(self.chainDb, tx.Hash()) + DeleteTransaction(self.chainDb, tx.Hash()) + } + // Must be posted in a goroutine because of the transaction pool trying + // to acquire the chain manager lock + go self.eventMux.Post(RemovedTransactionEvent{diff}) + + return nil +} + +func (self *BlockChain) update() { + events := self.eventMux.Subscribe(queueEvent{}) + futureTimer := time.Tick(5 * time.Second) +out: + for { + select { + case ev := <-events.Chan(): + switch ev := ev.(type) { + case queueEvent: + for _, event := range ev.queue { + switch event := event.(type) { + case ChainEvent: + // We need some control over the mining operation. Acquiring locks and waiting for the miner to create new block takes too long + // and in most cases isn't even necessary. + if self.currentBlock.Hash() == event.Hash { + self.currentGasLimit = CalcGasLimit(event.Block) + self.eventMux.Post(ChainHeadEvent{event.Block}) + } + } + self.eventMux.Post(event) + } + } + case <-futureTimer: + self.procFutureBlocks() + case <-self.quit: + break out + } + } +} + +func blockErr(block *types.Block, err error) { + if glog.V(logger.Error) { + glog.Errorf("Bad block #%v (%s)\n", block.Number(), block.Hash().Hex()) + glog.Errorf(" %v", err) + } +} diff --git a/core/blockchain_test.go b/core/blockchain_test.go new file mode 100644 index 000000000..e034417ce --- /dev/null +++ b/core/blockchain_test.go @@ -0,0 +1,652 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package core + +import ( + "fmt" + "math/big" + "math/rand" + "os" + "path/filepath" + "runtime" + "strconv" + "testing" + + "github.com/ethereum/ethash" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethdb" + "github.com/ethereum/go-ethereum/event" + "github.com/ethereum/go-ethereum/params" + "github.com/ethereum/go-ethereum/pow" + "github.com/ethereum/go-ethereum/rlp" + "github.com/hashicorp/golang-lru" +) + +func init() { + runtime.GOMAXPROCS(runtime.NumCPU()) +} + +func thePow() pow.PoW { + pow, _ := ethash.NewForTesting() + return pow +} + +func theBlockChain(db ethdb.Database, t *testing.T) *BlockChain { + var eventMux event.TypeMux + WriteTestNetGenesisBlock(db, 0) + blockchain, err := NewBlockChain(db, thePow(), &eventMux) + if err != nil { + t.Error("failed creating chainmanager:", err) + t.FailNow() + return nil + } + blockMan := NewBlockProcessor(db, nil, blockchain, &eventMux) + blockchain.SetProcessor(blockMan) + + return blockchain +} + +// Test fork of length N starting from block i +func testFork(t *testing.T, bman *BlockProcessor, i, N int, f func(td1, td2 *big.Int)) { + // switch databases to process the new chain + db, err := ethdb.NewMemDatabase() + if err != nil { + t.Fatal("Failed to create db:", err) + } + // copy old chain up to i into new db with deterministic canonical + bman2, err := newCanonical(i, db) + if err != nil { + t.Fatal("could not make new canonical in testFork", err) + } + // assert the bmans have the same block at i + bi1 := bman.bc.GetBlockByNumber(uint64(i)).Hash() + bi2 := bman2.bc.GetBlockByNumber(uint64(i)).Hash() + if bi1 != bi2 { + fmt.Printf("%+v\n%+v\n\n", bi1, bi2) + t.Fatal("chains do not have the same hash at height", i) + } + bman2.bc.SetProcessor(bman2) + + // extend the fork + parent := bman2.bc.CurrentBlock() + chainB := makeChain(parent, N, db, forkSeed) + _, err = bman2.bc.InsertChain(chainB) + if err != nil { + t.Fatal("Insert chain error for fork:", err) + } + + tdpre := bman.bc.Td() + // Test the fork's blocks on the original chain + td, err := testChain(chainB, bman) + if err != nil { + t.Fatal("expected chainB not to give errors:", err) + } + // Compare difficulties + f(tdpre, td) + + // Loop over parents making sure reconstruction is done properly +} + +func printChain(bc *BlockChain) { + for i := bc.CurrentBlock().Number().Uint64(); i > 0; i-- { + b := bc.GetBlockByNumber(uint64(i)) + fmt.Printf("\t%x %v\n", b.Hash(), b.Difficulty()) + } +} + +// process blocks against a chain +func testChain(chainB types.Blocks, bman *BlockProcessor) (*big.Int, error) { + for _, block := range chainB { + _, _, err := bman.bc.processor.Process(block) + if err != nil { + if IsKnownBlockErr(err) { + continue + } + return nil, err + } + bman.bc.mu.Lock() + WriteTd(bman.bc.chainDb, block.Hash(), new(big.Int).Add(block.Difficulty(), bman.bc.GetTd(block.ParentHash()))) + WriteBlock(bman.bc.chainDb, block) + bman.bc.mu.Unlock() + } + return bman.bc.GetTd(chainB[len(chainB)-1].Hash()), nil +} + +func loadChain(fn string, t *testing.T) (types.Blocks, error) { + fh, err := os.OpenFile(filepath.Join("..", "_data", fn), os.O_RDONLY, os.ModePerm) + if err != nil { + return nil, err + } + defer fh.Close() + + var chain types.Blocks + if err := rlp.Decode(fh, &chain); err != nil { + return nil, err + } + + return chain, nil +} + +func insertChain(done chan bool, blockchain *BlockChain, chain types.Blocks, t *testing.T) { + _, err := blockchain.InsertChain(chain) + if err != nil { + fmt.Println(err) + t.FailNow() + } + done <- true +} + +func TestExtendCanonical(t *testing.T) { + CanonicalLength := 5 + db, err := ethdb.NewMemDatabase() + if err != nil { + t.Fatal("Failed to create db:", err) + } + // make first chain starting from genesis + bman, err := newCanonical(CanonicalLength, db) + if err != nil { + t.Fatal("Could not make new canonical chain:", err) + } + f := func(td1, td2 *big.Int) { + if td2.Cmp(td1) <= 0 { + t.Error("expected chainB to have higher difficulty. Got", td2, "expected more than", td1) + } + } + // Start fork from current height (CanonicalLength) + testFork(t, bman, CanonicalLength, 1, f) + testFork(t, bman, CanonicalLength, 2, f) + testFork(t, bman, CanonicalLength, 5, f) + testFork(t, bman, CanonicalLength, 10, f) +} + +func TestShorterFork(t *testing.T) { + db, err := ethdb.NewMemDatabase() + if err != nil { + t.Fatal("Failed to create db:", err) + } + // make first chain starting from genesis + bman, err := newCanonical(10, db) + if err != nil { + t.Fatal("Could not make new canonical chain:", err) + } + f := func(td1, td2 *big.Int) { + if td2.Cmp(td1) >= 0 { + t.Error("expected chainB to have lower difficulty. Got", td2, "expected less than", td1) + } + } + // Sum of numbers must be less than 10 + // for this to be a shorter fork + testFork(t, bman, 0, 3, f) + testFork(t, bman, 0, 7, f) + testFork(t, bman, 1, 1, f) + testFork(t, bman, 1, 7, f) + testFork(t, bman, 5, 3, f) + testFork(t, bman, 5, 4, f) +} + +func TestLongerFork(t *testing.T) { + db, err := ethdb.NewMemDatabase() + if err != nil { + t.Fatal("Failed to create db:", err) + } + // make first chain starting from genesis + bman, err := newCanonical(10, db) + if err != nil { + t.Fatal("Could not make new canonical chain:", err) + } + f := func(td1, td2 *big.Int) { + if td2.Cmp(td1) <= 0 { + t.Error("expected chainB to have higher difficulty. Got", td2, "expected more than", td1) + } + } + // Sum of numbers must be greater than 10 + // for this to be a longer fork + testFork(t, bman, 0, 11, f) + testFork(t, bman, 0, 15, f) + testFork(t, bman, 1, 10, f) + testFork(t, bman, 1, 12, f) + testFork(t, bman, 5, 6, f) + testFork(t, bman, 5, 8, f) +} + +func TestEqualFork(t *testing.T) { + db, err := ethdb.NewMemDatabase() + if err != nil { + t.Fatal("Failed to create db:", err) + } + bman, err := newCanonical(10, db) + if err != nil { + t.Fatal("Could not make new canonical chain:", err) + } + f := func(td1, td2 *big.Int) { + if td2.Cmp(td1) != 0 { + t.Error("expected chainB to have equal difficulty. Got", td2, "expected ", td1) + } + } + // Sum of numbers must be equal to 10 + // for this to be an equal fork + testFork(t, bman, 0, 10, f) + testFork(t, bman, 1, 9, f) + testFork(t, bman, 2, 8, f) + testFork(t, bman, 5, 5, f) + testFork(t, bman, 6, 4, f) + testFork(t, bman, 9, 1, f) +} + +func TestBrokenChain(t *testing.T) { + db, err := ethdb.NewMemDatabase() + if err != nil { + t.Fatal("Failed to create db:", err) + } + bman, err := newCanonical(10, db) + if err != nil { + t.Fatal("Could not make new canonical chain:", err) + } + db2, err := ethdb.NewMemDatabase() + if err != nil { + t.Fatal("Failed to create db:", err) + } + bman2, err := newCanonical(10, db2) + if err != nil { + t.Fatal("Could not make new canonical chain:", err) + } + bman2.bc.SetProcessor(bman2) + parent := bman2.bc.CurrentBlock() + chainB := makeChain(parent, 5, db2, forkSeed) + chainB = chainB[1:] + _, err = testChain(chainB, bman) + if err == nil { + t.Error("expected broken chain to return error") + } +} + +func TestChainInsertions(t *testing.T) { + t.Skip("Skipped: outdated test files") + + db, _ := ethdb.NewMemDatabase() + + chain1, err := loadChain("valid1", t) + if err != nil { + fmt.Println(err) + t.FailNow() + } + + chain2, err := loadChain("valid2", t) + if err != nil { + fmt.Println(err) + t.FailNow() + } + + blockchain := theBlockChain(db, t) + + const max = 2 + done := make(chan bool, max) + + go insertChain(done, blockchain, chain1, t) + go insertChain(done, blockchain, chain2, t) + + for i := 0; i < max; i++ { + <-done + } + + if chain2[len(chain2)-1].Hash() != blockchain.CurrentBlock().Hash() { + t.Error("chain2 is canonical and shouldn't be") + } + + if chain1[len(chain1)-1].Hash() != blockchain.CurrentBlock().Hash() { + t.Error("chain1 isn't canonical and should be") + } +} + +func TestChainMultipleInsertions(t *testing.T) { + t.Skip("Skipped: outdated test files") + + db, _ := ethdb.NewMemDatabase() + + const max = 4 + chains := make([]types.Blocks, max) + var longest int + for i := 0; i < max; i++ { + var err error + name := "valid" + strconv.Itoa(i+1) + chains[i], err = loadChain(name, t) + if len(chains[i]) >= len(chains[longest]) { + longest = i + } + fmt.Println("loaded", name, "with a length of", len(chains[i])) + if err != nil { + fmt.Println(err) + t.FailNow() + } + } + + blockchain := theBlockChain(db, t) + + done := make(chan bool, max) + for i, chain := range chains { + // XXX the go routine would otherwise reference the same (chain[3]) variable and fail + i := i + chain := chain + go func() { + insertChain(done, blockchain, chain, t) + fmt.Println(i, "done") + }() + } + + for i := 0; i < max; i++ { + <-done + } + + if chains[longest][len(chains[longest])-1].Hash() != blockchain.CurrentBlock().Hash() { + t.Error("Invalid canonical chain") + } +} + +type bproc struct{} + +func (bproc) Process(*types.Block) (vm.Logs, types.Receipts, error) { return nil, nil, nil } + +func makeChainWithDiff(genesis *types.Block, d []int, seed byte) []*types.Block { + var chain []*types.Block + for i, difficulty := range d { + header := &types.Header{ + Coinbase: common.Address{seed}, + Number: big.NewInt(int64(i + 1)), + Difficulty: big.NewInt(int64(difficulty)), + } + if i == 0 { + header.ParentHash = genesis.Hash() + } else { + header.ParentHash = chain[i-1].Hash() + } + block := types.NewBlockWithHeader(header) + chain = append(chain, block) + } + return chain +} + +func chm(genesis *types.Block, db ethdb.Database) *BlockChain { + var eventMux event.TypeMux + bc := &BlockChain{chainDb: db, genesisBlock: genesis, eventMux: &eventMux, pow: FakePow{}} + bc.headerCache, _ = lru.New(100) + bc.bodyCache, _ = lru.New(100) + bc.bodyRLPCache, _ = lru.New(100) + bc.tdCache, _ = lru.New(100) + bc.blockCache, _ = lru.New(100) + bc.futureBlocks, _ = lru.New(100) + bc.processor = bproc{} + bc.ResetWithGenesisBlock(genesis) + + return bc +} + +func TestReorgLongest(t *testing.T) { + db, _ := ethdb.NewMemDatabase() + + genesis, err := WriteTestNetGenesisBlock(db, 0) + if err != nil { + t.Error(err) + t.FailNow() + } + bc := chm(genesis, db) + + chain1 := makeChainWithDiff(genesis, []int{1, 2, 4}, 10) + chain2 := makeChainWithDiff(genesis, []int{1, 2, 3, 4}, 11) + + bc.InsertChain(chain1) + bc.InsertChain(chain2) + + prev := bc.CurrentBlock() + for block := bc.GetBlockByNumber(bc.CurrentBlock().NumberU64() - 1); block.NumberU64() != 0; prev, block = block, bc.GetBlockByNumber(block.NumberU64()-1) { + if prev.ParentHash() != block.Hash() { + t.Errorf("parent hash mismatch %x - %x", prev.ParentHash(), block.Hash()) + } + } +} + +func TestBadHashes(t *testing.T) { + db, _ := ethdb.NewMemDatabase() + genesis, err := WriteTestNetGenesisBlock(db, 0) + if err != nil { + t.Error(err) + t.FailNow() + } + bc := chm(genesis, db) + + chain := makeChainWithDiff(genesis, []int{1, 2, 4}, 10) + BadHashes[chain[2].Header().Hash()] = true + + _, err = bc.InsertChain(chain) + if !IsBadHashError(err) { + t.Errorf("error mismatch: want: BadHashError, have: %v", err) + } +} + +func TestReorgBadHashes(t *testing.T) { + db, _ := ethdb.NewMemDatabase() + genesis, err := WriteTestNetGenesisBlock(db, 0) + if err != nil { + t.Error(err) + t.FailNow() + } + bc := chm(genesis, db) + + chain := makeChainWithDiff(genesis, []int{1, 2, 3, 4}, 11) + bc.InsertChain(chain) + + if chain[3].Header().Hash() != bc.LastBlockHash() { + t.Errorf("last block hash mismatch: want: %x, have: %x", chain[3].Header().Hash(), bc.LastBlockHash()) + } + + // NewChainManager should check BadHashes when loading it db + BadHashes[chain[3].Header().Hash()] = true + + var eventMux event.TypeMux + ncm, err := NewBlockChain(db, FakePow{}, &eventMux) + if err != nil { + t.Errorf("NewChainManager err: %s", err) + } + + // check it set head to (valid) parent of bad hash block + if chain[2].Header().Hash() != ncm.LastBlockHash() { + t.Errorf("last block hash mismatch: want: %x, have: %x", chain[2].Header().Hash(), ncm.LastBlockHash()) + } + + if chain[2].Header().GasLimit.Cmp(ncm.GasLimit()) != 0 { + t.Errorf("current block gasLimit mismatch: want: %x, have: %x", chain[2].Header().GasLimit, ncm.GasLimit()) + } +} + +func TestReorgShortest(t *testing.T) { + db, _ := ethdb.NewMemDatabase() + genesis, err := WriteTestNetGenesisBlock(db, 0) + if err != nil { + t.Error(err) + t.FailNow() + } + bc := chm(genesis, db) + + chain1 := makeChainWithDiff(genesis, []int{1, 2, 3, 4}, 10) + chain2 := makeChainWithDiff(genesis, []int{1, 10}, 11) + + bc.InsertChain(chain1) + bc.InsertChain(chain2) + + prev := bc.CurrentBlock() + for block := bc.GetBlockByNumber(bc.CurrentBlock().NumberU64() - 1); block.NumberU64() != 0; prev, block = block, bc.GetBlockByNumber(block.NumberU64()-1) { + if prev.ParentHash() != block.Hash() { + t.Errorf("parent hash mismatch %x - %x", prev.ParentHash(), block.Hash()) + } + } +} + +func TestInsertNonceError(t *testing.T) { + for i := 1; i < 25 && !t.Failed(); i++ { + db, _ := ethdb.NewMemDatabase() + genesis, err := WriteTestNetGenesisBlock(db, 0) + if err != nil { + t.Error(err) + t.FailNow() + } + bc := chm(genesis, db) + bc.processor = NewBlockProcessor(db, bc.pow, bc, bc.eventMux) + blocks := makeChain(bc.currentBlock, i, db, 0) + + fail := rand.Int() % len(blocks) + failblock := blocks[fail] + bc.pow = failPow{failblock.NumberU64()} + n, err := bc.InsertChain(blocks) + + // Check that the returned error indicates the nonce failure. + if n != fail { + t.Errorf("(i=%d) wrong failed block index: got %d, want %d", i, n, fail) + } + if !IsBlockNonceErr(err) { + t.Fatalf("(i=%d) got %q, want a nonce error", i, err) + } + nerr := err.(*BlockNonceErr) + if nerr.Number.Cmp(failblock.Number()) != 0 { + t.Errorf("(i=%d) wrong block number in error, got %v, want %v", i, nerr.Number, failblock.Number()) + } + if nerr.Hash != failblock.Hash() { + t.Errorf("(i=%d) wrong block hash in error, got %v, want %v", i, nerr.Hash, failblock.Hash()) + } + + // Check that all no blocks after the failing block have been inserted. + for _, block := range blocks[fail:] { + if bc.HasBlock(block.Hash()) { + t.Errorf("(i=%d) invalid block %d present in chain", i, block.NumberU64()) + } + } + } +} + +// Tests that chain reorganizations handle transaction removals and reinsertions. +func TestChainTxReorgs(t *testing.T) { + params.MinGasLimit = big.NewInt(125000) // Minimum the gas limit may ever be. + params.GenesisGasLimit = big.NewInt(3141592) // Gas limit of the Genesis block. + + var ( + key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") + key2, _ = crypto.HexToECDSA("8a1f9a8f95be41cd7ccb6168179afb4504aefe388d1e14474d32c45c72ce7b7a") + key3, _ = crypto.HexToECDSA("49a7b37aa6f6645917e7b807e9d1c00d4fa71f18343b0d4122a4d2df64dd6fee") + addr1 = crypto.PubkeyToAddress(key1.PublicKey) + addr2 = crypto.PubkeyToAddress(key2.PublicKey) + addr3 = crypto.PubkeyToAddress(key3.PublicKey) + db, _ = ethdb.NewMemDatabase() + ) + genesis := WriteGenesisBlockForTesting(db, + GenesisAccount{addr1, big.NewInt(1000000)}, + GenesisAccount{addr2, big.NewInt(1000000)}, + GenesisAccount{addr3, big.NewInt(1000000)}, + ) + // Create two transactions shared between the chains: + // - postponed: transaction included at a later block in the forked chain + // - swapped: transaction included at the same block number in the forked chain + postponed, _ := types.NewTransaction(0, addr1, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(key1) + swapped, _ := types.NewTransaction(1, addr1, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(key1) + + // Create two transactions that will be dropped by the forked chain: + // - pastDrop: transaction dropped retroactively from a past block + // - freshDrop: transaction dropped exactly at the block where the reorg is detected + var pastDrop, freshDrop *types.Transaction + + // Create three transactions that will be added in the forked chain: + // - pastAdd: transaction added before the reorganiztion is detected + // - freshAdd: transaction added at the exact block the reorg is detected + // - futureAdd: transaction added after the reorg has already finished + var pastAdd, freshAdd, futureAdd *types.Transaction + + chain := GenerateChain(genesis, db, 3, func(i int, gen *BlockGen) { + switch i { + case 0: + pastDrop, _ = types.NewTransaction(gen.TxNonce(addr2), addr2, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(key2) + + gen.AddTx(pastDrop) // This transaction will be dropped in the fork from below the split point + gen.AddTx(postponed) // This transaction will be postponed till block #3 in the fork + + case 2: + freshDrop, _ = types.NewTransaction(gen.TxNonce(addr2), addr2, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(key2) + + gen.AddTx(freshDrop) // This transaction will be dropped in the fork from exactly at the split point + gen.AddTx(swapped) // This transaction will be swapped out at the exact height + + gen.OffsetTime(9) // Lower the block difficulty to simulate a weaker chain + } + }) + // Import the chain. This runs all block validation rules. + evmux := &event.TypeMux{} + chainman, _ := NewBlockChain(db, FakePow{}, evmux) + chainman.SetProcessor(NewBlockProcessor(db, FakePow{}, chainman, evmux)) + if i, err := chainman.InsertChain(chain); err != nil { + t.Fatalf("failed to insert original chain[%d]: %v", i, err) + } + + // overwrite the old chain + chain = GenerateChain(genesis, db, 5, func(i int, gen *BlockGen) { + switch i { + case 0: + pastAdd, _ = types.NewTransaction(gen.TxNonce(addr3), addr3, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(key3) + gen.AddTx(pastAdd) // This transaction needs to be injected during reorg + + case 2: + gen.AddTx(postponed) // This transaction was postponed from block #1 in the original chain + gen.AddTx(swapped) // This transaction was swapped from the exact current spot in the original chain + + freshAdd, _ = types.NewTransaction(gen.TxNonce(addr3), addr3, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(key3) + gen.AddTx(freshAdd) // This transaction will be added exactly at reorg time + + case 3: + futureAdd, _ = types.NewTransaction(gen.TxNonce(addr3), addr3, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(key3) + gen.AddTx(futureAdd) // This transaction will be added after a full reorg + } + }) + if _, err := chainman.InsertChain(chain); err != nil { + t.Fatalf("failed to insert forked chain: %v", err) + } + + // removed tx + for i, tx := range (types.Transactions{pastDrop, freshDrop}) { + if GetTransaction(db, tx.Hash()) != nil { + t.Errorf("drop %d: tx found while shouldn't have been", i) + } + if GetReceipt(db, tx.Hash()) != nil { + t.Errorf("drop %d: receipt found while shouldn't have been", i) + } + } + // added tx + for i, tx := range (types.Transactions{pastAdd, freshAdd, futureAdd}) { + if GetTransaction(db, tx.Hash()) == nil { + t.Errorf("add %d: expected tx to be found", i) + } + if GetReceipt(db, tx.Hash()) == nil { + t.Errorf("add %d: expected receipt to be found", i) + } + } + // shared tx + for i, tx := range (types.Transactions{postponed, swapped}) { + if GetTransaction(db, tx.Hash()) == nil { + t.Errorf("share %d: expected tx to be found", i) + } + if GetReceipt(db, tx.Hash()) == nil { + t.Errorf("share %d: expected receipt to be found", i) + } + } +} diff --git a/core/chain_makers.go b/core/chain_makers.go index 3af9b0b89..ba09b3029 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -153,7 +153,7 @@ func (b *BlockGen) OffsetTime(seconds int64) { // and their coinbase will be the zero address. // // Blocks created by GenerateChain do not contain valid proof of work -// values. Inserting them into ChainManager requires use of FakePow or +// values. Inserting them into BlockChain requires use of FakePow or // a similar non-validating proof of work implementation. func GenerateChain(parent *types.Block, db ethdb.Database, n int, gen func(int, *BlockGen)) []*types.Block { statedb := state.New(parent.Root(), db) @@ -205,7 +205,7 @@ func newCanonical(n int, db ethdb.Database) (*BlockProcessor, error) { evmux := &event.TypeMux{} WriteTestNetGenesisBlock(db, 0) - chainman, _ := NewChainManager(db, FakePow{}, evmux) + chainman, _ := NewBlockChain(db, FakePow{}, evmux) bman := NewBlockProcessor(db, FakePow{}, chainman, evmux) bman.bc.SetProcessor(bman) parent := bman.bc.CurrentBlock() diff --git a/core/chain_makers_test.go b/core/chain_makers_test.go index ac18e5e0b..b33af8d87 100644 --- a/core/chain_makers_test.go +++ b/core/chain_makers_test.go @@ -77,7 +77,7 @@ func ExampleGenerateChain() { // Import the chain. This runs all block validation rules. evmux := &event.TypeMux{} - chainman, _ := NewChainManager(db, FakePow{}, evmux) + chainman, _ := NewBlockChain(db, FakePow{}, evmux) chainman.SetProcessor(NewBlockProcessor(db, FakePow{}, chainman, evmux)) if i, err := chainman.InsertChain(chain); err != nil { fmt.Printf("insert error (block %d): %v\n", i, err) diff --git a/core/chain_manager.go b/core/chain_manager.go deleted file mode 100644 index 49f831a59..000000000 --- a/core/chain_manager.go +++ /dev/null @@ -1,849 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -// Package core implements the Ethereum consensus protocol. -package core - -import ( - "errors" - "fmt" - "io" - "math/big" - "sync" - "sync/atomic" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/metrics" - "github.com/ethereum/go-ethereum/pow" - "github.com/ethereum/go-ethereum/rlp" - "github.com/hashicorp/golang-lru" -) - -var ( - chainlogger = logger.NewLogger("CHAIN") - jsonlogger = logger.NewJsonLogger() - - blockInsertTimer = metrics.NewTimer("chain/inserts") - - ErrNoGenesis = errors.New("Genesis not found in chain") -) - -const ( - headerCacheLimit = 512 - bodyCacheLimit = 256 - tdCacheLimit = 1024 - blockCacheLimit = 256 - maxFutureBlocks = 256 - maxTimeFutureBlocks = 30 - checkpointLimit = 200 -) - -type ChainManager struct { - //eth EthManager - chainDb ethdb.Database - processor types.BlockProcessor - eventMux *event.TypeMux - genesisBlock *types.Block - // Last known total difficulty - mu sync.RWMutex - chainmu sync.RWMutex - tsmu sync.RWMutex - - checkpoint int // checkpoint counts towards the new checkpoint - td *big.Int - currentBlock *types.Block - currentGasLimit *big.Int - - headerCache *lru.Cache // Cache for the most recent block headers - bodyCache *lru.Cache // Cache for the most recent block bodies - bodyRLPCache *lru.Cache // Cache for the most recent block bodies in RLP encoded format - tdCache *lru.Cache // Cache for the most recent block total difficulties - blockCache *lru.Cache // Cache for the most recent entire blocks - futureBlocks *lru.Cache // future blocks are blocks added for later processing - - quit chan struct{} - running int32 // running must be called automically - // procInterrupt must be atomically called - procInterrupt int32 // interrupt signaler for block processing - wg sync.WaitGroup - - pow pow.PoW -} - -func NewChainManager(chainDb ethdb.Database, pow pow.PoW, mux *event.TypeMux) (*ChainManager, error) { - headerCache, _ := lru.New(headerCacheLimit) - bodyCache, _ := lru.New(bodyCacheLimit) - bodyRLPCache, _ := lru.New(bodyCacheLimit) - tdCache, _ := lru.New(tdCacheLimit) - blockCache, _ := lru.New(blockCacheLimit) - futureBlocks, _ := lru.New(maxFutureBlocks) - - bc := &ChainManager{ - chainDb: chainDb, - eventMux: mux, - quit: make(chan struct{}), - headerCache: headerCache, - bodyCache: bodyCache, - bodyRLPCache: bodyRLPCache, - tdCache: tdCache, - blockCache: blockCache, - futureBlocks: futureBlocks, - pow: pow, - } - - bc.genesisBlock = bc.GetBlockByNumber(0) - if bc.genesisBlock == nil { - reader, err := NewDefaultGenesisReader() - if err != nil { - return nil, err - } - bc.genesisBlock, err = WriteGenesisBlock(chainDb, reader) - if err != nil { - return nil, err - } - glog.V(logger.Info).Infoln("WARNING: Wrote default ethereum genesis block") - } - if err := bc.setLastState(); err != nil { - return nil, err - } - // Check the current state of the block hashes and make sure that we do not have any of the bad blocks in our chain - for hash, _ := range BadHashes { - if block := bc.GetBlock(hash); block != nil { - glog.V(logger.Error).Infof("Found bad hash. Reorganising chain to state %x\n", block.ParentHash().Bytes()[:4]) - block = bc.GetBlock(block.ParentHash()) - if block == nil { - glog.Fatal("Unable to complete. Parent block not found. Corrupted DB?") - } - bc.SetHead(block) - - glog.V(logger.Error).Infoln("Chain reorg was successfull. Resuming normal operation") - } - } - // Take ownership of this particular state - go bc.update() - return bc, nil -} - -func (bc *ChainManager) SetHead(head *types.Block) { - bc.mu.Lock() - defer bc.mu.Unlock() - - for block := bc.currentBlock; block != nil && block.Hash() != head.Hash(); block = bc.GetBlock(block.ParentHash()) { - DeleteBlock(bc.chainDb, block.Hash()) - } - bc.headerCache.Purge() - bc.bodyCache.Purge() - bc.bodyRLPCache.Purge() - bc.blockCache.Purge() - bc.futureBlocks.Purge() - - bc.currentBlock = head - bc.setTotalDifficulty(bc.GetTd(head.Hash())) - bc.insert(head) - bc.setLastState() -} - -func (self *ChainManager) Td() *big.Int { - self.mu.RLock() - defer self.mu.RUnlock() - - return new(big.Int).Set(self.td) -} - -func (self *ChainManager) GasLimit() *big.Int { - self.mu.RLock() - defer self.mu.RUnlock() - - return self.currentBlock.GasLimit() -} - -func (self *ChainManager) LastBlockHash() common.Hash { - self.mu.RLock() - defer self.mu.RUnlock() - - return self.currentBlock.Hash() -} - -func (self *ChainManager) CurrentBlock() *types.Block { - self.mu.RLock() - defer self.mu.RUnlock() - - return self.currentBlock -} - -func (self *ChainManager) Status() (td *big.Int, currentBlock common.Hash, genesisBlock common.Hash) { - self.mu.RLock() - defer self.mu.RUnlock() - - return new(big.Int).Set(self.td), self.currentBlock.Hash(), self.genesisBlock.Hash() -} - -func (self *ChainManager) SetProcessor(proc types.BlockProcessor) { - self.processor = proc -} - -func (self *ChainManager) State() *state.StateDB { - return state.New(self.CurrentBlock().Root(), self.chainDb) -} - -func (bc *ChainManager) recover() bool { - data, _ := bc.chainDb.Get([]byte("checkpoint")) - if len(data) != 0 { - block := bc.GetBlock(common.BytesToHash(data)) - if block != nil { - if err := WriteCanonicalHash(bc.chainDb, block.Hash(), block.NumberU64()); err != nil { - glog.Fatalf("failed to write database head number: %v", err) - } - if err := WriteHeadBlockHash(bc.chainDb, block.Hash()); err != nil { - glog.Fatalf("failed to write database head hash: %v", err) - } - bc.currentBlock = block - return true - } - } - return false -} - -func (bc *ChainManager) setLastState() error { - head := GetHeadBlockHash(bc.chainDb) - if head != (common.Hash{}) { - block := bc.GetBlock(head) - if block != nil { - bc.currentBlock = block - } else { - glog.Infof("LastBlock (%x) not found. Recovering...\n", head) - if bc.recover() { - glog.Infof("Recover successful") - } else { - glog.Fatalf("Recover failed. Please report") - } - } - } else { - bc.Reset() - } - bc.td = bc.GetTd(bc.currentBlock.Hash()) - bc.currentGasLimit = CalcGasLimit(bc.currentBlock) - - if glog.V(logger.Info) { - glog.Infof("Last block (#%v) %x TD=%v\n", bc.currentBlock.Number(), bc.currentBlock.Hash(), bc.td) - } - - return nil -} - -// Reset purges the entire blockchain, restoring it to its genesis state. -func (bc *ChainManager) Reset() { - bc.ResetWithGenesisBlock(bc.genesisBlock) -} - -// ResetWithGenesisBlock purges the entire blockchain, restoring it to the -// specified genesis state. -func (bc *ChainManager) ResetWithGenesisBlock(genesis *types.Block) { - bc.mu.Lock() - defer bc.mu.Unlock() - - // Dump the entire block chain and purge the caches - for block := bc.currentBlock; block != nil; block = bc.GetBlock(block.ParentHash()) { - DeleteBlock(bc.chainDb, block.Hash()) - } - bc.headerCache.Purge() - bc.bodyCache.Purge() - bc.bodyRLPCache.Purge() - bc.blockCache.Purge() - bc.futureBlocks.Purge() - - // Prepare the genesis block and reinitialize the chain - if err := WriteTd(bc.chainDb, genesis.Hash(), genesis.Difficulty()); err != nil { - glog.Fatalf("failed to write genesis block TD: %v", err) - } - if err := WriteBlock(bc.chainDb, genesis); err != nil { - glog.Fatalf("failed to write genesis block: %v", err) - } - bc.genesisBlock = genesis - bc.insert(bc.genesisBlock) - bc.currentBlock = bc.genesisBlock - bc.setTotalDifficulty(genesis.Difficulty()) -} - -// Export writes the active chain to the given writer. -func (self *ChainManager) Export(w io.Writer) error { - if err := self.ExportN(w, uint64(0), self.currentBlock.NumberU64()); err != nil { - return err - } - return nil -} - -// ExportN writes a subset of the active chain to the given writer. -func (self *ChainManager) ExportN(w io.Writer, first uint64, last uint64) error { - self.mu.RLock() - defer self.mu.RUnlock() - - if first > last { - return fmt.Errorf("export failed: first (%d) is greater than last (%d)", first, last) - } - - glog.V(logger.Info).Infof("exporting %d blocks...\n", last-first+1) - - for nr := first; nr <= last; nr++ { - block := self.GetBlockByNumber(nr) - if block == nil { - return fmt.Errorf("export failed on #%d: not found", nr) - } - - if err := block.EncodeRLP(w); err != nil { - return err - } - } - - return nil -} - -// insert injects a block into the current chain block chain. Note, this function -// assumes that the `mu` mutex is held! -func (bc *ChainManager) insert(block *types.Block) { - // Add the block to the canonical chain number scheme and mark as the head - if err := WriteCanonicalHash(bc.chainDb, block.Hash(), block.NumberU64()); err != nil { - glog.Fatalf("failed to insert block number: %v", err) - } - if err := WriteHeadBlockHash(bc.chainDb, block.Hash()); err != nil { - glog.Fatalf("failed to insert block number: %v", err) - } - // Add a new restore point if we reached some limit - bc.checkpoint++ - if bc.checkpoint > checkpointLimit { - if err := bc.chainDb.Put([]byte("checkpoint"), block.Hash().Bytes()); err != nil { - glog.Fatalf("failed to create checkpoint: %v", err) - } - bc.checkpoint = 0 - } - // Update the internal internal state with the head block - bc.currentBlock = block -} - -// Accessors -func (bc *ChainManager) Genesis() *types.Block { - return bc.genesisBlock -} - -// HasHeader checks if a block header is present in the database or not, caching -// it if present. -func (bc *ChainManager) HasHeader(hash common.Hash) bool { - return bc.GetHeader(hash) != nil -} - -// GetHeader retrieves a block header from the database by hash, caching it if -// found. -func (self *ChainManager) GetHeader(hash common.Hash) *types.Header { - // Short circuit if the header's already in the cache, retrieve otherwise - if header, ok := self.headerCache.Get(hash); ok { - return header.(*types.Header) - } - header := GetHeader(self.chainDb, hash) - if header == nil { - return nil - } - // Cache the found header for next time and return - self.headerCache.Add(header.Hash(), header) - return header -} - -// GetHeaderByNumber retrieves a block header from the database by number, -// caching it (associated with its hash) if found. -func (self *ChainManager) GetHeaderByNumber(number uint64) *types.Header { - hash := GetCanonicalHash(self.chainDb, number) - if hash == (common.Hash{}) { - return nil - } - return self.GetHeader(hash) -} - -// GetBody retrieves a block body (transactions and uncles) from the database by -// hash, caching it if found. -func (self *ChainManager) GetBody(hash common.Hash) *types.Body { - // Short circuit if the body's already in the cache, retrieve otherwise - if cached, ok := self.bodyCache.Get(hash); ok { - body := cached.(*types.Body) - return body - } - body := GetBody(self.chainDb, hash) - if body == nil { - return nil - } - // Cache the found body for next time and return - self.bodyCache.Add(hash, body) - return body -} - -// GetBodyRLP retrieves a block body in RLP encoding from the database by hash, -// caching it if found. -func (self *ChainManager) GetBodyRLP(hash common.Hash) rlp.RawValue { - // Short circuit if the body's already in the cache, retrieve otherwise - if cached, ok := self.bodyRLPCache.Get(hash); ok { - return cached.(rlp.RawValue) - } - body := GetBodyRLP(self.chainDb, hash) - if len(body) == 0 { - return nil - } - // Cache the found body for next time and return - self.bodyRLPCache.Add(hash, body) - return body -} - -// GetTd retrieves a block's total difficulty in the canonical chain from the -// database by hash, caching it if found. -func (self *ChainManager) GetTd(hash common.Hash) *big.Int { - // Short circuit if the td's already in the cache, retrieve otherwise - if cached, ok := self.tdCache.Get(hash); ok { - return cached.(*big.Int) - } - td := GetTd(self.chainDb, hash) - if td == nil { - return nil - } - // Cache the found body for next time and return - self.tdCache.Add(hash, td) - return td -} - -// HasBlock checks if a block is fully present in the database or not, caching -// it if present. -func (bc *ChainManager) HasBlock(hash common.Hash) bool { - return bc.GetBlock(hash) != nil -} - -// GetBlock retrieves a block from the database by hash, caching it if found. -func (self *ChainManager) GetBlock(hash common.Hash) *types.Block { - // Short circuit if the block's already in the cache, retrieve otherwise - if block, ok := self.blockCache.Get(hash); ok { - return block.(*types.Block) - } - block := GetBlock(self.chainDb, hash) - if block == nil { - return nil - } - // Cache the found block for next time and return - self.blockCache.Add(block.Hash(), block) - return block -} - -// GetBlockByNumber retrieves a block from the database by number, caching it -// (associated with its hash) if found. -func (self *ChainManager) GetBlockByNumber(number uint64) *types.Block { - hash := GetCanonicalHash(self.chainDb, number) - if hash == (common.Hash{}) { - return nil - } - return self.GetBlock(hash) -} - -// GetBlockHashesFromHash retrieves a number of block hashes starting at a given -// hash, fetching towards the genesis block. -func (self *ChainManager) GetBlockHashesFromHash(hash common.Hash, max uint64) []common.Hash { - // Get the origin header from which to fetch - header := self.GetHeader(hash) - if header == nil { - return nil - } - // Iterate the headers until enough is collected or the genesis reached - chain := make([]common.Hash, 0, max) - for i := uint64(0); i < max; i++ { - if header = self.GetHeader(header.ParentHash); header == nil { - break - } - chain = append(chain, header.Hash()) - if header.Number.Cmp(common.Big0) == 0 { - break - } - } - return chain -} - -// [deprecated by eth/62] -// GetBlocksFromHash returns the block corresponding to hash and up to n-1 ancestors. -func (self *ChainManager) GetBlocksFromHash(hash common.Hash, n int) (blocks []*types.Block) { - for i := 0; i < n; i++ { - block := self.GetBlock(hash) - if block == nil { - break - } - blocks = append(blocks, block) - hash = block.ParentHash() - } - return -} - -func (self *ChainManager) GetUnclesInChain(block *types.Block, length int) (uncles []*types.Header) { - for i := 0; block != nil && i < length; i++ { - uncles = append(uncles, block.Uncles()...) - block = self.GetBlock(block.ParentHash()) - } - - return -} - -// setTotalDifficulty updates the TD of the chain manager. Note, this function -// assumes that the `mu` mutex is held! -func (bc *ChainManager) setTotalDifficulty(td *big.Int) { - bc.td = new(big.Int).Set(td) -} - -func (bc *ChainManager) Stop() { - if !atomic.CompareAndSwapInt32(&bc.running, 0, 1) { - return - } - close(bc.quit) - atomic.StoreInt32(&bc.procInterrupt, 1) - - bc.wg.Wait() - - glog.V(logger.Info).Infoln("Chain manager stopped") -} - -type queueEvent struct { - queue []interface{} - canonicalCount int - sideCount int - splitCount int -} - -func (self *ChainManager) procFutureBlocks() { - blocks := make([]*types.Block, self.futureBlocks.Len()) - for i, hash := range self.futureBlocks.Keys() { - block, _ := self.futureBlocks.Get(hash) - blocks[i] = block.(*types.Block) - } - if len(blocks) > 0 { - types.BlockBy(types.Number).Sort(blocks) - self.InsertChain(blocks) - } -} - -type writeStatus byte - -const ( - NonStatTy writeStatus = iota - CanonStatTy - SplitStatTy - SideStatTy -) - -// WriteBlock writes the block to the chain. -func (self *ChainManager) WriteBlock(block *types.Block) (status writeStatus, err error) { - self.wg.Add(1) - defer self.wg.Done() - - // Calculate the total difficulty of the block - ptd := self.GetTd(block.ParentHash()) - if ptd == nil { - return NonStatTy, ParentError(block.ParentHash()) - } - td := new(big.Int).Add(block.Difficulty(), ptd) - - self.mu.RLock() - cblock := self.currentBlock - self.mu.RUnlock() - - // Compare the TD of the last known block in the canonical chain to make sure it's greater. - // At this point it's possible that a different chain (fork) becomes the new canonical chain. - if td.Cmp(self.Td()) > 0 { - // chain fork - if block.ParentHash() != cblock.Hash() { - // during split we merge two different chains and create the new canonical chain - err := self.reorg(cblock, block) - if err != nil { - return NonStatTy, err - } - } - status = CanonStatTy - - self.mu.Lock() - self.setTotalDifficulty(td) - self.insert(block) - self.mu.Unlock() - } else { - status = SideStatTy - } - - if err := WriteTd(self.chainDb, block.Hash(), td); err != nil { - glog.Fatalf("failed to write block total difficulty: %v", err) - } - if err := WriteBlock(self.chainDb, block); err != nil { - glog.Fatalf("filed to write block contents: %v", err) - } - // Delete from future blocks - self.futureBlocks.Remove(block.Hash()) - - return -} - -// InsertChain will attempt to insert the given chain in to the canonical chain or, otherwise, create a fork. It an error is returned -// it will return the index number of the failing block as well an error describing what went wrong (for possible errors see core/errors.go). -func (self *ChainManager) InsertChain(chain types.Blocks) (int, error) { - self.wg.Add(1) - defer self.wg.Done() - - self.chainmu.Lock() - defer self.chainmu.Unlock() - - // A queued approach to delivering events. This is generally - // faster than direct delivery and requires much less mutex - // acquiring. - var ( - queue = make([]interface{}, len(chain)) - queueEvent = queueEvent{queue: queue} - stats struct{ queued, processed, ignored int } - tstart = time.Now() - - nonceChecked = make([]bool, len(chain)) - ) - - // Start the parallel nonce verifier. - nonceAbort, nonceResults := verifyNoncesFromBlocks(self.pow, chain) - defer close(nonceAbort) - - txcount := 0 - for i, block := range chain { - if atomic.LoadInt32(&self.procInterrupt) == 1 { - glog.V(logger.Debug).Infoln("Premature abort during chain processing") - break - } - - bstart := time.Now() - // Wait for block i's nonce to be verified before processing - // its state transition. - for !nonceChecked[i] { - r := <-nonceResults - nonceChecked[r.index] = true - if !r.valid { - block := chain[r.index] - return r.index, &BlockNonceErr{Hash: block.Hash(), Number: block.Number(), Nonce: block.Nonce()} - } - } - - if BadHashes[block.Hash()] { - err := BadHashError(block.Hash()) - blockErr(block, err) - return i, err - } - // Call in to the block processor and check for errors. It's likely that if one block fails - // all others will fail too (unless a known block is returned). - logs, receipts, err := self.processor.Process(block) - if err != nil { - if IsKnownBlockErr(err) { - stats.ignored++ - continue - } - - if err == BlockFutureErr { - // Allow up to MaxFuture second in the future blocks. If this limit - // is exceeded the chain is discarded and processed at a later time - // if given. - max := big.NewInt(time.Now().Unix() + maxTimeFutureBlocks) - if block.Time().Cmp(max) == 1 { - return i, fmt.Errorf("%v: BlockFutureErr, %v > %v", BlockFutureErr, block.Time(), max) - } - - self.futureBlocks.Add(block.Hash(), block) - stats.queued++ - continue - } - - if IsParentErr(err) && self.futureBlocks.Contains(block.ParentHash()) { - self.futureBlocks.Add(block.Hash(), block) - stats.queued++ - continue - } - - blockErr(block, err) - - go ReportBlock(block, err) - - return i, err - } - if err := PutBlockReceipts(self.chainDb, block, receipts); err != nil { - glog.V(logger.Warn).Infoln("error writing block receipts:", err) - } - - txcount += len(block.Transactions()) - // write the block to the chain and get the status - status, err := self.WriteBlock(block) - if err != nil { - return i, err - } - switch status { - case CanonStatTy: - if glog.V(logger.Debug) { - glog.Infof("[%v] inserted block #%d (%d TXs %v G %d UNCs) (%x...). Took %v\n", time.Now().UnixNano(), block.Number(), len(block.Transactions()), block.GasUsed(), len(block.Uncles()), block.Hash().Bytes()[0:4], time.Since(bstart)) - } - queue[i] = ChainEvent{block, block.Hash(), logs} - queueEvent.canonicalCount++ - - // This puts transactions in a extra db for rpc - PutTransactions(self.chainDb, block, block.Transactions()) - // store the receipts - PutReceipts(self.chainDb, receipts) - case SideStatTy: - if glog.V(logger.Detail) { - glog.Infof("inserted forked block #%d (TD=%v) (%d TXs %d UNCs) (%x...). Took %v\n", block.Number(), block.Difficulty(), len(block.Transactions()), len(block.Uncles()), block.Hash().Bytes()[0:4], time.Since(bstart)) - } - queue[i] = ChainSideEvent{block, logs} - queueEvent.sideCount++ - case SplitStatTy: - queue[i] = ChainSplitEvent{block, logs} - queueEvent.splitCount++ - } - stats.processed++ - } - - if (stats.queued > 0 || stats.processed > 0 || stats.ignored > 0) && bool(glog.V(logger.Info)) { - tend := time.Since(tstart) - start, end := chain[0], chain[len(chain)-1] - glog.Infof("imported %d block(s) (%d queued %d ignored) including %d txs in %v. #%v [%x / %x]\n", stats.processed, stats.queued, stats.ignored, txcount, tend, end.Number(), start.Hash().Bytes()[:4], end.Hash().Bytes()[:4]) - } - - go self.eventMux.Post(queueEvent) - - return 0, nil -} - -// reorgs takes two blocks, an old chain and a new chain and will reconstruct the blocks and inserts them -// to be part of the new canonical chain and accumulates potential missing transactions and post an -// event about them -func (self *ChainManager) reorg(oldBlock, newBlock *types.Block) error { - self.mu.Lock() - defer self.mu.Unlock() - - var ( - newChain types.Blocks - commonBlock *types.Block - oldStart = oldBlock - newStart = newBlock - deletedTxs types.Transactions - ) - - // first reduce whoever is higher bound - if oldBlock.NumberU64() > newBlock.NumberU64() { - // reduce old chain - for oldBlock = oldBlock; oldBlock != nil && oldBlock.NumberU64() != newBlock.NumberU64(); oldBlock = self.GetBlock(oldBlock.ParentHash()) { - deletedTxs = append(deletedTxs, oldBlock.Transactions()...) - } - } else { - // reduce new chain and append new chain blocks for inserting later on - for newBlock = newBlock; newBlock != nil && newBlock.NumberU64() != oldBlock.NumberU64(); newBlock = self.GetBlock(newBlock.ParentHash()) { - newChain = append(newChain, newBlock) - } - } - if oldBlock == nil { - return fmt.Errorf("Invalid old chain") - } - if newBlock == nil { - return fmt.Errorf("Invalid new chain") - } - - numSplit := newBlock.Number() - for { - if oldBlock.Hash() == newBlock.Hash() { - commonBlock = oldBlock - break - } - newChain = append(newChain, newBlock) - deletedTxs = append(deletedTxs, oldBlock.Transactions()...) - - oldBlock, newBlock = self.GetBlock(oldBlock.ParentHash()), self.GetBlock(newBlock.ParentHash()) - if oldBlock == nil { - return fmt.Errorf("Invalid old chain") - } - if newBlock == nil { - return fmt.Errorf("Invalid new chain") - } - } - - if glog.V(logger.Debug) { - commonHash := commonBlock.Hash() - glog.Infof("Chain split detected @ %x. Reorganising chain from #%v %x to %x", commonHash[:4], numSplit, oldStart.Hash().Bytes()[:4], newStart.Hash().Bytes()[:4]) - } - - var addedTxs types.Transactions - // insert blocks. Order does not matter. Last block will be written in ImportChain itself which creates the new head properly - for _, block := range newChain { - // insert the block in the canonical way, re-writing history - self.insert(block) - // write canonical receipts and transactions - PutTransactions(self.chainDb, block, block.Transactions()) - PutReceipts(self.chainDb, GetBlockReceipts(self.chainDb, block.Hash())) - - addedTxs = append(addedTxs, block.Transactions()...) - } - - // calculate the difference between deleted and added transactions - diff := types.TxDifference(deletedTxs, addedTxs) - // When transactions get deleted from the database that means the - // receipts that were created in the fork must also be deleted - for _, tx := range diff { - DeleteReceipt(self.chainDb, tx.Hash()) - DeleteTransaction(self.chainDb, tx.Hash()) - } - // Must be posted in a goroutine because of the transaction pool trying - // to acquire the chain manager lock - go self.eventMux.Post(RemovedTransactionEvent{diff}) - - return nil -} - -func (self *ChainManager) update() { - events := self.eventMux.Subscribe(queueEvent{}) - futureTimer := time.Tick(5 * time.Second) -out: - for { - select { - case ev := <-events.Chan(): - switch ev := ev.(type) { - case queueEvent: - for _, event := range ev.queue { - switch event := event.(type) { - case ChainEvent: - // We need some control over the mining operation. Acquiring locks and waiting for the miner to create new block takes too long - // and in most cases isn't even necessary. - if self.currentBlock.Hash() == event.Hash { - self.currentGasLimit = CalcGasLimit(event.Block) - self.eventMux.Post(ChainHeadEvent{event.Block}) - } - } - self.eventMux.Post(event) - } - } - case <-futureTimer: - self.procFutureBlocks() - case <-self.quit: - break out - } - } -} - -func blockErr(block *types.Block, err error) { - if glog.V(logger.Error) { - glog.Errorf("Bad block #%v (%s)\n", block.Number(), block.Hash().Hex()) - glog.Errorf(" %v", err) - } -} diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go deleted file mode 100644 index 40286190b..000000000 --- a/core/chain_manager_test.go +++ /dev/null @@ -1,652 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package core - -import ( - "fmt" - "math/big" - "math/rand" - "os" - "path/filepath" - "runtime" - "strconv" - "testing" - - "github.com/ethereum/ethash" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/params" - "github.com/ethereum/go-ethereum/pow" - "github.com/ethereum/go-ethereum/rlp" - "github.com/hashicorp/golang-lru" -) - -func init() { - runtime.GOMAXPROCS(runtime.NumCPU()) -} - -func thePow() pow.PoW { - pow, _ := ethash.NewForTesting() - return pow -} - -func theChainManager(db ethdb.Database, t *testing.T) *ChainManager { - var eventMux event.TypeMux - WriteTestNetGenesisBlock(db, 0) - chainMan, err := NewChainManager(db, thePow(), &eventMux) - if err != nil { - t.Error("failed creating chainmanager:", err) - t.FailNow() - return nil - } - blockMan := NewBlockProcessor(db, nil, chainMan, &eventMux) - chainMan.SetProcessor(blockMan) - - return chainMan -} - -// Test fork of length N starting from block i -func testFork(t *testing.T, bman *BlockProcessor, i, N int, f func(td1, td2 *big.Int)) { - // switch databases to process the new chain - db, err := ethdb.NewMemDatabase() - if err != nil { - t.Fatal("Failed to create db:", err) - } - // copy old chain up to i into new db with deterministic canonical - bman2, err := newCanonical(i, db) - if err != nil { - t.Fatal("could not make new canonical in testFork", err) - } - // assert the bmans have the same block at i - bi1 := bman.bc.GetBlockByNumber(uint64(i)).Hash() - bi2 := bman2.bc.GetBlockByNumber(uint64(i)).Hash() - if bi1 != bi2 { - fmt.Printf("%+v\n%+v\n\n", bi1, bi2) - t.Fatal("chains do not have the same hash at height", i) - } - bman2.bc.SetProcessor(bman2) - - // extend the fork - parent := bman2.bc.CurrentBlock() - chainB := makeChain(parent, N, db, forkSeed) - _, err = bman2.bc.InsertChain(chainB) - if err != nil { - t.Fatal("Insert chain error for fork:", err) - } - - tdpre := bman.bc.Td() - // Test the fork's blocks on the original chain - td, err := testChain(chainB, bman) - if err != nil { - t.Fatal("expected chainB not to give errors:", err) - } - // Compare difficulties - f(tdpre, td) - - // Loop over parents making sure reconstruction is done properly -} - -func printChain(bc *ChainManager) { - for i := bc.CurrentBlock().Number().Uint64(); i > 0; i-- { - b := bc.GetBlockByNumber(uint64(i)) - fmt.Printf("\t%x %v\n", b.Hash(), b.Difficulty()) - } -} - -// process blocks against a chain -func testChain(chainB types.Blocks, bman *BlockProcessor) (*big.Int, error) { - for _, block := range chainB { - _, _, err := bman.bc.processor.Process(block) - if err != nil { - if IsKnownBlockErr(err) { - continue - } - return nil, err - } - bman.bc.mu.Lock() - WriteTd(bman.bc.chainDb, block.Hash(), new(big.Int).Add(block.Difficulty(), bman.bc.GetTd(block.ParentHash()))) - WriteBlock(bman.bc.chainDb, block) - bman.bc.mu.Unlock() - } - return bman.bc.GetTd(chainB[len(chainB)-1].Hash()), nil -} - -func loadChain(fn string, t *testing.T) (types.Blocks, error) { - fh, err := os.OpenFile(filepath.Join("..", "_data", fn), os.O_RDONLY, os.ModePerm) - if err != nil { - return nil, err - } - defer fh.Close() - - var chain types.Blocks - if err := rlp.Decode(fh, &chain); err != nil { - return nil, err - } - - return chain, nil -} - -func insertChain(done chan bool, chainMan *ChainManager, chain types.Blocks, t *testing.T) { - _, err := chainMan.InsertChain(chain) - if err != nil { - fmt.Println(err) - t.FailNow() - } - done <- true -} - -func TestExtendCanonical(t *testing.T) { - CanonicalLength := 5 - db, err := ethdb.NewMemDatabase() - if err != nil { - t.Fatal("Failed to create db:", err) - } - // make first chain starting from genesis - bman, err := newCanonical(CanonicalLength, db) - if err != nil { - t.Fatal("Could not make new canonical chain:", err) - } - f := func(td1, td2 *big.Int) { - if td2.Cmp(td1) <= 0 { - t.Error("expected chainB to have higher difficulty. Got", td2, "expected more than", td1) - } - } - // Start fork from current height (CanonicalLength) - testFork(t, bman, CanonicalLength, 1, f) - testFork(t, bman, CanonicalLength, 2, f) - testFork(t, bman, CanonicalLength, 5, f) - testFork(t, bman, CanonicalLength, 10, f) -} - -func TestShorterFork(t *testing.T) { - db, err := ethdb.NewMemDatabase() - if err != nil { - t.Fatal("Failed to create db:", err) - } - // make first chain starting from genesis - bman, err := newCanonical(10, db) - if err != nil { - t.Fatal("Could not make new canonical chain:", err) - } - f := func(td1, td2 *big.Int) { - if td2.Cmp(td1) >= 0 { - t.Error("expected chainB to have lower difficulty. Got", td2, "expected less than", td1) - } - } - // Sum of numbers must be less than 10 - // for this to be a shorter fork - testFork(t, bman, 0, 3, f) - testFork(t, bman, 0, 7, f) - testFork(t, bman, 1, 1, f) - testFork(t, bman, 1, 7, f) - testFork(t, bman, 5, 3, f) - testFork(t, bman, 5, 4, f) -} - -func TestLongerFork(t *testing.T) { - db, err := ethdb.NewMemDatabase() - if err != nil { - t.Fatal("Failed to create db:", err) - } - // make first chain starting from genesis - bman, err := newCanonical(10, db) - if err != nil { - t.Fatal("Could not make new canonical chain:", err) - } - f := func(td1, td2 *big.Int) { - if td2.Cmp(td1) <= 0 { - t.Error("expected chainB to have higher difficulty. Got", td2, "expected more than", td1) - } - } - // Sum of numbers must be greater than 10 - // for this to be a longer fork - testFork(t, bman, 0, 11, f) - testFork(t, bman, 0, 15, f) - testFork(t, bman, 1, 10, f) - testFork(t, bman, 1, 12, f) - testFork(t, bman, 5, 6, f) - testFork(t, bman, 5, 8, f) -} - -func TestEqualFork(t *testing.T) { - db, err := ethdb.NewMemDatabase() - if err != nil { - t.Fatal("Failed to create db:", err) - } - bman, err := newCanonical(10, db) - if err != nil { - t.Fatal("Could not make new canonical chain:", err) - } - f := func(td1, td2 *big.Int) { - if td2.Cmp(td1) != 0 { - t.Error("expected chainB to have equal difficulty. Got", td2, "expected ", td1) - } - } - // Sum of numbers must be equal to 10 - // for this to be an equal fork - testFork(t, bman, 0, 10, f) - testFork(t, bman, 1, 9, f) - testFork(t, bman, 2, 8, f) - testFork(t, bman, 5, 5, f) - testFork(t, bman, 6, 4, f) - testFork(t, bman, 9, 1, f) -} - -func TestBrokenChain(t *testing.T) { - db, err := ethdb.NewMemDatabase() - if err != nil { - t.Fatal("Failed to create db:", err) - } - bman, err := newCanonical(10, db) - if err != nil { - t.Fatal("Could not make new canonical chain:", err) - } - db2, err := ethdb.NewMemDatabase() - if err != nil { - t.Fatal("Failed to create db:", err) - } - bman2, err := newCanonical(10, db2) - if err != nil { - t.Fatal("Could not make new canonical chain:", err) - } - bman2.bc.SetProcessor(bman2) - parent := bman2.bc.CurrentBlock() - chainB := makeChain(parent, 5, db2, forkSeed) - chainB = chainB[1:] - _, err = testChain(chainB, bman) - if err == nil { - t.Error("expected broken chain to return error") - } -} - -func TestChainInsertions(t *testing.T) { - t.Skip("Skipped: outdated test files") - - db, _ := ethdb.NewMemDatabase() - - chain1, err := loadChain("valid1", t) - if err != nil { - fmt.Println(err) - t.FailNow() - } - - chain2, err := loadChain("valid2", t) - if err != nil { - fmt.Println(err) - t.FailNow() - } - - chainMan := theChainManager(db, t) - - const max = 2 - done := make(chan bool, max) - - go insertChain(done, chainMan, chain1, t) - go insertChain(done, chainMan, chain2, t) - - for i := 0; i < max; i++ { - <-done - } - - if chain2[len(chain2)-1].Hash() != chainMan.CurrentBlock().Hash() { - t.Error("chain2 is canonical and shouldn't be") - } - - if chain1[len(chain1)-1].Hash() != chainMan.CurrentBlock().Hash() { - t.Error("chain1 isn't canonical and should be") - } -} - -func TestChainMultipleInsertions(t *testing.T) { - t.Skip("Skipped: outdated test files") - - db, _ := ethdb.NewMemDatabase() - - const max = 4 - chains := make([]types.Blocks, max) - var longest int - for i := 0; i < max; i++ { - var err error - name := "valid" + strconv.Itoa(i+1) - chains[i], err = loadChain(name, t) - if len(chains[i]) >= len(chains[longest]) { - longest = i - } - fmt.Println("loaded", name, "with a length of", len(chains[i])) - if err != nil { - fmt.Println(err) - t.FailNow() - } - } - - chainMan := theChainManager(db, t) - - done := make(chan bool, max) - for i, chain := range chains { - // XXX the go routine would otherwise reference the same (chain[3]) variable and fail - i := i - chain := chain - go func() { - insertChain(done, chainMan, chain, t) - fmt.Println(i, "done") - }() - } - - for i := 0; i < max; i++ { - <-done - } - - if chains[longest][len(chains[longest])-1].Hash() != chainMan.CurrentBlock().Hash() { - t.Error("Invalid canonical chain") - } -} - -type bproc struct{} - -func (bproc) Process(*types.Block) (vm.Logs, types.Receipts, error) { return nil, nil, nil } - -func makeChainWithDiff(genesis *types.Block, d []int, seed byte) []*types.Block { - var chain []*types.Block - for i, difficulty := range d { - header := &types.Header{ - Coinbase: common.Address{seed}, - Number: big.NewInt(int64(i + 1)), - Difficulty: big.NewInt(int64(difficulty)), - } - if i == 0 { - header.ParentHash = genesis.Hash() - } else { - header.ParentHash = chain[i-1].Hash() - } - block := types.NewBlockWithHeader(header) - chain = append(chain, block) - } - return chain -} - -func chm(genesis *types.Block, db ethdb.Database) *ChainManager { - var eventMux event.TypeMux - bc := &ChainManager{chainDb: db, genesisBlock: genesis, eventMux: &eventMux, pow: FakePow{}} - bc.headerCache, _ = lru.New(100) - bc.bodyCache, _ = lru.New(100) - bc.bodyRLPCache, _ = lru.New(100) - bc.tdCache, _ = lru.New(100) - bc.blockCache, _ = lru.New(100) - bc.futureBlocks, _ = lru.New(100) - bc.processor = bproc{} - bc.ResetWithGenesisBlock(genesis) - - return bc -} - -func TestReorgLongest(t *testing.T) { - db, _ := ethdb.NewMemDatabase() - - genesis, err := WriteTestNetGenesisBlock(db, 0) - if err != nil { - t.Error(err) - t.FailNow() - } - bc := chm(genesis, db) - - chain1 := makeChainWithDiff(genesis, []int{1, 2, 4}, 10) - chain2 := makeChainWithDiff(genesis, []int{1, 2, 3, 4}, 11) - - bc.InsertChain(chain1) - bc.InsertChain(chain2) - - prev := bc.CurrentBlock() - for block := bc.GetBlockByNumber(bc.CurrentBlock().NumberU64() - 1); block.NumberU64() != 0; prev, block = block, bc.GetBlockByNumber(block.NumberU64()-1) { - if prev.ParentHash() != block.Hash() { - t.Errorf("parent hash mismatch %x - %x", prev.ParentHash(), block.Hash()) - } - } -} - -func TestBadHashes(t *testing.T) { - db, _ := ethdb.NewMemDatabase() - genesis, err := WriteTestNetGenesisBlock(db, 0) - if err != nil { - t.Error(err) - t.FailNow() - } - bc := chm(genesis, db) - - chain := makeChainWithDiff(genesis, []int{1, 2, 4}, 10) - BadHashes[chain[2].Header().Hash()] = true - - _, err = bc.InsertChain(chain) - if !IsBadHashError(err) { - t.Errorf("error mismatch: want: BadHashError, have: %v", err) - } -} - -func TestReorgBadHashes(t *testing.T) { - db, _ := ethdb.NewMemDatabase() - genesis, err := WriteTestNetGenesisBlock(db, 0) - if err != nil { - t.Error(err) - t.FailNow() - } - bc := chm(genesis, db) - - chain := makeChainWithDiff(genesis, []int{1, 2, 3, 4}, 11) - bc.InsertChain(chain) - - if chain[3].Header().Hash() != bc.LastBlockHash() { - t.Errorf("last block hash mismatch: want: %x, have: %x", chain[3].Header().Hash(), bc.LastBlockHash()) - } - - // NewChainManager should check BadHashes when loading it db - BadHashes[chain[3].Header().Hash()] = true - - var eventMux event.TypeMux - ncm, err := NewChainManager(db, FakePow{}, &eventMux) - if err != nil { - t.Errorf("NewChainManager err: %s", err) - } - - // check it set head to (valid) parent of bad hash block - if chain[2].Header().Hash() != ncm.LastBlockHash() { - t.Errorf("last block hash mismatch: want: %x, have: %x", chain[2].Header().Hash(), ncm.LastBlockHash()) - } - - if chain[2].Header().GasLimit.Cmp(ncm.GasLimit()) != 0 { - t.Errorf("current block gasLimit mismatch: want: %x, have: %x", chain[2].Header().GasLimit, ncm.GasLimit()) - } -} - -func TestReorgShortest(t *testing.T) { - db, _ := ethdb.NewMemDatabase() - genesis, err := WriteTestNetGenesisBlock(db, 0) - if err != nil { - t.Error(err) - t.FailNow() - } - bc := chm(genesis, db) - - chain1 := makeChainWithDiff(genesis, []int{1, 2, 3, 4}, 10) - chain2 := makeChainWithDiff(genesis, []int{1, 10}, 11) - - bc.InsertChain(chain1) - bc.InsertChain(chain2) - - prev := bc.CurrentBlock() - for block := bc.GetBlockByNumber(bc.CurrentBlock().NumberU64() - 1); block.NumberU64() != 0; prev, block = block, bc.GetBlockByNumber(block.NumberU64()-1) { - if prev.ParentHash() != block.Hash() { - t.Errorf("parent hash mismatch %x - %x", prev.ParentHash(), block.Hash()) - } - } -} - -func TestInsertNonceError(t *testing.T) { - for i := 1; i < 25 && !t.Failed(); i++ { - db, _ := ethdb.NewMemDatabase() - genesis, err := WriteTestNetGenesisBlock(db, 0) - if err != nil { - t.Error(err) - t.FailNow() - } - bc := chm(genesis, db) - bc.processor = NewBlockProcessor(db, bc.pow, bc, bc.eventMux) - blocks := makeChain(bc.currentBlock, i, db, 0) - - fail := rand.Int() % len(blocks) - failblock := blocks[fail] - bc.pow = failPow{failblock.NumberU64()} - n, err := bc.InsertChain(blocks) - - // Check that the returned error indicates the nonce failure. - if n != fail { - t.Errorf("(i=%d) wrong failed block index: got %d, want %d", i, n, fail) - } - if !IsBlockNonceErr(err) { - t.Fatalf("(i=%d) got %q, want a nonce error", i, err) - } - nerr := err.(*BlockNonceErr) - if nerr.Number.Cmp(failblock.Number()) != 0 { - t.Errorf("(i=%d) wrong block number in error, got %v, want %v", i, nerr.Number, failblock.Number()) - } - if nerr.Hash != failblock.Hash() { - t.Errorf("(i=%d) wrong block hash in error, got %v, want %v", i, nerr.Hash, failblock.Hash()) - } - - // Check that all no blocks after the failing block have been inserted. - for _, block := range blocks[fail:] { - if bc.HasBlock(block.Hash()) { - t.Errorf("(i=%d) invalid block %d present in chain", i, block.NumberU64()) - } - } - } -} - -// Tests that chain reorganizations handle transaction removals and reinsertions. -func TestChainTxReorgs(t *testing.T) { - params.MinGasLimit = big.NewInt(125000) // Minimum the gas limit may ever be. - params.GenesisGasLimit = big.NewInt(3141592) // Gas limit of the Genesis block. - - var ( - key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") - key2, _ = crypto.HexToECDSA("8a1f9a8f95be41cd7ccb6168179afb4504aefe388d1e14474d32c45c72ce7b7a") - key3, _ = crypto.HexToECDSA("49a7b37aa6f6645917e7b807e9d1c00d4fa71f18343b0d4122a4d2df64dd6fee") - addr1 = crypto.PubkeyToAddress(key1.PublicKey) - addr2 = crypto.PubkeyToAddress(key2.PublicKey) - addr3 = crypto.PubkeyToAddress(key3.PublicKey) - db, _ = ethdb.NewMemDatabase() - ) - genesis := WriteGenesisBlockForTesting(db, - GenesisAccount{addr1, big.NewInt(1000000)}, - GenesisAccount{addr2, big.NewInt(1000000)}, - GenesisAccount{addr3, big.NewInt(1000000)}, - ) - // Create two transactions shared between the chains: - // - postponed: transaction included at a later block in the forked chain - // - swapped: transaction included at the same block number in the forked chain - postponed, _ := types.NewTransaction(0, addr1, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(key1) - swapped, _ := types.NewTransaction(1, addr1, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(key1) - - // Create two transactions that will be dropped by the forked chain: - // - pastDrop: transaction dropped retroactively from a past block - // - freshDrop: transaction dropped exactly at the block where the reorg is detected - var pastDrop, freshDrop *types.Transaction - - // Create three transactions that will be added in the forked chain: - // - pastAdd: transaction added before the reorganiztion is detected - // - freshAdd: transaction added at the exact block the reorg is detected - // - futureAdd: transaction added after the reorg has already finished - var pastAdd, freshAdd, futureAdd *types.Transaction - - chain := GenerateChain(genesis, db, 3, func(i int, gen *BlockGen) { - switch i { - case 0: - pastDrop, _ = types.NewTransaction(gen.TxNonce(addr2), addr2, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(key2) - - gen.AddTx(pastDrop) // This transaction will be dropped in the fork from below the split point - gen.AddTx(postponed) // This transaction will be postponed till block #3 in the fork - - case 2: - freshDrop, _ = types.NewTransaction(gen.TxNonce(addr2), addr2, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(key2) - - gen.AddTx(freshDrop) // This transaction will be dropped in the fork from exactly at the split point - gen.AddTx(swapped) // This transaction will be swapped out at the exact height - - gen.OffsetTime(9) // Lower the block difficulty to simulate a weaker chain - } - }) - // Import the chain. This runs all block validation rules. - evmux := &event.TypeMux{} - chainman, _ := NewChainManager(db, FakePow{}, evmux) - chainman.SetProcessor(NewBlockProcessor(db, FakePow{}, chainman, evmux)) - if i, err := chainman.InsertChain(chain); err != nil { - t.Fatalf("failed to insert original chain[%d]: %v", i, err) - } - - // overwrite the old chain - chain = GenerateChain(genesis, db, 5, func(i int, gen *BlockGen) { - switch i { - case 0: - pastAdd, _ = types.NewTransaction(gen.TxNonce(addr3), addr3, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(key3) - gen.AddTx(pastAdd) // This transaction needs to be injected during reorg - - case 2: - gen.AddTx(postponed) // This transaction was postponed from block #1 in the original chain - gen.AddTx(swapped) // This transaction was swapped from the exact current spot in the original chain - - freshAdd, _ = types.NewTransaction(gen.TxNonce(addr3), addr3, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(key3) - gen.AddTx(freshAdd) // This transaction will be added exactly at reorg time - - case 3: - futureAdd, _ = types.NewTransaction(gen.TxNonce(addr3), addr3, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(key3) - gen.AddTx(futureAdd) // This transaction will be added after a full reorg - } - }) - if _, err := chainman.InsertChain(chain); err != nil { - t.Fatalf("failed to insert forked chain: %v", err) - } - - // removed tx - for i, tx := range (types.Transactions{pastDrop, freshDrop}) { - if GetTransaction(db, tx.Hash()) != nil { - t.Errorf("drop %d: tx found while shouldn't have been", i) - } - if GetReceipt(db, tx.Hash()) != nil { - t.Errorf("drop %d: receipt found while shouldn't have been", i) - } - } - // added tx - for i, tx := range (types.Transactions{pastAdd, freshAdd, futureAdd}) { - if GetTransaction(db, tx.Hash()) == nil { - t.Errorf("add %d: expected tx to be found", i) - } - if GetReceipt(db, tx.Hash()) == nil { - t.Errorf("add %d: expected receipt to be found", i) - } - } - // shared tx - for i, tx := range (types.Transactions{postponed, swapped}) { - if GetTransaction(db, tx.Hash()) == nil { - t.Errorf("share %d: expected tx to be found", i) - } - if GetReceipt(db, tx.Hash()) == nil { - t.Errorf("share %d: expected receipt to be found", i) - } - } -} diff --git a/core/helper_test.go b/core/helper_test.go index 81ea6fc22..fd6a5491c 100644 --- a/core/helper_test.go +++ b/core/helper_test.go @@ -34,7 +34,7 @@ type TestManager struct { db ethdb.Database txPool *TxPool - blockChain *ChainManager + blockChain *BlockChain Blocks []*types.Block } @@ -54,7 +54,7 @@ func (s *TestManager) Peers() *list.List { return list.New() } -func (s *TestManager) ChainManager() *ChainManager { +func (s *TestManager) BlockChain() *BlockChain { return s.blockChain } @@ -89,7 +89,7 @@ func NewTestManager() *TestManager { testManager.eventMux = new(event.TypeMux) testManager.db = db // testManager.txPool = NewTxPool(testManager) - // testManager.blockChain = NewChainManager(testManager) + // testManager.blockChain = NewBlockChain(testManager) // testManager.stateManager = NewStateManager(testManager) return testManager diff --git a/core/manager.go b/core/manager.go index 0f108a6de..289c87c11 100644 --- a/core/manager.go +++ b/core/manager.go @@ -26,7 +26,7 @@ import ( type Backend interface { AccountManager() *accounts.Manager BlockProcessor() *BlockProcessor - ChainManager() *ChainManager + BlockChain() *BlockChain TxPool() *TxPool ChainDb() ethdb.Database DappDb() ethdb.Database diff --git a/core/vm/common.go b/core/vm/common.go index b52b598ba..2d1aa9332 100644 --- a/core/vm/common.go +++ b/core/vm/common.go @@ -38,7 +38,7 @@ const ( ) var ( - Pow256 = common.BigPow(2, 256) // Pew256 is 2**256 + Pow256 = common.BigPow(2, 256) // Pow256 is 2**256 U256 = common.U256 // Shortcut to common.U256 S256 = common.S256 // Shortcut to common.S256 @@ -46,7 +46,7 @@ var ( Zero = common.Big0 // Shortcut to common.Big0 One = common.Big1 // Shortcut to common.Big1 - max = big.NewInt(math.MaxInt64) // Maximum 256 bit integer + max = big.NewInt(math.MaxInt64) // Maximum 64 bit integer ) // NewVm returns a new VM based on the Environment diff --git a/core/vm/contract.go b/core/vm/contract.go index 8460cc47b..95417e747 100644 --- a/core/vm/contract.go +++ b/core/vm/contract.go @@ -118,8 +118,8 @@ func (self *Contract) SetCode(code []byte) { self.Code = code } -// SetCallCode sets the address of the code address and sets the code -// of the contract according to the backing database. +// SetCallCode sets the code of the contract and address of the backing data +// object func (self *Contract) SetCallCode(addr *common.Address, code []byte) { self.Code = code self.CodeAddr = addr diff --git a/core/vm/doc.go b/core/vm/doc.go index 4deb7761d..ab87bf934 100644 --- a/core/vm/doc.go +++ b/core/vm/doc.go @@ -18,15 +18,15 @@ Package vm implements the Ethereum Virtual Machine. The vm package implements two EVMs, a byte code VM and a JIT VM. The BC -(Byte Code) VM loops over a set of bytes and executes them according to a set -of rules defined in the Ethereum yellow paper. When the BC VM is invokes it +(Byte Code) VM loops over a set of bytes and executes them according to the set +of rules defined in the Ethereum yellow paper. When the BC VM is invoked it invokes the JIT VM in a seperate goroutine and compiles the byte code in JIT instructions. The JIT VM, when invoked, loops around a set of pre-defined instructions until -it either runs of gas, causes an internel error, returns or stops. At a later +it either runs of gas, causes an internal error, returns or stops. At a later stage the JIT VM will see some additional features that will cause sets of instructions to be compiled down to segments. Segments are sets of instructions -that can be ran in one go saving precious time during execution. +that can be run in one go saving precious time during execution. */ package vm diff --git a/core/vm/environment.go b/core/vm/environment.go index 606518fd4..f8e19baea 100644 --- a/core/vm/environment.go +++ b/core/vm/environment.go @@ -26,7 +26,7 @@ import ( // it's own isolated environment. // Environment is an EVM requirement and helper which allows access to outside -// information such like states. +// information such as states. type Environment interface { // The state database Db() Database @@ -50,7 +50,7 @@ type Environment interface { GasLimit() *big.Int // Determines whether it's possible to transact CanTransfer(from common.Address, balance *big.Int) bool - // Transfer from to to with amount set + // Transfers amount from one account to the other Transfer(from, to Account, amount *big.Int) error // Adds a LOG to the state AddLog(*Log) diff --git a/core/vm/memory.go b/core/vm/memory.go index 101ec75cb..d01188417 100644 --- a/core/vm/memory.go +++ b/core/vm/memory.go @@ -18,7 +18,7 @@ package vm import "fmt" -// Memory implements ethereum RAM backed by a simple byte slice +// Memory implements a simple memory model for the ethereum virtual machine. type Memory struct { store []byte } diff --git a/core/vm_env.go b/core/vm_env.go index dea280746..467e34c6b 100644 --- a/core/vm_env.go +++ b/core/vm_env.go @@ -30,13 +30,13 @@ type VMEnv struct { header *types.Header msg Message depth int - chain *ChainManager + chain *BlockChain typ vm.Type // structured logging logs []vm.StructLog } -func NewEnv(state *state.StateDB, chain *ChainManager, msg Message, header *types.Header) *VMEnv { +func NewEnv(state *state.StateDB, chain *BlockChain, msg Message, header *types.Header) *VMEnv { return &VMEnv{ chain: chain, state: state, diff --git a/eth/backend.go b/eth/backend.go index 349dfa613..a480b4931 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -217,7 +217,7 @@ type Ethereum struct { // State manager for processing new blocks and managing the over all states blockProcessor *core.BlockProcessor txPool *core.TxPool - chainManager *core.ChainManager + blockchain *core.BlockChain accountManager *accounts.Manager whisper *whisper.Whisper pow *ethash.Ethash @@ -365,7 +365,7 @@ func New(config *Config) (*Ethereum, error) { eth.pow = ethash.New() } //genesis := core.GenesisBlock(uint64(config.GenesisNonce), stateDb) - eth.chainManager, err = core.NewChainManager(chainDb, eth.pow, eth.EventMux()) + eth.blockchain, err = core.NewBlockChain(chainDb, eth.pow, eth.EventMux()) if err != nil { if err == core.ErrNoGenesis { return nil, fmt.Errorf(`Genesis block not found. Please supply a genesis block with the "--genesis /path/to/file" argument`) @@ -373,11 +373,11 @@ func New(config *Config) (*Ethereum, error) { return nil, err } - eth.txPool = core.NewTxPool(eth.EventMux(), eth.chainManager.State, eth.chainManager.GasLimit) + eth.txPool = core.NewTxPool(eth.EventMux(), eth.blockchain.State, eth.blockchain.GasLimit) - eth.blockProcessor = core.NewBlockProcessor(chainDb, eth.pow, eth.chainManager, eth.EventMux()) - eth.chainManager.SetProcessor(eth.blockProcessor) - eth.protocolManager = NewProtocolManager(config.NetworkId, eth.eventMux, eth.txPool, eth.pow, eth.chainManager, chainDb) + eth.blockProcessor = core.NewBlockProcessor(chainDb, eth.pow, eth.blockchain, eth.EventMux()) + eth.blockchain.SetProcessor(eth.blockProcessor) + eth.protocolManager = NewProtocolManager(config.NetworkId, eth.eventMux, eth.txPool, eth.pow, eth.blockchain, chainDb) eth.miner = miner.New(eth, eth.EventMux(), eth.pow) eth.miner.SetGasPrice(config.GasPrice) @@ -441,7 +441,7 @@ func (s *Ethereum) NodeInfo() *NodeInfo { DiscPort: int(node.UDP), TCPPort: int(node.TCP), ListenAddr: s.net.ListenAddr, - Td: s.ChainManager().Td().String(), + Td: s.BlockChain().Td().String(), } } @@ -478,7 +478,7 @@ func (s *Ethereum) PeersInfo() (peersinfo []*PeerInfo) { } func (s *Ethereum) ResetWithGenesisBlock(gb *types.Block) { - s.chainManager.ResetWithGenesisBlock(gb) + s.blockchain.ResetWithGenesisBlock(gb) } func (s *Ethereum) StartMining(threads int) error { @@ -518,7 +518,7 @@ func (s *Ethereum) Miner() *miner.Miner { return s.miner } // func (s *Ethereum) Logger() logger.LogSystem { return s.logger } func (s *Ethereum) Name() string { return s.net.Name } func (s *Ethereum) AccountManager() *accounts.Manager { return s.accountManager } -func (s *Ethereum) ChainManager() *core.ChainManager { return s.chainManager } +func (s *Ethereum) BlockChain() *core.BlockChain { return s.blockchain } func (s *Ethereum) BlockProcessor() *core.BlockProcessor { return s.blockProcessor } func (s *Ethereum) TxPool() *core.TxPool { return s.txPool } func (s *Ethereum) Whisper() *whisper.Whisper { return s.whisper } @@ -581,7 +581,7 @@ func (self *Ethereum) AddPeer(nodeURL string) error { func (s *Ethereum) Stop() { s.net.Stop() - s.chainManager.Stop() + s.blockchain.Stop() s.protocolManager.Stop() s.txPool.Stop() s.eventMux.Stop() @@ -622,7 +622,7 @@ func (self *Ethereum) StartAutoDAG() { select { case <-timer: glog.V(logger.Info).Infof("checking DAG (ethash dir: %s)", ethash.DefaultDir) - currentBlock := self.ChainManager().CurrentBlock().NumberU64() + currentBlock := self.BlockChain().CurrentBlock().NumberU64() thisEpoch := currentBlock / epochLength if nextEpoch <= thisEpoch { if currentBlock%epochLength > autoDAGepochHeight { diff --git a/eth/filters/filter.go b/eth/filters/filter.go index 0b4911629..2bcf20d0c 100644 --- a/eth/filters/filter.go +++ b/eth/filters/filter.go @@ -1,4 +1,4 @@ -// Copyright 2014 The go-ethereum Authors +// Copyright 2015 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify @@ -23,6 +23,7 @@ import ( "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/ethdb" ) type AccountChange struct { @@ -31,7 +32,7 @@ type AccountChange struct { // Filtering interface type Filter struct { - db common.Database + db ethdb.Database earliest int64 latest int64 skip int @@ -46,7 +47,7 @@ type Filter struct { // Create a new filter which uses a bloom filter on blocks to figure out whether a particular block // is interesting or not. -func New(db common.Database) *Filter { +func New(db ethdb.Database) *Filter { return &Filter{db: db} } @@ -79,7 +80,7 @@ func (self *Filter) SetSkip(skip int) { // Run filters logs with the current parameters set func (self *Filter) Find() vm.Logs { - earliestBlock := core.GetCurrentBlock(self.db) + earliestBlock := core.GetBlock(self.db, core.GetHeadBlockHash(self.db)) var earliestBlockNo uint64 = uint64(self.earliest) if self.earliest == -1 { earliestBlockNo = earliestBlock.NumberU64() @@ -91,8 +92,12 @@ func (self *Filter) Find() vm.Logs { var ( logs vm.Logs - block = core.GetBlockByNumber(self.db, latestBlockNo) + block *types.Block ) + hash := core.GetCanonicalHash(self.db, latestBlockNo) + if hash != (common.Hash{}) { + block = core.GetBlock(self.db, hash) + } done: for i := 0; block != nil; i++ { @@ -120,7 +125,7 @@ done: logs = append(logs, self.FilterLogs(unfiltered)...) } - block = core.GetBlockByHash(self.db, block.ParentHash()) + block = core.GetBlock(self.db, block.ParentHash()) } skip := int(math.Min(float64(len(logs)), float64(self.skip))) diff --git a/eth/filters/filter_system.go b/eth/filters/filter_system.go index 1c27c7be4..4972dcd59 100644 --- a/eth/filters/filter_system.go +++ b/eth/filters/filter_system.go @@ -28,7 +28,7 @@ import ( // FilterSystem manages filters that filter specific events such as // block, transaction and log events. The Filtering system can be used to listen -// for specific LOG events fires by the EVM (Ethereum Virtual Machine). +// for specific LOG events fired by the EVM (Ethereum Virtual Machine). type FilterSystem struct { eventMux *event.TypeMux diff --git a/eth/gasprice.go b/eth/gasprice.go index 3caad73c6..c08b96129 100644 --- a/eth/gasprice.go +++ b/eth/gasprice.go @@ -36,7 +36,7 @@ type blockPriceInfo struct { type GasPriceOracle struct { eth *Ethereum - chain *core.ChainManager + chain *core.BlockChain events event.Subscription blocks map[uint64]*blockPriceInfo firstProcessed, lastProcessed uint64 @@ -48,7 +48,7 @@ func NewGasPriceOracle(eth *Ethereum) (self *GasPriceOracle) { self = &GasPriceOracle{} self.blocks = make(map[uint64]*blockPriceInfo) self.eth = eth - self.chain = eth.chainManager + self.chain = eth.blockchain self.events = eth.EventMux().Subscribe( core.ChainEvent{}, core.ChainSplitEvent{}, diff --git a/eth/handler.go b/eth/handler.go index 52c9c4151..fc92338b4 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -60,9 +60,9 @@ func (ep extProt) GetHashes(hash common.Hash) error { return ep.getHashes(has func (ep extProt) GetBlock(hashes []common.Hash) error { return ep.getBlocks(hashes) } type ProtocolManager struct { - txpool txPool - chainman *core.ChainManager - chaindb ethdb.Database + txpool txPool + blockchain *core.BlockChain + chaindb ethdb.Database downloader *downloader.Downloader fetcher *fetcher.Fetcher @@ -87,17 +87,17 @@ type ProtocolManager struct { // NewProtocolManager returns a new ethereum sub protocol manager. The Ethereum sub protocol manages peers capable // with the ethereum network. -func NewProtocolManager(networkId int, mux *event.TypeMux, txpool txPool, pow pow.PoW, chainman *core.ChainManager, chaindb ethdb.Database) *ProtocolManager { +func NewProtocolManager(networkId int, mux *event.TypeMux, txpool txPool, pow pow.PoW, blockchain *core.BlockChain, chaindb ethdb.Database) *ProtocolManager { // Create the protocol manager with the base fields manager := &ProtocolManager{ - eventMux: mux, - txpool: txpool, - chainman: chainman, - chaindb: chaindb, - peers: newPeerSet(), - newPeerCh: make(chan *peer, 1), - txsyncCh: make(chan *txsync), - quitSync: make(chan struct{}), + eventMux: mux, + txpool: txpool, + blockchain: blockchain, + chaindb: chaindb, + peers: newPeerSet(), + newPeerCh: make(chan *peer, 1), + txsyncCh: make(chan *txsync), + quitSync: make(chan struct{}), } // Initiate a sub-protocol for every implemented version we can handle manager.SubProtocols = make([]p2p.Protocol, len(ProtocolVersions)) @@ -116,15 +116,15 @@ func NewProtocolManager(networkId int, mux *event.TypeMux, txpool txPool, pow po } } // Construct the different synchronisation mechanisms - manager.downloader = downloader.New(manager.eventMux, manager.chainman.HasBlock, manager.chainman.GetBlock, manager.chainman.CurrentBlock, manager.chainman.GetTd, manager.chainman.InsertChain, manager.removePeer) + manager.downloader = downloader.New(manager.eventMux, manager.blockchain.HasBlock, manager.blockchain.GetBlock, manager.blockchain.CurrentBlock, manager.blockchain.GetTd, manager.blockchain.InsertChain, manager.removePeer) validator := func(block *types.Block, parent *types.Block) error { return core.ValidateHeader(pow, block.Header(), parent.Header(), true, false) } heighter := func() uint64 { - return manager.chainman.CurrentBlock().NumberU64() + return manager.blockchain.CurrentBlock().NumberU64() } - manager.fetcher = fetcher.New(manager.chainman.GetBlock, validator, manager.BroadcastBlock, heighter, manager.chainman.InsertChain, manager.removePeer) + manager.fetcher = fetcher.New(manager.blockchain.GetBlock, validator, manager.BroadcastBlock, heighter, manager.blockchain.InsertChain, manager.removePeer) return manager } @@ -187,7 +187,7 @@ func (pm *ProtocolManager) handle(p *peer) error { glog.V(logger.Debug).Infof("%v: peer connected [%s]", p, p.Name()) // Execute the Ethereum handshake - td, head, genesis := pm.chainman.Status() + td, head, genesis := pm.blockchain.Status() if err := p.Handshake(td, head, genesis); err != nil { glog.V(logger.Debug).Infof("%v: handshake failed: %v", p, err) return err @@ -252,7 +252,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { request.Amount = uint64(downloader.MaxHashFetch) } // Retrieve the hashes from the block chain and return them - hashes := pm.chainman.GetBlockHashesFromHash(request.Hash, request.Amount) + hashes := pm.blockchain.GetBlockHashesFromHash(request.Hash, request.Amount) if len(hashes) == 0 { glog.V(logger.Debug).Infof("invalid block hash %x", request.Hash.Bytes()[:4]) } @@ -268,9 +268,9 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { request.Amount = uint64(downloader.MaxHashFetch) } // Calculate the last block that should be retrieved, and short circuit if unavailable - last := pm.chainman.GetBlockByNumber(request.Number + request.Amount - 1) + last := pm.blockchain.GetBlockByNumber(request.Number + request.Amount - 1) if last == nil { - last = pm.chainman.CurrentBlock() + last = pm.blockchain.CurrentBlock() request.Amount = last.NumberU64() - request.Number + 1 } if last.NumberU64() < request.Number { @@ -278,7 +278,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { } // Retrieve the hashes from the last block backwards, reverse and return hashes := []common.Hash{last.Hash()} - hashes = append(hashes, pm.chainman.GetBlockHashesFromHash(last.Hash(), request.Amount-1)...) + hashes = append(hashes, pm.blockchain.GetBlockHashesFromHash(last.Hash(), request.Amount-1)...) for i := 0; i < len(hashes)/2; i++ { hashes[i], hashes[len(hashes)-1-i] = hashes[len(hashes)-1-i], hashes[i] @@ -318,7 +318,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { return errResp(ErrDecode, "msg %v: %v", msg, err) } // Retrieve the requested block, stopping if enough was found - if block := pm.chainman.GetBlock(hash); block != nil { + if block := pm.blockchain.GetBlock(hash); block != nil { blocks = append(blocks, block) bytes += block.Size() } @@ -358,9 +358,9 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { // Retrieve the next header satisfying the query var origin *types.Header if query.Origin.Hash != (common.Hash{}) { - origin = pm.chainman.GetHeader(query.Origin.Hash) + origin = pm.blockchain.GetHeader(query.Origin.Hash) } else { - origin = pm.chainman.GetHeaderByNumber(query.Origin.Number) + origin = pm.blockchain.GetHeaderByNumber(query.Origin.Number) } if origin == nil { break @@ -373,7 +373,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { case query.Origin.Hash != (common.Hash{}) && query.Reverse: // Hash based traversal towards the genesis block for i := 0; i < int(query.Skip)+1; i++ { - if header := pm.chainman.GetHeader(query.Origin.Hash); header != nil { + if header := pm.blockchain.GetHeader(query.Origin.Hash); header != nil { query.Origin.Hash = header.ParentHash } else { unknown = true @@ -382,8 +382,8 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { } case query.Origin.Hash != (common.Hash{}) && !query.Reverse: // Hash based traversal towards the leaf block - if header := pm.chainman.GetHeaderByNumber(origin.Number.Uint64() + query.Skip + 1); header != nil { - if pm.chainman.GetBlockHashesFromHash(header.Hash(), query.Skip+1)[query.Skip] == query.Origin.Hash { + if header := pm.blockchain.GetHeaderByNumber(origin.Number.Uint64() + query.Skip + 1); header != nil { + if pm.blockchain.GetBlockHashesFromHash(header.Hash(), query.Skip+1)[query.Skip] == query.Origin.Hash { query.Origin.Hash = header.Hash() } else { unknown = true @@ -466,7 +466,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { return errResp(ErrDecode, "msg %v: %v", msg, err) } // Retrieve the requested block body, stopping if enough was found - if data := pm.chainman.GetBodyRLP(hash); len(data) != 0 { + if data := pm.blockchain.GetBodyRLP(hash); len(data) != 0 { bodies = append(bodies, data) bytes += len(data) } @@ -562,7 +562,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { // Schedule all the unknown hashes for retrieval unknown := make([]announce, 0, len(announces)) for _, block := range announces { - if !pm.chainman.HasBlock(block.Hash) { + if !pm.blockchain.HasBlock(block.Hash) { unknown = append(unknown, block) } } @@ -586,7 +586,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { request.Block.ReceivedAt = msg.ReceivedAt // Mark the block's arrival for whatever reason - _, chainHead, _ := pm.chainman.Status() + _, chainHead, _ := pm.blockchain.Status() jsonlogger.LogJson(&logger.EthChainReceivedNewBlock{ BlockHash: request.Block.Hash().Hex(), BlockNumber: request.Block.Number(), @@ -603,7 +603,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { // Update the peers total difficulty if needed, schedule a download if gapped if request.TD.Cmp(p.Td()) > 0 { p.SetTd(request.TD) - if request.TD.Cmp(new(big.Int).Add(pm.chainman.Td(), request.Block.Difficulty())) > 0 { + if request.TD.Cmp(new(big.Int).Add(pm.blockchain.Td(), request.Block.Difficulty())) > 0 { go pm.synchronise(p) } } @@ -645,8 +645,8 @@ func (pm *ProtocolManager) BroadcastBlock(block *types.Block, propagate bool) { if propagate { // Calculate the TD of the block (it's not imported yet, so block.Td is not valid) var td *big.Int - if parent := pm.chainman.GetBlock(block.ParentHash()); parent != nil { - td = new(big.Int).Add(block.Difficulty(), pm.chainman.GetTd(block.ParentHash())) + if parent := pm.blockchain.GetBlock(block.ParentHash()); parent != nil { + td = new(big.Int).Add(block.Difficulty(), pm.blockchain.GetTd(block.ParentHash())) } else { glog.V(logger.Error).Infof("propagating dangling block #%d [%x]", block.NumberU64(), hash[:4]) return @@ -659,7 +659,7 @@ func (pm *ProtocolManager) BroadcastBlock(block *types.Block, propagate bool) { glog.V(logger.Detail).Infof("propagated block %x to %d peers in %v", hash[:4], len(transfer), time.Since(block.ReceivedAt)) } // Otherwise if the block is indeed in out own chain, announce it - if pm.chainman.HasBlock(hash) { + if pm.blockchain.HasBlock(hash) { for _, peer := range peers { if peer.version < eth62 { peer.SendNewBlockHashes61([]common.Hash{hash}) diff --git a/eth/handler_test.go b/eth/handler_test.go index 6400d4e78..2b8c6168a 100644 --- a/eth/handler_test.go +++ b/eth/handler_test.go @@ -33,23 +33,23 @@ func testGetBlockHashes(t *testing.T, protocol int) { number int result int }{ - {common.Hash{}, 1, 0}, // Make sure non existent hashes don't return results - {pm.chainman.Genesis().Hash(), 1, 0}, // There are no hashes to retrieve up from the genesis - {pm.chainman.GetBlockByNumber(5).Hash(), 5, 5}, // All the hashes including the genesis requested - {pm.chainman.GetBlockByNumber(5).Hash(), 10, 5}, // More hashes than available till the genesis requested - {pm.chainman.GetBlockByNumber(100).Hash(), 10, 10}, // All hashes available from the middle of the chain - {pm.chainman.CurrentBlock().Hash(), 10, 10}, // All hashes available from the head of the chain - {pm.chainman.CurrentBlock().Hash(), limit, limit}, // Request the maximum allowed hash count - {pm.chainman.CurrentBlock().Hash(), limit + 1, limit}, // Request more than the maximum allowed hash count + {common.Hash{}, 1, 0}, // Make sure non existent hashes don't return results + {pm.blockchain.Genesis().Hash(), 1, 0}, // There are no hashes to retrieve up from the genesis + {pm.blockchain.GetBlockByNumber(5).Hash(), 5, 5}, // All the hashes including the genesis requested + {pm.blockchain.GetBlockByNumber(5).Hash(), 10, 5}, // More hashes than available till the genesis requested + {pm.blockchain.GetBlockByNumber(100).Hash(), 10, 10}, // All hashes available from the middle of the chain + {pm.blockchain.CurrentBlock().Hash(), 10, 10}, // All hashes available from the head of the chain + {pm.blockchain.CurrentBlock().Hash(), limit, limit}, // Request the maximum allowed hash count + {pm.blockchain.CurrentBlock().Hash(), limit + 1, limit}, // Request more than the maximum allowed hash count } // Run each of the tests and verify the results against the chain for i, tt := range tests { // Assemble the hash response we would like to receive resp := make([]common.Hash, tt.result) if len(resp) > 0 { - from := pm.chainman.GetBlock(tt.origin).NumberU64() - 1 + from := pm.blockchain.GetBlock(tt.origin).NumberU64() - 1 for j := 0; j < len(resp); j++ { - resp[j] = pm.chainman.GetBlockByNumber(uint64(int(from) - j)).Hash() + resp[j] = pm.blockchain.GetBlockByNumber(uint64(int(from) - j)).Hash() } } // Send the hash request and verify the response @@ -76,11 +76,11 @@ func testGetBlockHashesFromNumber(t *testing.T, protocol int) { number int result int }{ - {pm.chainman.CurrentBlock().NumberU64() + 1, 1, 0}, // Out of bounds requests should return empty - {pm.chainman.CurrentBlock().NumberU64(), 1, 1}, // Make sure the head hash can be retrieved - {pm.chainman.CurrentBlock().NumberU64() - 4, 5, 5}, // All hashes, including the head hash requested - {pm.chainman.CurrentBlock().NumberU64() - 4, 10, 5}, // More hashes requested than available till the head - {pm.chainman.CurrentBlock().NumberU64() - 100, 10, 10}, // All hashes available from the middle of the chain + {pm.blockchain.CurrentBlock().NumberU64() + 1, 1, 0}, // Out of bounds requests should return empty + {pm.blockchain.CurrentBlock().NumberU64(), 1, 1}, // Make sure the head hash can be retrieved + {pm.blockchain.CurrentBlock().NumberU64() - 4, 5, 5}, // All hashes, including the head hash requested + {pm.blockchain.CurrentBlock().NumberU64() - 4, 10, 5}, // More hashes requested than available till the head + {pm.blockchain.CurrentBlock().NumberU64() - 100, 10, 10}, // All hashes available from the middle of the chain {0, 10, 10}, // All hashes available from the root of the chain {0, limit, limit}, // Request the maximum allowed hash count {0, limit + 1, limit}, // Request more than the maximum allowed hash count @@ -91,7 +91,7 @@ func testGetBlockHashesFromNumber(t *testing.T, protocol int) { // Assemble the hash response we would like to receive resp := make([]common.Hash, tt.result) for j := 0; j < len(resp); j++ { - resp[j] = pm.chainman.GetBlockByNumber(tt.origin + uint64(j)).Hash() + resp[j] = pm.blockchain.GetBlockByNumber(tt.origin + uint64(j)).Hash() } // Send the hash request and verify the response p2p.Send(peer.app, 0x08, getBlockHashesFromNumberData{tt.origin, uint64(tt.number)}) @@ -117,22 +117,22 @@ func testGetBlocks(t *testing.T, protocol int) { available []bool // Availability of explicitly requested blocks expected int // Total number of existing blocks to expect }{ - {1, nil, nil, 1}, // A single random block should be retrievable - {10, nil, nil, 10}, // Multiple random blocks should be retrievable - {limit, nil, nil, limit}, // The maximum possible blocks should be retrievable - {limit + 1, nil, nil, limit}, // No more that the possible block count should be returned - {0, []common.Hash{pm.chainman.Genesis().Hash()}, []bool{true}, 1}, // The genesis block should be retrievable - {0, []common.Hash{pm.chainman.CurrentBlock().Hash()}, []bool{true}, 1}, // The chains head block should be retrievable - {0, []common.Hash{common.Hash{}}, []bool{false}, 0}, // A non existent block should not be returned + {1, nil, nil, 1}, // A single random block should be retrievable + {10, nil, nil, 10}, // Multiple random blocks should be retrievable + {limit, nil, nil, limit}, // The maximum possible blocks should be retrievable + {limit + 1, nil, nil, limit}, // No more than the possible block count should be returned + {0, []common.Hash{pm.blockchain.Genesis().Hash()}, []bool{true}, 1}, // The genesis block should be retrievable + {0, []common.Hash{pm.blockchain.CurrentBlock().Hash()}, []bool{true}, 1}, // The chains head block should be retrievable + {0, []common.Hash{common.Hash{}}, []bool{false}, 0}, // A non existent block should not be returned // Existing and non-existing blocks interleaved should not cause problems {0, []common.Hash{ common.Hash{}, - pm.chainman.GetBlockByNumber(1).Hash(), + pm.blockchain.GetBlockByNumber(1).Hash(), common.Hash{}, - pm.chainman.GetBlockByNumber(10).Hash(), + pm.blockchain.GetBlockByNumber(10).Hash(), common.Hash{}, - pm.chainman.GetBlockByNumber(100).Hash(), + pm.blockchain.GetBlockByNumber(100).Hash(), common.Hash{}, }, []bool{false, true, false, true, false, true, false}, 3}, } @@ -144,11 +144,11 @@ func testGetBlocks(t *testing.T, protocol int) { for j := 0; j < tt.random; j++ { for { - num := rand.Int63n(int64(pm.chainman.CurrentBlock().NumberU64())) + num := rand.Int63n(int64(pm.blockchain.CurrentBlock().NumberU64())) if !seen[num] { seen[num] = true - block := pm.chainman.GetBlockByNumber(uint64(num)) + block := pm.blockchain.GetBlockByNumber(uint64(num)) hashes = append(hashes, block.Hash()) if len(blocks) < tt.expected { blocks = append(blocks, block) @@ -160,7 +160,7 @@ func testGetBlocks(t *testing.T, protocol int) { for j, hash := range tt.explicit { hashes = append(hashes, hash) if tt.available[j] && len(blocks) < tt.expected { - blocks = append(blocks, pm.chainman.GetBlock(hash)) + blocks = append(blocks, pm.blockchain.GetBlock(hash)) } } // Send the hash request and verify the response @@ -194,83 +194,83 @@ func testGetBlockHeaders(t *testing.T, protocol int) { }{ // A single random block should be retrievable by hash and number too { - &getBlockHeadersData{Origin: hashOrNumber{Hash: pm.chainman.GetBlockByNumber(limit / 2).Hash()}, Amount: 1}, - []common.Hash{pm.chainman.GetBlockByNumber(limit / 2).Hash()}, + &getBlockHeadersData{Origin: hashOrNumber{Hash: pm.blockchain.GetBlockByNumber(limit / 2).Hash()}, Amount: 1}, + []common.Hash{pm.blockchain.GetBlockByNumber(limit / 2).Hash()}, }, { &getBlockHeadersData{Origin: hashOrNumber{Number: limit / 2}, Amount: 1}, - []common.Hash{pm.chainman.GetBlockByNumber(limit / 2).Hash()}, + []common.Hash{pm.blockchain.GetBlockByNumber(limit / 2).Hash()}, }, // Multiple headers should be retrievable in both directions { &getBlockHeadersData{Origin: hashOrNumber{Number: limit / 2}, Amount: 3}, []common.Hash{ - pm.chainman.GetBlockByNumber(limit / 2).Hash(), - pm.chainman.GetBlockByNumber(limit/2 + 1).Hash(), - pm.chainman.GetBlockByNumber(limit/2 + 2).Hash(), + pm.blockchain.GetBlockByNumber(limit / 2).Hash(), + pm.blockchain.GetBlockByNumber(limit/2 + 1).Hash(), + pm.blockchain.GetBlockByNumber(limit/2 + 2).Hash(), }, }, { &getBlockHeadersData{Origin: hashOrNumber{Number: limit / 2}, Amount: 3, Reverse: true}, []common.Hash{ - pm.chainman.GetBlockByNumber(limit / 2).Hash(), - pm.chainman.GetBlockByNumber(limit/2 - 1).Hash(), - pm.chainman.GetBlockByNumber(limit/2 - 2).Hash(), + pm.blockchain.GetBlockByNumber(limit / 2).Hash(), + pm.blockchain.GetBlockByNumber(limit/2 - 1).Hash(), + pm.blockchain.GetBlockByNumber(limit/2 - 2).Hash(), }, }, // Multiple headers with skip lists should be retrievable { &getBlockHeadersData{Origin: hashOrNumber{Number: limit / 2}, Skip: 3, Amount: 3}, []common.Hash{ - pm.chainman.GetBlockByNumber(limit / 2).Hash(), - pm.chainman.GetBlockByNumber(limit/2 + 4).Hash(), - pm.chainman.GetBlockByNumber(limit/2 + 8).Hash(), + pm.blockchain.GetBlockByNumber(limit / 2).Hash(), + pm.blockchain.GetBlockByNumber(limit/2 + 4).Hash(), + pm.blockchain.GetBlockByNumber(limit/2 + 8).Hash(), }, }, { &getBlockHeadersData{Origin: hashOrNumber{Number: limit / 2}, Skip: 3, Amount: 3, Reverse: true}, []common.Hash{ - pm.chainman.GetBlockByNumber(limit / 2).Hash(), - pm.chainman.GetBlockByNumber(limit/2 - 4).Hash(), - pm.chainman.GetBlockByNumber(limit/2 - 8).Hash(), + pm.blockchain.GetBlockByNumber(limit / 2).Hash(), + pm.blockchain.GetBlockByNumber(limit/2 - 4).Hash(), + pm.blockchain.GetBlockByNumber(limit/2 - 8).Hash(), }, }, // The chain endpoints should be retrievable { &getBlockHeadersData{Origin: hashOrNumber{Number: 0}, Amount: 1}, - []common.Hash{pm.chainman.GetBlockByNumber(0).Hash()}, + []common.Hash{pm.blockchain.GetBlockByNumber(0).Hash()}, }, { - &getBlockHeadersData{Origin: hashOrNumber{Number: pm.chainman.CurrentBlock().NumberU64()}, Amount: 1}, - []common.Hash{pm.chainman.CurrentBlock().Hash()}, + &getBlockHeadersData{Origin: hashOrNumber{Number: pm.blockchain.CurrentBlock().NumberU64()}, Amount: 1}, + []common.Hash{pm.blockchain.CurrentBlock().Hash()}, }, // Ensure protocol limits are honored { - &getBlockHeadersData{Origin: hashOrNumber{Number: pm.chainman.CurrentBlock().NumberU64() - 1}, Amount: limit + 10, Reverse: true}, - pm.chainman.GetBlockHashesFromHash(pm.chainman.CurrentBlock().Hash(), limit), + &getBlockHeadersData{Origin: hashOrNumber{Number: pm.blockchain.CurrentBlock().NumberU64() - 1}, Amount: limit + 10, Reverse: true}, + pm.blockchain.GetBlockHashesFromHash(pm.blockchain.CurrentBlock().Hash(), limit), }, // Check that requesting more than available is handled gracefully { - &getBlockHeadersData{Origin: hashOrNumber{Number: pm.chainman.CurrentBlock().NumberU64() - 4}, Skip: 3, Amount: 3}, + &getBlockHeadersData{Origin: hashOrNumber{Number: pm.blockchain.CurrentBlock().NumberU64() - 4}, Skip: 3, Amount: 3}, []common.Hash{ - pm.chainman.GetBlockByNumber(pm.chainman.CurrentBlock().NumberU64() - 4).Hash(), - pm.chainman.GetBlockByNumber(pm.chainman.CurrentBlock().NumberU64()).Hash(), + pm.blockchain.GetBlockByNumber(pm.blockchain.CurrentBlock().NumberU64() - 4).Hash(), + pm.blockchain.GetBlockByNumber(pm.blockchain.CurrentBlock().NumberU64()).Hash(), }, }, { &getBlockHeadersData{Origin: hashOrNumber{Number: 4}, Skip: 3, Amount: 3, Reverse: true}, []common.Hash{ - pm.chainman.GetBlockByNumber(4).Hash(), - pm.chainman.GetBlockByNumber(0).Hash(), + pm.blockchain.GetBlockByNumber(4).Hash(), + pm.blockchain.GetBlockByNumber(0).Hash(), }, }, // Check that requesting more than available is handled gracefully, even if mid skip { - &getBlockHeadersData{Origin: hashOrNumber{Number: pm.chainman.CurrentBlock().NumberU64() - 4}, Skip: 2, Amount: 3}, + &getBlockHeadersData{Origin: hashOrNumber{Number: pm.blockchain.CurrentBlock().NumberU64() - 4}, Skip: 2, Amount: 3}, []common.Hash{ - pm.chainman.GetBlockByNumber(pm.chainman.CurrentBlock().NumberU64() - 4).Hash(), - pm.chainman.GetBlockByNumber(pm.chainman.CurrentBlock().NumberU64() - 1).Hash(), + pm.blockchain.GetBlockByNumber(pm.blockchain.CurrentBlock().NumberU64() - 4).Hash(), + pm.blockchain.GetBlockByNumber(pm.blockchain.CurrentBlock().NumberU64() - 1).Hash(), }, }, { &getBlockHeadersData{Origin: hashOrNumber{Number: 4}, Skip: 2, Amount: 3, Reverse: true}, []common.Hash{ - pm.chainman.GetBlockByNumber(4).Hash(), - pm.chainman.GetBlockByNumber(1).Hash(), + pm.blockchain.GetBlockByNumber(4).Hash(), + pm.blockchain.GetBlockByNumber(1).Hash(), }, }, // Check that non existing headers aren't returned @@ -278,7 +278,7 @@ func testGetBlockHeaders(t *testing.T, protocol int) { &getBlockHeadersData{Origin: hashOrNumber{Hash: unknown}, Amount: 1}, []common.Hash{}, }, { - &getBlockHeadersData{Origin: hashOrNumber{Number: pm.chainman.CurrentBlock().NumberU64() + 1}, Amount: 1}, + &getBlockHeadersData{Origin: hashOrNumber{Number: pm.blockchain.CurrentBlock().NumberU64() + 1}, Amount: 1}, []common.Hash{}, }, } @@ -287,7 +287,7 @@ func testGetBlockHeaders(t *testing.T, protocol int) { // Collect the headers to expect in the response headers := []*types.Header{} for _, hash := range tt.expect { - headers = append(headers, pm.chainman.GetBlock(hash).Header()) + headers = append(headers, pm.blockchain.GetBlock(hash).Header()) } // Send the hash request and verify the response p2p.Send(peer.app, 0x03, tt.query) @@ -315,22 +315,22 @@ func testGetBlockBodies(t *testing.T, protocol int) { available []bool // Availability of explicitly requested blocks expected int // Total number of existing blocks to expect }{ - {1, nil, nil, 1}, // A single random block should be retrievable - {10, nil, nil, 10}, // Multiple random blocks should be retrievable - {limit, nil, nil, limit}, // The maximum possible blocks should be retrievable - {limit + 1, nil, nil, limit}, // No more that the possible block count should be returned - {0, []common.Hash{pm.chainman.Genesis().Hash()}, []bool{true}, 1}, // The genesis block should be retrievable - {0, []common.Hash{pm.chainman.CurrentBlock().Hash()}, []bool{true}, 1}, // The chains head block should be retrievable - {0, []common.Hash{common.Hash{}}, []bool{false}, 0}, // A non existent block should not be returned + {1, nil, nil, 1}, // A single random block should be retrievable + {10, nil, nil, 10}, // Multiple random blocks should be retrievable + {limit, nil, nil, limit}, // The maximum possible blocks should be retrievable + {limit + 1, nil, nil, limit}, // No more than the possible block count should be returned + {0, []common.Hash{pm.blockchain.Genesis().Hash()}, []bool{true}, 1}, // The genesis block should be retrievable + {0, []common.Hash{pm.blockchain.CurrentBlock().Hash()}, []bool{true}, 1}, // The chains head block should be retrievable + {0, []common.Hash{common.Hash{}}, []bool{false}, 0}, // A non existent block should not be returned // Existing and non-existing blocks interleaved should not cause problems {0, []common.Hash{ common.Hash{}, - pm.chainman.GetBlockByNumber(1).Hash(), + pm.blockchain.GetBlockByNumber(1).Hash(), common.Hash{}, - pm.chainman.GetBlockByNumber(10).Hash(), + pm.blockchain.GetBlockByNumber(10).Hash(), common.Hash{}, - pm.chainman.GetBlockByNumber(100).Hash(), + pm.blockchain.GetBlockByNumber(100).Hash(), common.Hash{}, }, []bool{false, true, false, true, false, true, false}, 3}, } @@ -342,11 +342,11 @@ func testGetBlockBodies(t *testing.T, protocol int) { for j := 0; j < tt.random; j++ { for { - num := rand.Int63n(int64(pm.chainman.CurrentBlock().NumberU64())) + num := rand.Int63n(int64(pm.blockchain.CurrentBlock().NumberU64())) if !seen[num] { seen[num] = true - block := pm.chainman.GetBlockByNumber(uint64(num)) + block := pm.blockchain.GetBlockByNumber(uint64(num)) hashes = append(hashes, block.Hash()) if len(bodies) < tt.expected { bodies = append(bodies, &blockBody{Transactions: block.Transactions(), Uncles: block.Uncles()}) @@ -358,7 +358,7 @@ func testGetBlockBodies(t *testing.T, protocol int) { for j, hash := range tt.explicit { hashes = append(hashes, hash) if tt.available[j] && len(bodies) < tt.expected { - block := pm.chainman.GetBlock(hash) + block := pm.blockchain.GetBlock(hash) bodies = append(bodies, &blockBody{Transactions: block.Transactions(), Uncles: block.Uncles()}) } } @@ -442,11 +442,11 @@ func testGetNodeData(t *testing.T, protocol int) { statedb.Put(hashes[i].Bytes(), data[i]) } accounts := []common.Address{testBankAddress, acc1Addr, acc2Addr} - for i := uint64(0); i <= pm.chainman.CurrentBlock().NumberU64(); i++ { - trie := state.New(pm.chainman.GetBlockByNumber(i).Root(), statedb) + for i := uint64(0); i <= pm.blockchain.CurrentBlock().NumberU64(); i++ { + trie := state.New(pm.blockchain.GetBlockByNumber(i).Root(), statedb) for j, acc := range accounts { - bw := pm.chainman.State().GetBalance(acc) + bw := pm.blockchain.State().GetBalance(acc) bh := trie.GetBalance(acc) if (bw != nil && bh == nil) || (bw == nil && bh != nil) { @@ -505,8 +505,8 @@ func testGetReceipt(t *testing.T, protocol int) { // Collect the hashes to request, and the response to expect hashes := []common.Hash{} - for i := uint64(0); i <= pm.chainman.CurrentBlock().NumberU64(); i++ { - for _, tx := range pm.chainman.GetBlockByNumber(i).Transactions() { + for i := uint64(0); i <= pm.blockchain.CurrentBlock().NumberU64(); i++ { + for _, tx := range pm.blockchain.GetBlockByNumber(i).Transactions() { hashes = append(hashes, tx.Hash()) } } diff --git a/eth/helper_test.go b/eth/helper_test.go index 034751f7f..e42fa1f82 100644 --- a/eth/helper_test.go +++ b/eth/helper_test.go @@ -30,18 +30,18 @@ var ( // channels for different events. func newTestProtocolManager(blocks int, generator func(int, *core.BlockGen), newtx chan<- []*types.Transaction) *ProtocolManager { var ( - evmux = new(event.TypeMux) - pow = new(core.FakePow) - db, _ = ethdb.NewMemDatabase() - genesis = core.WriteGenesisBlockForTesting(db, core.GenesisAccount{testBankAddress, testBankFunds}) - chainman, _ = core.NewChainManager(db, pow, evmux) - blockproc = core.NewBlockProcessor(db, pow, chainman, evmux) + evmux = new(event.TypeMux) + pow = new(core.FakePow) + db, _ = ethdb.NewMemDatabase() + genesis = core.WriteGenesisBlockForTesting(db, core.GenesisAccount{testBankAddress, testBankFunds}) + blockchain, _ = core.NewBlockChain(db, pow, evmux) + blockproc = core.NewBlockProcessor(db, pow, blockchain, evmux) ) - chainman.SetProcessor(blockproc) - if _, err := chainman.InsertChain(core.GenerateChain(genesis, db, blocks, generator)); err != nil { + blockchain.SetProcessor(blockproc) + if _, err := blockchain.InsertChain(core.GenerateChain(genesis, db, blocks, generator)); err != nil { panic(err) } - pm := NewProtocolManager(NetworkId, evmux, &testTxPool{added: newtx}, pow, chainman, db) + pm := NewProtocolManager(NetworkId, evmux, &testTxPool{added: newtx}, pow, blockchain, db) pm.Start() return pm } @@ -116,7 +116,7 @@ func newTestPeer(name string, version int, pm *ProtocolManager, shake bool) (*te } // Execute any implicitly requested handshakes and return if shake { - td, head, genesis := pm.chainman.Status() + td, head, genesis := pm.blockchain.Status() tp.handshake(nil, td, head, genesis) } return tp, errc diff --git a/eth/protocol_test.go b/eth/protocol_test.go index bc3b5acfc..523e6c1eb 100644 --- a/eth/protocol_test.go +++ b/eth/protocol_test.go @@ -45,7 +45,7 @@ func TestStatusMsgErrors64(t *testing.T) { testStatusMsgErrors(t, 64) } func testStatusMsgErrors(t *testing.T, protocol int) { pm := newTestProtocolManager(0, nil, nil) - td, currentBlock, genesis := pm.chainman.Status() + td, currentBlock, genesis := pm.blockchain.Status() defer pm.Stop() tests := []struct { diff --git a/eth/sync.go b/eth/sync.go index b4dea4b0f..5a2031c68 100644 --- a/eth/sync.go +++ b/eth/sync.go @@ -160,7 +160,7 @@ func (pm *ProtocolManager) synchronise(peer *peer) { return } // Make sure the peer's TD is higher than our own. If not drop. - if peer.Td().Cmp(pm.chainman.Td()) <= 0 { + if peer.Td().Cmp(pm.blockchain.Td()) <= 0 { return } // Otherwise try to sync with the downloader diff --git a/miner/worker.go b/miner/worker.go index 470f1f676..8be2db93e 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -100,7 +100,7 @@ type worker struct { pow pow.PoW eth core.Backend - chain *core.ChainManager + chain *core.BlockChain proc *core.BlockProcessor chainDb ethdb.Database @@ -131,7 +131,7 @@ func newWorker(coinbase common.Address, eth core.Backend) *worker { chainDb: eth.ChainDb(), recv: make(chan *Result, resultQueueSize), gasPrice: new(big.Int), - chain: eth.ChainManager(), + chain: eth.BlockChain(), proc: eth.BlockProcessor(), possibleUncles: make(map[common.Hash]*types.Block), coinbase: coinbase, diff --git a/rpc/api/admin.go b/rpc/api/admin.go index 8af69b189..6aa04e667 100644 --- a/rpc/api/admin.go +++ b/rpc/api/admin.go @@ -151,7 +151,7 @@ func (self *adminApi) DataDir(req *shared.Request) (interface{}, error) { return self.ethereum.DataDir, nil } -func hasAllBlocks(chain *core.ChainManager, bs []*types.Block) bool { +func hasAllBlocks(chain *core.BlockChain, bs []*types.Block) bool { for _, b := range bs { if !chain.HasBlock(b.Hash()) { return false @@ -193,10 +193,10 @@ func (self *adminApi) ImportChain(req *shared.Request) (interface{}, error) { break } // Import the batch. - if hasAllBlocks(self.ethereum.ChainManager(), blocks[:i]) { + if hasAllBlocks(self.ethereum.BlockChain(), blocks[:i]) { continue } - if _, err := self.ethereum.ChainManager().InsertChain(blocks[:i]); err != nil { + if _, err := self.ethereum.BlockChain().InsertChain(blocks[:i]); err != nil { return false, fmt.Errorf("invalid block %d: %v", n, err) } } @@ -214,7 +214,7 @@ func (self *adminApi) ExportChain(req *shared.Request) (interface{}, error) { return false, err } defer fh.Close() - if err := self.ethereum.ChainManager().Export(fh); err != nil { + if err := self.ethereum.BlockChain().Export(fh); err != nil { return false, err } diff --git a/rpc/api/debug.go b/rpc/api/debug.go index d325b1720..e193f7ad2 100644 --- a/rpc/api/debug.go +++ b/rpc/api/debug.go @@ -152,7 +152,7 @@ func (self *debugApi) SetHead(req *shared.Request) (interface{}, error) { return nil, fmt.Errorf("block #%d not found", args.BlockNumber) } - self.ethereum.ChainManager().SetHead(block) + self.ethereum.BlockChain().SetHead(block) return nil, nil } diff --git a/rpc/api/eth.go b/rpc/api/eth.go index 4cd5f2695..6db006a46 100644 --- a/rpc/api/eth.go +++ b/rpc/api/eth.go @@ -168,7 +168,7 @@ func (self *ethApi) IsMining(req *shared.Request) (interface{}, error) { } func (self *ethApi) IsSyncing(req *shared.Request) (interface{}, error) { - current := self.ethereum.ChainManager().CurrentBlock().NumberU64() + current := self.ethereum.BlockChain().CurrentBlock().NumberU64() origin, height := self.ethereum.Downloader().Boundaries() if current < height { diff --git a/tests/block_test_util.go b/tests/block_test_util.go index 33577cf55..fb9ca16e6 100644 --- a/tests/block_test_util.go +++ b/tests/block_test_util.go @@ -181,7 +181,7 @@ func runBlockTest(test *BlockTest) error { return fmt.Errorf("InsertPreState: %v", err) } - cm := ethereum.ChainManager() + cm := ethereum.BlockChain() validBlocks, err := test.TryBlocksInsert(cm) if err != nil { return err @@ -276,7 +276,7 @@ func (t *BlockTest) InsertPreState(ethereum *eth.Ethereum) (*state.StateDB, erro expected we are expected to ignore it and continue processing and then validate the post state. */ -func (t *BlockTest) TryBlocksInsert(chainManager *core.ChainManager) ([]btBlock, error) { +func (t *BlockTest) TryBlocksInsert(blockchain *core.BlockChain) ([]btBlock, error) { validBlocks := make([]btBlock, 0) // insert the test blocks, which will execute all transactions for _, b := range t.Json.Blocks { @@ -289,7 +289,7 @@ func (t *BlockTest) TryBlocksInsert(chainManager *core.ChainManager) ([]btBlock, } } // RLP decoding worked, try to insert into chain: - _, err = chainManager.InsertChain(types.Blocks{cb}) + _, err = blockchain.InsertChain(types.Blocks{cb}) if err != nil { if b.BlockHeader == nil { continue // OK - block is supposed to be invalid, continue with next block @@ -426,7 +426,7 @@ func (t *BlockTest) ValidatePostState(statedb *state.StateDB) error { return nil } -func (test *BlockTest) ValidateImportedHeaders(cm *core.ChainManager, validBlocks []btBlock) error { +func (test *BlockTest) ValidateImportedHeaders(cm *core.BlockChain, validBlocks []btBlock) error { // to get constant lookup when verifying block headers by hash (some tests have many blocks) bmap := make(map[string]btBlock, len(test.Json.Blocks)) for _, b := range validBlocks { diff --git a/xeth/xeth.go b/xeth/xeth.go index 9d366d215..da712a984 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -126,7 +126,7 @@ func New(ethereum *eth.Ethereum, frontend Frontend) *XEth { if frontend == nil { xeth.frontend = dummyFrontend{} } - xeth.state = NewState(xeth, xeth.backend.ChainManager().State()) + xeth.state = NewState(xeth, xeth.backend.BlockChain().State()) go xeth.start() @@ -214,7 +214,7 @@ func (self *XEth) AtStateNum(num int64) *XEth { if block := self.getBlockByHeight(num); block != nil { st = state.New(block.Root(), self.backend.ChainDb()) } else { - st = state.New(self.backend.ChainManager().GetBlockByNumber(0).Root(), self.backend.ChainDb()) + st = state.New(self.backend.BlockChain().GetBlockByNumber(0).Root(), self.backend.ChainDb()) } } @@ -290,19 +290,19 @@ func (self *XEth) getBlockByHeight(height int64) *types.Block { num = uint64(height) } - return self.backend.ChainManager().GetBlockByNumber(num) + return self.backend.BlockChain().GetBlockByNumber(num) } func (self *XEth) BlockByHash(strHash string) *Block { hash := common.HexToHash(strHash) - block := self.backend.ChainManager().GetBlock(hash) + block := self.backend.BlockChain().GetBlock(hash) return NewBlock(block) } func (self *XEth) EthBlockByHash(strHash string) *types.Block { hash := common.HexToHash(strHash) - block := self.backend.ChainManager().GetBlock(hash) + block := self.backend.BlockChain().GetBlock(hash) return block } @@ -356,11 +356,11 @@ func (self *XEth) EthBlockByNumber(num int64) *types.Block { } func (self *XEth) Td(hash common.Hash) *big.Int { - return self.backend.ChainManager().GetTd(hash) + return self.backend.BlockChain().GetTd(hash) } func (self *XEth) CurrentBlock() *types.Block { - return self.backend.ChainManager().CurrentBlock() + return self.backend.BlockChain().CurrentBlock() } func (self *XEth) GetBlockReceipts(bhash common.Hash) types.Receipts { @@ -372,7 +372,7 @@ func (self *XEth) GetTxReceipt(txhash common.Hash) *types.Receipt { } func (self *XEth) GasLimit() *big.Int { - return self.backend.ChainManager().GasLimit() + return self.backend.BlockChain().GasLimit() } func (self *XEth) Block(v interface{}) *Block { @@ -855,7 +855,7 @@ func (self *XEth) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, dataStr st } header := self.CurrentBlock().Header() - vmenv := core.NewEnv(statedb, self.backend.ChainManager(), msg, header) + vmenv := core.NewEnv(statedb, self.backend.BlockChain(), msg, header) res, gas, err := core.ApplyMessage(vmenv, msg, from) return common.ToHex(res), gas.String(), err -- cgit v1.2.3 From 20ab29f8855982f28c6887743c737531065fa792 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Mon, 5 Oct 2015 16:51:06 +0200 Subject: core: fixed head write on block insertion Due to a rebase this probably got overlooked / ignored. This fixes the issue of a block insertion never writing the last block. --- core/blockchain.go | 3 +++ core/blockchain_test.go | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/core/blockchain.go b/core/blockchain.go index e8209f8e3..ad545cf69 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -297,6 +297,9 @@ func (bc *BlockChain) insert(block *types.Block) { if err := WriteCanonicalHash(bc.chainDb, block.Hash(), block.NumberU64()); err != nil { glog.Fatalf("failed to insert block number: %v", err) } + if err := WriteHeadBlockHash(bc.chainDb, block.Hash()); err != nil { + glog.Fatalf("failed to insert block number: %v", err) + } bc.currentBlock = block } diff --git a/core/blockchain_test.go b/core/blockchain_test.go index e034417ce..13971ccba 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -153,6 +153,19 @@ func insertChain(done chan bool, blockchain *BlockChain, chain types.Blocks, t * done <- true } +func TestLastBlock(t *testing.T) { + db, err := ethdb.NewMemDatabase() + if err != nil { + t.Fatal("Failed to create db:", err) + } + bchain := theBlockChain(db, t) + block := makeChain(bchain.CurrentBlock(), 1, db, 0)[0] + bchain.insert(block) + if block.Hash() != GetHeadBlockHash(db) { + t.Errorf("Write/Get HeadBlockHash failed") + } +} + func TestExtendCanonical(t *testing.T) { CanonicalLength := 5 db, err := ethdb.NewMemDatabase() -- cgit v1.2.3 From 7b44b8aeceb445fd0f59a85f8bbf9527c3898954 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Mon, 5 Oct 2015 21:11:39 +0200 Subject: cmd/geth: dev version number --- cmd/geth/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index e8292fdf2..fa9beafd0 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -48,9 +48,9 @@ import ( const ( ClientIdentifier = "Geth" - Version = "1.2.0-dev" + Version = "1.3.0-dev" VersionMajor = 1 - VersionMinor = 2 + VersionMinor = 3 VersionPatch = 0 ) -- cgit v1.2.3 From e1616f77c7fb348f6b171b608d036f2bd4e34cc3 Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Tue, 6 Oct 2015 12:35:05 +0200 Subject: core, core/vm, cmd/evm: remove redundant balance check --- cmd/evm/main.go | 4 ++-- core/execution.go | 9 +-------- core/vm/environment.go | 2 +- core/vm/jit_test.go | 4 +--- core/vm_env.go | 4 ++-- tests/util.go | 6 +++--- 6 files changed, 10 insertions(+), 19 deletions(-) diff --git a/cmd/evm/main.go b/cmd/evm/main.go index bf24da982..e170dc190 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -217,8 +217,8 @@ func (self *VMEnv) AddLog(log *vm.Log) { func (self *VMEnv) CanTransfer(from common.Address, balance *big.Int) bool { return self.state.GetBalance(from).Cmp(balance) >= 0 } -func (self *VMEnv) Transfer(from, to vm.Account, amount *big.Int) error { - return core.Transfer(from, to, amount) +func (self *VMEnv) Transfer(from, to vm.Account, amount *big.Int) { + core.Transfer(from, to, amount) } func (self *VMEnv) Call(caller vm.ContractRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { diff --git a/core/execution.go b/core/execution.go index e3c00a2ea..fd8464f6e 100644 --- a/core/execution.go +++ b/core/execution.go @@ -17,7 +17,6 @@ package core import ( - "errors" "math/big" "github.com/ethereum/go-ethereum/common" @@ -108,13 +107,7 @@ func exec(env vm.Environment, caller vm.ContractRef, address, codeAddr *common.A } // generic transfer method -func Transfer(from, to vm.Account, amount *big.Int) error { - if from.Balance().Cmp(amount) < 0 { - return errors.New("Insufficient balance in account") - } - +func Transfer(from, to vm.Account, amount *big.Int) { from.SubBalance(amount) to.AddBalance(amount) - - return nil } diff --git a/core/vm/environment.go b/core/vm/environment.go index f8e19baea..ec739b26c 100644 --- a/core/vm/environment.go +++ b/core/vm/environment.go @@ -51,7 +51,7 @@ type Environment interface { // Determines whether it's possible to transact CanTransfer(from common.Address, balance *big.Int) bool // Transfers amount from one account to the other - Transfer(from, to Account, amount *big.Int) error + Transfer(from, to Account, amount *big.Int) // Adds a LOG to the state AddLog(*Log) // Adds a structured log to the env diff --git a/core/vm/jit_test.go b/core/vm/jit_test.go index 8c45f2ce7..cb09e179d 100644 --- a/core/vm/jit_test.go +++ b/core/vm/jit_test.go @@ -152,9 +152,7 @@ func (self *Env) SetDepth(i int) { self.depth = i } func (self *Env) CanTransfer(from common.Address, balance *big.Int) bool { return true } -func (self *Env) Transfer(from, to Account, amount *big.Int) error { - return nil -} +func (self *Env) Transfer(from, to Account, amount *big.Int) {} func (self *Env) Call(caller ContractRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { return nil, nil } diff --git a/core/vm_env.go b/core/vm_env.go index 467e34c6b..715fde52f 100644 --- a/core/vm_env.go +++ b/core/vm_env.go @@ -81,8 +81,8 @@ func (self *VMEnv) SetSnapshot(copy vm.Database) { self.state.Set(copy.(*state.StateDB)) } -func (self *VMEnv) Transfer(from, to vm.Account, amount *big.Int) error { - return Transfer(from, to, amount) +func (self *VMEnv) Transfer(from, to vm.Account, amount *big.Int) { + Transfer(from, to, amount) } func (self *VMEnv) Call(me vm.ContractRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { diff --git a/tests/util.go b/tests/util.go index fb9e518c8..bbc671169 100644 --- a/tests/util.go +++ b/tests/util.go @@ -209,11 +209,11 @@ func (self *Env) SetSnapshot(copy vm.Database) { self.state.Set(copy.(*state.StateDB)) } -func (self *Env) Transfer(from, to vm.Account, amount *big.Int) error { +func (self *Env) Transfer(from, to vm.Account, amount *big.Int) { if self.skipTransfer { - return nil + return } - return core.Transfer(from, to, amount) + core.Transfer(from, to, amount) } func (self *Env) Call(caller vm.ContractRef, addr common.Address, data []byte, gas, price, value *big.Int) ([]byte, error) { -- cgit v1.2.3 From ec6a548ee3555813d83f86f82bd25694bfd9c303 Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Fri, 12 Jun 2015 07:45:23 +0200 Subject: all: Add GPU mining, disabled by default --- Godeps/Godeps.json | 4 +- .../github.com/Gustav-Simonsson/go-opencl/cl/cl.go | 26 + .../Gustav-Simonsson/go-opencl/cl/cl_test.go | 254 ++++ .../Gustav-Simonsson/go-opencl/cl/context.go | 161 +++ .../Gustav-Simonsson/go-opencl/cl/device.go | 510 ++++++++ .../Gustav-Simonsson/go-opencl/cl/device12.go | 51 + .../Gustav-Simonsson/go-opencl/cl/headers/1.2/cl.h | 1210 ++++++++++++++++++ .../go-opencl/cl/headers/1.2/cl_ext.h | 315 +++++ .../go-opencl/cl/headers/1.2/cl_gl.h | 158 +++ .../go-opencl/cl/headers/1.2/cl_gl_ext.h | 65 + .../go-opencl/cl/headers/1.2/cl_platform.h | 1278 ++++++++++++++++++++ .../go-opencl/cl/headers/1.2/opencl.h | 43 + .../Gustav-Simonsson/go-opencl/cl/image.go | 83 ++ .../Gustav-Simonsson/go-opencl/cl/kernel.go | 127 ++ .../Gustav-Simonsson/go-opencl/cl/kernel10.go | 7 + .../Gustav-Simonsson/go-opencl/cl/kernel12.go | 20 + .../Gustav-Simonsson/go-opencl/cl/platform.go | 83 ++ .../Gustav-Simonsson/go-opencl/cl/program.go | 105 ++ .../Gustav-Simonsson/go-opencl/cl/queue.go | 193 +++ .../Gustav-Simonsson/go-opencl/cl/types.go | 487 ++++++++ .../Gustav-Simonsson/go-opencl/cl/types12.go | 71 ++ .../Gustav-Simonsson/go-opencl/cl/types_darwin.go | 45 + .../src/github.com/ethereum/ethash/ethash.go | 24 +- .../github.com/ethereum/ethash/ethash_opencl.go | 629 ++++++++++ .../ethereum/ethash/ethash_opencl_kernel_go_str.go | 600 +++++++++ .../src/github.com/ethereum/ethash/ethash_test.go | 6 +- Makefile | 6 +- build/flags.sh | 22 + build/ldflags.sh | 18 - cmd/geth/js_test.go | 3 +- cmd/geth/main.go | 45 +- cmd/utils/flags.go | 6 + common/natspec/natspec_e2e_test.go | 2 +- core/chain_makers.go | 2 +- core/chain_pow_test.go | 4 +- eth/backend.go | 12 - eth/cpu_mining.go | 54 + eth/gpu_mining.go | 103 ++ miner/agent.go | 2 +- pow/ezp/pow.go | 2 +- pow/pow.go | 2 +- rpc/api/miner.go | 2 +- xeth/xeth.go | 2 +- 43 files changed, 6782 insertions(+), 60 deletions(-) create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/cl.go create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/cl_test.go create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/context.go create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/device.go create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/device12.go create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl.h create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_ext.h create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_gl.h create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_gl_ext.h create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_platform.h create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/opencl.h create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/image.go create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel.go create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel10.go create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel12.go create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/platform.go create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/program.go create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/queue.go create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types.go create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types12.go create mode 100644 Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types_darwin.go create mode 100644 Godeps/_workspace/src/github.com/ethereum/ethash/ethash_opencl.go create mode 100644 Godeps/_workspace/src/github.com/ethereum/ethash/ethash_opencl_kernel_go_str.go create mode 100755 build/flags.sh delete mode 100755 build/ldflags.sh create mode 100644 eth/cpu_mining.go create mode 100644 eth/gpu_mining.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index e4b37a12e..01bda12bf 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -16,8 +16,8 @@ }, { "ImportPath": "github.com/ethereum/ethash", - "Comment": "v23.1-234-g062e40a", - "Rev": "062e40a1a1671f5a5102862b56e4c56f68a732f5" + "Comment": "v23.1-235-gb39e007", + "Rev": "b39e007d393ab5945b4c0748a7415b7e31c5db04" }, { "ImportPath": "github.com/fatih/color", diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/cl.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/cl.go new file mode 100644 index 000000000..3d577b2b6 --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/cl.go @@ -0,0 +1,26 @@ +/* +Package cl provides a binding to the OpenCL api. It's mostly a low-level +wrapper that avoids adding functionality while still making the interface +a little more friendly and easy to use. + +Resource life-cycle management: + +For any CL object that gets created (buffer, queue, kernel, etc..) you should +call object.Release() when finished with it to free the CL resources. This +explicitely calls the related clXXXRelease method for the type. However, +as a fallback there is a finalizer set for every resource item that takes +care of it (eventually) if Release isn't called. In this way you can have +better control over the life cycle of resources while having a fall back +to avoid leaks. This is similar to how file handles and such are handled +in the Go standard packages. +*/ +package cl + +// #include "headers/1.2/opencl.h" +// #cgo CFLAGS: -Iheaders/1.2 +// #cgo darwin LDFLAGS: -framework OpenCL +// #cgo linux LDFLAGS: -lOpenCL +import "C" +import "errors" + +var ErrUnsupported = errors.New("cl: unsupported") diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/cl_test.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/cl_test.go new file mode 100644 index 000000000..7659ce14f --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/cl_test.go @@ -0,0 +1,254 @@ +package cl + +import ( + "math/rand" + "reflect" + "strings" + "testing" +) + +var kernelSource = ` +__kernel void square( + __global float* input, + __global float* output, + const unsigned int count) +{ + int i = get_global_id(0); + if(i < count) + output[i] = input[i] * input[i]; +} +` + +func getObjectStrings(object interface{}) map[string]string { + v := reflect.ValueOf(object) + t := reflect.TypeOf(object) + + strs := make(map[string]string) + + numMethods := t.NumMethod() + for i := 0; i < numMethods; i++ { + method := t.Method(i) + if method.Type.NumIn() == 1 && method.Type.NumOut() == 1 && method.Type.Out(0).Kind() == reflect.String { + // this is a string-returning method with (presumably) only a pointer receiver parameter + // call it + outs := v.Method(i).Call([]reflect.Value{}) + // put the result in our map + strs[method.Name] = (outs[0].Interface()).(string) + } + } + + return strs +} + +func TestPlatformStringsContainNoNULs(t *testing.T) { + platforms, err := GetPlatforms() + if err != nil { + t.Fatalf("Failed to get platforms: %+v", err) + } + + for _, p := range platforms { + for key, value := range getObjectStrings(p) { + if strings.Contains(value, "\x00") { + t.Fatalf("platform string %q = %+q contains NUL", key, value) + } + } + } +} + +func TestDeviceStringsContainNoNULs(t *testing.T) { + platforms, err := GetPlatforms() + if err != nil { + t.Fatalf("Failed to get platforms: %+v", err) + } + + for _, p := range platforms { + devs, err := p.GetDevices(DeviceTypeAll) + if err != nil { + t.Fatalf("Failed to get devices for platform %q: %+v", p.Name(), err) + } + + for _, d := range devs { + for key, value := range getObjectStrings(d) { + if strings.Contains(value, "\x00") { + t.Fatalf("device string %q = %+q contains NUL", key, value) + } + } + } + } +} + +func TestHello(t *testing.T) { + var data [1024]float32 + for i := 0; i < len(data); i++ { + data[i] = rand.Float32() + } + + platforms, err := GetPlatforms() + if err != nil { + t.Fatalf("Failed to get platforms: %+v", err) + } + for i, p := range platforms { + t.Logf("Platform %d:", i) + t.Logf(" Name: %s", p.Name()) + t.Logf(" Vendor: %s", p.Vendor()) + t.Logf(" Profile: %s", p.Profile()) + t.Logf(" Version: %s", p.Version()) + t.Logf(" Extensions: %s", p.Extensions()) + } + platform := platforms[0] + + devices, err := platform.GetDevices(DeviceTypeAll) + if err != nil { + t.Fatalf("Failed to get devices: %+v", err) + } + if len(devices) == 0 { + t.Fatalf("GetDevices returned no devices") + } + deviceIndex := -1 + for i, d := range devices { + if deviceIndex < 0 && d.Type() == DeviceTypeGPU { + deviceIndex = i + } + t.Logf("Device %d (%s): %s", i, d.Type(), d.Name()) + t.Logf(" Address Bits: %d", d.AddressBits()) + t.Logf(" Available: %+v", d.Available()) + // t.Logf(" Built-In Kernels: %s", d.BuiltInKernels()) + t.Logf(" Compiler Available: %+v", d.CompilerAvailable()) + t.Logf(" Double FP Config: %s", d.DoubleFPConfig()) + t.Logf(" Driver Version: %s", d.DriverVersion()) + t.Logf(" Error Correction Supported: %+v", d.ErrorCorrectionSupport()) + t.Logf(" Execution Capabilities: %s", d.ExecutionCapabilities()) + t.Logf(" Extensions: %s", d.Extensions()) + t.Logf(" Global Memory Cache Type: %s", d.GlobalMemCacheType()) + t.Logf(" Global Memory Cacheline Size: %d KB", d.GlobalMemCachelineSize()/1024) + t.Logf(" Global Memory Size: %d MB", d.GlobalMemSize()/(1024*1024)) + t.Logf(" Half FP Config: %s", d.HalfFPConfig()) + t.Logf(" Host Unified Memory: %+v", d.HostUnifiedMemory()) + t.Logf(" Image Support: %+v", d.ImageSupport()) + t.Logf(" Image2D Max Dimensions: %d x %d", d.Image2DMaxWidth(), d.Image2DMaxHeight()) + t.Logf(" Image3D Max Dimenionns: %d x %d x %d", d.Image3DMaxWidth(), d.Image3DMaxHeight(), d.Image3DMaxDepth()) + // t.Logf(" Image Max Buffer Size: %d", d.ImageMaxBufferSize()) + // t.Logf(" Image Max Array Size: %d", d.ImageMaxArraySize()) + // t.Logf(" Linker Available: %+v", d.LinkerAvailable()) + t.Logf(" Little Endian: %+v", d.EndianLittle()) + t.Logf(" Local Mem Size Size: %d KB", d.LocalMemSize()/1024) + t.Logf(" Local Mem Type: %s", d.LocalMemType()) + t.Logf(" Max Clock Frequency: %d", d.MaxClockFrequency()) + t.Logf(" Max Compute Units: %d", d.MaxComputeUnits()) + t.Logf(" Max Constant Args: %d", d.MaxConstantArgs()) + t.Logf(" Max Constant Buffer Size: %d KB", d.MaxConstantBufferSize()/1024) + t.Logf(" Max Mem Alloc Size: %d KB", d.MaxMemAllocSize()/1024) + t.Logf(" Max Parameter Size: %d", d.MaxParameterSize()) + t.Logf(" Max Read-Image Args: %d", d.MaxReadImageArgs()) + t.Logf(" Max Samplers: %d", d.MaxSamplers()) + t.Logf(" Max Work Group Size: %d", d.MaxWorkGroupSize()) + t.Logf(" Max Work Item Dimensions: %d", d.MaxWorkItemDimensions()) + t.Logf(" Max Work Item Sizes: %d", d.MaxWorkItemSizes()) + t.Logf(" Max Write-Image Args: %d", d.MaxWriteImageArgs()) + t.Logf(" Memory Base Address Alignment: %d", d.MemBaseAddrAlign()) + t.Logf(" Native Vector Width Char: %d", d.NativeVectorWidthChar()) + t.Logf(" Native Vector Width Short: %d", d.NativeVectorWidthShort()) + t.Logf(" Native Vector Width Int: %d", d.NativeVectorWidthInt()) + t.Logf(" Native Vector Width Long: %d", d.NativeVectorWidthLong()) + t.Logf(" Native Vector Width Float: %d", d.NativeVectorWidthFloat()) + t.Logf(" Native Vector Width Double: %d", d.NativeVectorWidthDouble()) + t.Logf(" Native Vector Width Half: %d", d.NativeVectorWidthHalf()) + t.Logf(" OpenCL C Version: %s", d.OpenCLCVersion()) + // t.Logf(" Parent Device: %+v", d.ParentDevice()) + t.Logf(" Profile: %s", d.Profile()) + t.Logf(" Profiling Timer Resolution: %d", d.ProfilingTimerResolution()) + t.Logf(" Vendor: %s", d.Vendor()) + t.Logf(" Version: %s", d.Version()) + } + if deviceIndex < 0 { + deviceIndex = 0 + } + device := devices[deviceIndex] + t.Logf("Using device %d", deviceIndex) + context, err := CreateContext([]*Device{device}) + if err != nil { + t.Fatalf("CreateContext failed: %+v", err) + } + // imageFormats, err := context.GetSupportedImageFormats(0, MemObjectTypeImage2D) + // if err != nil { + // t.Fatalf("GetSupportedImageFormats failed: %+v", err) + // } + // t.Logf("Supported image formats: %+v", imageFormats) + queue, err := context.CreateCommandQueue(device, 0) + if err != nil { + t.Fatalf("CreateCommandQueue failed: %+v", err) + } + program, err := context.CreateProgramWithSource([]string{kernelSource}) + if err != nil { + t.Fatalf("CreateProgramWithSource failed: %+v", err) + } + if err := program.BuildProgram(nil, ""); err != nil { + t.Fatalf("BuildProgram failed: %+v", err) + } + kernel, err := program.CreateKernel("square") + if err != nil { + t.Fatalf("CreateKernel failed: %+v", err) + } + for i := 0; i < 3; i++ { + name, err := kernel.ArgName(i) + if err == ErrUnsupported { + break + } else if err != nil { + t.Errorf("GetKernelArgInfo for name failed: %+v", err) + break + } else { + t.Logf("Kernel arg %d: %s", i, name) + } + } + input, err := context.CreateEmptyBuffer(MemReadOnly, 4*len(data)) + if err != nil { + t.Fatalf("CreateBuffer failed for input: %+v", err) + } + output, err := context.CreateEmptyBuffer(MemReadOnly, 4*len(data)) + if err != nil { + t.Fatalf("CreateBuffer failed for output: %+v", err) + } + if _, err := queue.EnqueueWriteBufferFloat32(input, true, 0, data[:], nil); err != nil { + t.Fatalf("EnqueueWriteBufferFloat32 failed: %+v", err) + } + if err := kernel.SetArgs(input, output, uint32(len(data))); err != nil { + t.Fatalf("SetKernelArgs failed: %+v", err) + } + + local, err := kernel.WorkGroupSize(device) + if err != nil { + t.Fatalf("WorkGroupSize failed: %+v", err) + } + t.Logf("Work group size: %d", local) + size, _ := kernel.PreferredWorkGroupSizeMultiple(nil) + t.Logf("Preferred Work Group Size Multiple: %d", size) + + global := len(data) + d := len(data) % local + if d != 0 { + global += local - d + } + if _, err := queue.EnqueueNDRangeKernel(kernel, nil, []int{global}, []int{local}, nil); err != nil { + t.Fatalf("EnqueueNDRangeKernel failed: %+v", err) + } + + if err := queue.Finish(); err != nil { + t.Fatalf("Finish failed: %+v", err) + } + + results := make([]float32, len(data)) + if _, err := queue.EnqueueReadBufferFloat32(output, true, 0, results, nil); err != nil { + t.Fatalf("EnqueueReadBufferFloat32 failed: %+v", err) + } + + correct := 0 + for i, v := range data { + if results[i] == v*v { + correct++ + } + } + + if correct != len(data) { + t.Fatalf("%d/%d correct values", correct, len(data)) + } +} diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/context.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/context.go new file mode 100644 index 000000000..67441bb5f --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/context.go @@ -0,0 +1,161 @@ +package cl + +// #include +// #ifdef __APPLE__ +// #include "OpenCL/opencl.h" +// #else +// #include "cl.h" +// #endif +import "C" + +import ( + "runtime" + "unsafe" +) + +const maxImageFormats = 256 + +type Context struct { + clContext C.cl_context + devices []*Device +} + +type MemObject struct { + clMem C.cl_mem + size int +} + +func releaseContext(c *Context) { + if c.clContext != nil { + C.clReleaseContext(c.clContext) + c.clContext = nil + } +} + +func releaseMemObject(b *MemObject) { + if b.clMem != nil { + C.clReleaseMemObject(b.clMem) + b.clMem = nil + } +} + +func newMemObject(mo C.cl_mem, size int) *MemObject { + memObject := &MemObject{clMem: mo, size: size} + runtime.SetFinalizer(memObject, releaseMemObject) + return memObject +} + +func (b *MemObject) Release() { + releaseMemObject(b) +} + +// TODO: properties +func CreateContext(devices []*Device) (*Context, error) { + deviceIds := buildDeviceIdList(devices) + var err C.cl_int + clContext := C.clCreateContext(nil, C.cl_uint(len(devices)), &deviceIds[0], nil, nil, &err) + if err != C.CL_SUCCESS { + return nil, toError(err) + } + if clContext == nil { + return nil, ErrUnknown + } + context := &Context{clContext: clContext, devices: devices} + runtime.SetFinalizer(context, releaseContext) + return context, nil +} + +func (ctx *Context) GetSupportedImageFormats(flags MemFlag, imageType MemObjectType) ([]ImageFormat, error) { + var formats [maxImageFormats]C.cl_image_format + var nFormats C.cl_uint + if err := C.clGetSupportedImageFormats(ctx.clContext, C.cl_mem_flags(flags), C.cl_mem_object_type(imageType), maxImageFormats, &formats[0], &nFormats); err != C.CL_SUCCESS { + return nil, toError(err) + } + fmts := make([]ImageFormat, nFormats) + for i, f := range formats[:nFormats] { + fmts[i] = ImageFormat{ + ChannelOrder: ChannelOrder(f.image_channel_order), + ChannelDataType: ChannelDataType(f.image_channel_data_type), + } + } + return fmts, nil +} + +func (ctx *Context) CreateCommandQueue(device *Device, properties CommandQueueProperty) (*CommandQueue, error) { + var err C.cl_int + clQueue := C.clCreateCommandQueue(ctx.clContext, device.id, C.cl_command_queue_properties(properties), &err) + if err != C.CL_SUCCESS { + return nil, toError(err) + } + if clQueue == nil { + return nil, ErrUnknown + } + commandQueue := &CommandQueue{clQueue: clQueue, device: device} + runtime.SetFinalizer(commandQueue, releaseCommandQueue) + return commandQueue, nil +} + +func (ctx *Context) CreateProgramWithSource(sources []string) (*Program, error) { + cSources := make([]*C.char, len(sources)) + for i, s := range sources { + cs := C.CString(s) + cSources[i] = cs + defer C.free(unsafe.Pointer(cs)) + } + var err C.cl_int + clProgram := C.clCreateProgramWithSource(ctx.clContext, C.cl_uint(len(sources)), &cSources[0], nil, &err) + if err != C.CL_SUCCESS { + return nil, toError(err) + } + if clProgram == nil { + return nil, ErrUnknown + } + program := &Program{clProgram: clProgram, devices: ctx.devices} + runtime.SetFinalizer(program, releaseProgram) + return program, nil +} + +func (ctx *Context) CreateBufferUnsafe(flags MemFlag, size int, dataPtr unsafe.Pointer) (*MemObject, error) { + var err C.cl_int + clBuffer := C.clCreateBuffer(ctx.clContext, C.cl_mem_flags(flags), C.size_t(size), dataPtr, &err) + if err != C.CL_SUCCESS { + return nil, toError(err) + } + if clBuffer == nil { + return nil, ErrUnknown + } + return newMemObject(clBuffer, size), nil +} + +func (ctx *Context) CreateEmptyBuffer(flags MemFlag, size int) (*MemObject, error) { + return ctx.CreateBufferUnsafe(flags, size, nil) +} + +func (ctx *Context) CreateEmptyBufferFloat32(flags MemFlag, size int) (*MemObject, error) { + return ctx.CreateBufferUnsafe(flags, 4*size, nil) +} + +func (ctx *Context) CreateBuffer(flags MemFlag, data []byte) (*MemObject, error) { + return ctx.CreateBufferUnsafe(flags, len(data), unsafe.Pointer(&data[0])) +} + +//float64 +func (ctx *Context) CreateBufferFloat32(flags MemFlag, data []float32) (*MemObject, error) { + return ctx.CreateBufferUnsafe(flags, 4*len(data), unsafe.Pointer(&data[0])) +} + +func (ctx *Context) CreateUserEvent() (*Event, error) { + var err C.cl_int + clEvent := C.clCreateUserEvent(ctx.clContext, &err) + if err != C.CL_SUCCESS { + return nil, toError(err) + } + return newEvent(clEvent), nil +} + +func (ctx *Context) Release() { + releaseContext(ctx) +} + +// http://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clCreateSubBuffer.html +// func (memObject *MemObject) CreateSubBuffer(flags MemFlag, bufferCreateType BufferCreateType, ) diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/device.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/device.go new file mode 100644 index 000000000..d62a6fb71 --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/device.go @@ -0,0 +1,510 @@ +package cl + +// #ifdef __APPLE__ +// #include "OpenCL/opencl.h" +// #else +// #include "cl.h" +// #include "cl_ext.h" +// #endif +import "C" + +import ( + "strings" + "unsafe" +) + +const maxDeviceCount = 64 + +type DeviceType uint + +const ( + DeviceTypeCPU DeviceType = C.CL_DEVICE_TYPE_CPU + DeviceTypeGPU DeviceType = C.CL_DEVICE_TYPE_GPU + DeviceTypeAccelerator DeviceType = C.CL_DEVICE_TYPE_ACCELERATOR + DeviceTypeDefault DeviceType = C.CL_DEVICE_TYPE_DEFAULT + DeviceTypeAll DeviceType = C.CL_DEVICE_TYPE_ALL +) + +type FPConfig int + +const ( + FPConfigDenorm FPConfig = C.CL_FP_DENORM // denorms are supported + FPConfigInfNaN FPConfig = C.CL_FP_INF_NAN // INF and NaNs are supported + FPConfigRoundToNearest FPConfig = C.CL_FP_ROUND_TO_NEAREST // round to nearest even rounding mode supported + FPConfigRoundToZero FPConfig = C.CL_FP_ROUND_TO_ZERO // round to zero rounding mode supported + FPConfigRoundToInf FPConfig = C.CL_FP_ROUND_TO_INF // round to positive and negative infinity rounding modes supported + FPConfigFMA FPConfig = C.CL_FP_FMA // IEEE754-2008 fused multiply-add is supported + FPConfigSoftFloat FPConfig = C.CL_FP_SOFT_FLOAT // Basic floating-point operations (such as addition, subtraction, multiplication) are implemented in software +) + +var fpConfigNameMap = map[FPConfig]string{ + FPConfigDenorm: "Denorm", + FPConfigInfNaN: "InfNaN", + FPConfigRoundToNearest: "RoundToNearest", + FPConfigRoundToZero: "RoundToZero", + FPConfigRoundToInf: "RoundToInf", + FPConfigFMA: "FMA", + FPConfigSoftFloat: "SoftFloat", +} + +func (c FPConfig) String() string { + var parts []string + for bit, name := range fpConfigNameMap { + if c&bit != 0 { + parts = append(parts, name) + } + } + if parts == nil { + return "" + } + return strings.Join(parts, "|") +} + +func (dt DeviceType) String() string { + var parts []string + if dt&DeviceTypeCPU != 0 { + parts = append(parts, "CPU") + } + if dt&DeviceTypeGPU != 0 { + parts = append(parts, "GPU") + } + if dt&DeviceTypeAccelerator != 0 { + parts = append(parts, "Accelerator") + } + if dt&DeviceTypeDefault != 0 { + parts = append(parts, "Default") + } + if parts == nil { + parts = append(parts, "None") + } + return strings.Join(parts, "|") +} + +type Device struct { + id C.cl_device_id +} + +func buildDeviceIdList(devices []*Device) []C.cl_device_id { + deviceIds := make([]C.cl_device_id, len(devices)) + for i, d := range devices { + deviceIds[i] = d.id + } + return deviceIds +} + +// Obtain the list of devices available on a platform. 'platform' refers +// to the platform returned by GetPlatforms or can be nil. If platform +// is nil, the behavior is implementation-defined. +func GetDevices(platform *Platform, deviceType DeviceType) ([]*Device, error) { + var deviceIds [maxDeviceCount]C.cl_device_id + var numDevices C.cl_uint + var platformId C.cl_platform_id + if platform != nil { + platformId = platform.id + } + if err := C.clGetDeviceIDs(platformId, C.cl_device_type(deviceType), C.cl_uint(maxDeviceCount), &deviceIds[0], &numDevices); err != C.CL_SUCCESS { + return nil, toError(err) + } + if numDevices > maxDeviceCount { + numDevices = maxDeviceCount + } + devices := make([]*Device, numDevices) + for i := 0; i < int(numDevices); i++ { + devices[i] = &Device{id: deviceIds[i]} + } + return devices, nil +} + +func (d *Device) nullableId() C.cl_device_id { + if d == nil { + return nil + } + return d.id +} + +func (d *Device) GetInfoString(param C.cl_device_info, panicOnError bool) (string, error) { + var strC [1024]C.char + var strN C.size_t + if err := C.clGetDeviceInfo(d.id, param, 1024, unsafe.Pointer(&strC), &strN); err != C.CL_SUCCESS { + if panicOnError { + panic("Should never fail") + } + return "", toError(err) + } + + // OpenCL strings are NUL-terminated, and the terminator is included in strN + // Go strings aren't NUL-terminated, so subtract 1 from the length + return C.GoStringN((*C.char)(unsafe.Pointer(&strC)), C.int(strN-1)), nil +} + +func (d *Device) getInfoUint(param C.cl_device_info, panicOnError bool) (uint, error) { + var val C.cl_uint + if err := C.clGetDeviceInfo(d.id, param, C.size_t(unsafe.Sizeof(val)), unsafe.Pointer(&val), nil); err != C.CL_SUCCESS { + if panicOnError { + panic("Should never fail") + } + return 0, toError(err) + } + return uint(val), nil +} + +func (d *Device) getInfoSize(param C.cl_device_info, panicOnError bool) (int, error) { + var val C.size_t + if err := C.clGetDeviceInfo(d.id, param, C.size_t(unsafe.Sizeof(val)), unsafe.Pointer(&val), nil); err != C.CL_SUCCESS { + if panicOnError { + panic("Should never fail") + } + return 0, toError(err) + } + return int(val), nil +} + +func (d *Device) getInfoUlong(param C.cl_device_info, panicOnError bool) (int64, error) { + var val C.cl_ulong + if err := C.clGetDeviceInfo(d.id, param, C.size_t(unsafe.Sizeof(val)), unsafe.Pointer(&val), nil); err != C.CL_SUCCESS { + if panicOnError { + panic("Should never fail") + } + return 0, toError(err) + } + return int64(val), nil +} + +func (d *Device) getInfoBool(param C.cl_device_info, panicOnError bool) (bool, error) { + var val C.cl_bool + if err := C.clGetDeviceInfo(d.id, param, C.size_t(unsafe.Sizeof(val)), unsafe.Pointer(&val), nil); err != C.CL_SUCCESS { + if panicOnError { + panic("Should never fail") + } + return false, toError(err) + } + return val == C.CL_TRUE, nil +} + +func (d *Device) Name() string { + str, _ := d.GetInfoString(C.CL_DEVICE_NAME, true) + return str +} + +func (d *Device) Vendor() string { + str, _ := d.GetInfoString(C.CL_DEVICE_VENDOR, true) + return str +} + +func (d *Device) Extensions() string { + str, _ := d.GetInfoString(C.CL_DEVICE_EXTENSIONS, true) + return str +} + +func (d *Device) OpenCLCVersion() string { + str, _ := d.GetInfoString(C.CL_DEVICE_OPENCL_C_VERSION, true) + return str +} + +func (d *Device) Profile() string { + str, _ := d.GetInfoString(C.CL_DEVICE_PROFILE, true) + return str +} + +func (d *Device) Version() string { + str, _ := d.GetInfoString(C.CL_DEVICE_VERSION, true) + return str +} + +func (d *Device) DriverVersion() string { + str, _ := d.GetInfoString(C.CL_DRIVER_VERSION, true) + return str +} + +// The default compute device address space size specified as an +// unsigned integer value in bits. Currently supported values are 32 or 64 bits. +func (d *Device) AddressBits() int { + val, _ := d.getInfoUint(C.CL_DEVICE_ADDRESS_BITS, true) + return int(val) +} + +// Size of global memory cache line in bytes. +func (d *Device) GlobalMemCachelineSize() int { + val, _ := d.getInfoUint(C.CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE, true) + return int(val) +} + +// Maximum configured clock frequency of the device in MHz. +func (d *Device) MaxClockFrequency() int { + val, _ := d.getInfoUint(C.CL_DEVICE_MAX_CLOCK_FREQUENCY, true) + return int(val) +} + +// The number of parallel compute units on the OpenCL device. +// A work-group executes on a single compute unit. The minimum value is 1. +func (d *Device) MaxComputeUnits() int { + val, _ := d.getInfoUint(C.CL_DEVICE_MAX_COMPUTE_UNITS, true) + return int(val) +} + +// Max number of arguments declared with the __constant qualifier in a kernel. +// The minimum value is 8 for devices that are not of type CL_DEVICE_TYPE_CUSTOM. +func (d *Device) MaxConstantArgs() int { + val, _ := d.getInfoUint(C.CL_DEVICE_MAX_CONSTANT_ARGS, true) + return int(val) +} + +// Max number of simultaneous image objects that can be read by a kernel. +// The minimum value is 128 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. +func (d *Device) MaxReadImageArgs() int { + val, _ := d.getInfoUint(C.CL_DEVICE_MAX_READ_IMAGE_ARGS, true) + return int(val) +} + +// Maximum number of samplers that can be used in a kernel. The minimum +// value is 16 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. (Also see sampler_t.) +func (d *Device) MaxSamplers() int { + val, _ := d.getInfoUint(C.CL_DEVICE_MAX_SAMPLERS, true) + return int(val) +} + +// Maximum dimensions that specify the global and local work-item IDs used +// by the data parallel execution model. (Refer to clEnqueueNDRangeKernel). +// The minimum value is 3 for devices that are not of type CL_DEVICE_TYPE_CUSTOM. +func (d *Device) MaxWorkItemDimensions() int { + val, _ := d.getInfoUint(C.CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS, true) + return int(val) +} + +// Max number of simultaneous image objects that can be written to by a +// kernel. The minimum value is 8 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. +func (d *Device) MaxWriteImageArgs() int { + val, _ := d.getInfoUint(C.CL_DEVICE_MAX_WRITE_IMAGE_ARGS, true) + return int(val) +} + +// The minimum value is the size (in bits) of the largest OpenCL built-in +// data type supported by the device (long16 in FULL profile, long16 or +// int16 in EMBEDDED profile) for devices that are not of type CL_DEVICE_TYPE_CUSTOM. +func (d *Device) MemBaseAddrAlign() int { + val, _ := d.getInfoUint(C.CL_DEVICE_MEM_BASE_ADDR_ALIGN, true) + return int(val) +} + +func (d *Device) NativeVectorWidthChar() int { + val, _ := d.getInfoUint(C.CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR, true) + return int(val) +} + +func (d *Device) NativeVectorWidthShort() int { + val, _ := d.getInfoUint(C.CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT, true) + return int(val) +} + +func (d *Device) NativeVectorWidthInt() int { + val, _ := d.getInfoUint(C.CL_DEVICE_NATIVE_VECTOR_WIDTH_INT, true) + return int(val) +} + +func (d *Device) NativeVectorWidthLong() int { + val, _ := d.getInfoUint(C.CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG, true) + return int(val) +} + +func (d *Device) NativeVectorWidthFloat() int { + val, _ := d.getInfoUint(C.CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT, true) + return int(val) +} + +func (d *Device) NativeVectorWidthDouble() int { + val, _ := d.getInfoUint(C.CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE, true) + return int(val) +} + +func (d *Device) NativeVectorWidthHalf() int { + val, _ := d.getInfoUint(C.CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF, true) + return int(val) +} + +// Max height of 2D image in pixels. The minimum value is 8192 +// if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. +func (d *Device) Image2DMaxHeight() int { + val, _ := d.getInfoSize(C.CL_DEVICE_IMAGE2D_MAX_HEIGHT, true) + return int(val) +} + +// Max width of 2D image or 1D image not created from a buffer object in +// pixels. The minimum value is 8192 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. +func (d *Device) Image2DMaxWidth() int { + val, _ := d.getInfoSize(C.CL_DEVICE_IMAGE2D_MAX_WIDTH, true) + return int(val) +} + +// Max depth of 3D image in pixels. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. +func (d *Device) Image3DMaxDepth() int { + val, _ := d.getInfoSize(C.CL_DEVICE_IMAGE3D_MAX_DEPTH, true) + return int(val) +} + +// Max height of 3D image in pixels. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. +func (d *Device) Image3DMaxHeight() int { + val, _ := d.getInfoSize(C.CL_DEVICE_IMAGE3D_MAX_HEIGHT, true) + return int(val) +} + +// Max width of 3D image in pixels. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. +func (d *Device) Image3DMaxWidth() int { + val, _ := d.getInfoSize(C.CL_DEVICE_IMAGE3D_MAX_WIDTH, true) + return int(val) +} + +// Max size in bytes of the arguments that can be passed to a kernel. The +// minimum value is 1024 for devices that are not of type CL_DEVICE_TYPE_CUSTOM. +// For this minimum value, only a maximum of 128 arguments can be passed to a kernel. +func (d *Device) MaxParameterSize() int { + val, _ := d.getInfoSize(C.CL_DEVICE_MAX_PARAMETER_SIZE, true) + return int(val) +} + +// Maximum number of work-items in a work-group executing a kernel on a +// single compute unit, using the data parallel execution model. (Refer +// to clEnqueueNDRangeKernel). The minimum value is 1. +func (d *Device) MaxWorkGroupSize() int { + val, _ := d.getInfoSize(C.CL_DEVICE_MAX_WORK_GROUP_SIZE, true) + return int(val) +} + +// Describes the resolution of device timer. This is measured in nanoseconds. +func (d *Device) ProfilingTimerResolution() int { + val, _ := d.getInfoSize(C.CL_DEVICE_PROFILING_TIMER_RESOLUTION, true) + return int(val) +} + +// Size of local memory arena in bytes. The minimum value is 32 KB for +// devices that are not of type CL_DEVICE_TYPE_CUSTOM. +func (d *Device) LocalMemSize() int64 { + val, _ := d.getInfoUlong(C.CL_DEVICE_LOCAL_MEM_SIZE, true) + return val +} + +// Max size in bytes of a constant buffer allocation. The minimum value is +// 64 KB for devices that are not of type CL_DEVICE_TYPE_CUSTOM. +func (d *Device) MaxConstantBufferSize() int64 { + val, _ := d.getInfoUlong(C.CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE, true) + return val +} + +// Max size of memory object allocation in bytes. The minimum value is max +// (1/4th of CL_DEVICE_GLOBAL_MEM_SIZE, 128*1024*1024) for devices that are +// not of type CL_DEVICE_TYPE_CUSTOM. +func (d *Device) MaxMemAllocSize() int64 { + val, _ := d.getInfoUlong(C.CL_DEVICE_MAX_MEM_ALLOC_SIZE, true) + return val +} + +// Size of global device memory in bytes. +func (d *Device) GlobalMemSize() int64 { + val, _ := d.getInfoUlong(C.CL_DEVICE_GLOBAL_MEM_SIZE, true) + return val +} + +func (d *Device) Available() bool { + val, _ := d.getInfoBool(C.CL_DEVICE_AVAILABLE, true) + return val +} + +func (d *Device) CompilerAvailable() bool { + val, _ := d.getInfoBool(C.CL_DEVICE_COMPILER_AVAILABLE, true) + return val +} + +func (d *Device) EndianLittle() bool { + val, _ := d.getInfoBool(C.CL_DEVICE_ENDIAN_LITTLE, true) + return val +} + +// Is CL_TRUE if the device implements error correction for all +// accesses to compute device memory (global and constant). Is +// CL_FALSE if the device does not implement such error correction. +func (d *Device) ErrorCorrectionSupport() bool { + val, _ := d.getInfoBool(C.CL_DEVICE_ERROR_CORRECTION_SUPPORT, true) + return val +} + +func (d *Device) HostUnifiedMemory() bool { + val, _ := d.getInfoBool(C.CL_DEVICE_HOST_UNIFIED_MEMORY, true) + return val +} + +func (d *Device) ImageSupport() bool { + val, _ := d.getInfoBool(C.CL_DEVICE_IMAGE_SUPPORT, true) + return val +} + +func (d *Device) Type() DeviceType { + var deviceType C.cl_device_type + if err := C.clGetDeviceInfo(d.id, C.CL_DEVICE_TYPE, C.size_t(unsafe.Sizeof(deviceType)), unsafe.Pointer(&deviceType), nil); err != C.CL_SUCCESS { + panic("Failed to get device type") + } + return DeviceType(deviceType) +} + +// Describes double precision floating-point capability of the OpenCL device +func (d *Device) DoubleFPConfig() FPConfig { + var fpConfig C.cl_device_fp_config + if err := C.clGetDeviceInfo(d.id, C.CL_DEVICE_DOUBLE_FP_CONFIG, C.size_t(unsafe.Sizeof(fpConfig)), unsafe.Pointer(&fpConfig), nil); err != C.CL_SUCCESS { + panic("Failed to get double FP config") + } + return FPConfig(fpConfig) +} + +// Describes the OPTIONAL half precision floating-point capability of the OpenCL device +func (d *Device) HalfFPConfig() FPConfig { + var fpConfig C.cl_device_fp_config + err := C.clGetDeviceInfo(d.id, C.CL_DEVICE_HALF_FP_CONFIG, C.size_t(unsafe.Sizeof(fpConfig)), unsafe.Pointer(&fpConfig), nil) + if err != C.CL_SUCCESS { + return FPConfig(0) + } + return FPConfig(fpConfig) +} + +// Type of local memory supported. This can be set to CL_LOCAL implying dedicated +// local memory storage such as SRAM, or CL_GLOBAL. For custom devices, CL_NONE +// can also be returned indicating no local memory support. +func (d *Device) LocalMemType() LocalMemType { + var memType C.cl_device_local_mem_type + if err := C.clGetDeviceInfo(d.id, C.CL_DEVICE_LOCAL_MEM_TYPE, C.size_t(unsafe.Sizeof(memType)), unsafe.Pointer(&memType), nil); err != C.CL_SUCCESS { + return LocalMemType(C.CL_NONE) + } + return LocalMemType(memType) +} + +// Describes the execution capabilities of the device. The mandated minimum capability is CL_EXEC_KERNEL. +func (d *Device) ExecutionCapabilities() ExecCapability { + var execCap C.cl_device_exec_capabilities + if err := C.clGetDeviceInfo(d.id, C.CL_DEVICE_EXECUTION_CAPABILITIES, C.size_t(unsafe.Sizeof(execCap)), unsafe.Pointer(&execCap), nil); err != C.CL_SUCCESS { + panic("Failed to get execution capabilities") + } + return ExecCapability(execCap) +} + +func (d *Device) GlobalMemCacheType() MemCacheType { + var memType C.cl_device_mem_cache_type + if err := C.clGetDeviceInfo(d.id, C.CL_DEVICE_GLOBAL_MEM_CACHE_TYPE, C.size_t(unsafe.Sizeof(memType)), unsafe.Pointer(&memType), nil); err != C.CL_SUCCESS { + return MemCacheType(C.CL_NONE) + } + return MemCacheType(memType) +} + +// Maximum number of work-items that can be specified in each dimension of the work-group to clEnqueueNDRangeKernel. +// +// Returns n size_t entries, where n is the value returned by the query for CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS. +// +// The minimum value is (1, 1, 1) for devices that are not of type CL_DEVICE_TYPE_CUSTOM. +func (d *Device) MaxWorkItemSizes() []int { + dims := d.MaxWorkItemDimensions() + sizes := make([]C.size_t, dims) + if err := C.clGetDeviceInfo(d.id, C.CL_DEVICE_MAX_WORK_ITEM_SIZES, C.size_t(int(unsafe.Sizeof(sizes[0]))*dims), unsafe.Pointer(&sizes[0]), nil); err != C.CL_SUCCESS { + panic("Failed to get max work item sizes") + } + intSizes := make([]int, dims) + for i, s := range sizes { + intSizes[i] = int(s) + } + return intSizes +} diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/device12.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/device12.go new file mode 100644 index 000000000..b4b559a6a --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/device12.go @@ -0,0 +1,51 @@ +// +build cl12 + +package cl + +// #ifdef __APPLE__ +// #include "OpenCL/opencl.h" +// #else +// #include "cl.h" +// #endif +import "C" +import "unsafe" + +const FPConfigCorrectlyRoundedDivideSqrt FPConfig = C.CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT + +func init() { + fpConfigNameMap[FPConfigCorrectlyRoundedDivideSqrt] = "CorrectlyRoundedDivideSqrt" +} + +func (d *Device) BuiltInKernels() string { + str, _ := d.getInfoString(C.CL_DEVICE_BUILT_IN_KERNELS, true) + return str +} + +// Is CL_FALSE if the implementation does not have a linker available. Is CL_TRUE if the linker is available. This can be CL_FALSE for the embedded platform profile only. This must be CL_TRUE if CL_DEVICE_COMPILER_AVAILABLE is CL_TRUE +func (d *Device) LinkerAvailable() bool { + val, _ := d.getInfoBool(C.CL_DEVICE_LINKER_AVAILABLE, true) + return val +} + +func (d *Device) ParentDevice() *Device { + var deviceId C.cl_device_id + if err := C.clGetDeviceInfo(d.id, C.CL_DEVICE_PARENT_DEVICE, C.size_t(unsafe.Sizeof(deviceId)), unsafe.Pointer(&deviceId), nil); err != C.CL_SUCCESS { + panic("ParentDevice failed") + } + if deviceId == nil { + return nil + } + return &Device{id: deviceId} +} + +// Max number of pixels for a 1D image created from a buffer object. The minimum value is 65536 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE. +func (d *Device) ImageMaxBufferSize() int { + val, _ := d.getInfoSize(C.CL_DEVICE_IMAGE_MAX_BUFFER_SIZE, true) + return int(val) +} + +// Max number of images in a 1D or 2D image array. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE +func (d *Device) ImageMaxArraySize() int { + val, _ := d.getInfoSize(C.CL_DEVICE_IMAGE_MAX_ARRAY_SIZE, true) + return int(val) +} diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl.h b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl.h new file mode 100644 index 000000000..c38aa1eda --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl.h @@ -0,0 +1,1210 @@ +/******************************************************************************* + * Copyright (c) 2008 - 2012 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and/or associated documentation files (the + * "Materials"), to deal in the Materials without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Materials, and to + * permit persons to whom the Materials are furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Materials. + * + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + ******************************************************************************/ + +#ifndef __OPENCL_CL_H +#define __OPENCL_CL_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/******************************************************************************/ + +typedef struct _cl_platform_id * cl_platform_id; +typedef struct _cl_device_id * cl_device_id; +typedef struct _cl_context * cl_context; +typedef struct _cl_command_queue * cl_command_queue; +typedef struct _cl_mem * cl_mem; +typedef struct _cl_program * cl_program; +typedef struct _cl_kernel * cl_kernel; +typedef struct _cl_event * cl_event; +typedef struct _cl_sampler * cl_sampler; + +typedef cl_uint cl_bool; /* WARNING! Unlike cl_ types in cl_platform.h, cl_bool is not guaranteed to be the same size as the bool in kernels. */ +typedef cl_ulong cl_bitfield; +typedef cl_bitfield cl_device_type; +typedef cl_uint cl_platform_info; +typedef cl_uint cl_device_info; +typedef cl_bitfield cl_device_fp_config; +typedef cl_uint cl_device_mem_cache_type; +typedef cl_uint cl_device_local_mem_type; +typedef cl_bitfield cl_device_exec_capabilities; +typedef cl_bitfield cl_command_queue_properties; +typedef intptr_t cl_device_partition_property; +typedef cl_bitfield cl_device_affinity_domain; + +typedef intptr_t cl_context_properties; +typedef cl_uint cl_context_info; +typedef cl_uint cl_command_queue_info; +typedef cl_uint cl_channel_order; +typedef cl_uint cl_channel_type; +typedef cl_bitfield cl_mem_flags; +typedef cl_uint cl_mem_object_type; +typedef cl_uint cl_mem_info; +typedef cl_bitfield cl_mem_migration_flags; +typedef cl_uint cl_image_info; +typedef cl_uint cl_buffer_create_type; +typedef cl_uint cl_addressing_mode; +typedef cl_uint cl_filter_mode; +typedef cl_uint cl_sampler_info; +typedef cl_bitfield cl_map_flags; +typedef cl_uint cl_program_info; +typedef cl_uint cl_program_build_info; +typedef cl_uint cl_program_binary_type; +typedef cl_int cl_build_status; +typedef cl_uint cl_kernel_info; +typedef cl_uint cl_kernel_arg_info; +typedef cl_uint cl_kernel_arg_address_qualifier; +typedef cl_uint cl_kernel_arg_access_qualifier; +typedef cl_bitfield cl_kernel_arg_type_qualifier; +typedef cl_uint cl_kernel_work_group_info; +typedef cl_uint cl_event_info; +typedef cl_uint cl_command_type; +typedef cl_uint cl_profiling_info; + + +typedef struct _cl_image_format { + cl_channel_order image_channel_order; + cl_channel_type image_channel_data_type; +} cl_image_format; + +typedef struct _cl_image_desc { + cl_mem_object_type image_type; + size_t image_width; + size_t image_height; + size_t image_depth; + size_t image_array_size; + size_t image_row_pitch; + size_t image_slice_pitch; + cl_uint num_mip_levels; + cl_uint num_samples; + cl_mem buffer; +} cl_image_desc; + +typedef struct _cl_buffer_region { + size_t origin; + size_t size; +} cl_buffer_region; + + +/******************************************************************************/ + +/* Error Codes */ +#define CL_SUCCESS 0 +#define CL_DEVICE_NOT_FOUND -1 +#define CL_DEVICE_NOT_AVAILABLE -2 +#define CL_COMPILER_NOT_AVAILABLE -3 +#define CL_MEM_OBJECT_ALLOCATION_FAILURE -4 +#define CL_OUT_OF_RESOURCES -5 +#define CL_OUT_OF_HOST_MEMORY -6 +#define CL_PROFILING_INFO_NOT_AVAILABLE -7 +#define CL_MEM_COPY_OVERLAP -8 +#define CL_IMAGE_FORMAT_MISMATCH -9 +#define CL_IMAGE_FORMAT_NOT_SUPPORTED -10 +#define CL_BUILD_PROGRAM_FAILURE -11 +#define CL_MAP_FAILURE -12 +#define CL_MISALIGNED_SUB_BUFFER_OFFSET -13 +#define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14 +#define CL_COMPILE_PROGRAM_FAILURE -15 +#define CL_LINKER_NOT_AVAILABLE -16 +#define CL_LINK_PROGRAM_FAILURE -17 +#define CL_DEVICE_PARTITION_FAILED -18 +#define CL_KERNEL_ARG_INFO_NOT_AVAILABLE -19 + +#define CL_INVALID_VALUE -30 +#define CL_INVALID_DEVICE_TYPE -31 +#define CL_INVALID_PLATFORM -32 +#define CL_INVALID_DEVICE -33 +#define CL_INVALID_CONTEXT -34 +#define CL_INVALID_QUEUE_PROPERTIES -35 +#define CL_INVALID_COMMAND_QUEUE -36 +#define CL_INVALID_HOST_PTR -37 +#define CL_INVALID_MEM_OBJECT -38 +#define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39 +#define CL_INVALID_IMAGE_SIZE -40 +#define CL_INVALID_SAMPLER -41 +#define CL_INVALID_BINARY -42 +#define CL_INVALID_BUILD_OPTIONS -43 +#define CL_INVALID_PROGRAM -44 +#define CL_INVALID_PROGRAM_EXECUTABLE -45 +#define CL_INVALID_KERNEL_NAME -46 +#define CL_INVALID_KERNEL_DEFINITION -47 +#define CL_INVALID_KERNEL -48 +#define CL_INVALID_ARG_INDEX -49 +#define CL_INVALID_ARG_VALUE -50 +#define CL_INVALID_ARG_SIZE -51 +#define CL_INVALID_KERNEL_ARGS -52 +#define CL_INVALID_WORK_DIMENSION -53 +#define CL_INVALID_WORK_GROUP_SIZE -54 +#define CL_INVALID_WORK_ITEM_SIZE -55 +#define CL_INVALID_GLOBAL_OFFSET -56 +#define CL_INVALID_EVENT_WAIT_LIST -57 +#define CL_INVALID_EVENT -58 +#define CL_INVALID_OPERATION -59 +#define CL_INVALID_GL_OBJECT -60 +#define CL_INVALID_BUFFER_SIZE -61 +#define CL_INVALID_MIP_LEVEL -62 +#define CL_INVALID_GLOBAL_WORK_SIZE -63 +#define CL_INVALID_PROPERTY -64 +#define CL_INVALID_IMAGE_DESCRIPTOR -65 +#define CL_INVALID_COMPILER_OPTIONS -66 +#define CL_INVALID_LINKER_OPTIONS -67 +#define CL_INVALID_DEVICE_PARTITION_COUNT -68 + +/* OpenCL Version */ +#define CL_VERSION_1_0 1 +#define CL_VERSION_1_1 1 +#define CL_VERSION_1_2 1 + +/* cl_bool */ +#define CL_FALSE 0 +#define CL_TRUE 1 +#define CL_BLOCKING CL_TRUE +#define CL_NON_BLOCKING CL_FALSE + +/* cl_platform_info */ +#define CL_PLATFORM_PROFILE 0x0900 +#define CL_PLATFORM_VERSION 0x0901 +#define CL_PLATFORM_NAME 0x0902 +#define CL_PLATFORM_VENDOR 0x0903 +#define CL_PLATFORM_EXTENSIONS 0x0904 + +/* cl_device_type - bitfield */ +#define CL_DEVICE_TYPE_DEFAULT (1 << 0) +#define CL_DEVICE_TYPE_CPU (1 << 1) +#define CL_DEVICE_TYPE_GPU (1 << 2) +#define CL_DEVICE_TYPE_ACCELERATOR (1 << 3) +#define CL_DEVICE_TYPE_CUSTOM (1 << 4) +#define CL_DEVICE_TYPE_ALL 0xFFFFFFFF + +/* cl_device_info */ +#define CL_DEVICE_TYPE 0x1000 +#define CL_DEVICE_VENDOR_ID 0x1001 +#define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002 +#define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003 +#define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004 +#define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005 +#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006 +#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007 +#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008 +#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009 +#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A +#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B +#define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C +#define CL_DEVICE_ADDRESS_BITS 0x100D +#define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E +#define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F +#define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010 +#define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011 +#define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012 +#define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013 +#define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014 +#define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015 +#define CL_DEVICE_IMAGE_SUPPORT 0x1016 +#define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017 +#define CL_DEVICE_MAX_SAMPLERS 0x1018 +#define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019 +#define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A +#define CL_DEVICE_SINGLE_FP_CONFIG 0x101B +#define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C +#define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D +#define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E +#define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F +#define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020 +#define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021 +#define CL_DEVICE_LOCAL_MEM_TYPE 0x1022 +#define CL_DEVICE_LOCAL_MEM_SIZE 0x1023 +#define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024 +#define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025 +#define CL_DEVICE_ENDIAN_LITTLE 0x1026 +#define CL_DEVICE_AVAILABLE 0x1027 +#define CL_DEVICE_COMPILER_AVAILABLE 0x1028 +#define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029 +#define CL_DEVICE_QUEUE_PROPERTIES 0x102A +#define CL_DEVICE_NAME 0x102B +#define CL_DEVICE_VENDOR 0x102C +#define CL_DRIVER_VERSION 0x102D +#define CL_DEVICE_PROFILE 0x102E +#define CL_DEVICE_VERSION 0x102F +#define CL_DEVICE_EXTENSIONS 0x1030 +#define CL_DEVICE_PLATFORM 0x1031 +#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032 +/* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG */ +#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034 +#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 +#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036 +#define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037 +#define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038 +#define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039 +#define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A +#define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B +#define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C +#define CL_DEVICE_OPENCL_C_VERSION 0x103D +#define CL_DEVICE_LINKER_AVAILABLE 0x103E +#define CL_DEVICE_BUILT_IN_KERNELS 0x103F +#define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE 0x1040 +#define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE 0x1041 +#define CL_DEVICE_PARENT_DEVICE 0x1042 +#define CL_DEVICE_PARTITION_MAX_SUB_DEVICES 0x1043 +#define CL_DEVICE_PARTITION_PROPERTIES 0x1044 +#define CL_DEVICE_PARTITION_AFFINITY_DOMAIN 0x1045 +#define CL_DEVICE_PARTITION_TYPE 0x1046 +#define CL_DEVICE_REFERENCE_COUNT 0x1047 +#define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC 0x1048 +#define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049 +#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A +#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B + +/* cl_device_fp_config - bitfield */ +#define CL_FP_DENORM (1 << 0) +#define CL_FP_INF_NAN (1 << 1) +#define CL_FP_ROUND_TO_NEAREST (1 << 2) +#define CL_FP_ROUND_TO_ZERO (1 << 3) +#define CL_FP_ROUND_TO_INF (1 << 4) +#define CL_FP_FMA (1 << 5) +#define CL_FP_SOFT_FLOAT (1 << 6) +#define CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT (1 << 7) + +/* cl_device_mem_cache_type */ +#define CL_NONE 0x0 +#define CL_READ_ONLY_CACHE 0x1 +#define CL_READ_WRITE_CACHE 0x2 + +/* cl_device_local_mem_type */ +#define CL_LOCAL 0x1 +#define CL_GLOBAL 0x2 + +/* cl_device_exec_capabilities - bitfield */ +#define CL_EXEC_KERNEL (1 << 0) +#define CL_EXEC_NATIVE_KERNEL (1 << 1) + +/* cl_command_queue_properties - bitfield */ +#define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0) +#define CL_QUEUE_PROFILING_ENABLE (1 << 1) + +/* cl_context_info */ +#define CL_CONTEXT_REFERENCE_COUNT 0x1080 +#define CL_CONTEXT_DEVICES 0x1081 +#define CL_CONTEXT_PROPERTIES 0x1082 +#define CL_CONTEXT_NUM_DEVICES 0x1083 + +/* cl_context_properties */ +#define CL_CONTEXT_PLATFORM 0x1084 +#define CL_CONTEXT_INTEROP_USER_SYNC 0x1085 + +/* cl_device_partition_property */ +#define CL_DEVICE_PARTITION_EQUALLY 0x1086 +#define CL_DEVICE_PARTITION_BY_COUNTS 0x1087 +#define CL_DEVICE_PARTITION_BY_COUNTS_LIST_END 0x0 +#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN 0x1088 + +/* cl_device_affinity_domain */ +#define CL_DEVICE_AFFINITY_DOMAIN_NUMA (1 << 0) +#define CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE (1 << 1) +#define CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE (1 << 2) +#define CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE (1 << 3) +#define CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE (1 << 4) +#define CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE (1 << 5) + +/* cl_command_queue_info */ +#define CL_QUEUE_CONTEXT 0x1090 +#define CL_QUEUE_DEVICE 0x1091 +#define CL_QUEUE_REFERENCE_COUNT 0x1092 +#define CL_QUEUE_PROPERTIES 0x1093 + +/* cl_mem_flags - bitfield */ +#define CL_MEM_READ_WRITE (1 << 0) +#define CL_MEM_WRITE_ONLY (1 << 1) +#define CL_MEM_READ_ONLY (1 << 2) +#define CL_MEM_USE_HOST_PTR (1 << 3) +#define CL_MEM_ALLOC_HOST_PTR (1 << 4) +#define CL_MEM_COPY_HOST_PTR (1 << 5) +/* reserved (1 << 6) */ +#define CL_MEM_HOST_WRITE_ONLY (1 << 7) +#define CL_MEM_HOST_READ_ONLY (1 << 8) +#define CL_MEM_HOST_NO_ACCESS (1 << 9) + +/* cl_mem_migration_flags - bitfield */ +#define CL_MIGRATE_MEM_OBJECT_HOST (1 << 0) +#define CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED (1 << 1) + +/* cl_channel_order */ +#define CL_R 0x10B0 +#define CL_A 0x10B1 +#define CL_RG 0x10B2 +#define CL_RA 0x10B3 +#define CL_RGB 0x10B4 +#define CL_RGBA 0x10B5 +#define CL_BGRA 0x10B6 +#define CL_ARGB 0x10B7 +#define CL_INTENSITY 0x10B8 +#define CL_LUMINANCE 0x10B9 +#define CL_Rx 0x10BA +#define CL_RGx 0x10BB +#define CL_RGBx 0x10BC +#define CL_DEPTH 0x10BD +#define CL_DEPTH_STENCIL 0x10BE + +/* cl_channel_type */ +#define CL_SNORM_INT8 0x10D0 +#define CL_SNORM_INT16 0x10D1 +#define CL_UNORM_INT8 0x10D2 +#define CL_UNORM_INT16 0x10D3 +#define CL_UNORM_SHORT_565 0x10D4 +#define CL_UNORM_SHORT_555 0x10D5 +#define CL_UNORM_INT_101010 0x10D6 +#define CL_SIGNED_INT8 0x10D7 +#define CL_SIGNED_INT16 0x10D8 +#define CL_SIGNED_INT32 0x10D9 +#define CL_UNSIGNED_INT8 0x10DA +#define CL_UNSIGNED_INT16 0x10DB +#define CL_UNSIGNED_INT32 0x10DC +#define CL_HALF_FLOAT 0x10DD +#define CL_FLOAT 0x10DE +#define CL_UNORM_INT24 0x10DF + +/* cl_mem_object_type */ +#define CL_MEM_OBJECT_BUFFER 0x10F0 +#define CL_MEM_OBJECT_IMAGE2D 0x10F1 +#define CL_MEM_OBJECT_IMAGE3D 0x10F2 +#define CL_MEM_OBJECT_IMAGE2D_ARRAY 0x10F3 +#define CL_MEM_OBJECT_IMAGE1D 0x10F4 +#define CL_MEM_OBJECT_IMAGE1D_ARRAY 0x10F5 +#define CL_MEM_OBJECT_IMAGE1D_BUFFER 0x10F6 + +/* cl_mem_info */ +#define CL_MEM_TYPE 0x1100 +#define CL_MEM_FLAGS 0x1101 +#define CL_MEM_SIZE 0x1102 +#define CL_MEM_HOST_PTR 0x1103 +#define CL_MEM_MAP_COUNT 0x1104 +#define CL_MEM_REFERENCE_COUNT 0x1105 +#define CL_MEM_CONTEXT 0x1106 +#define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107 +#define CL_MEM_OFFSET 0x1108 + +/* cl_image_info */ +#define CL_IMAGE_FORMAT 0x1110 +#define CL_IMAGE_ELEMENT_SIZE 0x1111 +#define CL_IMAGE_ROW_PITCH 0x1112 +#define CL_IMAGE_SLICE_PITCH 0x1113 +#define CL_IMAGE_WIDTH 0x1114 +#define CL_IMAGE_HEIGHT 0x1115 +#define CL_IMAGE_DEPTH 0x1116 +#define CL_IMAGE_ARRAY_SIZE 0x1117 +#define CL_IMAGE_BUFFER 0x1118 +#define CL_IMAGE_NUM_MIP_LEVELS 0x1119 +#define CL_IMAGE_NUM_SAMPLES 0x111A + +/* cl_addressing_mode */ +#define CL_ADDRESS_NONE 0x1130 +#define CL_ADDRESS_CLAMP_TO_EDGE 0x1131 +#define CL_ADDRESS_CLAMP 0x1132 +#define CL_ADDRESS_REPEAT 0x1133 +#define CL_ADDRESS_MIRRORED_REPEAT 0x1134 + +/* cl_filter_mode */ +#define CL_FILTER_NEAREST 0x1140 +#define CL_FILTER_LINEAR 0x1141 + +/* cl_sampler_info */ +#define CL_SAMPLER_REFERENCE_COUNT 0x1150 +#define CL_SAMPLER_CONTEXT 0x1151 +#define CL_SAMPLER_NORMALIZED_COORDS 0x1152 +#define CL_SAMPLER_ADDRESSING_MODE 0x1153 +#define CL_SAMPLER_FILTER_MODE 0x1154 + +/* cl_map_flags - bitfield */ +#define CL_MAP_READ (1 << 0) +#define CL_MAP_WRITE (1 << 1) +#define CL_MAP_WRITE_INVALIDATE_REGION (1 << 2) + +/* cl_program_info */ +#define CL_PROGRAM_REFERENCE_COUNT 0x1160 +#define CL_PROGRAM_CONTEXT 0x1161 +#define CL_PROGRAM_NUM_DEVICES 0x1162 +#define CL_PROGRAM_DEVICES 0x1163 +#define CL_PROGRAM_SOURCE 0x1164 +#define CL_PROGRAM_BINARY_SIZES 0x1165 +#define CL_PROGRAM_BINARIES 0x1166 +#define CL_PROGRAM_NUM_KERNELS 0x1167 +#define CL_PROGRAM_KERNEL_NAMES 0x1168 + +/* cl_program_build_info */ +#define CL_PROGRAM_BUILD_STATUS 0x1181 +#define CL_PROGRAM_BUILD_OPTIONS 0x1182 +#define CL_PROGRAM_BUILD_LOG 0x1183 +#define CL_PROGRAM_BINARY_TYPE 0x1184 + +/* cl_program_binary_type */ +#define CL_PROGRAM_BINARY_TYPE_NONE 0x0 +#define CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT 0x1 +#define CL_PROGRAM_BINARY_TYPE_LIBRARY 0x2 +#define CL_PROGRAM_BINARY_TYPE_EXECUTABLE 0x4 + +/* cl_build_status */ +#define CL_BUILD_SUCCESS 0 +#define CL_BUILD_NONE -1 +#define CL_BUILD_ERROR -2 +#define CL_BUILD_IN_PROGRESS -3 + +/* cl_kernel_info */ +#define CL_KERNEL_FUNCTION_NAME 0x1190 +#define CL_KERNEL_NUM_ARGS 0x1191 +#define CL_KERNEL_REFERENCE_COUNT 0x1192 +#define CL_KERNEL_CONTEXT 0x1193 +#define CL_KERNEL_PROGRAM 0x1194 +#define CL_KERNEL_ATTRIBUTES 0x1195 + +/* cl_kernel_arg_info */ +#define CL_KERNEL_ARG_ADDRESS_QUALIFIER 0x1196 +#define CL_KERNEL_ARG_ACCESS_QUALIFIER 0x1197 +#define CL_KERNEL_ARG_TYPE_NAME 0x1198 +#define CL_KERNEL_ARG_TYPE_QUALIFIER 0x1199 +#define CL_KERNEL_ARG_NAME 0x119A + +/* cl_kernel_arg_address_qualifier */ +#define CL_KERNEL_ARG_ADDRESS_GLOBAL 0x119B +#define CL_KERNEL_ARG_ADDRESS_LOCAL 0x119C +#define CL_KERNEL_ARG_ADDRESS_CONSTANT 0x119D +#define CL_KERNEL_ARG_ADDRESS_PRIVATE 0x119E + +/* cl_kernel_arg_access_qualifier */ +#define CL_KERNEL_ARG_ACCESS_READ_ONLY 0x11A0 +#define CL_KERNEL_ARG_ACCESS_WRITE_ONLY 0x11A1 +#define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2 +#define CL_KERNEL_ARG_ACCESS_NONE 0x11A3 + +/* cl_kernel_arg_type_qualifer */ +#define CL_KERNEL_ARG_TYPE_NONE 0 +#define CL_KERNEL_ARG_TYPE_CONST (1 << 0) +#define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1) +#define CL_KERNEL_ARG_TYPE_VOLATILE (1 << 2) + +/* cl_kernel_work_group_info */ +#define CL_KERNEL_WORK_GROUP_SIZE 0x11B0 +#define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1 +#define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2 +#define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3 +#define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4 +#define CL_KERNEL_GLOBAL_WORK_SIZE 0x11B5 + +/* cl_event_info */ +#define CL_EVENT_COMMAND_QUEUE 0x11D0 +#define CL_EVENT_COMMAND_TYPE 0x11D1 +#define CL_EVENT_REFERENCE_COUNT 0x11D2 +#define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3 +#define CL_EVENT_CONTEXT 0x11D4 + +/* cl_command_type */ +#define CL_COMMAND_NDRANGE_KERNEL 0x11F0 +#define CL_COMMAND_TASK 0x11F1 +#define CL_COMMAND_NATIVE_KERNEL 0x11F2 +#define CL_COMMAND_READ_BUFFER 0x11F3 +#define CL_COMMAND_WRITE_BUFFER 0x11F4 +#define CL_COMMAND_COPY_BUFFER 0x11F5 +#define CL_COMMAND_READ_IMAGE 0x11F6 +#define CL_COMMAND_WRITE_IMAGE 0x11F7 +#define CL_COMMAND_COPY_IMAGE 0x11F8 +#define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9 +#define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA +#define CL_COMMAND_MAP_BUFFER 0x11FB +#define CL_COMMAND_MAP_IMAGE 0x11FC +#define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD +#define CL_COMMAND_MARKER 0x11FE +#define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF +#define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200 +#define CL_COMMAND_READ_BUFFER_RECT 0x1201 +#define CL_COMMAND_WRITE_BUFFER_RECT 0x1202 +#define CL_COMMAND_COPY_BUFFER_RECT 0x1203 +#define CL_COMMAND_USER 0x1204 +#define CL_COMMAND_BARRIER 0x1205 +#define CL_COMMAND_MIGRATE_MEM_OBJECTS 0x1206 +#define CL_COMMAND_FILL_BUFFER 0x1207 +#define CL_COMMAND_FILL_IMAGE 0x1208 + +/* command execution status */ +#define CL_COMPLETE 0x0 +#define CL_RUNNING 0x1 +#define CL_SUBMITTED 0x2 +#define CL_QUEUED 0x3 + +/* cl_buffer_create_type */ +#define CL_BUFFER_CREATE_TYPE_REGION 0x1220 + +/* cl_profiling_info */ +#define CL_PROFILING_COMMAND_QUEUED 0x1280 +#define CL_PROFILING_COMMAND_SUBMIT 0x1281 +#define CL_PROFILING_COMMAND_START 0x1282 +#define CL_PROFILING_COMMAND_END 0x1283 + +/********************************************************************************************************/ + +/* Platform API */ +extern CL_API_ENTRY cl_int CL_API_CALL +clGetPlatformIDs(cl_uint /* num_entries */, + cl_platform_id * /* platforms */, + cl_uint * /* num_platforms */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetPlatformInfo(cl_platform_id /* platform */, + cl_platform_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +/* Device APIs */ +extern CL_API_ENTRY cl_int CL_API_CALL +clGetDeviceIDs(cl_platform_id /* platform */, + cl_device_type /* device_type */, + cl_uint /* num_entries */, + cl_device_id * /* devices */, + cl_uint * /* num_devices */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetDeviceInfo(cl_device_id /* device */, + cl_device_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clCreateSubDevices(cl_device_id /* in_device */, + const cl_device_partition_property * /* properties */, + cl_uint /* num_devices */, + cl_device_id * /* out_devices */, + cl_uint * /* num_devices_ret */) CL_API_SUFFIX__VERSION_1_2; + +extern CL_API_ENTRY cl_int CL_API_CALL +clRetainDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2; + +extern CL_API_ENTRY cl_int CL_API_CALL +clReleaseDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2; + +/* Context APIs */ +extern CL_API_ENTRY cl_context CL_API_CALL +clCreateContext(const cl_context_properties * /* properties */, + cl_uint /* num_devices */, + const cl_device_id * /* devices */, + void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *), + void * /* user_data */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_context CL_API_CALL +clCreateContextFromType(const cl_context_properties * /* properties */, + cl_device_type /* device_type */, + void (CL_CALLBACK * /* pfn_notify*/ )(const char *, const void *, size_t, void *), + void * /* user_data */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clRetainContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clReleaseContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetContextInfo(cl_context /* context */, + cl_context_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +/* Command Queue APIs */ +extern CL_API_ENTRY cl_command_queue CL_API_CALL +clCreateCommandQueue(cl_context /* context */, + cl_device_id /* device */, + cl_command_queue_properties /* properties */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clRetainCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clReleaseCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetCommandQueueInfo(cl_command_queue /* command_queue */, + cl_command_queue_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +/* Memory Object APIs */ +extern CL_API_ENTRY cl_mem CL_API_CALL +clCreateBuffer(cl_context /* context */, + cl_mem_flags /* flags */, + size_t /* size */, + void * /* host_ptr */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_mem CL_API_CALL +clCreateSubBuffer(cl_mem /* buffer */, + cl_mem_flags /* flags */, + cl_buffer_create_type /* buffer_create_type */, + const void * /* buffer_create_info */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1; + +extern CL_API_ENTRY cl_mem CL_API_CALL +clCreateImage(cl_context /* context */, + cl_mem_flags /* flags */, + const cl_image_format * /* image_format */, + const cl_image_desc * /* image_desc */, + void * /* host_ptr */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2; + +extern CL_API_ENTRY cl_int CL_API_CALL +clRetainMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clReleaseMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetSupportedImageFormats(cl_context /* context */, + cl_mem_flags /* flags */, + cl_mem_object_type /* image_type */, + cl_uint /* num_entries */, + cl_image_format * /* image_formats */, + cl_uint * /* num_image_formats */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetMemObjectInfo(cl_mem /* memobj */, + cl_mem_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetImageInfo(cl_mem /* image */, + cl_image_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clSetMemObjectDestructorCallback( cl_mem /* memobj */, + void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/), + void * /*user_data */ ) CL_API_SUFFIX__VERSION_1_1; + +/* Sampler APIs */ +extern CL_API_ENTRY cl_sampler CL_API_CALL +clCreateSampler(cl_context /* context */, + cl_bool /* normalized_coords */, + cl_addressing_mode /* addressing_mode */, + cl_filter_mode /* filter_mode */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clRetainSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clReleaseSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetSamplerInfo(cl_sampler /* sampler */, + cl_sampler_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +/* Program Object APIs */ +extern CL_API_ENTRY cl_program CL_API_CALL +clCreateProgramWithSource(cl_context /* context */, + cl_uint /* count */, + const char ** /* strings */, + const size_t * /* lengths */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_program CL_API_CALL +clCreateProgramWithBinary(cl_context /* context */, + cl_uint /* num_devices */, + const cl_device_id * /* device_list */, + const size_t * /* lengths */, + const unsigned char ** /* binaries */, + cl_int * /* binary_status */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_program CL_API_CALL +clCreateProgramWithBuiltInKernels(cl_context /* context */, + cl_uint /* num_devices */, + const cl_device_id * /* device_list */, + const char * /* kernel_names */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2; + +extern CL_API_ENTRY cl_int CL_API_CALL +clRetainProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clReleaseProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clBuildProgram(cl_program /* program */, + cl_uint /* num_devices */, + const cl_device_id * /* device_list */, + const char * /* options */, + void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */), + void * /* user_data */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clCompileProgram(cl_program /* program */, + cl_uint /* num_devices */, + const cl_device_id * /* device_list */, + const char * /* options */, + cl_uint /* num_input_headers */, + const cl_program * /* input_headers */, + const char ** /* header_include_names */, + void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */), + void * /* user_data */) CL_API_SUFFIX__VERSION_1_2; + +extern CL_API_ENTRY cl_program CL_API_CALL +clLinkProgram(cl_context /* context */, + cl_uint /* num_devices */, + const cl_device_id * /* device_list */, + const char * /* options */, + cl_uint /* num_input_programs */, + const cl_program * /* input_programs */, + void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */), + void * /* user_data */, + cl_int * /* errcode_ret */ ) CL_API_SUFFIX__VERSION_1_2; + + +extern CL_API_ENTRY cl_int CL_API_CALL +clUnloadPlatformCompiler(cl_platform_id /* platform */) CL_API_SUFFIX__VERSION_1_2; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetProgramInfo(cl_program /* program */, + cl_program_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetProgramBuildInfo(cl_program /* program */, + cl_device_id /* device */, + cl_program_build_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +/* Kernel Object APIs */ +extern CL_API_ENTRY cl_kernel CL_API_CALL +clCreateKernel(cl_program /* program */, + const char * /* kernel_name */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clCreateKernelsInProgram(cl_program /* program */, + cl_uint /* num_kernels */, + cl_kernel * /* kernels */, + cl_uint * /* num_kernels_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clRetainKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clReleaseKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clSetKernelArg(cl_kernel /* kernel */, + cl_uint /* arg_index */, + size_t /* arg_size */, + const void * /* arg_value */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetKernelInfo(cl_kernel /* kernel */, + cl_kernel_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetKernelArgInfo(cl_kernel /* kernel */, + cl_uint /* arg_indx */, + cl_kernel_arg_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_2; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetKernelWorkGroupInfo(cl_kernel /* kernel */, + cl_device_id /* device */, + cl_kernel_work_group_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +/* Event Object APIs */ +extern CL_API_ENTRY cl_int CL_API_CALL +clWaitForEvents(cl_uint /* num_events */, + const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetEventInfo(cl_event /* event */, + cl_event_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_event CL_API_CALL +clCreateUserEvent(cl_context /* context */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1; + +extern CL_API_ENTRY cl_int CL_API_CALL +clRetainEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clReleaseEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clSetUserEventStatus(cl_event /* event */, + cl_int /* execution_status */) CL_API_SUFFIX__VERSION_1_1; + +extern CL_API_ENTRY cl_int CL_API_CALL +clSetEventCallback( cl_event /* event */, + cl_int /* command_exec_callback_type */, + void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *), + void * /* user_data */) CL_API_SUFFIX__VERSION_1_1; + +/* Profiling APIs */ +extern CL_API_ENTRY cl_int CL_API_CALL +clGetEventProfilingInfo(cl_event /* event */, + cl_profiling_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +/* Flush and Finish APIs */ +extern CL_API_ENTRY cl_int CL_API_CALL +clFlush(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clFinish(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; + +/* Enqueued Commands APIs */ +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueReadBuffer(cl_command_queue /* command_queue */, + cl_mem /* buffer */, + cl_bool /* blocking_read */, + size_t /* offset */, + size_t /* size */, + void * /* ptr */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueReadBufferRect(cl_command_queue /* command_queue */, + cl_mem /* buffer */, + cl_bool /* blocking_read */, + const size_t * /* buffer_offset */, + const size_t * /* host_offset */, + const size_t * /* region */, + size_t /* buffer_row_pitch */, + size_t /* buffer_slice_pitch */, + size_t /* host_row_pitch */, + size_t /* host_slice_pitch */, + void * /* ptr */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueWriteBuffer(cl_command_queue /* command_queue */, + cl_mem /* buffer */, + cl_bool /* blocking_write */, + size_t /* offset */, + size_t /* size */, + const void * /* ptr */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueWriteBufferRect(cl_command_queue /* command_queue */, + cl_mem /* buffer */, + cl_bool /* blocking_write */, + const size_t * /* buffer_offset */, + const size_t * /* host_offset */, + const size_t * /* region */, + size_t /* buffer_row_pitch */, + size_t /* buffer_slice_pitch */, + size_t /* host_row_pitch */, + size_t /* host_slice_pitch */, + const void * /* ptr */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueFillBuffer(cl_command_queue /* command_queue */, + cl_mem /* buffer */, + const void * /* pattern */, + size_t /* pattern_size */, + size_t /* offset */, + size_t /* size */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueCopyBuffer(cl_command_queue /* command_queue */, + cl_mem /* src_buffer */, + cl_mem /* dst_buffer */, + size_t /* src_offset */, + size_t /* dst_offset */, + size_t /* size */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueCopyBufferRect(cl_command_queue /* command_queue */, + cl_mem /* src_buffer */, + cl_mem /* dst_buffer */, + const size_t * /* src_origin */, + const size_t * /* dst_origin */, + const size_t * /* region */, + size_t /* src_row_pitch */, + size_t /* src_slice_pitch */, + size_t /* dst_row_pitch */, + size_t /* dst_slice_pitch */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueReadImage(cl_command_queue /* command_queue */, + cl_mem /* image */, + cl_bool /* blocking_read */, + const size_t * /* origin[3] */, + const size_t * /* region[3] */, + size_t /* row_pitch */, + size_t /* slice_pitch */, + void * /* ptr */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueWriteImage(cl_command_queue /* command_queue */, + cl_mem /* image */, + cl_bool /* blocking_write */, + const size_t * /* origin[3] */, + const size_t * /* region[3] */, + size_t /* input_row_pitch */, + size_t /* input_slice_pitch */, + const void * /* ptr */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueFillImage(cl_command_queue /* command_queue */, + cl_mem /* image */, + const void * /* fill_color */, + const size_t * /* origin[3] */, + const size_t * /* region[3] */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueCopyImage(cl_command_queue /* command_queue */, + cl_mem /* src_image */, + cl_mem /* dst_image */, + const size_t * /* src_origin[3] */, + const size_t * /* dst_origin[3] */, + const size_t * /* region[3] */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueCopyImageToBuffer(cl_command_queue /* command_queue */, + cl_mem /* src_image */, + cl_mem /* dst_buffer */, + const size_t * /* src_origin[3] */, + const size_t * /* region[3] */, + size_t /* dst_offset */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueCopyBufferToImage(cl_command_queue /* command_queue */, + cl_mem /* src_buffer */, + cl_mem /* dst_image */, + size_t /* src_offset */, + const size_t * /* dst_origin[3] */, + const size_t * /* region[3] */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY void * CL_API_CALL +clEnqueueMapBuffer(cl_command_queue /* command_queue */, + cl_mem /* buffer */, + cl_bool /* blocking_map */, + cl_map_flags /* map_flags */, + size_t /* offset */, + size_t /* size */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY void * CL_API_CALL +clEnqueueMapImage(cl_command_queue /* command_queue */, + cl_mem /* image */, + cl_bool /* blocking_map */, + cl_map_flags /* map_flags */, + const size_t * /* origin[3] */, + const size_t * /* region[3] */, + size_t * /* image_row_pitch */, + size_t * /* image_slice_pitch */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueUnmapMemObject(cl_command_queue /* command_queue */, + cl_mem /* memobj */, + void * /* mapped_ptr */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueMigrateMemObjects(cl_command_queue /* command_queue */, + cl_uint /* num_mem_objects */, + const cl_mem * /* mem_objects */, + cl_mem_migration_flags /* flags */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueNDRangeKernel(cl_command_queue /* command_queue */, + cl_kernel /* kernel */, + cl_uint /* work_dim */, + const size_t * /* global_work_offset */, + const size_t * /* global_work_size */, + const size_t * /* local_work_size */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueTask(cl_command_queue /* command_queue */, + cl_kernel /* kernel */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueNativeKernel(cl_command_queue /* command_queue */, + void (CL_CALLBACK * /*user_func*/)(void *), + void * /* args */, + size_t /* cb_args */, + cl_uint /* num_mem_objects */, + const cl_mem * /* mem_list */, + const void ** /* args_mem_loc */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueMarkerWithWaitList(cl_command_queue /* command_queue */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueBarrierWithWaitList(cl_command_queue /* command_queue */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; + + +/* Extension function access + * + * Returns the extension function address for the given function name, + * or NULL if a valid function can not be found. The client must + * check to make sure the address is not NULL, before using or + * calling the returned function address. + */ +extern CL_API_ENTRY void * CL_API_CALL +clGetExtensionFunctionAddressForPlatform(cl_platform_id /* platform */, + const char * /* func_name */) CL_API_SUFFIX__VERSION_1_2; + + +/* Deprecated OpenCL 1.1 APIs */ +extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL +clCreateImage2D(cl_context /* context */, + cl_mem_flags /* flags */, + const cl_image_format * /* image_format */, + size_t /* image_width */, + size_t /* image_height */, + size_t /* image_row_pitch */, + void * /* host_ptr */, + cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; + +extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL +clCreateImage3D(cl_context /* context */, + cl_mem_flags /* flags */, + const cl_image_format * /* image_format */, + size_t /* image_width */, + size_t /* image_height */, + size_t /* image_depth */, + size_t /* image_row_pitch */, + size_t /* image_slice_pitch */, + void * /* host_ptr */, + cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; + +extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL +clEnqueueMarker(cl_command_queue /* command_queue */, + cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; + +extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL +clEnqueueWaitForEvents(cl_command_queue /* command_queue */, + cl_uint /* num_events */, + const cl_event * /* event_list */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; + +extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL +clEnqueueBarrier(cl_command_queue /* command_queue */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; + +extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL +clUnloadCompiler(void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; + +extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED void * CL_API_CALL +clGetExtensionFunctionAddress(const char * /* func_name */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; + +#ifdef __cplusplus +} +#endif + +#endif /* __OPENCL_CL_H */ + diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_ext.h b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_ext.h new file mode 100644 index 000000000..a998c9c51 --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_ext.h @@ -0,0 +1,315 @@ +/******************************************************************************* + * Copyright (c) 2008-2013 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and/or associated documentation files (the + * "Materials"), to deal in the Materials without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Materials, and to + * permit persons to whom the Materials are furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Materials. + * + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + ******************************************************************************/ + +/* $Revision: 11928 $ on $Date: 2010-07-13 09:04:56 -0700 (Tue, 13 Jul 2010) $ */ + +/* cl_ext.h contains OpenCL extensions which don't have external */ +/* (OpenGL, D3D) dependencies. */ + +#ifndef __CL_EXT_H +#define __CL_EXT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __APPLE__ +#include +#endif + +#include + +/* cl_khr_fp16 extension - no extension #define since it has no functions */ +#define CL_DEVICE_HALF_FP_CONFIG 0x1033 + +/* Memory object destruction + * + * Apple extension for use to manage externally allocated buffers used with cl_mem objects with CL_MEM_USE_HOST_PTR + * + * Registers a user callback function that will be called when the memory object is deleted and its resources + * freed. Each call to clSetMemObjectCallbackFn registers the specified user callback function on a callback + * stack associated with memobj. The registered user callback functions are called in the reverse order in + * which they were registered. The user callback functions are called and then the memory object is deleted + * and its resources freed. This provides a mechanism for the application (and libraries) using memobj to be + * notified when the memory referenced by host_ptr, specified when the memory object is created and used as + * the storage bits for the memory object, can be reused or freed. + * + * The application may not call CL api's with the cl_mem object passed to the pfn_notify. + * + * Please check for the "cl_APPLE_SetMemObjectDestructor" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS) + * before using. + */ +#define cl_APPLE_SetMemObjectDestructor 1 +cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE( cl_mem /* memobj */, + void (* /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/), + void * /*user_data */ ) CL_EXT_SUFFIX__VERSION_1_0; + + +/* Context Logging Functions + * + * The next three convenience functions are intended to be used as the pfn_notify parameter to clCreateContext(). + * Please check for the "cl_APPLE_ContextLoggingFunctions" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS) + * before using. + * + * clLogMessagesToSystemLog fowards on all log messages to the Apple System Logger + */ +#define cl_APPLE_ContextLoggingFunctions 1 +extern void CL_API_ENTRY clLogMessagesToSystemLogAPPLE( const char * /* errstr */, + const void * /* private_info */, + size_t /* cb */, + void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0; + +/* clLogMessagesToStdout sends all log messages to the file descriptor stdout */ +extern void CL_API_ENTRY clLogMessagesToStdoutAPPLE( const char * /* errstr */, + const void * /* private_info */, + size_t /* cb */, + void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0; + +/* clLogMessagesToStderr sends all log messages to the file descriptor stderr */ +extern void CL_API_ENTRY clLogMessagesToStderrAPPLE( const char * /* errstr */, + const void * /* private_info */, + size_t /* cb */, + void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0; + + +/************************ +* cl_khr_icd extension * +************************/ +#define cl_khr_icd 1 + +/* cl_platform_info */ +#define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920 + +/* Additional Error Codes */ +#define CL_PLATFORM_NOT_FOUND_KHR -1001 + +extern CL_API_ENTRY cl_int CL_API_CALL +clIcdGetPlatformIDsKHR(cl_uint /* num_entries */, + cl_platform_id * /* platforms */, + cl_uint * /* num_platforms */); + +typedef CL_API_ENTRY cl_int (CL_API_CALL *clIcdGetPlatformIDsKHR_fn)( + cl_uint /* num_entries */, + cl_platform_id * /* platforms */, + cl_uint * /* num_platforms */); + + +/* Extension: cl_khr_image2D_buffer + * + * This extension allows a 2D image to be created from a cl_mem buffer without a copy. + * The type associated with a 2D image created from a buffer in an OpenCL program is image2d_t. + * Both the sampler and sampler-less read_image built-in functions are supported for 2D images + * and 2D images created from a buffer. Similarly, the write_image built-ins are also supported + * for 2D images created from a buffer. + * + * When the 2D image from buffer is created, the client must specify the width, + * height, image format (i.e. channel order and channel data type) and optionally the row pitch + * + * The pitch specified must be a multiple of CL_DEVICE_IMAGE_PITCH_ALIGNMENT pixels. + * The base address of the buffer must be aligned to CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT pixels. + */ + +/************************************* + * cl_khr_initalize_memory extension * + *************************************/ + +#define CL_CONTEXT_MEMORY_INITIALIZE_KHR 0x200E + + +/************************************** + * cl_khr_terminate_context extension * + **************************************/ + +#define CL_DEVICE_TERMINATE_CAPABILITY_KHR 0x200F +#define CL_CONTEXT_TERMINATE_KHR 0x2010 + +#define cl_khr_terminate_context 1 +extern CL_API_ENTRY cl_int CL_API_CALL clTerminateContextKHR(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2; + +typedef CL_API_ENTRY cl_int (CL_API_CALL *clTerminateContextKHR_fn)(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2; + + +/* + * Extension: cl_khr_spir + * + * This extension adds support to create an OpenCL program object from a + * Standard Portable Intermediate Representation (SPIR) instance + */ + +#define CL_DEVICE_SPIR_VERSIONS 0x40E0 +#define CL_PROGRAM_BINARY_TYPE_INTERMEDIATE 0x40E1 + + +/****************************************** +* cl_nv_device_attribute_query extension * +******************************************/ +/* cl_nv_device_attribute_query extension - no extension #define since it has no functions */ +#define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000 +#define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV 0x4001 +#define CL_DEVICE_REGISTERS_PER_BLOCK_NV 0x4002 +#define CL_DEVICE_WARP_SIZE_NV 0x4003 +#define CL_DEVICE_GPU_OVERLAP_NV 0x4004 +#define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV 0x4005 +#define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006 + +/********************************* +* cl_amd_device_attribute_query * +*********************************/ +#define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 0x4036 + +/********************************* +* cl_arm_printf extension +*********************************/ +#define CL_PRINTF_CALLBACK_ARM 0x40B0 +#define CL_PRINTF_BUFFERSIZE_ARM 0x40B1 + +#ifdef CL_VERSION_1_1 + /*********************************** + * cl_ext_device_fission extension * + ***********************************/ + #define cl_ext_device_fission 1 + + extern CL_API_ENTRY cl_int CL_API_CALL + clReleaseDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1; + + typedef CL_API_ENTRY cl_int + (CL_API_CALL *clReleaseDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1; + + extern CL_API_ENTRY cl_int CL_API_CALL + clRetainDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1; + + typedef CL_API_ENTRY cl_int + (CL_API_CALL *clRetainDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1; + + typedef cl_ulong cl_device_partition_property_ext; + extern CL_API_ENTRY cl_int CL_API_CALL + clCreateSubDevicesEXT( cl_device_id /*in_device*/, + const cl_device_partition_property_ext * /* properties */, + cl_uint /*num_entries*/, + cl_device_id * /*out_devices*/, + cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1; + + typedef CL_API_ENTRY cl_int + ( CL_API_CALL * clCreateSubDevicesEXT_fn)( cl_device_id /*in_device*/, + const cl_device_partition_property_ext * /* properties */, + cl_uint /*num_entries*/, + cl_device_id * /*out_devices*/, + cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1; + + /* cl_device_partition_property_ext */ + #define CL_DEVICE_PARTITION_EQUALLY_EXT 0x4050 + #define CL_DEVICE_PARTITION_BY_COUNTS_EXT 0x4051 + #define CL_DEVICE_PARTITION_BY_NAMES_EXT 0x4052 + #define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT 0x4053 + + /* clDeviceGetInfo selectors */ + #define CL_DEVICE_PARENT_DEVICE_EXT 0x4054 + #define CL_DEVICE_PARTITION_TYPES_EXT 0x4055 + #define CL_DEVICE_AFFINITY_DOMAINS_EXT 0x4056 + #define CL_DEVICE_REFERENCE_COUNT_EXT 0x4057 + #define CL_DEVICE_PARTITION_STYLE_EXT 0x4058 + + /* error codes */ + #define CL_DEVICE_PARTITION_FAILED_EXT -1057 + #define CL_INVALID_PARTITION_COUNT_EXT -1058 + #define CL_INVALID_PARTITION_NAME_EXT -1059 + + /* CL_AFFINITY_DOMAINs */ + #define CL_AFFINITY_DOMAIN_L1_CACHE_EXT 0x1 + #define CL_AFFINITY_DOMAIN_L2_CACHE_EXT 0x2 + #define CL_AFFINITY_DOMAIN_L3_CACHE_EXT 0x3 + #define CL_AFFINITY_DOMAIN_L4_CACHE_EXT 0x4 + #define CL_AFFINITY_DOMAIN_NUMA_EXT 0x10 + #define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT 0x100 + + /* cl_device_partition_property_ext list terminators */ + #define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0) + #define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0) + #define CL_PARTITION_BY_NAMES_LIST_END_EXT ((cl_device_partition_property_ext) 0 - 1) + +/********************************* +* cl_qcom_ext_host_ptr extension +*********************************/ + +#define CL_MEM_EXT_HOST_PTR_QCOM (1 << 29) + +#define CL_DEVICE_EXT_MEM_PADDING_IN_BYTES_QCOM 0x40A0 +#define CL_DEVICE_PAGE_SIZE_QCOM 0x40A1 +#define CL_IMAGE_ROW_ALIGNMENT_QCOM 0x40A2 +#define CL_IMAGE_SLICE_ALIGNMENT_QCOM 0x40A3 +#define CL_MEM_HOST_UNCACHED_QCOM 0x40A4 +#define CL_MEM_HOST_WRITEBACK_QCOM 0x40A5 +#define CL_MEM_HOST_WRITETHROUGH_QCOM 0x40A6 +#define CL_MEM_HOST_WRITE_COMBINING_QCOM 0x40A7 + +typedef cl_uint cl_image_pitch_info_qcom; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetDeviceImageInfoQCOM(cl_device_id device, + size_t image_width, + size_t image_height, + const cl_image_format *image_format, + cl_image_pitch_info_qcom param_name, + size_t param_value_size, + void *param_value, + size_t *param_value_size_ret); + +typedef struct _cl_mem_ext_host_ptr +{ + /* Type of external memory allocation. */ + /* Legal values will be defined in layered extensions. */ + cl_uint allocation_type; + + /* Host cache policy for this external memory allocation. */ + cl_uint host_cache_policy; + +} cl_mem_ext_host_ptr; + +/********************************* +* cl_qcom_ion_host_ptr extension +*********************************/ + +#define CL_MEM_ION_HOST_PTR_QCOM 0x40A8 + +typedef struct _cl_mem_ion_host_ptr +{ + /* Type of external memory allocation. */ + /* Must be CL_MEM_ION_HOST_PTR_QCOM for ION allocations. */ + cl_mem_ext_host_ptr ext_host_ptr; + + /* ION file descriptor */ + int ion_filedesc; + + /* Host pointer to the ION allocated memory */ + void* ion_hostptr; + +} cl_mem_ion_host_ptr; + +#endif /* CL_VERSION_1_1 */ + +#ifdef __cplusplus +} +#endif + + +#endif /* __CL_EXT_H */ diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_gl.h b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_gl.h new file mode 100644 index 000000000..ad914cbd4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_gl.h @@ -0,0 +1,158 @@ +/********************************************************************************** + * Copyright (c) 2008 - 2012 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and/or associated documentation files (the + * "Materials"), to deal in the Materials without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Materials, and to + * permit persons to whom the Materials are furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Materials. + * + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + **********************************************************************************/ + +#ifndef __OPENCL_CL_GL_H +#define __OPENCL_CL_GL_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef cl_uint cl_gl_object_type; +typedef cl_uint cl_gl_texture_info; +typedef cl_uint cl_gl_platform_info; +typedef struct __GLsync *cl_GLsync; + +/* cl_gl_object_type = 0x2000 - 0x200F enum values are currently taken */ +#define CL_GL_OBJECT_BUFFER 0x2000 +#define CL_GL_OBJECT_TEXTURE2D 0x2001 +#define CL_GL_OBJECT_TEXTURE3D 0x2002 +#define CL_GL_OBJECT_RENDERBUFFER 0x2003 +#define CL_GL_OBJECT_TEXTURE2D_ARRAY 0x200E +#define CL_GL_OBJECT_TEXTURE1D 0x200F +#define CL_GL_OBJECT_TEXTURE1D_ARRAY 0x2010 +#define CL_GL_OBJECT_TEXTURE_BUFFER 0x2011 + +/* cl_gl_texture_info */ +#define CL_GL_TEXTURE_TARGET 0x2004 +#define CL_GL_MIPMAP_LEVEL 0x2005 +#define CL_GL_NUM_SAMPLES 0x2012 + + +extern CL_API_ENTRY cl_mem CL_API_CALL +clCreateFromGLBuffer(cl_context /* context */, + cl_mem_flags /* flags */, + cl_GLuint /* bufobj */, + int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_mem CL_API_CALL +clCreateFromGLTexture(cl_context /* context */, + cl_mem_flags /* flags */, + cl_GLenum /* target */, + cl_GLint /* miplevel */, + cl_GLuint /* texture */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2; + +extern CL_API_ENTRY cl_mem CL_API_CALL +clCreateFromGLRenderbuffer(cl_context /* context */, + cl_mem_flags /* flags */, + cl_GLuint /* renderbuffer */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetGLObjectInfo(cl_mem /* memobj */, + cl_gl_object_type * /* gl_object_type */, + cl_GLuint * /* gl_object_name */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetGLTextureInfo(cl_mem /* memobj */, + cl_gl_texture_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueAcquireGLObjects(cl_command_queue /* command_queue */, + cl_uint /* num_objects */, + const cl_mem * /* mem_objects */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueReleaseGLObjects(cl_command_queue /* command_queue */, + cl_uint /* num_objects */, + const cl_mem * /* mem_objects */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + + +/* Deprecated OpenCL 1.1 APIs */ +extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL +clCreateFromGLTexture2D(cl_context /* context */, + cl_mem_flags /* flags */, + cl_GLenum /* target */, + cl_GLint /* miplevel */, + cl_GLuint /* texture */, + cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; + +extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL +clCreateFromGLTexture3D(cl_context /* context */, + cl_mem_flags /* flags */, + cl_GLenum /* target */, + cl_GLint /* miplevel */, + cl_GLuint /* texture */, + cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; + +/* cl_khr_gl_sharing extension */ + +#define cl_khr_gl_sharing 1 + +typedef cl_uint cl_gl_context_info; + +/* Additional Error Codes */ +#define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR -1000 + +/* cl_gl_context_info */ +#define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR 0x2006 +#define CL_DEVICES_FOR_GL_CONTEXT_KHR 0x2007 + +/* Additional cl_context_properties */ +#define CL_GL_CONTEXT_KHR 0x2008 +#define CL_EGL_DISPLAY_KHR 0x2009 +#define CL_GLX_DISPLAY_KHR 0x200A +#define CL_WGL_HDC_KHR 0x200B +#define CL_CGL_SHAREGROUP_KHR 0x200C + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetGLContextInfoKHR(const cl_context_properties * /* properties */, + cl_gl_context_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)( + const cl_context_properties * properties, + cl_gl_context_info param_name, + size_t param_value_size, + void * param_value, + size_t * param_value_size_ret); + +#ifdef __cplusplus +} +#endif + +#endif /* __OPENCL_CL_GL_H */ diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_gl_ext.h b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_gl_ext.h new file mode 100644 index 000000000..0c10fedfa --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_gl_ext.h @@ -0,0 +1,65 @@ +/********************************************************************************** + * Copyright (c) 2008-2012 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and/or associated documentation files (the + * "Materials"), to deal in the Materials without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Materials, and to + * permit persons to whom the Materials are furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Materials. + * + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + **********************************************************************************/ + +/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */ + +/* cl_gl_ext.h contains vendor (non-KHR) OpenCL extensions which have */ +/* OpenGL dependencies. */ + +#ifndef __OPENCL_CL_GL_EXT_H +#define __OPENCL_CL_GL_EXT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/* + * For each extension, follow this template + * cl_VEN_extname extension */ +/* #define cl_VEN_extname 1 + * ... define new types, if any + * ... define new tokens, if any + * ... define new APIs, if any + * + * If you need GLtypes here, mirror them with a cl_GLtype, rather than including a GL header + * This allows us to avoid having to decide whether to include GL headers or GLES here. + */ + +/* + * cl_khr_gl_event extension + * See section 9.9 in the OpenCL 1.1 spec for more information + */ +#define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D + +extern CL_API_ENTRY cl_event CL_API_CALL +clCreateEventFromGLsyncKHR(cl_context /* context */, + cl_GLsync /* cl_GLsync */, + cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1; + +#ifdef __cplusplus +} +#endif + +#endif /* __OPENCL_CL_GL_EXT_H */ diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_platform.h b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_platform.h new file mode 100644 index 000000000..7f6f5e8a7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/cl_platform.h @@ -0,0 +1,1278 @@ +/********************************************************************************** + * Copyright (c) 2008-2012 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and/or associated documentation files (the + * "Materials"), to deal in the Materials without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Materials, and to + * permit persons to whom the Materials are furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Materials. + * + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + **********************************************************************************/ + +/* $Revision: 11803 $ on $Date: 2010-06-25 10:02:12 -0700 (Fri, 25 Jun 2010) $ */ + +#ifndef __CL_PLATFORM_H +#define __CL_PLATFORM_H + +#ifdef __APPLE__ + /* Contains #defines for AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER below */ + #include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(_WIN32) + #define CL_API_ENTRY + #define CL_API_CALL __stdcall + #define CL_CALLBACK __stdcall +#else + #define CL_API_ENTRY + #define CL_API_CALL + #define CL_CALLBACK +#endif + +#ifdef __APPLE__ + #define CL_EXTENSION_WEAK_LINK __attribute__((weak_import)) + #define CL_API_SUFFIX__VERSION_1_0 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER + #define CL_EXT_SUFFIX__VERSION_1_0 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER + #define CL_API_SUFFIX__VERSION_1_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER + #define GCL_API_SUFFIX__VERSION_1_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER + #define CL_EXT_SUFFIX__VERSION_1_1 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER + #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 + + #ifdef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER + #define CL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER + #define GCL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER + #define CL_EXT_SUFFIX__VERSION_1_2 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER + #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED + #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 + #else + #warning This path should never happen outside of internal operating system development. AvailabilityMacros do not function correctly here! + #define CL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER + #define GCL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER + #define CL_EXT_SUFFIX__VERSION_1_2 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER + #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER + #endif +#else + #define CL_EXTENSION_WEAK_LINK + #define CL_API_SUFFIX__VERSION_1_0 + #define CL_EXT_SUFFIX__VERSION_1_0 + #define CL_API_SUFFIX__VERSION_1_1 + #define CL_EXT_SUFFIX__VERSION_1_1 + #define CL_API_SUFFIX__VERSION_1_2 + #define CL_EXT_SUFFIX__VERSION_1_2 + + #ifdef __GNUC__ + #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS + #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED + #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED + #else + #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED __attribute__((deprecated)) + #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED + #endif + + #ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS + #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED + #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED + #else + #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED __attribute__((deprecated)) + #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED + #endif + #elif _WIN32 + #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS + #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED + #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED + #else + #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED + #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED __declspec(deprecated) + #endif + + #ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS + #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED + #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED + #else + #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED + #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED __declspec(deprecated) + #endif + #else + #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED + #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED + + #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED + #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED + #endif +#endif + +#if (defined (_WIN32) && defined(_MSC_VER)) + +/* scalar types */ +typedef signed __int8 cl_char; +typedef unsigned __int8 cl_uchar; +typedef signed __int16 cl_short; +typedef unsigned __int16 cl_ushort; +typedef signed __int32 cl_int; +typedef unsigned __int32 cl_uint; +typedef signed __int64 cl_long; +typedef unsigned __int64 cl_ulong; + +typedef unsigned __int16 cl_half; +typedef float cl_float; +typedef double cl_double; + +/* Macro names and corresponding values defined by OpenCL */ +#define CL_CHAR_BIT 8 +#define CL_SCHAR_MAX 127 +#define CL_SCHAR_MIN (-127-1) +#define CL_CHAR_MAX CL_SCHAR_MAX +#define CL_CHAR_MIN CL_SCHAR_MIN +#define CL_UCHAR_MAX 255 +#define CL_SHRT_MAX 32767 +#define CL_SHRT_MIN (-32767-1) +#define CL_USHRT_MAX 65535 +#define CL_INT_MAX 2147483647 +#define CL_INT_MIN (-2147483647-1) +#define CL_UINT_MAX 0xffffffffU +#define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL) +#define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL) +#define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL) + +#define CL_FLT_DIG 6 +#define CL_FLT_MANT_DIG 24 +#define CL_FLT_MAX_10_EXP +38 +#define CL_FLT_MAX_EXP +128 +#define CL_FLT_MIN_10_EXP -37 +#define CL_FLT_MIN_EXP -125 +#define CL_FLT_RADIX 2 +#define CL_FLT_MAX 340282346638528859811704183484516925440.0f +#define CL_FLT_MIN 1.175494350822287507969e-38f +#define CL_FLT_EPSILON 0x1.0p-23f + +#define CL_DBL_DIG 15 +#define CL_DBL_MANT_DIG 53 +#define CL_DBL_MAX_10_EXP +308 +#define CL_DBL_MAX_EXP +1024 +#define CL_DBL_MIN_10_EXP -307 +#define CL_DBL_MIN_EXP -1021 +#define CL_DBL_RADIX 2 +#define CL_DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0 +#define CL_DBL_MIN 2.225073858507201383090e-308 +#define CL_DBL_EPSILON 2.220446049250313080847e-16 + +#define CL_M_E 2.718281828459045090796 +#define CL_M_LOG2E 1.442695040888963387005 +#define CL_M_LOG10E 0.434294481903251816668 +#define CL_M_LN2 0.693147180559945286227 +#define CL_M_LN10 2.302585092994045901094 +#define CL_M_PI 3.141592653589793115998 +#define CL_M_PI_2 1.570796326794896557999 +#define CL_M_PI_4 0.785398163397448278999 +#define CL_M_1_PI 0.318309886183790691216 +#define CL_M_2_PI 0.636619772367581382433 +#define CL_M_2_SQRTPI 1.128379167095512558561 +#define CL_M_SQRT2 1.414213562373095145475 +#define CL_M_SQRT1_2 0.707106781186547572737 + +#define CL_M_E_F 2.71828174591064f +#define CL_M_LOG2E_F 1.44269502162933f +#define CL_M_LOG10E_F 0.43429449200630f +#define CL_M_LN2_F 0.69314718246460f +#define CL_M_LN10_F 2.30258512496948f +#define CL_M_PI_F 3.14159274101257f +#define CL_M_PI_2_F 1.57079637050629f +#define CL_M_PI_4_F 0.78539818525314f +#define CL_M_1_PI_F 0.31830987334251f +#define CL_M_2_PI_F 0.63661974668503f +#define CL_M_2_SQRTPI_F 1.12837922573090f +#define CL_M_SQRT2_F 1.41421353816986f +#define CL_M_SQRT1_2_F 0.70710676908493f + +#define CL_NAN (CL_INFINITY - CL_INFINITY) +#define CL_HUGE_VALF ((cl_float) 1e50) +#define CL_HUGE_VAL ((cl_double) 1e500) +#define CL_MAXFLOAT CL_FLT_MAX +#define CL_INFINITY CL_HUGE_VALF + +#else + +#include + +/* scalar types */ +typedef int8_t cl_char; +typedef uint8_t cl_uchar; +typedef int16_t cl_short __attribute__((aligned(2))); +typedef uint16_t cl_ushort __attribute__((aligned(2))); +typedef int32_t cl_int __attribute__((aligned(4))); +typedef uint32_t cl_uint __attribute__((aligned(4))); +typedef int64_t cl_long __attribute__((aligned(8))); +typedef uint64_t cl_ulong __attribute__((aligned(8))); + +typedef uint16_t cl_half __attribute__((aligned(2))); +typedef float cl_float __attribute__((aligned(4))); +typedef double cl_double __attribute__((aligned(8))); + +/* Macro names and corresponding values defined by OpenCL */ +#define CL_CHAR_BIT 8 +#define CL_SCHAR_MAX 127 +#define CL_SCHAR_MIN (-127-1) +#define CL_CHAR_MAX CL_SCHAR_MAX +#define CL_CHAR_MIN CL_SCHAR_MIN +#define CL_UCHAR_MAX 255 +#define CL_SHRT_MAX 32767 +#define CL_SHRT_MIN (-32767-1) +#define CL_USHRT_MAX 65535 +#define CL_INT_MAX 2147483647 +#define CL_INT_MIN (-2147483647-1) +#define CL_UINT_MAX 0xffffffffU +#define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL) +#define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL) +#define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL) + +#define CL_FLT_DIG 6 +#define CL_FLT_MANT_DIG 24 +#define CL_FLT_MAX_10_EXP +38 +#define CL_FLT_MAX_EXP +128 +#define CL_FLT_MIN_10_EXP -37 +#define CL_FLT_MIN_EXP -125 +#define CL_FLT_RADIX 2 +#define CL_FLT_MAX 0x1.fffffep127f +#define CL_FLT_MIN 0x1.0p-126f +#define CL_FLT_EPSILON 0x1.0p-23f + +#define CL_DBL_DIG 15 +#define CL_DBL_MANT_DIG 53 +#define CL_DBL_MAX_10_EXP +308 +#define CL_DBL_MAX_EXP +1024 +#define CL_DBL_MIN_10_EXP -307 +#define CL_DBL_MIN_EXP -1021 +#define CL_DBL_RADIX 2 +#define CL_DBL_MAX 0x1.fffffffffffffp1023 +#define CL_DBL_MIN 0x1.0p-1022 +#define CL_DBL_EPSILON 0x1.0p-52 + +#define CL_M_E 2.718281828459045090796 +#define CL_M_LOG2E 1.442695040888963387005 +#define CL_M_LOG10E 0.434294481903251816668 +#define CL_M_LN2 0.693147180559945286227 +#define CL_M_LN10 2.302585092994045901094 +#define CL_M_PI 3.141592653589793115998 +#define CL_M_PI_2 1.570796326794896557999 +#define CL_M_PI_4 0.785398163397448278999 +#define CL_M_1_PI 0.318309886183790691216 +#define CL_M_2_PI 0.636619772367581382433 +#define CL_M_2_SQRTPI 1.128379167095512558561 +#define CL_M_SQRT2 1.414213562373095145475 +#define CL_M_SQRT1_2 0.707106781186547572737 + +#define CL_M_E_F 2.71828174591064f +#define CL_M_LOG2E_F 1.44269502162933f +#define CL_M_LOG10E_F 0.43429449200630f +#define CL_M_LN2_F 0.69314718246460f +#define CL_M_LN10_F 2.30258512496948f +#define CL_M_PI_F 3.14159274101257f +#define CL_M_PI_2_F 1.57079637050629f +#define CL_M_PI_4_F 0.78539818525314f +#define CL_M_1_PI_F 0.31830987334251f +#define CL_M_2_PI_F 0.63661974668503f +#define CL_M_2_SQRTPI_F 1.12837922573090f +#define CL_M_SQRT2_F 1.41421353816986f +#define CL_M_SQRT1_2_F 0.70710676908493f + +#if defined( __GNUC__ ) + #define CL_HUGE_VALF __builtin_huge_valf() + #define CL_HUGE_VAL __builtin_huge_val() + #define CL_NAN __builtin_nanf( "" ) +#else + #define CL_HUGE_VALF ((cl_float) 1e50) + #define CL_HUGE_VAL ((cl_double) 1e500) + float nanf( const char * ); + #define CL_NAN nanf( "" ) +#endif +#define CL_MAXFLOAT CL_FLT_MAX +#define CL_INFINITY CL_HUGE_VALF + +#endif + +#include + +/* Mirror types to GL types. Mirror types allow us to avoid deciding which 87s to load based on whether we are using GL or GLES here. */ +typedef unsigned int cl_GLuint; +typedef int cl_GLint; +typedef unsigned int cl_GLenum; + +/* + * Vector types + * + * Note: OpenCL requires that all types be naturally aligned. + * This means that vector types must be naturally aligned. + * For example, a vector of four floats must be aligned to + * a 16 byte boundary (calculated as 4 * the natural 4-byte + * alignment of the float). The alignment qualifiers here + * will only function properly if your compiler supports them + * and if you don't actively work to defeat them. For example, + * in order for a cl_float4 to be 16 byte aligned in a struct, + * the start of the struct must itself be 16-byte aligned. + * + * Maintaining proper alignment is the user's responsibility. + */ + +/* Define basic vector types */ +#if defined( __VEC__ ) + #include /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */ + typedef vector unsigned char __cl_uchar16; + typedef vector signed char __cl_char16; + typedef vector unsigned short __cl_ushort8; + typedef vector signed short __cl_short8; + typedef vector unsigned int __cl_uint4; + typedef vector signed int __cl_int4; + typedef vector float __cl_float4; + #define __CL_UCHAR16__ 1 + #define __CL_CHAR16__ 1 + #define __CL_USHORT8__ 1 + #define __CL_SHORT8__ 1 + #define __CL_UINT4__ 1 + #define __CL_INT4__ 1 + #define __CL_FLOAT4__ 1 +#endif + +#if defined( __SSE__ ) + #if defined( __MINGW64__ ) + #include + #else + #include + #endif + #if defined( __GNUC__ ) + typedef float __cl_float4 __attribute__((vector_size(16))); + #else + typedef __m128 __cl_float4; + #endif + #define __CL_FLOAT4__ 1 +#endif + +#if defined( __SSE2__ ) + #if defined( __MINGW64__ ) + #include + #else + #include + #endif + #if defined( __GNUC__ ) + typedef cl_uchar __cl_uchar16 __attribute__((vector_size(16))); + typedef cl_char __cl_char16 __attribute__((vector_size(16))); + typedef cl_ushort __cl_ushort8 __attribute__((vector_size(16))); + typedef cl_short __cl_short8 __attribute__((vector_size(16))); + typedef cl_uint __cl_uint4 __attribute__((vector_size(16))); + typedef cl_int __cl_int4 __attribute__((vector_size(16))); + typedef cl_ulong __cl_ulong2 __attribute__((vector_size(16))); + typedef cl_long __cl_long2 __attribute__((vector_size(16))); + typedef cl_double __cl_double2 __attribute__((vector_size(16))); + #else + typedef __m128i __cl_uchar16; + typedef __m128i __cl_char16; + typedef __m128i __cl_ushort8; + typedef __m128i __cl_short8; + typedef __m128i __cl_uint4; + typedef __m128i __cl_int4; + typedef __m128i __cl_ulong2; + typedef __m128i __cl_long2; + typedef __m128d __cl_double2; + #endif + #define __CL_UCHAR16__ 1 + #define __CL_CHAR16__ 1 + #define __CL_USHORT8__ 1 + #define __CL_SHORT8__ 1 + #define __CL_INT4__ 1 + #define __CL_UINT4__ 1 + #define __CL_ULONG2__ 1 + #define __CL_LONG2__ 1 + #define __CL_DOUBLE2__ 1 +#endif + +#if defined( __MMX__ ) + #include + #if defined( __GNUC__ ) + typedef cl_uchar __cl_uchar8 __attribute__((vector_size(8))); + typedef cl_char __cl_char8 __attribute__((vector_size(8))); + typedef cl_ushort __cl_ushort4 __attribute__((vector_size(8))); + typedef cl_short __cl_short4 __attribute__((vector_size(8))); + typedef cl_uint __cl_uint2 __attribute__((vector_size(8))); + typedef cl_int __cl_int2 __attribute__((vector_size(8))); + typedef cl_ulong __cl_ulong1 __attribute__((vector_size(8))); + typedef cl_long __cl_long1 __attribute__((vector_size(8))); + typedef cl_float __cl_float2 __attribute__((vector_size(8))); + #else + typedef __m64 __cl_uchar8; + typedef __m64 __cl_char8; + typedef __m64 __cl_ushort4; + typedef __m64 __cl_short4; + typedef __m64 __cl_uint2; + typedef __m64 __cl_int2; + typedef __m64 __cl_ulong1; + typedef __m64 __cl_long1; + typedef __m64 __cl_float2; + #endif + #define __CL_UCHAR8__ 1 + #define __CL_CHAR8__ 1 + #define __CL_USHORT4__ 1 + #define __CL_SHORT4__ 1 + #define __CL_INT2__ 1 + #define __CL_UINT2__ 1 + #define __CL_ULONG1__ 1 + #define __CL_LONG1__ 1 + #define __CL_FLOAT2__ 1 +#endif + +#if defined( __AVX__ ) + #if defined( __MINGW64__ ) + #include + #else + #include + #endif + #if defined( __GNUC__ ) + typedef cl_float __cl_float8 __attribute__((vector_size(32))); + typedef cl_double __cl_double4 __attribute__((vector_size(32))); + #else + typedef __m256 __cl_float8; + typedef __m256d __cl_double4; + #endif + #define __CL_FLOAT8__ 1 + #define __CL_DOUBLE4__ 1 +#endif + +/* Define capabilities for anonymous struct members. */ +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) +#define __CL_HAS_ANON_STRUCT__ 1 +#define __CL_ANON_STRUCT__ __extension__ +#elif defined( _WIN32) && (_MSC_VER >= 1500) + /* Microsoft Developer Studio 2008 supports anonymous structs, but + * complains by default. */ +#define __CL_HAS_ANON_STRUCT__ 1 +#define __CL_ANON_STRUCT__ + /* Disable warning C4201: nonstandard extension used : nameless + * struct/union */ +#pragma warning( push ) +#pragma warning( disable : 4201 ) +#else +#define __CL_HAS_ANON_STRUCT__ 0 +#define __CL_ANON_STRUCT__ +#endif + +/* Define alignment keys */ +#if defined( __GNUC__ ) + #define CL_ALIGNED(_x) __attribute__ ((aligned(_x))) +#elif defined( _WIN32) && (_MSC_VER) + /* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */ + /* http://msdn.microsoft.com/en-us/library/373ak2y1%28VS.71%29.aspx */ + /* #include */ + /* #define CL_ALIGNED(_x) _CRT_ALIGN(_x) */ + #define CL_ALIGNED(_x) +#else + #warning Need to implement some method to align data here + #define CL_ALIGNED(_x) +#endif + +/* Indicate whether .xyzw, .s0123 and .hi.lo are supported */ +#if __CL_HAS_ANON_STRUCT__ + /* .xyzw and .s0123...{f|F} are supported */ + #define CL_HAS_NAMED_VECTOR_FIELDS 1 + /* .hi and .lo are supported */ + #define CL_HAS_HI_LO_VECTOR_FIELDS 1 +#endif + +/* Define cl_vector types */ + +/* ---- cl_charn ---- */ +typedef union +{ + cl_char CL_ALIGNED(2) s[2]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_char x, y; }; + __CL_ANON_STRUCT__ struct{ cl_char s0, s1; }; + __CL_ANON_STRUCT__ struct{ cl_char lo, hi; }; +#endif +#if defined( __CL_CHAR2__) + __cl_char2 v2; +#endif +}cl_char2; + +typedef union +{ + cl_char CL_ALIGNED(4) s[4]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_char x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3; }; + __CL_ANON_STRUCT__ struct{ cl_char2 lo, hi; }; +#endif +#if defined( __CL_CHAR2__) + __cl_char2 v2[2]; +#endif +#if defined( __CL_CHAR4__) + __cl_char4 v4; +#endif +}cl_char4; + +/* cl_char3 is identical in size, alignment and behavior to cl_char4. See section 6.1.5. */ +typedef cl_char4 cl_char3; + +typedef union +{ + cl_char CL_ALIGNED(8) s[8]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_char x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7; }; + __CL_ANON_STRUCT__ struct{ cl_char4 lo, hi; }; +#endif +#if defined( __CL_CHAR2__) + __cl_char2 v2[4]; +#endif +#if defined( __CL_CHAR4__) + __cl_char4 v4[2]; +#endif +#if defined( __CL_CHAR8__ ) + __cl_char8 v8; +#endif +}cl_char8; + +typedef union +{ + cl_char CL_ALIGNED(16) s[16]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_char x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __CL_ANON_STRUCT__ struct{ cl_char8 lo, hi; }; +#endif +#if defined( __CL_CHAR2__) + __cl_char2 v2[8]; +#endif +#if defined( __CL_CHAR4__) + __cl_char4 v4[4]; +#endif +#if defined( __CL_CHAR8__ ) + __cl_char8 v8[2]; +#endif +#if defined( __CL_CHAR16__ ) + __cl_char16 v16; +#endif +}cl_char16; + + +/* ---- cl_ucharn ---- */ +typedef union +{ + cl_uchar CL_ALIGNED(2) s[2]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_uchar x, y; }; + __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1; }; + __CL_ANON_STRUCT__ struct{ cl_uchar lo, hi; }; +#endif +#if defined( __cl_uchar2__) + __cl_uchar2 v2; +#endif +}cl_uchar2; + +typedef union +{ + cl_uchar CL_ALIGNED(4) s[4]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3; }; + __CL_ANON_STRUCT__ struct{ cl_uchar2 lo, hi; }; +#endif +#if defined( __CL_UCHAR2__) + __cl_uchar2 v2[2]; +#endif +#if defined( __CL_UCHAR4__) + __cl_uchar4 v4; +#endif +}cl_uchar4; + +/* cl_uchar3 is identical in size, alignment and behavior to cl_uchar4. See section 6.1.5. */ +typedef cl_uchar4 cl_uchar3; + +typedef union +{ + cl_uchar CL_ALIGNED(8) s[8]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7; }; + __CL_ANON_STRUCT__ struct{ cl_uchar4 lo, hi; }; +#endif +#if defined( __CL_UCHAR2__) + __cl_uchar2 v2[4]; +#endif +#if defined( __CL_UCHAR4__) + __cl_uchar4 v4[2]; +#endif +#if defined( __CL_UCHAR8__ ) + __cl_uchar8 v8; +#endif +}cl_uchar8; + +typedef union +{ + cl_uchar CL_ALIGNED(16) s[16]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __CL_ANON_STRUCT__ struct{ cl_uchar8 lo, hi; }; +#endif +#if defined( __CL_UCHAR2__) + __cl_uchar2 v2[8]; +#endif +#if defined( __CL_UCHAR4__) + __cl_uchar4 v4[4]; +#endif +#if defined( __CL_UCHAR8__ ) + __cl_uchar8 v8[2]; +#endif +#if defined( __CL_UCHAR16__ ) + __cl_uchar16 v16; +#endif +}cl_uchar16; + + +/* ---- cl_shortn ---- */ +typedef union +{ + cl_short CL_ALIGNED(4) s[2]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_short x, y; }; + __CL_ANON_STRUCT__ struct{ cl_short s0, s1; }; + __CL_ANON_STRUCT__ struct{ cl_short lo, hi; }; +#endif +#if defined( __CL_SHORT2__) + __cl_short2 v2; +#endif +}cl_short2; + +typedef union +{ + cl_short CL_ALIGNED(8) s[4]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_short x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3; }; + __CL_ANON_STRUCT__ struct{ cl_short2 lo, hi; }; +#endif +#if defined( __CL_SHORT2__) + __cl_short2 v2[2]; +#endif +#if defined( __CL_SHORT4__) + __cl_short4 v4; +#endif +}cl_short4; + +/* cl_short3 is identical in size, alignment and behavior to cl_short4. See section 6.1.5. */ +typedef cl_short4 cl_short3; + +typedef union +{ + cl_short CL_ALIGNED(16) s[8]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_short x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7; }; + __CL_ANON_STRUCT__ struct{ cl_short4 lo, hi; }; +#endif +#if defined( __CL_SHORT2__) + __cl_short2 v2[4]; +#endif +#if defined( __CL_SHORT4__) + __cl_short4 v4[2]; +#endif +#if defined( __CL_SHORT8__ ) + __cl_short8 v8; +#endif +}cl_short8; + +typedef union +{ + cl_short CL_ALIGNED(32) s[16]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_short x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __CL_ANON_STRUCT__ struct{ cl_short8 lo, hi; }; +#endif +#if defined( __CL_SHORT2__) + __cl_short2 v2[8]; +#endif +#if defined( __CL_SHORT4__) + __cl_short4 v4[4]; +#endif +#if defined( __CL_SHORT8__ ) + __cl_short8 v8[2]; +#endif +#if defined( __CL_SHORT16__ ) + __cl_short16 v16; +#endif +}cl_short16; + + +/* ---- cl_ushortn ---- */ +typedef union +{ + cl_ushort CL_ALIGNED(4) s[2]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_ushort x, y; }; + __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1; }; + __CL_ANON_STRUCT__ struct{ cl_ushort lo, hi; }; +#endif +#if defined( __CL_USHORT2__) + __cl_ushort2 v2; +#endif +}cl_ushort2; + +typedef union +{ + cl_ushort CL_ALIGNED(8) s[4]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3; }; + __CL_ANON_STRUCT__ struct{ cl_ushort2 lo, hi; }; +#endif +#if defined( __CL_USHORT2__) + __cl_ushort2 v2[2]; +#endif +#if defined( __CL_USHORT4__) + __cl_ushort4 v4; +#endif +}cl_ushort4; + +/* cl_ushort3 is identical in size, alignment and behavior to cl_ushort4. See section 6.1.5. */ +typedef cl_ushort4 cl_ushort3; + +typedef union +{ + cl_ushort CL_ALIGNED(16) s[8]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7; }; + __CL_ANON_STRUCT__ struct{ cl_ushort4 lo, hi; }; +#endif +#if defined( __CL_USHORT2__) + __cl_ushort2 v2[4]; +#endif +#if defined( __CL_USHORT4__) + __cl_ushort4 v4[2]; +#endif +#if defined( __CL_USHORT8__ ) + __cl_ushort8 v8; +#endif +}cl_ushort8; + +typedef union +{ + cl_ushort CL_ALIGNED(32) s[16]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __CL_ANON_STRUCT__ struct{ cl_ushort8 lo, hi; }; +#endif +#if defined( __CL_USHORT2__) + __cl_ushort2 v2[8]; +#endif +#if defined( __CL_USHORT4__) + __cl_ushort4 v4[4]; +#endif +#if defined( __CL_USHORT8__ ) + __cl_ushort8 v8[2]; +#endif +#if defined( __CL_USHORT16__ ) + __cl_ushort16 v16; +#endif +}cl_ushort16; + +/* ---- cl_intn ---- */ +typedef union +{ + cl_int CL_ALIGNED(8) s[2]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_int x, y; }; + __CL_ANON_STRUCT__ struct{ cl_int s0, s1; }; + __CL_ANON_STRUCT__ struct{ cl_int lo, hi; }; +#endif +#if defined( __CL_INT2__) + __cl_int2 v2; +#endif +}cl_int2; + +typedef union +{ + cl_int CL_ALIGNED(16) s[4]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_int x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3; }; + __CL_ANON_STRUCT__ struct{ cl_int2 lo, hi; }; +#endif +#if defined( __CL_INT2__) + __cl_int2 v2[2]; +#endif +#if defined( __CL_INT4__) + __cl_int4 v4; +#endif +}cl_int4; + +/* cl_int3 is identical in size, alignment and behavior to cl_int4. See section 6.1.5. */ +typedef cl_int4 cl_int3; + +typedef union +{ + cl_int CL_ALIGNED(32) s[8]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_int x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7; }; + __CL_ANON_STRUCT__ struct{ cl_int4 lo, hi; }; +#endif +#if defined( __CL_INT2__) + __cl_int2 v2[4]; +#endif +#if defined( __CL_INT4__) + __cl_int4 v4[2]; +#endif +#if defined( __CL_INT8__ ) + __cl_int8 v8; +#endif +}cl_int8; + +typedef union +{ + cl_int CL_ALIGNED(64) s[16]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_int x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __CL_ANON_STRUCT__ struct{ cl_int8 lo, hi; }; +#endif +#if defined( __CL_INT2__) + __cl_int2 v2[8]; +#endif +#if defined( __CL_INT4__) + __cl_int4 v4[4]; +#endif +#if defined( __CL_INT8__ ) + __cl_int8 v8[2]; +#endif +#if defined( __CL_INT16__ ) + __cl_int16 v16; +#endif +}cl_int16; + + +/* ---- cl_uintn ---- */ +typedef union +{ + cl_uint CL_ALIGNED(8) s[2]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_uint x, y; }; + __CL_ANON_STRUCT__ struct{ cl_uint s0, s1; }; + __CL_ANON_STRUCT__ struct{ cl_uint lo, hi; }; +#endif +#if defined( __CL_UINT2__) + __cl_uint2 v2; +#endif +}cl_uint2; + +typedef union +{ + cl_uint CL_ALIGNED(16) s[4]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3; }; + __CL_ANON_STRUCT__ struct{ cl_uint2 lo, hi; }; +#endif +#if defined( __CL_UINT2__) + __cl_uint2 v2[2]; +#endif +#if defined( __CL_UINT4__) + __cl_uint4 v4; +#endif +}cl_uint4; + +/* cl_uint3 is identical in size, alignment and behavior to cl_uint4. See section 6.1.5. */ +typedef cl_uint4 cl_uint3; + +typedef union +{ + cl_uint CL_ALIGNED(32) s[8]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7; }; + __CL_ANON_STRUCT__ struct{ cl_uint4 lo, hi; }; +#endif +#if defined( __CL_UINT2__) + __cl_uint2 v2[4]; +#endif +#if defined( __CL_UINT4__) + __cl_uint4 v4[2]; +#endif +#if defined( __CL_UINT8__ ) + __cl_uint8 v8; +#endif +}cl_uint8; + +typedef union +{ + cl_uint CL_ALIGNED(64) s[16]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __CL_ANON_STRUCT__ struct{ cl_uint8 lo, hi; }; +#endif +#if defined( __CL_UINT2__) + __cl_uint2 v2[8]; +#endif +#if defined( __CL_UINT4__) + __cl_uint4 v4[4]; +#endif +#if defined( __CL_UINT8__ ) + __cl_uint8 v8[2]; +#endif +#if defined( __CL_UINT16__ ) + __cl_uint16 v16; +#endif +}cl_uint16; + +/* ---- cl_longn ---- */ +typedef union +{ + cl_long CL_ALIGNED(16) s[2]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_long x, y; }; + __CL_ANON_STRUCT__ struct{ cl_long s0, s1; }; + __CL_ANON_STRUCT__ struct{ cl_long lo, hi; }; +#endif +#if defined( __CL_LONG2__) + __cl_long2 v2; +#endif +}cl_long2; + +typedef union +{ + cl_long CL_ALIGNED(32) s[4]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_long x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3; }; + __CL_ANON_STRUCT__ struct{ cl_long2 lo, hi; }; +#endif +#if defined( __CL_LONG2__) + __cl_long2 v2[2]; +#endif +#if defined( __CL_LONG4__) + __cl_long4 v4; +#endif +}cl_long4; + +/* cl_long3 is identical in size, alignment and behavior to cl_long4. See section 6.1.5. */ +typedef cl_long4 cl_long3; + +typedef union +{ + cl_long CL_ALIGNED(64) s[8]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_long x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7; }; + __CL_ANON_STRUCT__ struct{ cl_long4 lo, hi; }; +#endif +#if defined( __CL_LONG2__) + __cl_long2 v2[4]; +#endif +#if defined( __CL_LONG4__) + __cl_long4 v4[2]; +#endif +#if defined( __CL_LONG8__ ) + __cl_long8 v8; +#endif +}cl_long8; + +typedef union +{ + cl_long CL_ALIGNED(128) s[16]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_long x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __CL_ANON_STRUCT__ struct{ cl_long8 lo, hi; }; +#endif +#if defined( __CL_LONG2__) + __cl_long2 v2[8]; +#endif +#if defined( __CL_LONG4__) + __cl_long4 v4[4]; +#endif +#if defined( __CL_LONG8__ ) + __cl_long8 v8[2]; +#endif +#if defined( __CL_LONG16__ ) + __cl_long16 v16; +#endif +}cl_long16; + + +/* ---- cl_ulongn ---- */ +typedef union +{ + cl_ulong CL_ALIGNED(16) s[2]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_ulong x, y; }; + __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1; }; + __CL_ANON_STRUCT__ struct{ cl_ulong lo, hi; }; +#endif +#if defined( __CL_ULONG2__) + __cl_ulong2 v2; +#endif +}cl_ulong2; + +typedef union +{ + cl_ulong CL_ALIGNED(32) s[4]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3; }; + __CL_ANON_STRUCT__ struct{ cl_ulong2 lo, hi; }; +#endif +#if defined( __CL_ULONG2__) + __cl_ulong2 v2[2]; +#endif +#if defined( __CL_ULONG4__) + __cl_ulong4 v4; +#endif +}cl_ulong4; + +/* cl_ulong3 is identical in size, alignment and behavior to cl_ulong4. See section 6.1.5. */ +typedef cl_ulong4 cl_ulong3; + +typedef union +{ + cl_ulong CL_ALIGNED(64) s[8]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7; }; + __CL_ANON_STRUCT__ struct{ cl_ulong4 lo, hi; }; +#endif +#if defined( __CL_ULONG2__) + __cl_ulong2 v2[4]; +#endif +#if defined( __CL_ULONG4__) + __cl_ulong4 v4[2]; +#endif +#if defined( __CL_ULONG8__ ) + __cl_ulong8 v8; +#endif +}cl_ulong8; + +typedef union +{ + cl_ulong CL_ALIGNED(128) s[16]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __CL_ANON_STRUCT__ struct{ cl_ulong8 lo, hi; }; +#endif +#if defined( __CL_ULONG2__) + __cl_ulong2 v2[8]; +#endif +#if defined( __CL_ULONG4__) + __cl_ulong4 v4[4]; +#endif +#if defined( __CL_ULONG8__ ) + __cl_ulong8 v8[2]; +#endif +#if defined( __CL_ULONG16__ ) + __cl_ulong16 v16; +#endif +}cl_ulong16; + + +/* --- cl_floatn ---- */ + +typedef union +{ + cl_float CL_ALIGNED(8) s[2]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_float x, y; }; + __CL_ANON_STRUCT__ struct{ cl_float s0, s1; }; + __CL_ANON_STRUCT__ struct{ cl_float lo, hi; }; +#endif +#if defined( __CL_FLOAT2__) + __cl_float2 v2; +#endif +}cl_float2; + +typedef union +{ + cl_float CL_ALIGNED(16) s[4]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_float x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3; }; + __CL_ANON_STRUCT__ struct{ cl_float2 lo, hi; }; +#endif +#if defined( __CL_FLOAT2__) + __cl_float2 v2[2]; +#endif +#if defined( __CL_FLOAT4__) + __cl_float4 v4; +#endif +}cl_float4; + +/* cl_float3 is identical in size, alignment and behavior to cl_float4. See section 6.1.5. */ +typedef cl_float4 cl_float3; + +typedef union +{ + cl_float CL_ALIGNED(32) s[8]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_float x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7; }; + __CL_ANON_STRUCT__ struct{ cl_float4 lo, hi; }; +#endif +#if defined( __CL_FLOAT2__) + __cl_float2 v2[4]; +#endif +#if defined( __CL_FLOAT4__) + __cl_float4 v4[2]; +#endif +#if defined( __CL_FLOAT8__ ) + __cl_float8 v8; +#endif +}cl_float8; + +typedef union +{ + cl_float CL_ALIGNED(64) s[16]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_float x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __CL_ANON_STRUCT__ struct{ cl_float8 lo, hi; }; +#endif +#if defined( __CL_FLOAT2__) + __cl_float2 v2[8]; +#endif +#if defined( __CL_FLOAT4__) + __cl_float4 v4[4]; +#endif +#if defined( __CL_FLOAT8__ ) + __cl_float8 v8[2]; +#endif +#if defined( __CL_FLOAT16__ ) + __cl_float16 v16; +#endif +}cl_float16; + +/* --- cl_doublen ---- */ + +typedef union +{ + cl_double CL_ALIGNED(16) s[2]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_double x, y; }; + __CL_ANON_STRUCT__ struct{ cl_double s0, s1; }; + __CL_ANON_STRUCT__ struct{ cl_double lo, hi; }; +#endif +#if defined( __CL_DOUBLE2__) + __cl_double2 v2; +#endif +}cl_double2; + +typedef union +{ + cl_double CL_ALIGNED(32) s[4]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_double x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3; }; + __CL_ANON_STRUCT__ struct{ cl_double2 lo, hi; }; +#endif +#if defined( __CL_DOUBLE2__) + __cl_double2 v2[2]; +#endif +#if defined( __CL_DOUBLE4__) + __cl_double4 v4; +#endif +}cl_double4; + +/* cl_double3 is identical in size, alignment and behavior to cl_double4. See section 6.1.5. */ +typedef cl_double4 cl_double3; + +typedef union +{ + cl_double CL_ALIGNED(64) s[8]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_double x, y, z, w; }; + __CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7; }; + __CL_ANON_STRUCT__ struct{ cl_double4 lo, hi; }; +#endif +#if defined( __CL_DOUBLE2__) + __cl_double2 v2[4]; +#endif +#if defined( __CL_DOUBLE4__) + __cl_double4 v4[2]; +#endif +#if defined( __CL_DOUBLE8__ ) + __cl_double8 v8; +#endif +}cl_double8; + +typedef union +{ + cl_double CL_ALIGNED(128) s[16]; +#if __CL_HAS_ANON_STRUCT__ + __CL_ANON_STRUCT__ struct{ cl_double x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __CL_ANON_STRUCT__ struct{ cl_double8 lo, hi; }; +#endif +#if defined( __CL_DOUBLE2__) + __cl_double2 v2[8]; +#endif +#if defined( __CL_DOUBLE4__) + __cl_double4 v4[4]; +#endif +#if defined( __CL_DOUBLE8__ ) + __cl_double8 v8[2]; +#endif +#if defined( __CL_DOUBLE16__ ) + __cl_double16 v16; +#endif +}cl_double16; + +/* Macro to facilitate debugging + * Usage: + * Place CL_PROGRAM_STRING_DEBUG_INFO on the line before the first line of your source. + * The first line ends with: CL_PROGRAM_STRING_DEBUG_INFO \" + * Each line thereafter of OpenCL C source must end with: \n\ + * The last line ends in "; + * + * Example: + * + * const char *my_program = CL_PROGRAM_STRING_DEBUG_INFO "\ + * kernel void foo( int a, float * b ) \n\ + * { \n\ + * // my comment \n\ + * *b[ get_global_id(0)] = a; \n\ + * } \n\ + * "; + * + * This should correctly set up the line, (column) and file information for your source + * string so you can do source level debugging. + */ +#define __CL_STRINGIFY( _x ) # _x +#define _CL_STRINGIFY( _x ) __CL_STRINGIFY( _x ) +#define CL_PROGRAM_STRING_DEBUG_INFO "#line " _CL_STRINGIFY(__LINE__) " \"" __FILE__ "\" \n\n" + +#ifdef __cplusplus +} +#endif + +#undef __CL_HAS_ANON_STRUCT__ +#undef __CL_ANON_STRUCT__ +#if defined( _WIN32) && (_MSC_VER >= 1500) +#pragma warning( pop ) +#endif + +#endif /* __CL_PLATFORM_H */ diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/opencl.h b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/opencl.h new file mode 100644 index 000000000..fccacd168 --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/headers/1.2/opencl.h @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2008-2012 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and/or associated documentation files (the + * "Materials"), to deal in the Materials without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Materials, and to + * permit persons to whom the Materials are furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Materials. + * + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + ******************************************************************************/ + +/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */ + +#ifndef __OPENCL_H +#define __OPENCL_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include + +#ifdef __cplusplus +} +#endif + +#endif /* __OPENCL_H */ + diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/image.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/image.go new file mode 100644 index 000000000..d6a996377 --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/image.go @@ -0,0 +1,83 @@ +// +build cl12 + +package cl + +// #ifdef __APPLE__ +// #include "OpenCL/opencl.h" +// #else +// #include "cl.h" +// #endif +import "C" +import ( + "image" + "unsafe" +) + +func (ctx *Context) CreateImage(flags MemFlag, imageFormat ImageFormat, imageDesc ImageDescription, data []byte) (*MemObject, error) { + format := imageFormat.toCl() + desc := imageDesc.toCl() + var dataPtr unsafe.Pointer + if data != nil { + dataPtr = unsafe.Pointer(&data[0]) + } + var err C.cl_int + clBuffer := C.clCreateImage(ctx.clContext, C.cl_mem_flags(flags), &format, &desc, dataPtr, &err) + if err != C.CL_SUCCESS { + return nil, toError(err) + } + if clBuffer == nil { + return nil, ErrUnknown + } + return newMemObject(clBuffer, len(data)), nil +} + +func (ctx *Context) CreateImageSimple(flags MemFlag, width, height int, channelOrder ChannelOrder, channelDataType ChannelDataType, data []byte) (*MemObject, error) { + format := ImageFormat{channelOrder, channelDataType} + desc := ImageDescription{ + Type: MemObjectTypeImage2D, + Width: width, + Height: height, + } + return ctx.CreateImage(flags, format, desc, data) +} + +func (ctx *Context) CreateImageFromImage(flags MemFlag, img image.Image) (*MemObject, error) { + switch m := img.(type) { + case *image.Gray: + format := ImageFormat{ChannelOrderIntensity, ChannelDataTypeUNormInt8} + desc := ImageDescription{ + Type: MemObjectTypeImage2D, + Width: m.Bounds().Dx(), + Height: m.Bounds().Dy(), + RowPitch: m.Stride, + } + return ctx.CreateImage(flags, format, desc, m.Pix) + case *image.RGBA: + format := ImageFormat{ChannelOrderRGBA, ChannelDataTypeUNormInt8} + desc := ImageDescription{ + Type: MemObjectTypeImage2D, + Width: m.Bounds().Dx(), + Height: m.Bounds().Dy(), + RowPitch: m.Stride, + } + return ctx.CreateImage(flags, format, desc, m.Pix) + } + + b := img.Bounds() + w := b.Dx() + h := b.Dy() + data := make([]byte, w*h*4) + dataOffset := 0 + for y := 0; y < h; y++ { + for x := 0; x < w; x++ { + c := img.At(x+b.Min.X, y+b.Min.Y) + r, g, b, a := c.RGBA() + data[dataOffset] = uint8(r >> 8) + data[dataOffset+1] = uint8(g >> 8) + data[dataOffset+2] = uint8(b >> 8) + data[dataOffset+3] = uint8(a >> 8) + dataOffset += 4 + } + } + return ctx.CreateImageSimple(flags, w, h, ChannelOrderRGBA, ChannelDataTypeUNormInt8, data) +} diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel.go new file mode 100644 index 000000000..894a775e8 --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel.go @@ -0,0 +1,127 @@ +package cl + +// #ifdef __APPLE__ +// #include "OpenCL/opencl.h" +// #else +// #include "cl.h" +// #endif +import "C" + +import ( + "fmt" + "unsafe" +) + +type ErrUnsupportedArgumentType struct { + Index int + Value interface{} +} + +func (e ErrUnsupportedArgumentType) Error() string { + return fmt.Sprintf("cl: unsupported argument type for index %d: %+v", e.Index, e.Value) +} + +type Kernel struct { + clKernel C.cl_kernel + name string +} + +type LocalBuffer int + +func releaseKernel(k *Kernel) { + if k.clKernel != nil { + C.clReleaseKernel(k.clKernel) + k.clKernel = nil + } +} + +func (k *Kernel) Release() { + releaseKernel(k) +} + +func (k *Kernel) SetArgs(args ...interface{}) error { + for index, arg := range args { + if err := k.SetArg(index, arg); err != nil { + return err + } + } + return nil +} + +func (k *Kernel) SetArg(index int, arg interface{}) error { + switch val := arg.(type) { + case uint8: + return k.SetArgUint8(index, val) + case int8: + return k.SetArgInt8(index, val) + case uint32: + return k.SetArgUint32(index, val) + case uint64: + return k.SetArgUint64(index, val) + case int32: + return k.SetArgInt32(index, val) + case float32: + return k.SetArgFloat32(index, val) + case *MemObject: + return k.SetArgBuffer(index, val) + case LocalBuffer: + return k.SetArgLocal(index, int(val)) + default: + return ErrUnsupportedArgumentType{Index: index, Value: arg} + } +} + +func (k *Kernel) SetArgBuffer(index int, buffer *MemObject) error { + return k.SetArgUnsafe(index, int(unsafe.Sizeof(buffer.clMem)), unsafe.Pointer(&buffer.clMem)) +} + +func (k *Kernel) SetArgFloat32(index int, val float32) error { + return k.SetArgUnsafe(index, int(unsafe.Sizeof(val)), unsafe.Pointer(&val)) +} + +func (k *Kernel) SetArgInt8(index int, val int8) error { + return k.SetArgUnsafe(index, int(unsafe.Sizeof(val)), unsafe.Pointer(&val)) +} + +func (k *Kernel) SetArgUint8(index int, val uint8) error { + return k.SetArgUnsafe(index, int(unsafe.Sizeof(val)), unsafe.Pointer(&val)) +} + +func (k *Kernel) SetArgInt32(index int, val int32) error { + return k.SetArgUnsafe(index, int(unsafe.Sizeof(val)), unsafe.Pointer(&val)) +} + +func (k *Kernel) SetArgUint32(index int, val uint32) error { + return k.SetArgUnsafe(index, int(unsafe.Sizeof(val)), unsafe.Pointer(&val)) +} + +func (k *Kernel) SetArgUint64(index int, val uint64) error { + return k.SetArgUnsafe(index, int(unsafe.Sizeof(val)), unsafe.Pointer(&val)) +} + +func (k *Kernel) SetArgLocal(index int, size int) error { + return k.SetArgUnsafe(index, size, nil) +} + +func (k *Kernel) SetArgUnsafe(index, argSize int, arg unsafe.Pointer) error { + //fmt.Println("FUNKY: ", index, argSize) + return toError(C.clSetKernelArg(k.clKernel, C.cl_uint(index), C.size_t(argSize), arg)) +} + +func (k *Kernel) PreferredWorkGroupSizeMultiple(device *Device) (int, error) { + var size C.size_t + err := C.clGetKernelWorkGroupInfo(k.clKernel, device.nullableId(), C.CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE, C.size_t(unsafe.Sizeof(size)), unsafe.Pointer(&size), nil) + return int(size), toError(err) +} + +func (k *Kernel) WorkGroupSize(device *Device) (int, error) { + var size C.size_t + err := C.clGetKernelWorkGroupInfo(k.clKernel, device.nullableId(), C.CL_KERNEL_WORK_GROUP_SIZE, C.size_t(unsafe.Sizeof(size)), unsafe.Pointer(&size), nil) + return int(size), toError(err) +} + +func (k *Kernel) NumArgs() (int, error) { + var num C.cl_uint + err := C.clGetKernelInfo(k.clKernel, C.CL_KERNEL_NUM_ARGS, C.size_t(unsafe.Sizeof(num)), unsafe.Pointer(&num), nil) + return int(num), toError(err) +} diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel10.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel10.go new file mode 100644 index 000000000..579946068 --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel10.go @@ -0,0 +1,7 @@ +// +build !cl12 + +package cl + +func (k *Kernel) ArgName(index int) (string, error) { + return "", ErrUnsupported +} diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel12.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel12.go new file mode 100644 index 000000000..d9e6f3546 --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/kernel12.go @@ -0,0 +1,20 @@ +// +build cl12 + +package cl + +// #ifdef __APPLE__ +// #include "OpenCL/opencl.h" +// #else +// #include "cl.h" +// #endif +import "C" +import "unsafe" + +func (k *Kernel) ArgName(index int) (string, error) { + var strC [1024]byte + var strN C.size_t + if err := C.clGetKernelArgInfo(k.clKernel, C.cl_uint(index), C.CL_KERNEL_ARG_NAME, 1024, unsafe.Pointer(&strC[0]), &strN); err != C.CL_SUCCESS { + return "", toError(err) + } + return string(strC[:strN]), nil +} diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/platform.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/platform.go new file mode 100644 index 000000000..fd1d162cf --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/platform.go @@ -0,0 +1,83 @@ +package cl + +// #ifdef __APPLE__ +// #include "OpenCL/opencl.h" +// #else +// #include "cl.h" +// #endif +import "C" + +import "unsafe" + +const maxPlatforms = 32 + +type Platform struct { + id C.cl_platform_id +} + +// Obtain the list of platforms available. +func GetPlatforms() ([]*Platform, error) { + var platformIds [maxPlatforms]C.cl_platform_id + var nPlatforms C.cl_uint + if err := C.clGetPlatformIDs(C.cl_uint(maxPlatforms), &platformIds[0], &nPlatforms); err != C.CL_SUCCESS { + return nil, toError(err) + } + platforms := make([]*Platform, nPlatforms) + for i := 0; i < int(nPlatforms); i++ { + platforms[i] = &Platform{id: platformIds[i]} + } + return platforms, nil +} + +func (p *Platform) GetDevices(deviceType DeviceType) ([]*Device, error) { + return GetDevices(p, deviceType) +} + +func (p *Platform) getInfoString(param C.cl_platform_info) (string, error) { + var strC [2048]byte + var strN C.size_t + if err := C.clGetPlatformInfo(p.id, param, 2048, unsafe.Pointer(&strC[0]), &strN); err != C.CL_SUCCESS { + return "", toError(err) + } + return string(strC[:(strN - 1)]), nil +} + +func (p *Platform) Name() string { + if str, err := p.getInfoString(C.CL_PLATFORM_NAME); err != nil { + panic("Platform.Name() should never fail") + } else { + return str + } +} + +func (p *Platform) Vendor() string { + if str, err := p.getInfoString(C.CL_PLATFORM_VENDOR); err != nil { + panic("Platform.Vendor() should never fail") + } else { + return str + } +} + +func (p *Platform) Profile() string { + if str, err := p.getInfoString(C.CL_PLATFORM_PROFILE); err != nil { + panic("Platform.Profile() should never fail") + } else { + return str + } +} + +func (p *Platform) Version() string { + if str, err := p.getInfoString(C.CL_PLATFORM_VERSION); err != nil { + panic("Platform.Version() should never fail") + } else { + return str + } +} + +func (p *Platform) Extensions() string { + if str, err := p.getInfoString(C.CL_PLATFORM_EXTENSIONS); err != nil { + panic("Platform.Extensions() should never fail") + } else { + return str + } +} diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/program.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/program.go new file mode 100644 index 000000000..e75f7ee0e --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/program.go @@ -0,0 +1,105 @@ +package cl + +// #include +// #ifdef __APPLE__ +// #include "OpenCL/opencl.h" +// #else +// #include "cl.h" +// #endif +import "C" + +import ( + "fmt" + "runtime" + "unsafe" +) + +type BuildError struct { + Message string + Device *Device +} + +func (e BuildError) Error() string { + if e.Device != nil { + return fmt.Sprintf("cl: build error on %q: %s", e.Device.Name(), e.Message) + } else { + return fmt.Sprintf("cl: build error: %s", e.Message) + } +} + +type Program struct { + clProgram C.cl_program + devices []*Device +} + +func releaseProgram(p *Program) { + if p.clProgram != nil { + C.clReleaseProgram(p.clProgram) + p.clProgram = nil + } +} + +func (p *Program) Release() { + releaseProgram(p) +} + +func (p *Program) BuildProgram(devices []*Device, options string) error { + var cOptions *C.char + if options != "" { + cOptions = C.CString(options) + defer C.free(unsafe.Pointer(cOptions)) + } + var deviceList []C.cl_device_id + var deviceListPtr *C.cl_device_id + numDevices := C.cl_uint(len(devices)) + if devices != nil && len(devices) > 0 { + deviceList = buildDeviceIdList(devices) + deviceListPtr = &deviceList[0] + } + if err := C.clBuildProgram(p.clProgram, numDevices, deviceListPtr, cOptions, nil, nil); err != C.CL_SUCCESS { + buffer := make([]byte, 4096) + var bLen C.size_t + var err C.cl_int + + for _, dev := range p.devices { + for i := 2; i >= 0; i-- { + err = C.clGetProgramBuildInfo(p.clProgram, dev.id, C.CL_PROGRAM_BUILD_LOG, C.size_t(len(buffer)), unsafe.Pointer(&buffer[0]), &bLen) + if err == C.CL_INVALID_VALUE && i > 0 && bLen < 1024*1024 { + // INVALID_VALUE probably means our buffer isn't large enough + buffer = make([]byte, bLen) + } else { + break + } + } + if err != C.CL_SUCCESS { + return toError(err) + } + + if bLen > 1 { + return BuildError{ + Device: dev, + Message: string(buffer[:bLen-1]), + } + } + } + + return BuildError{ + Device: nil, + Message: "build failed and produced no log entries", + } + } + return nil +} + +func (p *Program) CreateKernel(name string) (*Kernel, error) { + cName := C.CString(name) + defer C.free(unsafe.Pointer(cName)) + var err C.cl_int + clKernel := C.clCreateKernel(p.clProgram, cName, &err) + if err != C.CL_SUCCESS { + return nil, toError(err) + } + kernel := &Kernel{clKernel: clKernel, name: name} + runtime.SetFinalizer(kernel, releaseKernel) + return kernel, nil +} diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/queue.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/queue.go new file mode 100644 index 000000000..7762746da --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/queue.go @@ -0,0 +1,193 @@ +package cl + +// #ifdef __APPLE__ +// #include "OpenCL/opencl.h" +// #else +// #include "cl.h" +// #endif +import "C" + +import "unsafe" + +type CommandQueueProperty int + +const ( + CommandQueueOutOfOrderExecModeEnable CommandQueueProperty = C.CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE + CommandQueueProfilingEnable CommandQueueProperty = C.CL_QUEUE_PROFILING_ENABLE +) + +type CommandQueue struct { + clQueue C.cl_command_queue + device *Device +} + +func releaseCommandQueue(q *CommandQueue) { + if q.clQueue != nil { + C.clReleaseCommandQueue(q.clQueue) + q.clQueue = nil + } +} + +// Call clReleaseCommandQueue on the CommandQueue. Using the CommandQueue after Release will cause a panick. +func (q *CommandQueue) Release() { + releaseCommandQueue(q) +} + +// Blocks until all previously queued OpenCL commands in a command-queue are issued to the associated device and have completed. +func (q *CommandQueue) Finish() error { + return toError(C.clFinish(q.clQueue)) +} + +// Issues all previously queued OpenCL commands in a command-queue to the device associated with the command-queue. +func (q *CommandQueue) Flush() error { + return toError(C.clFlush(q.clQueue)) +} + +// Enqueues a command to map a region of the buffer object given by buffer into the host address space and returns a pointer to this mapped region. +func (q *CommandQueue) EnqueueMapBuffer(buffer *MemObject, blocking bool, flags MapFlag, offset, size int, eventWaitList []*Event) (*MappedMemObject, *Event, error) { + var event C.cl_event + var err C.cl_int + ptr := C.clEnqueueMapBuffer(q.clQueue, buffer.clMem, clBool(blocking), flags.toCl(), C.size_t(offset), C.size_t(size), C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event, &err) + if err != C.CL_SUCCESS { + return nil, nil, toError(err) + } + ev := newEvent(event) + if ptr == nil { + return nil, ev, ErrUnknown + } + return &MappedMemObject{ptr: ptr, size: size}, ev, nil +} + +// Enqueues a command to map a region of an image object into the host address space and returns a pointer to this mapped region. +func (q *CommandQueue) EnqueueMapImage(buffer *MemObject, blocking bool, flags MapFlag, origin, region [3]int, eventWaitList []*Event) (*MappedMemObject, *Event, error) { + cOrigin := sizeT3(origin) + cRegion := sizeT3(region) + var event C.cl_event + var err C.cl_int + var rowPitch, slicePitch C.size_t + ptr := C.clEnqueueMapImage(q.clQueue, buffer.clMem, clBool(blocking), flags.toCl(), &cOrigin[0], &cRegion[0], &rowPitch, &slicePitch, C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event, &err) + if err != C.CL_SUCCESS { + return nil, nil, toError(err) + } + ev := newEvent(event) + if ptr == nil { + return nil, ev, ErrUnknown + } + size := 0 // TODO: could calculate this + return &MappedMemObject{ptr: ptr, size: size, rowPitch: int(rowPitch), slicePitch: int(slicePitch)}, ev, nil +} + +// Enqueues a command to unmap a previously mapped region of a memory object. +func (q *CommandQueue) EnqueueUnmapMemObject(buffer *MemObject, mappedObj *MappedMemObject, eventWaitList []*Event) (*Event, error) { + var event C.cl_event + if err := C.clEnqueueUnmapMemObject(q.clQueue, buffer.clMem, mappedObj.ptr, C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event); err != C.CL_SUCCESS { + return nil, toError(err) + } + return newEvent(event), nil +} + +// Enqueues a command to copy a buffer object to another buffer object. +func (q *CommandQueue) EnqueueCopyBuffer(srcBuffer, dstBuffer *MemObject, srcOffset, dstOffset, byteCount int, eventWaitList []*Event) (*Event, error) { + var event C.cl_event + err := toError(C.clEnqueueCopyBuffer(q.clQueue, srcBuffer.clMem, dstBuffer.clMem, C.size_t(srcOffset), C.size_t(dstOffset), C.size_t(byteCount), C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event)) + return newEvent(event), err +} + +// Enqueue commands to write to a buffer object from host memory. +func (q *CommandQueue) EnqueueWriteBuffer(buffer *MemObject, blocking bool, offset, dataSize int, dataPtr unsafe.Pointer, eventWaitList []*Event) (*Event, error) { + var event C.cl_event + err := toError(C.clEnqueueWriteBuffer(q.clQueue, buffer.clMem, clBool(blocking), C.size_t(offset), C.size_t(dataSize), dataPtr, C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event)) + return newEvent(event), err +} + +func (q *CommandQueue) EnqueueWriteBufferFloat32(buffer *MemObject, blocking bool, offset int, data []float32, eventWaitList []*Event) (*Event, error) { + dataPtr := unsafe.Pointer(&data[0]) + dataSize := int(unsafe.Sizeof(data[0])) * len(data) + return q.EnqueueWriteBuffer(buffer, blocking, offset, dataSize, dataPtr, eventWaitList) +} + +// Enqueue commands to read from a buffer object to host memory. +func (q *CommandQueue) EnqueueReadBuffer(buffer *MemObject, blocking bool, offset, dataSize int, dataPtr unsafe.Pointer, eventWaitList []*Event) (*Event, error) { + var event C.cl_event + err := toError(C.clEnqueueReadBuffer(q.clQueue, buffer.clMem, clBool(blocking), C.size_t(offset), C.size_t(dataSize), dataPtr, C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event)) + return newEvent(event), err +} + +func (q *CommandQueue) EnqueueReadBufferFloat32(buffer *MemObject, blocking bool, offset int, data []float32, eventWaitList []*Event) (*Event, error) { + dataPtr := unsafe.Pointer(&data[0]) + dataSize := int(unsafe.Sizeof(data[0])) * len(data) + return q.EnqueueReadBuffer(buffer, blocking, offset, dataSize, dataPtr, eventWaitList) +} + +// Enqueues a command to execute a kernel on a device. +func (q *CommandQueue) EnqueueNDRangeKernel(kernel *Kernel, globalWorkOffset, globalWorkSize, localWorkSize []int, eventWaitList []*Event) (*Event, error) { + workDim := len(globalWorkSize) + var globalWorkOffsetList []C.size_t + var globalWorkOffsetPtr *C.size_t + if globalWorkOffset != nil { + globalWorkOffsetList = make([]C.size_t, len(globalWorkOffset)) + for i, off := range globalWorkOffset { + globalWorkOffsetList[i] = C.size_t(off) + } + globalWorkOffsetPtr = &globalWorkOffsetList[0] + } + var globalWorkSizeList []C.size_t + var globalWorkSizePtr *C.size_t + if globalWorkSize != nil { + globalWorkSizeList = make([]C.size_t, len(globalWorkSize)) + for i, off := range globalWorkSize { + globalWorkSizeList[i] = C.size_t(off) + } + globalWorkSizePtr = &globalWorkSizeList[0] + } + var localWorkSizeList []C.size_t + var localWorkSizePtr *C.size_t + if localWorkSize != nil { + localWorkSizeList = make([]C.size_t, len(localWorkSize)) + for i, off := range localWorkSize { + localWorkSizeList[i] = C.size_t(off) + } + localWorkSizePtr = &localWorkSizeList[0] + } + var event C.cl_event + err := toError(C.clEnqueueNDRangeKernel(q.clQueue, kernel.clKernel, C.cl_uint(workDim), globalWorkOffsetPtr, globalWorkSizePtr, localWorkSizePtr, C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event)) + return newEvent(event), err +} + +// Enqueues a command to read from a 2D or 3D image object to host memory. +func (q *CommandQueue) EnqueueReadImage(image *MemObject, blocking bool, origin, region [3]int, rowPitch, slicePitch int, data []byte, eventWaitList []*Event) (*Event, error) { + cOrigin := sizeT3(origin) + cRegion := sizeT3(region) + var event C.cl_event + err := toError(C.clEnqueueReadImage(q.clQueue, image.clMem, clBool(blocking), &cOrigin[0], &cRegion[0], C.size_t(rowPitch), C.size_t(slicePitch), unsafe.Pointer(&data[0]), C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event)) + return newEvent(event), err +} + +// Enqueues a command to write from a 2D or 3D image object to host memory. +func (q *CommandQueue) EnqueueWriteImage(image *MemObject, blocking bool, origin, region [3]int, rowPitch, slicePitch int, data []byte, eventWaitList []*Event) (*Event, error) { + cOrigin := sizeT3(origin) + cRegion := sizeT3(region) + var event C.cl_event + err := toError(C.clEnqueueWriteImage(q.clQueue, image.clMem, clBool(blocking), &cOrigin[0], &cRegion[0], C.size_t(rowPitch), C.size_t(slicePitch), unsafe.Pointer(&data[0]), C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event)) + return newEvent(event), err +} + +func (q *CommandQueue) EnqueueFillBuffer(buffer *MemObject, pattern unsafe.Pointer, patternSize, offset, size int, eventWaitList []*Event) (*Event, error) { + var event C.cl_event + err := toError(C.clEnqueueFillBuffer(q.clQueue, buffer.clMem, pattern, C.size_t(patternSize), C.size_t(offset), C.size_t(size), C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event)) + return newEvent(event), err +} + +// A synchronization point that enqueues a barrier operation. +func (q *CommandQueue) EnqueueBarrierWithWaitList(eventWaitList []*Event) (*Event, error) { + var event C.cl_event + err := toError(C.clEnqueueBarrierWithWaitList(q.clQueue, C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event)) + return newEvent(event), err +} + +// Enqueues a marker command which waits for either a list of events to complete, or all previously enqueued commands to complete. +func (q *CommandQueue) EnqueueMarkerWithWaitList(eventWaitList []*Event) (*Event, error) { + var event C.cl_event + err := toError(C.clEnqueueMarkerWithWaitList(q.clQueue, C.cl_uint(len(eventWaitList)), eventListPtr(eventWaitList), &event)) + return newEvent(event), err +} diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types.go new file mode 100644 index 000000000..00c846ce7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types.go @@ -0,0 +1,487 @@ +package cl + +// #ifdef __APPLE__ +// #include "OpenCL/opencl.h" +// #else +// #include "cl.h" +// #endif +import "C" + +import ( + "errors" + "fmt" + "reflect" + "runtime" + "strings" + "unsafe" +) + +var ( + ErrUnknown = errors.New("cl: unknown error") // Generally an unexpected result from an OpenCL function (e.g. CL_SUCCESS but null pointer) +) + +type ErrOther int + +func (e ErrOther) Error() string { + return fmt.Sprintf("cl: error %d", int(e)) +} + +var ( + ErrDeviceNotFound = errors.New("cl: Device Not Found") + ErrDeviceNotAvailable = errors.New("cl: Device Not Available") + ErrCompilerNotAvailable = errors.New("cl: Compiler Not Available") + ErrMemObjectAllocationFailure = errors.New("cl: Mem Object Allocation Failure") + ErrOutOfResources = errors.New("cl: Out Of Resources") + ErrOutOfHostMemory = errors.New("cl: Out Of Host Memory") + ErrProfilingInfoNotAvailable = errors.New("cl: Profiling Info Not Available") + ErrMemCopyOverlap = errors.New("cl: Mem Copy Overlap") + ErrImageFormatMismatch = errors.New("cl: Image Format Mismatch") + ErrImageFormatNotSupported = errors.New("cl: Image Format Not Supported") + ErrBuildProgramFailure = errors.New("cl: Build Program Failure") + ErrMapFailure = errors.New("cl: Map Failure") + ErrMisalignedSubBufferOffset = errors.New("cl: Misaligned Sub Buffer Offset") + ErrExecStatusErrorForEventsInWaitList = errors.New("cl: Exec Status Error For Events In Wait List") + ErrCompileProgramFailure = errors.New("cl: Compile Program Failure") + ErrLinkerNotAvailable = errors.New("cl: Linker Not Available") + ErrLinkProgramFailure = errors.New("cl: Link Program Failure") + ErrDevicePartitionFailed = errors.New("cl: Device Partition Failed") + ErrKernelArgInfoNotAvailable = errors.New("cl: Kernel Arg Info Not Available") + ErrInvalidValue = errors.New("cl: Invalid Value") + ErrInvalidDeviceType = errors.New("cl: Invalid Device Type") + ErrInvalidPlatform = errors.New("cl: Invalid Platform") + ErrInvalidDevice = errors.New("cl: Invalid Device") + ErrInvalidContext = errors.New("cl: Invalid Context") + ErrInvalidQueueProperties = errors.New("cl: Invalid Queue Properties") + ErrInvalidCommandQueue = errors.New("cl: Invalid Command Queue") + ErrInvalidHostPtr = errors.New("cl: Invalid Host Ptr") + ErrInvalidMemObject = errors.New("cl: Invalid Mem Object") + ErrInvalidImageFormatDescriptor = errors.New("cl: Invalid Image Format Descriptor") + ErrInvalidImageSize = errors.New("cl: Invalid Image Size") + ErrInvalidSampler = errors.New("cl: Invalid Sampler") + ErrInvalidBinary = errors.New("cl: Invalid Binary") + ErrInvalidBuildOptions = errors.New("cl: Invalid Build Options") + ErrInvalidProgram = errors.New("cl: Invalid Program") + ErrInvalidProgramExecutable = errors.New("cl: Invalid Program Executable") + ErrInvalidKernelName = errors.New("cl: Invalid Kernel Name") + ErrInvalidKernelDefinition = errors.New("cl: Invalid Kernel Definition") + ErrInvalidKernel = errors.New("cl: Invalid Kernel") + ErrInvalidArgIndex = errors.New("cl: Invalid Arg Index") + ErrInvalidArgValue = errors.New("cl: Invalid Arg Value") + ErrInvalidArgSize = errors.New("cl: Invalid Arg Size") + ErrInvalidKernelArgs = errors.New("cl: Invalid Kernel Args") + ErrInvalidWorkDimension = errors.New("cl: Invalid Work Dimension") + ErrInvalidWorkGroupSize = errors.New("cl: Invalid Work Group Size") + ErrInvalidWorkItemSize = errors.New("cl: Invalid Work Item Size") + ErrInvalidGlobalOffset = errors.New("cl: Invalid Global Offset") + ErrInvalidEventWaitList = errors.New("cl: Invalid Event Wait List") + ErrInvalidEvent = errors.New("cl: Invalid Event") + ErrInvalidOperation = errors.New("cl: Invalid Operation") + ErrInvalidGlObject = errors.New("cl: Invalid Gl Object") + ErrInvalidBufferSize = errors.New("cl: Invalid Buffer Size") + ErrInvalidMipLevel = errors.New("cl: Invalid Mip Level") + ErrInvalidGlobalWorkSize = errors.New("cl: Invalid Global Work Size") + ErrInvalidProperty = errors.New("cl: Invalid Property") + ErrInvalidImageDescriptor = errors.New("cl: Invalid Image Descriptor") + ErrInvalidCompilerOptions = errors.New("cl: Invalid Compiler Options") + ErrInvalidLinkerOptions = errors.New("cl: Invalid Linker Options") + ErrInvalidDevicePartitionCount = errors.New("cl: Invalid Device Partition Count") +) +var errorMap = map[C.cl_int]error{ + C.CL_SUCCESS: nil, + C.CL_DEVICE_NOT_FOUND: ErrDeviceNotFound, + C.CL_DEVICE_NOT_AVAILABLE: ErrDeviceNotAvailable, + C.CL_COMPILER_NOT_AVAILABLE: ErrCompilerNotAvailable, + C.CL_MEM_OBJECT_ALLOCATION_FAILURE: ErrMemObjectAllocationFailure, + C.CL_OUT_OF_RESOURCES: ErrOutOfResources, + C.CL_OUT_OF_HOST_MEMORY: ErrOutOfHostMemory, + C.CL_PROFILING_INFO_NOT_AVAILABLE: ErrProfilingInfoNotAvailable, + C.CL_MEM_COPY_OVERLAP: ErrMemCopyOverlap, + C.CL_IMAGE_FORMAT_MISMATCH: ErrImageFormatMismatch, + C.CL_IMAGE_FORMAT_NOT_SUPPORTED: ErrImageFormatNotSupported, + C.CL_BUILD_PROGRAM_FAILURE: ErrBuildProgramFailure, + C.CL_MAP_FAILURE: ErrMapFailure, + C.CL_MISALIGNED_SUB_BUFFER_OFFSET: ErrMisalignedSubBufferOffset, + C.CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST: ErrExecStatusErrorForEventsInWaitList, + C.CL_INVALID_VALUE: ErrInvalidValue, + C.CL_INVALID_DEVICE_TYPE: ErrInvalidDeviceType, + C.CL_INVALID_PLATFORM: ErrInvalidPlatform, + C.CL_INVALID_DEVICE: ErrInvalidDevice, + C.CL_INVALID_CONTEXT: ErrInvalidContext, + C.CL_INVALID_QUEUE_PROPERTIES: ErrInvalidQueueProperties, + C.CL_INVALID_COMMAND_QUEUE: ErrInvalidCommandQueue, + C.CL_INVALID_HOST_PTR: ErrInvalidHostPtr, + C.CL_INVALID_MEM_OBJECT: ErrInvalidMemObject, + C.CL_INVALID_IMAGE_FORMAT_DESCRIPTOR: ErrInvalidImageFormatDescriptor, + C.CL_INVALID_IMAGE_SIZE: ErrInvalidImageSize, + C.CL_INVALID_SAMPLER: ErrInvalidSampler, + C.CL_INVALID_BINARY: ErrInvalidBinary, + C.CL_INVALID_BUILD_OPTIONS: ErrInvalidBuildOptions, + C.CL_INVALID_PROGRAM: ErrInvalidProgram, + C.CL_INVALID_PROGRAM_EXECUTABLE: ErrInvalidProgramExecutable, + C.CL_INVALID_KERNEL_NAME: ErrInvalidKernelName, + C.CL_INVALID_KERNEL_DEFINITION: ErrInvalidKernelDefinition, + C.CL_INVALID_KERNEL: ErrInvalidKernel, + C.CL_INVALID_ARG_INDEX: ErrInvalidArgIndex, + C.CL_INVALID_ARG_VALUE: ErrInvalidArgValue, + C.CL_INVALID_ARG_SIZE: ErrInvalidArgSize, + C.CL_INVALID_KERNEL_ARGS: ErrInvalidKernelArgs, + C.CL_INVALID_WORK_DIMENSION: ErrInvalidWorkDimension, + C.CL_INVALID_WORK_GROUP_SIZE: ErrInvalidWorkGroupSize, + C.CL_INVALID_WORK_ITEM_SIZE: ErrInvalidWorkItemSize, + C.CL_INVALID_GLOBAL_OFFSET: ErrInvalidGlobalOffset, + C.CL_INVALID_EVENT_WAIT_LIST: ErrInvalidEventWaitList, + C.CL_INVALID_EVENT: ErrInvalidEvent, + C.CL_INVALID_OPERATION: ErrInvalidOperation, + C.CL_INVALID_GL_OBJECT: ErrInvalidGlObject, + C.CL_INVALID_BUFFER_SIZE: ErrInvalidBufferSize, + C.CL_INVALID_MIP_LEVEL: ErrInvalidMipLevel, + C.CL_INVALID_GLOBAL_WORK_SIZE: ErrInvalidGlobalWorkSize, + C.CL_INVALID_PROPERTY: ErrInvalidProperty, +} + +func toError(code C.cl_int) error { + if err, ok := errorMap[code]; ok { + return err + } + return ErrOther(code) +} + +type LocalMemType int + +const ( + LocalMemTypeNone LocalMemType = C.CL_NONE + LocalMemTypeGlobal LocalMemType = C.CL_GLOBAL + LocalMemTypeLocal LocalMemType = C.CL_LOCAL +) + +var localMemTypeMap = map[LocalMemType]string{ + LocalMemTypeNone: "None", + LocalMemTypeGlobal: "Global", + LocalMemTypeLocal: "Local", +} + +func (t LocalMemType) String() string { + name := localMemTypeMap[t] + if name == "" { + name = "Unknown" + } + return name +} + +type ExecCapability int + +const ( + ExecCapabilityKernel ExecCapability = C.CL_EXEC_KERNEL // The OpenCL device can execute OpenCL kernels. + ExecCapabilityNativeKernel ExecCapability = C.CL_EXEC_NATIVE_KERNEL // The OpenCL device can execute native kernels. +) + +func (ec ExecCapability) String() string { + var parts []string + if ec&ExecCapabilityKernel != 0 { + parts = append(parts, "Kernel") + } + if ec&ExecCapabilityNativeKernel != 0 { + parts = append(parts, "NativeKernel") + } + if parts == nil { + return "" + } + return strings.Join(parts, "|") +} + +type MemCacheType int + +const ( + MemCacheTypeNone MemCacheType = C.CL_NONE + MemCacheTypeReadOnlyCache MemCacheType = C.CL_READ_ONLY_CACHE + MemCacheTypeReadWriteCache MemCacheType = C.CL_READ_WRITE_CACHE +) + +func (ct MemCacheType) String() string { + switch ct { + case MemCacheTypeNone: + return "None" + case MemCacheTypeReadOnlyCache: + return "ReadOnly" + case MemCacheTypeReadWriteCache: + return "ReadWrite" + } + return fmt.Sprintf("Unknown(%x)", int(ct)) +} + +type MemFlag int + +const ( + MemReadWrite MemFlag = C.CL_MEM_READ_WRITE + MemWriteOnly MemFlag = C.CL_MEM_WRITE_ONLY + MemReadOnly MemFlag = C.CL_MEM_READ_ONLY + MemUseHostPtr MemFlag = C.CL_MEM_USE_HOST_PTR + MemAllocHostPtr MemFlag = C.CL_MEM_ALLOC_HOST_PTR + MemCopyHostPtr MemFlag = C.CL_MEM_COPY_HOST_PTR + + MemWriteOnlyHost MemFlag = C.CL_MEM_HOST_WRITE_ONLY + MemReadOnlyHost MemFlag = C.CL_MEM_HOST_READ_ONLY + MemNoAccessHost MemFlag = C.CL_MEM_HOST_NO_ACCESS +) + +type MemObjectType int + +const ( + MemObjectTypeBuffer MemObjectType = C.CL_MEM_OBJECT_BUFFER + MemObjectTypeImage2D MemObjectType = C.CL_MEM_OBJECT_IMAGE2D + MemObjectTypeImage3D MemObjectType = C.CL_MEM_OBJECT_IMAGE3D +) + +type MapFlag int + +const ( + // This flag specifies that the region being mapped in the memory object is being mapped for reading. + MapFlagRead MapFlag = C.CL_MAP_READ + MapFlagWrite MapFlag = C.CL_MAP_WRITE + MapFlagWriteInvalidateRegion MapFlag = C.CL_MAP_WRITE_INVALIDATE_REGION +) + +func (mf MapFlag) toCl() C.cl_map_flags { + return C.cl_map_flags(mf) +} + +type ChannelOrder int + +const ( + ChannelOrderR ChannelOrder = C.CL_R + ChannelOrderA ChannelOrder = C.CL_A + ChannelOrderRG ChannelOrder = C.CL_RG + ChannelOrderRA ChannelOrder = C.CL_RA + ChannelOrderRGB ChannelOrder = C.CL_RGB + ChannelOrderRGBA ChannelOrder = C.CL_RGBA + ChannelOrderBGRA ChannelOrder = C.CL_BGRA + ChannelOrderARGB ChannelOrder = C.CL_ARGB + ChannelOrderIntensity ChannelOrder = C.CL_INTENSITY + ChannelOrderLuminance ChannelOrder = C.CL_LUMINANCE + ChannelOrderRx ChannelOrder = C.CL_Rx + ChannelOrderRGx ChannelOrder = C.CL_RGx + ChannelOrderRGBx ChannelOrder = C.CL_RGBx +) + +var channelOrderNameMap = map[ChannelOrder]string{ + ChannelOrderR: "R", + ChannelOrderA: "A", + ChannelOrderRG: "RG", + ChannelOrderRA: "RA", + ChannelOrderRGB: "RGB", + ChannelOrderRGBA: "RGBA", + ChannelOrderBGRA: "BGRA", + ChannelOrderARGB: "ARGB", + ChannelOrderIntensity: "Intensity", + ChannelOrderLuminance: "Luminance", + ChannelOrderRx: "Rx", + ChannelOrderRGx: "RGx", + ChannelOrderRGBx: "RGBx", +} + +func (co ChannelOrder) String() string { + name := channelOrderNameMap[co] + if name == "" { + name = fmt.Sprintf("Unknown(%x)", int(co)) + } + return name +} + +type ChannelDataType int + +const ( + ChannelDataTypeSNormInt8 ChannelDataType = C.CL_SNORM_INT8 + ChannelDataTypeSNormInt16 ChannelDataType = C.CL_SNORM_INT16 + ChannelDataTypeUNormInt8 ChannelDataType = C.CL_UNORM_INT8 + ChannelDataTypeUNormInt16 ChannelDataType = C.CL_UNORM_INT16 + ChannelDataTypeUNormShort565 ChannelDataType = C.CL_UNORM_SHORT_565 + ChannelDataTypeUNormShort555 ChannelDataType = C.CL_UNORM_SHORT_555 + ChannelDataTypeUNormInt101010 ChannelDataType = C.CL_UNORM_INT_101010 + ChannelDataTypeSignedInt8 ChannelDataType = C.CL_SIGNED_INT8 + ChannelDataTypeSignedInt16 ChannelDataType = C.CL_SIGNED_INT16 + ChannelDataTypeSignedInt32 ChannelDataType = C.CL_SIGNED_INT32 + ChannelDataTypeUnsignedInt8 ChannelDataType = C.CL_UNSIGNED_INT8 + ChannelDataTypeUnsignedInt16 ChannelDataType = C.CL_UNSIGNED_INT16 + ChannelDataTypeUnsignedInt32 ChannelDataType = C.CL_UNSIGNED_INT32 + ChannelDataTypeHalfFloat ChannelDataType = C.CL_HALF_FLOAT + ChannelDataTypeFloat ChannelDataType = C.CL_FLOAT +) + +var channelDataTypeNameMap = map[ChannelDataType]string{ + ChannelDataTypeSNormInt8: "SNormInt8", + ChannelDataTypeSNormInt16: "SNormInt16", + ChannelDataTypeUNormInt8: "UNormInt8", + ChannelDataTypeUNormInt16: "UNormInt16", + ChannelDataTypeUNormShort565: "UNormShort565", + ChannelDataTypeUNormShort555: "UNormShort555", + ChannelDataTypeUNormInt101010: "UNormInt101010", + ChannelDataTypeSignedInt8: "SignedInt8", + ChannelDataTypeSignedInt16: "SignedInt16", + ChannelDataTypeSignedInt32: "SignedInt32", + ChannelDataTypeUnsignedInt8: "UnsignedInt8", + ChannelDataTypeUnsignedInt16: "UnsignedInt16", + ChannelDataTypeUnsignedInt32: "UnsignedInt32", + ChannelDataTypeHalfFloat: "HalfFloat", + ChannelDataTypeFloat: "Float", +} + +func (ct ChannelDataType) String() string { + name := channelDataTypeNameMap[ct] + if name == "" { + name = fmt.Sprintf("Unknown(%x)", int(ct)) + } + return name +} + +type ImageFormat struct { + ChannelOrder ChannelOrder + ChannelDataType ChannelDataType +} + +func (f ImageFormat) toCl() C.cl_image_format { + var format C.cl_image_format + format.image_channel_order = C.cl_channel_order(f.ChannelOrder) + format.image_channel_data_type = C.cl_channel_type(f.ChannelDataType) + return format +} + +type ProfilingInfo int + +const ( + // A 64-bit value that describes the current device time counter in + // nanoseconds when the command identified by event is enqueued in + // a command-queue by the host. + ProfilingInfoCommandQueued ProfilingInfo = C.CL_PROFILING_COMMAND_QUEUED + // A 64-bit value that describes the current device time counter in + // nanoseconds when the command identified by event that has been + // enqueued is submitted by the host to the device associated with the command-queue. + ProfilingInfoCommandSubmit ProfilingInfo = C.CL_PROFILING_COMMAND_SUBMIT + // A 64-bit value that describes the current device time counter in + // nanoseconds when the command identified by event starts execution on the device. + ProfilingInfoCommandStart ProfilingInfo = C.CL_PROFILING_COMMAND_START + // A 64-bit value that describes the current device time counter in + // nanoseconds when the command identified by event has finished + // execution on the device. + ProfilingInfoCommandEnd ProfilingInfo = C.CL_PROFILING_COMMAND_END +) + +type CommmandExecStatus int + +const ( + CommmandExecStatusComplete CommmandExecStatus = C.CL_COMPLETE + CommmandExecStatusRunning CommmandExecStatus = C.CL_RUNNING + CommmandExecStatusSubmitted CommmandExecStatus = C.CL_SUBMITTED + CommmandExecStatusQueued CommmandExecStatus = C.CL_QUEUED +) + +type Event struct { + clEvent C.cl_event +} + +func releaseEvent(ev *Event) { + if ev.clEvent != nil { + C.clReleaseEvent(ev.clEvent) + ev.clEvent = nil + } +} + +func (e *Event) Release() { + releaseEvent(e) +} + +func (e *Event) GetEventProfilingInfo(paramName ProfilingInfo) (int64, error) { + var paramValue C.cl_ulong + if err := C.clGetEventProfilingInfo(e.clEvent, C.cl_profiling_info(paramName), C.size_t(unsafe.Sizeof(paramValue)), unsafe.Pointer(¶mValue), nil); err != C.CL_SUCCESS { + return 0, toError(err) + } + return int64(paramValue), nil +} + +// Sets the execution status of a user event object. +// +// `status` specifies the new execution status to be set and +// can be CL_COMPLETE or a negative integer value to indicate +// an error. A negative integer value causes all enqueued commands +// that wait on this user event to be terminated. clSetUserEventStatus +// can only be called once to change the execution status of event. +func (e *Event) SetUserEventStatus(status int) error { + return toError(C.clSetUserEventStatus(e.clEvent, C.cl_int(status))) +} + +// Waits on the host thread for commands identified by event objects in +// events to complete. A command is considered complete if its execution +// status is CL_COMPLETE or a negative value. The events specified in +// event_list act as synchronization points. +// +// If the cl_khr_gl_event extension is enabled, event objects can also be +// used to reflect the status of an OpenGL sync object. The sync object +// in turn refers to a fence command executing in an OpenGL command +// stream. This provides another method of coordinating sharing of buffers +// and images between OpenGL and OpenCL. +func WaitForEvents(events []*Event) error { + return toError(C.clWaitForEvents(C.cl_uint(len(events)), eventListPtr(events))) +} + +func newEvent(clEvent C.cl_event) *Event { + ev := &Event{clEvent: clEvent} + runtime.SetFinalizer(ev, releaseEvent) + return ev +} + +func eventListPtr(el []*Event) *C.cl_event { + if el == nil { + return nil + } + elist := make([]C.cl_event, len(el)) + for i, e := range el { + elist[i] = e.clEvent + } + return (*C.cl_event)(&elist[0]) +} + +func clBool(b bool) C.cl_bool { + if b { + return C.CL_TRUE + } + return C.CL_FALSE +} + +func sizeT3(i3 [3]int) [3]C.size_t { + var val [3]C.size_t + val[0] = C.size_t(i3[0]) + val[1] = C.size_t(i3[1]) + val[2] = C.size_t(i3[2]) + return val +} + +type MappedMemObject struct { + ptr unsafe.Pointer + size int + rowPitch int + slicePitch int +} + +func (mb *MappedMemObject) ByteSlice() []byte { + var byteSlice []byte + sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&byteSlice)) + sliceHeader.Cap = mb.size + sliceHeader.Len = mb.size + sliceHeader.Data = uintptr(mb.ptr) + return byteSlice +} + +func (mb *MappedMemObject) Ptr() unsafe.Pointer { + return mb.ptr +} + +func (mb *MappedMemObject) Size() int { + return mb.size +} + +func (mb *MappedMemObject) RowPitch() int { + return mb.rowPitch +} + +func (mb *MappedMemObject) SlicePitch() int { + return mb.slicePitch +} diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types12.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types12.go new file mode 100644 index 000000000..58023cb60 --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types12.go @@ -0,0 +1,71 @@ +// +build cl12 + +package cl + +// #ifdef __APPLE__ +// #include "OpenCL/opencl.h" +// #else +// #include "cl.h" +// #endif +import "C" + +const ( + ChannelDataTypeUNormInt24 ChannelDataType = C.CL_UNORM_INT24 + ChannelOrderDepth ChannelOrder = C.CL_DEPTH + ChannelOrderDepthStencil ChannelOrder = C.CL_DEPTH_STENCIL + MemHostNoAccess MemFlag = C.CL_MEM_HOST_NO_ACCESS // OpenCL 1.2 + MemHostReadOnly MemFlag = C.CL_MEM_HOST_READ_ONLY // OpenCL 1.2 + MemHostWriteOnly MemFlag = C.CL_MEM_HOST_WRITE_ONLY // OpenCL 1.2 + MemObjectTypeImage1D MemObjectType = C.CL_MEM_OBJECT_IMAGE1D + MemObjectTypeImage1DArray MemObjectType = C.CL_MEM_OBJECT_IMAGE1D_ARRAY + MemObjectTypeImage1DBuffer MemObjectType = C.CL_MEM_OBJECT_IMAGE1D_BUFFER + MemObjectTypeImage2DArray MemObjectType = C.CL_MEM_OBJECT_IMAGE2D_ARRAY + // This flag specifies that the region being mapped in the memory object is being mapped for writing. + // + // The contents of the region being mapped are to be discarded. This is typically the case when the + // region being mapped is overwritten by the host. This flag allows the implementation to no longer + // guarantee that the pointer returned by clEnqueueMapBuffer or clEnqueueMapImage contains the + // latest bits in the region being mapped which can be a significant performance enhancement. + MapFlagWriteInvalidateRegion MapFlag = C.CL_MAP_WRITE_INVALIDATE_REGION +) + +func init() { + errorMap[C.CL_COMPILE_PROGRAM_FAILURE] = ErrCompileProgramFailure + errorMap[C.CL_DEVICE_PARTITION_FAILED] = ErrDevicePartitionFailed + errorMap[C.CL_INVALID_COMPILER_OPTIONS] = ErrInvalidCompilerOptions + errorMap[C.CL_INVALID_DEVICE_PARTITION_COUNT] = ErrInvalidDevicePartitionCount + errorMap[C.CL_INVALID_IMAGE_DESCRIPTOR] = ErrInvalidImageDescriptor + errorMap[C.CL_INVALID_LINKER_OPTIONS] = ErrInvalidLinkerOptions + errorMap[C.CL_KERNEL_ARG_INFO_NOT_AVAILABLE] = ErrKernelArgInfoNotAvailable + errorMap[C.CL_LINK_PROGRAM_FAILURE] = ErrLinkProgramFailure + errorMap[C.CL_LINKER_NOT_AVAILABLE] = ErrLinkerNotAvailable + channelOrderNameMap[ChannelOrderDepth] = "Depth" + channelOrderNameMap[ChannelOrderDepthStencil] = "DepthStencil" + channelDataTypeNameMap[ChannelDataTypeUNormInt24] = "UNormInt24" +} + +type ImageDescription struct { + Type MemObjectType + Width, Height, Depth int + ArraySize, RowPitch, SlicePitch int + NumMipLevels, NumSamples int + Buffer *MemObject +} + +func (d ImageDescription) toCl() C.cl_image_desc { + var desc C.cl_image_desc + desc.image_type = C.cl_mem_object_type(d.Type) + desc.image_width = C.size_t(d.Width) + desc.image_height = C.size_t(d.Height) + desc.image_depth = C.size_t(d.Depth) + desc.image_array_size = C.size_t(d.ArraySize) + desc.image_row_pitch = C.size_t(d.RowPitch) + desc.image_slice_pitch = C.size_t(d.SlicePitch) + desc.num_mip_levels = C.cl_uint(d.NumMipLevels) + desc.num_samples = C.cl_uint(d.NumSamples) + desc.buffer = nil + if d.Buffer != nil { + desc.buffer = d.Buffer.clMem + } + return desc +} diff --git a/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types_darwin.go b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types_darwin.go new file mode 100644 index 000000000..ddcf74906 --- /dev/null +++ b/Godeps/_workspace/src/github.com/Gustav-Simonsson/go-opencl/cl/types_darwin.go @@ -0,0 +1,45 @@ +package cl + +// #ifdef __APPLE__ +// #include "OpenCL/opencl.h" +// #else +// #include "cl.h" +// #endif +import "C" + +// Extension: cl_APPLE_fixed_alpha_channel_orders +// +// These selectors may be passed to clCreateImage2D() in the cl_image_format.image_channel_order field. +// They are like CL_BGRA and CL_ARGB except that the alpha channel to be ignored. On calls to read_imagef, +// the alpha will be 0xff (1.0f) if the sample falls in the image and 0 if it does not fall in the image. +// On calls to write_imagef, the alpha value is ignored and 0xff (1.0f) is written. These formats are +// currently only available for the CL_UNORM_INT8 cl_channel_type. They are intended to support legacy +// image formats. +const ( + ChannelOrder1RGBApple ChannelOrder = C.CL_1RGB_APPLE // Introduced in MacOS X.7. + ChannelOrderBGR1Apple ChannelOrder = C.CL_BGR1_APPLE // Introduced in MacOS X.7. +) + +// Extension: cl_APPLE_biased_fixed_point_image_formats +// +// This selector may be passed to clCreateImage2D() in the cl_image_format.image_channel_data_type field. +// It defines a biased signed 1.14 fixed point storage format, with range [-1, 3). The conversion from +// float to this fixed point format is defined as follows: +// +// ushort float_to_sfixed14( float x ){ +// int i = convert_int_sat_rte( x * 0x1.0p14f ); // scale [-1, 3.0) to [-16384, 3*16384), round to nearest integer +// i = add_sat( i, 0x4000 ); // apply bias, to convert to [0, 65535) range +// return convert_ushort_sat(i); // clamp to destination size +// } +// +// The inverse conversion is the reverse process. The formats are currently only available on the CPU with +// the CL_RGBA channel layout. +const ( + ChannelDataTypeSFixed14Apple ChannelDataType = C.CL_SFIXED14_APPLE // Introduced in MacOS X.7. +) + +func init() { + channelOrderNameMap[ChannelOrder1RGBApple] = "1RGBApple" + channelOrderNameMap[ChannelOrderBGR1Apple] = "RGB1Apple" + channelDataTypeNameMap[ChannelDataTypeSFixed14Apple] = "SFixed14Apple" +} diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go index d0864da7f..ddb8ba583 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go @@ -30,8 +30,8 @@ import ( ) var ( - minDifficulty = new(big.Int).Exp(big.NewInt(2), big.NewInt(256), big.NewInt(0)) - sharedLight = new(Light) + maxUint256 = new(big.Int).Exp(big.NewInt(2), big.NewInt(256), big.NewInt(0)) + sharedLight = new(Light) ) const ( @@ -140,7 +140,7 @@ func (l *Light) Verify(block pow.Block) bool { // the finalizer before the call completes. _ = cache // The actual check. - target := new(big.Int).Div(minDifficulty, difficulty) + target := new(big.Int).Div(maxUint256, difficulty) return h256ToHash(ret.result).Big().Cmp(target) <= 0 } @@ -199,7 +199,7 @@ func (d *dag) generate() { if d.dir == "" { d.dir = DefaultDir } - glog.V(logger.Info).Infof("Generating DAG for epoch %d (%x)", d.epoch, seedHash) + glog.V(logger.Info).Infof("Generating DAG for epoch %d (size %d) (%x)", d.epoch, dagSize, seedHash) // Generate a temporary cache. // TODO: this could share the cache with Light cache := C.ethash_light_new_internal(cacheSize, (*C.ethash_h256_t)(unsafe.Pointer(&seedHash[0]))) @@ -220,14 +220,18 @@ func (d *dag) generate() { }) } -func freeDAG(h *dag) { - C.ethash_full_delete(h.ptr) - h.ptr = nil +func freeDAG(d *dag) { + C.ethash_full_delete(d.ptr) + d.ptr = nil +} + +func (d *dag) Ptr() unsafe.Pointer { + return unsafe.Pointer(d.ptr.data) } //export ethashGoCallback func ethashGoCallback(percent C.unsigned) C.int { - glog.V(logger.Info).Infof("Still generating DAG: %d%%", percent) + glog.V(logger.Info).Infof("Generating DAG: %d%%", percent) return 0 } @@ -273,7 +277,7 @@ func (pow *Full) getDAG(blockNum uint64) (d *dag) { return d } -func (pow *Full) Search(block pow.Block, stop <-chan struct{}) (nonce uint64, mixDigest []byte) { +func (pow *Full) Search(block pow.Block, stop <-chan struct{}, index int) (nonce uint64, mixDigest []byte) { dag := pow.getDAG(block.NumberU64()) r := rand.New(rand.NewSource(time.Now().UnixNano())) @@ -286,7 +290,7 @@ func (pow *Full) Search(block pow.Block, stop <-chan struct{}) (nonce uint64, mi nonce = uint64(r.Int63()) hash := hashToH256(block.HashNoNonce()) - target := new(big.Int).Div(minDifficulty, diff) + target := new(big.Int).Div(maxUint256, diff) for { select { case <-stop: diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_opencl.go b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_opencl.go new file mode 100644 index 000000000..332b7f524 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_opencl.go @@ -0,0 +1,629 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +// +build opencl + +package ethash + +//#cgo LDFLAGS: -w +//#include +//#include +//#include "src/libethash/internal.h" +import "C" + +import ( + crand "crypto/rand" + "encoding/binary" + "fmt" + "math" + "math/big" + mrand "math/rand" + "strconv" + "strings" + "sync" + "sync/atomic" + "time" + "unsafe" + + "github.com/Gustav-Simonsson/go-opencl/cl" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/pow" +) + +/* + + This code have two main entry points: + + 1. The initCL(...) function configures one or more OpenCL device + (for now only GPU) and loads the Ethash DAG onto device memory + + 2. The Search(...) function loads a Ethash nonce into device(s) memory and + executes the Ethash OpenCL kernel. + + Throughout the code, we refer to "host memory" and "device memory". + For most systems (e.g. regular PC GPU miner) the host memory is RAM and + device memory is the GPU global memory (e.g. GDDR5). + + References mentioned in code comments: + + 1. https://github.com/ethereum/wiki/wiki/Ethash + 2. https://github.com/ethereum/cpp-ethereum/blob/develop/libethash-cl/ethash_cl_miner.cpp + 3. https://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/ + 4. http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2013/12/AMD_OpenCL_Programming_User_Guide.pdf + +*/ + +type OpenCLDevice struct { + deviceId int + device *cl.Device + openCL11 bool // OpenCL version 1.1 and 1.2 are handled a bit different + openCL12 bool + + dagBuf *cl.MemObject // Ethash full DAG in device mem + headerBuf *cl.MemObject // Hash of block-to-mine in device mem + searchBuffers []*cl.MemObject + + searchKernel *cl.Kernel + hashKernel *cl.Kernel + + queue *cl.CommandQueue + ctx *cl.Context + workGroupSize int + + nonceRand *mrand.Rand // seeded by crypto/rand, see comments where it's initialised + result common.Hash +} + +type OpenCLMiner struct { + mu sync.Mutex + + ethash *Ethash // Ethash full DAG & cache in host mem + + deviceIds []int + devices []*OpenCLDevice + + dagSize uint64 + + hashRate int32 // Go atomics & uint64 have some issues; int32 is supported on all platforms +} + +type pendingSearch struct { + bufIndex uint32 + startNonce uint64 +} + +const ( + SIZEOF_UINT32 = 4 + + // See [1] + ethashMixBytesLen = 128 + ethashAccesses = 64 + + // See [4] + workGroupSize = 32 // must be multiple of 8 + maxSearchResults = 63 + searchBufSize = 2 + globalWorkSize = 1024 * 256 +) + +func NewCL(deviceIds []int) *OpenCLMiner { + ids := make([]int, len(deviceIds)) + copy(ids, deviceIds) + return &OpenCLMiner{ + ethash: New(), + dagSize: 0, // to see if we need to update DAG. + deviceIds: ids, + } +} + +func PrintDevices() { + fmt.Println("=============================================") + fmt.Println("============ OpenCL Device Info =============") + fmt.Println("=============================================") + + var found []*cl.Device + + platforms, err := cl.GetPlatforms() + if err != nil { + fmt.Println("Plaform error (check your OpenCL installation): %v", err) + return + } + + for i, p := range platforms { + fmt.Println("Platform id ", i) + fmt.Println("Platform Name ", p.Name()) + fmt.Println("Platform Vendor ", p.Vendor()) + fmt.Println("Platform Version ", p.Version()) + fmt.Println("Platform Extensions ", p.Extensions()) + fmt.Println("Platform Profile ", p.Profile()) + fmt.Println("") + + devices, err := cl.GetDevices(p, cl.DeviceTypeGPU) + if err != nil { + fmt.Println("Device error (check your GPU drivers) :", err) + return + } + + for _, d := range devices { + fmt.Println("Device OpenCL id ", i) + fmt.Println("Device id for mining ", len(found)) + fmt.Println("Device Name ", d.Name()) + fmt.Println("Vendor ", d.Vendor()) + fmt.Println("Version ", d.Version()) + fmt.Println("Driver version ", d.DriverVersion()) + fmt.Println("Address bits ", d.AddressBits()) + fmt.Println("Max clock freq ", d.MaxClockFrequency()) + fmt.Println("Global mem size ", d.GlobalMemSize()) + fmt.Println("Max constant buffer size", d.MaxConstantBufferSize()) + fmt.Println("Max mem alloc size ", d.MaxMemAllocSize()) + fmt.Println("Max compute units ", d.MaxComputeUnits()) + fmt.Println("Max work group size ", d.MaxWorkGroupSize()) + fmt.Println("Max work item sizes ", d.MaxWorkItemSizes()) + fmt.Println("=============================================") + + found = append(found, d) + } + } + if len(found) == 0 { + fmt.Println("Found no GPU(s). Check that your OS can see the GPU(s)") + } else { + var idsFormat string + for i := 0; i < len(found); i++ { + idsFormat += strconv.Itoa(i) + if i != len(found)-1 { + idsFormat += "," + } + } + fmt.Printf("Found %v devices. Benchmark first GPU: geth gpubench 0\n", len(found)) + fmt.Printf("Mine using all GPUs: geth --minegpu %v\n", idsFormat) + } +} + +// See [2]. We basically do the same here, but the Go OpenCL bindings +// are at a slightly higher abtraction level. +func InitCL(blockNum uint64, c *OpenCLMiner) error { + platforms, err := cl.GetPlatforms() + if err != nil { + return fmt.Errorf("Plaform error: %v\nCheck your OpenCL installation and then run geth gpuinfo", err) + } + + var devices []*cl.Device + for _, p := range platforms { + ds, err := cl.GetDevices(p, cl.DeviceTypeGPU) + if err != nil { + return fmt.Errorf("Devices error: %v\nCheck your GPU drivers and then run geth gpuinfo", err) + } + for _, d := range ds { + devices = append(devices, d) + } + } + + pow := New() + _ = pow.getDAG(blockNum) // generates DAG if we don't have it + pow.Light.getCache(blockNum) // and cache + + c.ethash = pow + dagSize := uint64(C.ethash_get_datasize(C.uint64_t(blockNum))) + c.dagSize = dagSize + + for _, id := range c.deviceIds { + if id > len(devices)-1 { + return fmt.Errorf("Device id not found. See available device ids with: geth gpuinfo") + } else { + err := initCLDevice(id, devices[id], c) + if err != nil { + return err + } + } + } + if len(c.devices) == 0 { + return fmt.Errorf("No GPU devices found") + } + return nil +} + +func initCLDevice(deviceId int, device *cl.Device, c *OpenCLMiner) error { + devMaxAlloc := uint64(device.MaxMemAllocSize()) + devGlobalMem := uint64(device.GlobalMemSize()) + + // TODO: more fine grained version logic + if device.Version() == "OpenCL 1.0" { + fmt.Println("Device OpenCL version not supported: ", device.Version()) + return fmt.Errorf("opencl version not supported") + } + + var cl11, cl12 bool + if device.Version() == "OpenCL 1.1" { + cl11 = true + } + if device.Version() == "OpenCL 1.2" { + cl12 = true + } + + // log warnings but carry on; some device drivers report inaccurate values + if c.dagSize > devGlobalMem { + fmt.Printf("WARNING: device memory may be insufficient: %v. DAG size: %v.\n", devGlobalMem, c.dagSize) + } + + if c.dagSize > devMaxAlloc { + fmt.Printf("WARNING: DAG size (%v) larger than device max memory allocation size (%v).\n", c.dagSize, devMaxAlloc) + fmt.Printf("You probably have to export GPU_MAX_ALLOC_PERCENT=95\n") + } + + fmt.Printf("Initialising device %v: %v\n", deviceId, device.Name()) + + context, err := cl.CreateContext([]*cl.Device{device}) + if err != nil { + return fmt.Errorf("failed creating context:", err) + } + + // TODO: test running with CL_QUEUE_PROFILING_ENABLE for profiling? + queue, err := context.CreateCommandQueue(device, 0) + if err != nil { + return fmt.Errorf("command queue err:", err) + } + + // See [4] section 3.2 and [3] "clBuildProgram". + // The OpenCL kernel code is compiled at run-time. + kvs := make(map[string]string, 4) + kvs["GROUP_SIZE"] = strconv.FormatUint(workGroupSize, 10) + kvs["DAG_SIZE"] = strconv.FormatUint(c.dagSize/ethashMixBytesLen, 10) + kvs["ACCESSES"] = strconv.FormatUint(ethashAccesses, 10) + kvs["MAX_OUTPUTS"] = strconv.FormatUint(maxSearchResults, 10) + kernelCode := replaceWords(kernel, kvs) + + program, err := context.CreateProgramWithSource([]string{kernelCode}) + if err != nil { + return fmt.Errorf("program err:", err) + } + + /* if using AMD OpenCL impl, you can set this to debug on x86 CPU device. + see AMD OpenCL programming guide section 4.2 + + export in shell before running: + export AMD_OCL_BUILD_OPTIONS_APPEND="-g -O0" + export CPU_MAX_COMPUTE_UNITS=1 + + buildOpts := "-g -cl-opt-disable" + + */ + buildOpts := "" + err = program.BuildProgram([]*cl.Device{device}, buildOpts) + if err != nil { + return fmt.Errorf("program build err:", err) + } + + var searchKernelName, hashKernelName string + searchKernelName = "ethash_search" + hashKernelName = "ethash_hash" + + searchKernel, err := program.CreateKernel(searchKernelName) + hashKernel, err := program.CreateKernel(hashKernelName) + if err != nil { + return fmt.Errorf("kernel err:", err) + } + + // TODO: when this DAG size appears, patch the Go bindings + // (context.go) to work with uint64 as size_t + if c.dagSize > math.MaxInt32 { + fmt.Println("DAG too large for allocation.") + return fmt.Errorf("DAG too large for alloc") + } + + // TODO: patch up Go bindings to work with size_t, will overflow if > maxint32 + // TODO: fuck. shit's gonna overflow around 2017-06-09 12:17:02 + dagBuf := *(new(*cl.MemObject)) + dagBuf, err = context.CreateEmptyBuffer(cl.MemReadOnly, int(c.dagSize)) + if err != nil { + return fmt.Errorf("allocating dag buf failed: ", err) + } + + // write DAG to device mem + dagPtr := unsafe.Pointer(c.ethash.Full.current.ptr.data) + _, err = queue.EnqueueWriteBuffer(dagBuf, true, 0, int(c.dagSize), dagPtr, nil) + if err != nil { + return fmt.Errorf("writing to dag buf failed: ", err) + } + + searchBuffers := make([]*cl.MemObject, searchBufSize) + for i := 0; i < searchBufSize; i++ { + searchBuff, err := context.CreateEmptyBuffer(cl.MemWriteOnly, (1+maxSearchResults)*SIZEOF_UINT32) + if err != nil { + return fmt.Errorf("search buffer err:", err) + } + searchBuffers[i] = searchBuff + } + + headerBuf, err := context.CreateEmptyBuffer(cl.MemReadOnly, 32) + if err != nil { + return fmt.Errorf("header buffer err:", err) + } + + // Unique, random nonces are crucial for mining efficieny. + // While we do not need cryptographically secure PRNG for nonces, + // we want to have uniform distribution and minimal repetition of nonces. + // We could guarantee strict uniqueness of nonces by generating unique ranges, + // but a int64 seed from crypto/rand should be good enough. + // we then use math/rand for speed and to avoid draining OS entropy pool + seed, err := crand.Int(crand.Reader, big.NewInt(math.MaxInt64)) + if err != nil { + return err + } + nonceRand := mrand.New(mrand.NewSource(seed.Int64())) + + deviceStruct := &OpenCLDevice{ + deviceId: deviceId, + device: device, + openCL11: cl11, + openCL12: cl12, + + dagBuf: dagBuf, + headerBuf: headerBuf, + searchBuffers: searchBuffers, + + searchKernel: searchKernel, + hashKernel: hashKernel, + + queue: queue, + ctx: context, + + workGroupSize: workGroupSize, + + nonceRand: nonceRand, + } + c.devices = append(c.devices, deviceStruct) + + return nil +} + +func (c *OpenCLMiner) Search(block pow.Block, stop <-chan struct{}, index int) (uint64, []byte) { + c.mu.Lock() + newDagSize := uint64(C.ethash_get_datasize(C.uint64_t(block.NumberU64()))) + if newDagSize > c.dagSize { + // TODO: clean up buffers from previous DAG? + err := InitCL(block.NumberU64(), c) + if err != nil { + fmt.Println("OpenCL init error: ", err) + return 0, []byte{0} + } + } + defer c.mu.Unlock() + + // Avoid unneeded OpenCL initialisation if we received stop while running InitCL + select { + case <-stop: + return 0, []byte{0} + default: + } + + headerHash := block.HashNoNonce() + diff := block.Difficulty() + target256 := new(big.Int).Div(maxUint256, diff) + target64 := new(big.Int).Rsh(target256, 192).Uint64() + var zero uint32 = 0 + + d := c.devices[index] + + _, err := d.queue.EnqueueWriteBuffer(d.headerBuf, false, 0, 32, unsafe.Pointer(&headerHash[0]), nil) + if err != nil { + fmt.Println("Error in Search clEnqueueWriterBuffer : ", err) + return 0, []byte{0} + } + + for i := 0; i < searchBufSize; i++ { + _, err := d.queue.EnqueueWriteBuffer(d.searchBuffers[i], false, 0, 4, unsafe.Pointer(&zero), nil) + if err != nil { + fmt.Println("Error in Search clEnqueueWriterBuffer : ", err) + return 0, []byte{0} + } + } + + // wait for all search buffers to complete + err = d.queue.Finish() + if err != nil { + fmt.Println("Error in Search clFinish : ", err) + return 0, []byte{0} + } + + err = d.searchKernel.SetArg(1, d.headerBuf) + if err != nil { + fmt.Println("Error in Search clSetKernelArg : ", err) + return 0, []byte{0} + } + + err = d.searchKernel.SetArg(2, d.dagBuf) + if err != nil { + fmt.Println("Error in Search clSetKernelArg : ", err) + return 0, []byte{0} + } + + err = d.searchKernel.SetArg(4, target64) + if err != nil { + fmt.Println("Error in Search clSetKernelArg : ", err) + return 0, []byte{0} + } + err = d.searchKernel.SetArg(5, uint32(math.MaxUint32)) + if err != nil { + fmt.Println("Error in Search clSetKernelArg : ", err) + return 0, []byte{0} + } + + // wait on this before returning + var preReturnEvent *cl.Event + if d.openCL12 { + preReturnEvent, err = d.ctx.CreateUserEvent() + if err != nil { + fmt.Println("Error in Search create CL user event : ", err) + return 0, []byte{0} + } + } + + pending := make([]pendingSearch, 0, searchBufSize) + var p *pendingSearch + searchBufIndex := uint32(0) + var checkNonce uint64 + loops := int64(0) + prevHashRate := int32(0) + start := time.Now().UnixNano() + // we grab a single random nonce and sets this as argument to the kernel search function + // the device will then add each local threads gid to the nonce, creating a unique nonce + // for each device computing unit executing in parallel + initNonce := uint64(d.nonceRand.Int63()) + for nonce := initNonce; ; nonce += uint64(globalWorkSize) { + select { + case <-stop: + + /* + if d.openCL12 { + err = cl.WaitForEvents([]*cl.Event{preReturnEvent}) + if err != nil { + fmt.Println("Error in Search WaitForEvents: ", err) + } + } + */ + + atomic.AddInt32(&c.hashRate, -prevHashRate) + return 0, []byte{0} + default: + } + + if (loops % (1 << 7)) == 0 { + elapsed := time.Now().UnixNano() - start + // TODO: verify if this is correct hash rate calculation + hashes := (float64(1e9) / float64(elapsed)) * float64(loops*1024*256) + hashrateDiff := int32(hashes) - prevHashRate + prevHashRate = int32(hashes) + atomic.AddInt32(&c.hashRate, hashrateDiff) + } + loops++ + + err = d.searchKernel.SetArg(0, d.searchBuffers[searchBufIndex]) + if err != nil { + fmt.Println("Error in Search clSetKernelArg : ", err) + return 0, []byte{0} + } + err = d.searchKernel.SetArg(3, nonce) + if err != nil { + fmt.Println("Error in Search clSetKernelArg : ", err) + return 0, []byte{0} + } + + // execute kernel + _, err := d.queue.EnqueueNDRangeKernel( + d.searchKernel, + []int{0}, + []int{globalWorkSize}, + []int{d.workGroupSize}, + nil) + if err != nil { + fmt.Println("Error in Search clEnqueueNDRangeKernel : ", err) + return 0, []byte{0} + } + + pending = append(pending, pendingSearch{bufIndex: searchBufIndex, startNonce: nonce}) + searchBufIndex = (searchBufIndex + 1) % searchBufSize + + if len(pending) == searchBufSize { + p = &(pending[searchBufIndex]) + cres, _, err := d.queue.EnqueueMapBuffer(d.searchBuffers[p.bufIndex], true, + cl.MapFlagRead, 0, (1+maxSearchResults)*SIZEOF_UINT32, + nil) + if err != nil { + fmt.Println("Error in Search clEnqueueMapBuffer: ", err) + return 0, []byte{0} + } + + results := cres.ByteSlice() + nfound := binary.LittleEndian.Uint32(results) + nfound = uint32(math.Min(float64(nfound), float64(maxSearchResults))) + // OpenCL returns the offsets from the start nonce + for i := uint32(0); i < nfound; i++ { + lo := (i + 1) * SIZEOF_UINT32 + hi := (i + 2) * SIZEOF_UINT32 + upperNonce := uint64(binary.LittleEndian.Uint32(results[lo:hi])) + checkNonce = p.startNonce + upperNonce + if checkNonce != 0 { + cn := C.uint64_t(checkNonce) + ds := C.uint64_t(c.dagSize) + // We verify that the nonce is indeed a solution by + // executing the Ethash verification function (on the CPU). + ret := C.ethash_light_compute_internal(c.ethash.Light.current.ptr, ds, hashToH256(headerHash), cn) + // TODO: return result first + if ret.success && h256ToHash(ret.result).Big().Cmp(target256) <= 0 { + _, err = d.queue.EnqueueUnmapMemObject(d.searchBuffers[p.bufIndex], cres, nil) + if err != nil { + fmt.Println("Error in Search clEnqueueUnmapMemObject: ", err) + } + if d.openCL12 { + err = cl.WaitForEvents([]*cl.Event{preReturnEvent}) + if err != nil { + fmt.Println("Error in Search WaitForEvents: ", err) + } + } + return checkNonce, C.GoBytes(unsafe.Pointer(&ret.mix_hash), C.int(32)) + } + + _, err := d.queue.EnqueueWriteBuffer(d.searchBuffers[p.bufIndex], false, 0, 4, unsafe.Pointer(&zero), nil) + if err != nil { + fmt.Println("Error in Search cl: EnqueueWriteBuffer", err) + return 0, []byte{0} + } + } + } + _, err = d.queue.EnqueueUnmapMemObject(d.searchBuffers[p.bufIndex], cres, nil) + if err != nil { + fmt.Println("Error in Search clEnqueueUnMapMemObject: ", err) + return 0, []byte{0} + } + pending = append(pending[:searchBufIndex], pending[searchBufIndex+1:]...) + } + } + if d.openCL12 { + err := cl.WaitForEvents([]*cl.Event{preReturnEvent}) + if err != nil { + fmt.Println("Error in Search clWaitForEvents: ", err) + return 0, []byte{0} + } + } + return 0, []byte{0} +} + +func (c *OpenCLMiner) Verify(block pow.Block) bool { + return c.ethash.Light.Verify(block) +} +func (c *OpenCLMiner) GetHashrate() int64 { + return int64(atomic.LoadInt32(&c.hashRate)) +} +func (c *OpenCLMiner) Turbo(on bool) { + // This is GPU mining. Always be turbo. +} + +func replaceWords(text string, kvs map[string]string) string { + for k, v := range kvs { + text = strings.Replace(text, k, v, -1) + } + return text +} + +func logErr(err error) { + if err != nil { + fmt.Println("Error in OpenCL call:", err) + } +} + +func argErr(err error) error { + return fmt.Errorf("arg err: %v", err) +} diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_opencl_kernel_go_str.go b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_opencl_kernel_go_str.go new file mode 100644 index 000000000..695ff1829 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_opencl_kernel_go_str.go @@ -0,0 +1,600 @@ +package ethash + +/* DO NOT EDIT!!! + + This code is version controlled at + https://github.com/ethereum/cpp-ethereum/blob/develop/libethash-cl/ethash_cl_miner_kernel.cl + + If needed change it there first, then copy over here. +*/ + +const kernel = ` +// author Tim Hughes +// Tested on Radeon HD 7850 +// Hashrate: 15940347 hashes/s +// Bandwidth: 124533 MB/s +// search kernel should fit in <= 84 VGPRS (3 wavefronts) + +#define THREADS_PER_HASH (128 / 16) +#define HASHES_PER_LOOP (GROUP_SIZE / THREADS_PER_HASH) + +#define FNV_PRIME 0x01000193 + +__constant uint2 const Keccak_f1600_RC[24] = { + (uint2)(0x00000001, 0x00000000), + (uint2)(0x00008082, 0x00000000), + (uint2)(0x0000808a, 0x80000000), + (uint2)(0x80008000, 0x80000000), + (uint2)(0x0000808b, 0x00000000), + (uint2)(0x80000001, 0x00000000), + (uint2)(0x80008081, 0x80000000), + (uint2)(0x00008009, 0x80000000), + (uint2)(0x0000008a, 0x00000000), + (uint2)(0x00000088, 0x00000000), + (uint2)(0x80008009, 0x00000000), + (uint2)(0x8000000a, 0x00000000), + (uint2)(0x8000808b, 0x00000000), + (uint2)(0x0000008b, 0x80000000), + (uint2)(0x00008089, 0x80000000), + (uint2)(0x00008003, 0x80000000), + (uint2)(0x00008002, 0x80000000), + (uint2)(0x00000080, 0x80000000), + (uint2)(0x0000800a, 0x00000000), + (uint2)(0x8000000a, 0x80000000), + (uint2)(0x80008081, 0x80000000), + (uint2)(0x00008080, 0x80000000), + (uint2)(0x80000001, 0x00000000), + (uint2)(0x80008008, 0x80000000), +}; + +void keccak_f1600_round(uint2* a, uint r, uint out_size) +{ + #if !__ENDIAN_LITTLE__ + for (uint i = 0; i != 25; ++i) + a[i] = a[i].yx; + #endif + + uint2 b[25]; + uint2 t; + + // Theta + b[0] = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]; + b[1] = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]; + b[2] = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]; + b[3] = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]; + b[4] = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]; + t = b[4] ^ (uint2)(b[1].x << 1 | b[1].y >> 31, b[1].y << 1 | b[1].x >> 31); + a[0] ^= t; + a[5] ^= t; + a[10] ^= t; + a[15] ^= t; + a[20] ^= t; + t = b[0] ^ (uint2)(b[2].x << 1 | b[2].y >> 31, b[2].y << 1 | b[2].x >> 31); + a[1] ^= t; + a[6] ^= t; + a[11] ^= t; + a[16] ^= t; + a[21] ^= t; + t = b[1] ^ (uint2)(b[3].x << 1 | b[3].y >> 31, b[3].y << 1 | b[3].x >> 31); + a[2] ^= t; + a[7] ^= t; + a[12] ^= t; + a[17] ^= t; + a[22] ^= t; + t = b[2] ^ (uint2)(b[4].x << 1 | b[4].y >> 31, b[4].y << 1 | b[4].x >> 31); + a[3] ^= t; + a[8] ^= t; + a[13] ^= t; + a[18] ^= t; + a[23] ^= t; + t = b[3] ^ (uint2)(b[0].x << 1 | b[0].y >> 31, b[0].y << 1 | b[0].x >> 31); + a[4] ^= t; + a[9] ^= t; + a[14] ^= t; + a[19] ^= t; + a[24] ^= t; + + // Rho Pi + b[0] = a[0]; + b[10] = (uint2)(a[1].x << 1 | a[1].y >> 31, a[1].y << 1 | a[1].x >> 31); + b[7] = (uint2)(a[10].x << 3 | a[10].y >> 29, a[10].y << 3 | a[10].x >> 29); + b[11] = (uint2)(a[7].x << 6 | a[7].y >> 26, a[7].y << 6 | a[7].x >> 26); + b[17] = (uint2)(a[11].x << 10 | a[11].y >> 22, a[11].y << 10 | a[11].x >> 22); + b[18] = (uint2)(a[17].x << 15 | a[17].y >> 17, a[17].y << 15 | a[17].x >> 17); + b[3] = (uint2)(a[18].x << 21 | a[18].y >> 11, a[18].y << 21 | a[18].x >> 11); + b[5] = (uint2)(a[3].x << 28 | a[3].y >> 4, a[3].y << 28 | a[3].x >> 4); + b[16] = (uint2)(a[5].y << 4 | a[5].x >> 28, a[5].x << 4 | a[5].y >> 28); + b[8] = (uint2)(a[16].y << 13 | a[16].x >> 19, a[16].x << 13 | a[16].y >> 19); + b[21] = (uint2)(a[8].y << 23 | a[8].x >> 9, a[8].x << 23 | a[8].y >> 9); + b[24] = (uint2)(a[21].x << 2 | a[21].y >> 30, a[21].y << 2 | a[21].x >> 30); + b[4] = (uint2)(a[24].x << 14 | a[24].y >> 18, a[24].y << 14 | a[24].x >> 18); + b[15] = (uint2)(a[4].x << 27 | a[4].y >> 5, a[4].y << 27 | a[4].x >> 5); + b[23] = (uint2)(a[15].y << 9 | a[15].x >> 23, a[15].x << 9 | a[15].y >> 23); + b[19] = (uint2)(a[23].y << 24 | a[23].x >> 8, a[23].x << 24 | a[23].y >> 8); + b[13] = (uint2)(a[19].x << 8 | a[19].y >> 24, a[19].y << 8 | a[19].x >> 24); + b[12] = (uint2)(a[13].x << 25 | a[13].y >> 7, a[13].y << 25 | a[13].x >> 7); + b[2] = (uint2)(a[12].y << 11 | a[12].x >> 21, a[12].x << 11 | a[12].y >> 21); + b[20] = (uint2)(a[2].y << 30 | a[2].x >> 2, a[2].x << 30 | a[2].y >> 2); + b[14] = (uint2)(a[20].x << 18 | a[20].y >> 14, a[20].y << 18 | a[20].x >> 14); + b[22] = (uint2)(a[14].y << 7 | a[14].x >> 25, a[14].x << 7 | a[14].y >> 25); + b[9] = (uint2)(a[22].y << 29 | a[22].x >> 3, a[22].x << 29 | a[22].y >> 3); + b[6] = (uint2)(a[9].x << 20 | a[9].y >> 12, a[9].y << 20 | a[9].x >> 12); + b[1] = (uint2)(a[6].y << 12 | a[6].x >> 20, a[6].x << 12 | a[6].y >> 20); + + // Chi + a[0] = bitselect(b[0] ^ b[2], b[0], b[1]); + a[1] = bitselect(b[1] ^ b[3], b[1], b[2]); + a[2] = bitselect(b[2] ^ b[4], b[2], b[3]); + a[3] = bitselect(b[3] ^ b[0], b[3], b[4]); + if (out_size >= 4) + { + a[4] = bitselect(b[4] ^ b[1], b[4], b[0]); + a[5] = bitselect(b[5] ^ b[7], b[5], b[6]); + a[6] = bitselect(b[6] ^ b[8], b[6], b[7]); + a[7] = bitselect(b[7] ^ b[9], b[7], b[8]); + a[8] = bitselect(b[8] ^ b[5], b[8], b[9]); + if (out_size >= 8) + { + a[9] = bitselect(b[9] ^ b[6], b[9], b[5]); + a[10] = bitselect(b[10] ^ b[12], b[10], b[11]); + a[11] = bitselect(b[11] ^ b[13], b[11], b[12]); + a[12] = bitselect(b[12] ^ b[14], b[12], b[13]); + a[13] = bitselect(b[13] ^ b[10], b[13], b[14]); + a[14] = bitselect(b[14] ^ b[11], b[14], b[10]); + a[15] = bitselect(b[15] ^ b[17], b[15], b[16]); + a[16] = bitselect(b[16] ^ b[18], b[16], b[17]); + a[17] = bitselect(b[17] ^ b[19], b[17], b[18]); + a[18] = bitselect(b[18] ^ b[15], b[18], b[19]); + a[19] = bitselect(b[19] ^ b[16], b[19], b[15]); + a[20] = bitselect(b[20] ^ b[22], b[20], b[21]); + a[21] = bitselect(b[21] ^ b[23], b[21], b[22]); + a[22] = bitselect(b[22] ^ b[24], b[22], b[23]); + a[23] = bitselect(b[23] ^ b[20], b[23], b[24]); + a[24] = bitselect(b[24] ^ b[21], b[24], b[20]); + } + } + + // Iota + a[0] ^= Keccak_f1600_RC[r]; + + #if !__ENDIAN_LITTLE__ + for (uint i = 0; i != 25; ++i) + a[i] = a[i].yx; + #endif +} + +void keccak_f1600_no_absorb(ulong* a, uint in_size, uint out_size, uint isolate) +{ + for (uint i = in_size; i != 25; ++i) + { + a[i] = 0; + } +#if __ENDIAN_LITTLE__ + a[in_size] ^= 0x0000000000000001; + a[24-out_size*2] ^= 0x8000000000000000; +#else + a[in_size] ^= 0x0100000000000000; + a[24-out_size*2] ^= 0x0000000000000080; +#endif + + // Originally I unrolled the first and last rounds to interface + // better with surrounding code, however I haven't done this + // without causing the AMD compiler to blow up the VGPR usage. + uint r = 0; + do + { + // This dynamic branch stops the AMD compiler unrolling the loop + // and additionally saves about 33% of the VGPRs, enough to gain another + // wavefront. Ideally we'd get 4 in flight, but 3 is the best I can + // massage out of the compiler. It doesn't really seem to matter how + // much we try and help the compiler save VGPRs because it seems to throw + // that information away, hence the implementation of keccak here + // doesn't bother. + if (isolate) + { + keccak_f1600_round((uint2*)a, r++, 25); + } + } + while (r < 23); + + // final round optimised for digest size + keccak_f1600_round((uint2*)a, r++, out_size); +} + +#define copy(dst, src, count) for (uint i = 0; i != count; ++i) { (dst)[i] = (src)[i]; } + +#define countof(x) (sizeof(x) / sizeof(x[0])) + +uint fnv(uint x, uint y) +{ + return x * FNV_PRIME ^ y; +} + +uint4 fnv4(uint4 x, uint4 y) +{ + return x * FNV_PRIME ^ y; +} + +uint fnv_reduce(uint4 v) +{ + return fnv(fnv(fnv(v.x, v.y), v.z), v.w); +} + +typedef union +{ + ulong ulongs[32 / sizeof(ulong)]; + uint uints[32 / sizeof(uint)]; +} hash32_t; + +typedef union +{ + ulong ulongs[64 / sizeof(ulong)]; + uint4 uint4s[64 / sizeof(uint4)]; +} hash64_t; + +typedef union +{ + uint uints[128 / sizeof(uint)]; + uint4 uint4s[128 / sizeof(uint4)]; +} hash128_t; + +hash64_t init_hash(__constant hash32_t const* header, ulong nonce, uint isolate) +{ + hash64_t init; + uint const init_size = countof(init.ulongs); + uint const hash_size = countof(header->ulongs); + + // sha3_512(header .. nonce) + ulong state[25]; + copy(state, header->ulongs, hash_size); + state[hash_size] = nonce; + keccak_f1600_no_absorb(state, hash_size + 1, init_size, isolate); + + copy(init.ulongs, state, init_size); + return init; +} + +uint inner_loop_chunks(uint4 init, uint thread_id, __local uint* share, __global hash128_t const* g_dag, __global hash128_t const* g_dag1, __global hash128_t const* g_dag2, __global hash128_t const* g_dag3, uint isolate) +{ + uint4 mix = init; + + // share init0 + if (thread_id == 0) + *share = mix.x; + barrier(CLK_LOCAL_MEM_FENCE); + uint init0 = *share; + + uint a = 0; + do + { + bool update_share = thread_id == (a/4) % THREADS_PER_HASH; + + #pragma unroll + for (uint i = 0; i != 4; ++i) + { + if (update_share) + { + uint m[4] = { mix.x, mix.y, mix.z, mix.w }; + *share = fnv(init0 ^ (a+i), m[i]) % DAG_SIZE; + } + barrier(CLK_LOCAL_MEM_FENCE); + + mix = fnv4(mix, *share>=3 * DAG_SIZE / 4 ? g_dag3[*share - 3 * DAG_SIZE / 4].uint4s[thread_id] : *share>=DAG_SIZE / 2 ? g_dag2[*share - DAG_SIZE / 2].uint4s[thread_id] : *share>=DAG_SIZE / 4 ? g_dag1[*share - DAG_SIZE / 4].uint4s[thread_id]:g_dag[*share].uint4s[thread_id]); + } + } while ((a += 4) != (ACCESSES & isolate)); + + return fnv_reduce(mix); +} + + + +uint inner_loop(uint4 init, uint thread_id, __local uint* share, __global hash128_t const* g_dag, uint isolate) +{ + uint4 mix = init; + + // share init0 + if (thread_id == 0) + *share = mix.x; + barrier(CLK_LOCAL_MEM_FENCE); + uint init0 = *share; + + uint a = 0; + do + { + bool update_share = thread_id == (a/4) % THREADS_PER_HASH; + + #pragma unroll + for (uint i = 0; i != 4; ++i) + { + if (update_share) + { + uint m[4] = { mix.x, mix.y, mix.z, mix.w }; + *share = fnv(init0 ^ (a+i), m[i]) % DAG_SIZE; + } + barrier(CLK_LOCAL_MEM_FENCE); + + mix = fnv4(mix, g_dag[*share].uint4s[thread_id]); + } + } + while ((a += 4) != (ACCESSES & isolate)); + + return fnv_reduce(mix); +} + + +hash32_t final_hash(hash64_t const* init, hash32_t const* mix, uint isolate) +{ + ulong state[25]; + + hash32_t hash; + uint const hash_size = countof(hash.ulongs); + uint const init_size = countof(init->ulongs); + uint const mix_size = countof(mix->ulongs); + + // keccak_256(keccak_512(header..nonce) .. mix); + copy(state, init->ulongs, init_size); + copy(state + init_size, mix->ulongs, mix_size); + keccak_f1600_no_absorb(state, init_size+mix_size, hash_size, isolate); + + // copy out + copy(hash.ulongs, state, hash_size); + return hash; +} + +hash32_t compute_hash_simple( + __constant hash32_t const* g_header, + __global hash128_t const* g_dag, + ulong nonce, + uint isolate + ) +{ + hash64_t init = init_hash(g_header, nonce, isolate); + + hash128_t mix; + for (uint i = 0; i != countof(mix.uint4s); ++i) + { + mix.uint4s[i] = init.uint4s[i % countof(init.uint4s)]; + } + + uint mix_val = mix.uints[0]; + uint init0 = mix.uints[0]; + uint a = 0; + do + { + uint pi = fnv(init0 ^ a, mix_val) % DAG_SIZE; + uint n = (a+1) % countof(mix.uints); + + #pragma unroll + for (uint i = 0; i != countof(mix.uints); ++i) + { + mix.uints[i] = fnv(mix.uints[i], g_dag[pi].uints[i]); + mix_val = i == n ? mix.uints[i] : mix_val; + } + } + while (++a != (ACCESSES & isolate)); + + // reduce to output + hash32_t fnv_mix; + for (uint i = 0; i != countof(fnv_mix.uints); ++i) + { + fnv_mix.uints[i] = fnv_reduce(mix.uint4s[i]); + } + + return final_hash(&init, &fnv_mix, isolate); +} + +typedef union +{ + struct + { + hash64_t init; + uint pad; // avoid lds bank conflicts + }; + hash32_t mix; +} compute_hash_share; + + +hash32_t compute_hash( + __local compute_hash_share* share, + __constant hash32_t const* g_header, + __global hash128_t const* g_dag, + ulong nonce, + uint isolate + ) +{ + uint const gid = get_global_id(0); + + // Compute one init hash per work item. + hash64_t init = init_hash(g_header, nonce, isolate); + + // Threads work together in this phase in groups of 8. + uint const thread_id = gid % THREADS_PER_HASH; + uint const hash_id = (gid % GROUP_SIZE) / THREADS_PER_HASH; + + hash32_t mix; + uint i = 0; + do + { + // share init with other threads + if (i == thread_id) + share[hash_id].init = init; + barrier(CLK_LOCAL_MEM_FENCE); + + uint4 thread_init = share[hash_id].init.uint4s[thread_id % (64 / sizeof(uint4))]; + barrier(CLK_LOCAL_MEM_FENCE); + + uint thread_mix = inner_loop(thread_init, thread_id, share[hash_id].mix.uints, g_dag, isolate); + + share[hash_id].mix.uints[thread_id] = thread_mix; + barrier(CLK_LOCAL_MEM_FENCE); + + if (i == thread_id) + mix = share[hash_id].mix; + barrier(CLK_LOCAL_MEM_FENCE); + } + while (++i != (THREADS_PER_HASH & isolate)); + + return final_hash(&init, &mix, isolate); +} + + +hash32_t compute_hash_chunks( + __local compute_hash_share* share, + __constant hash32_t const* g_header, + __global hash128_t const* g_dag, + __global hash128_t const* g_dag1, + __global hash128_t const* g_dag2, + __global hash128_t const* g_dag3, + ulong nonce, + uint isolate + ) +{ + uint const gid = get_global_id(0); + + // Compute one init hash per work item. + hash64_t init = init_hash(g_header, nonce, isolate); + + // Threads work together in this phase in groups of 8. + uint const thread_id = gid % THREADS_PER_HASH; + uint const hash_id = (gid % GROUP_SIZE) / THREADS_PER_HASH; + + hash32_t mix; + uint i = 0; + do + { + // share init with other threads + if (i == thread_id) + share[hash_id].init = init; + barrier(CLK_LOCAL_MEM_FENCE); + + uint4 thread_init = share[hash_id].init.uint4s[thread_id % (64 / sizeof(uint4))]; + barrier(CLK_LOCAL_MEM_FENCE); + + uint thread_mix = inner_loop_chunks(thread_init, thread_id, share[hash_id].mix.uints, g_dag, g_dag1, g_dag2, g_dag3, isolate); + + share[hash_id].mix.uints[thread_id] = thread_mix; + barrier(CLK_LOCAL_MEM_FENCE); + + if (i == thread_id) + mix = share[hash_id].mix; + barrier(CLK_LOCAL_MEM_FENCE); + } + while (++i != (THREADS_PER_HASH & isolate)); + + return final_hash(&init, &mix, isolate); +} + +__attribute__((reqd_work_group_size(GROUP_SIZE, 1, 1))) +__kernel void ethash_hash_simple( + __global hash32_t* g_hashes, + __constant hash32_t const* g_header, + __global hash128_t const* g_dag, + ulong start_nonce, + uint isolate + ) +{ + uint const gid = get_global_id(0); + g_hashes[gid] = compute_hash_simple(g_header, g_dag, start_nonce + gid, isolate); +} + +__attribute__((reqd_work_group_size(GROUP_SIZE, 1, 1))) +__kernel void ethash_search_simple( + __global volatile uint* restrict g_output, + __constant hash32_t const* g_header, + __global hash128_t const* g_dag, + ulong start_nonce, + ulong target, + uint isolate + ) +{ + uint const gid = get_global_id(0); + hash32_t hash = compute_hash_simple(g_header, g_dag, start_nonce + gid, isolate); + + if (hash.ulongs[countof(hash.ulongs)-1] < target) + { + uint slot = min(convert_uint(MAX_OUTPUTS), convert_uint(atomic_inc(&g_output[0]) + 1)); + g_output[slot] = gid; + } +} + + +__attribute__((reqd_work_group_size(GROUP_SIZE, 1, 1))) +__kernel void ethash_hash( + __global hash32_t* g_hashes, + __constant hash32_t const* g_header, + __global hash128_t const* g_dag, + ulong start_nonce, + uint isolate + ) +{ + __local compute_hash_share share[HASHES_PER_LOOP]; + + uint const gid = get_global_id(0); + g_hashes[gid] = compute_hash(share, g_header, g_dag, start_nonce + gid, isolate); +} + +__attribute__((reqd_work_group_size(GROUP_SIZE, 1, 1))) +__kernel void ethash_search( + __global volatile uint* restrict g_output, + __constant hash32_t const* g_header, + __global hash128_t const* g_dag, + ulong start_nonce, + ulong target, + uint isolate + ) +{ + __local compute_hash_share share[HASHES_PER_LOOP]; + + uint const gid = get_global_id(0); + hash32_t hash = compute_hash(share, g_header, g_dag, start_nonce + gid, isolate); + + if (as_ulong(as_uchar8(hash.ulongs[0]).s76543210) < target) + { + uint slot = min((uint)MAX_OUTPUTS, atomic_inc(&g_output[0]) + 1); + g_output[slot] = gid; + } +} + +__attribute__((reqd_work_group_size(GROUP_SIZE, 1, 1))) +__kernel void ethash_hash_chunks( + __global hash32_t* g_hashes, + __constant hash32_t const* g_header, + __global hash128_t const* g_dag, + __global hash128_t const* g_dag1, + __global hash128_t const* g_dag2, + __global hash128_t const* g_dag3, + ulong start_nonce, + uint isolate + ) +{ + __local compute_hash_share share[HASHES_PER_LOOP]; + + uint const gid = get_global_id(0); + g_hashes[gid] = compute_hash_chunks(share, g_header, g_dag, g_dag1, g_dag2, g_dag3,start_nonce + gid, isolate); +} + +__attribute__((reqd_work_group_size(GROUP_SIZE, 1, 1))) +__kernel void ethash_search_chunks( + __global volatile uint* restrict g_output, + __constant hash32_t const* g_header, + __global hash128_t const* g_dag, + __global hash128_t const* g_dag1, + __global hash128_t const* g_dag2, + __global hash128_t const* g_dag3, + ulong start_nonce, + ulong target, + uint isolate + ) +{ + __local compute_hash_share share[HASHES_PER_LOOP]; + + uint const gid = get_global_id(0); + hash32_t hash = compute_hash_chunks(share, g_header, g_dag, g_dag1, g_dag2, g_dag3, start_nonce + gid, isolate); + + if (as_ulong(as_uchar8(hash.ulongs[0]).s76543210) < target) + { + uint slot = min(convert_uint(MAX_OUTPUTS), convert_uint(atomic_inc(&g_output[0]) + 1)); + g_output[slot] = gid; + } +} +` diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go index 1e1de989d..c19e45d1d 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go @@ -92,7 +92,7 @@ func TestEthashConcurrentVerify(t *testing.T) { defer os.RemoveAll(eth.Full.Dir) block := &testBlock{difficulty: big.NewInt(10)} - nonce, md := eth.Search(block, nil) + nonce, md := eth.Search(block, nil, 0) block.nonce = nonce block.mixDigest = common.BytesToHash(md) @@ -135,7 +135,7 @@ func TestEthashConcurrentSearch(t *testing.T) { // launch n searches concurrently. for i := 0; i < nsearch; i++ { go func() { - nonce, md := eth.Search(block, stop) + nonce, md := eth.Search(block, stop, 0) select { case found <- searchRes{n: nonce, md: md}: case <-stop: @@ -167,7 +167,7 @@ func TestEthashSearchAcrossEpoch(t *testing.T) { for i := epochLength - 40; i < epochLength+40; i++ { block := &testBlock{number: i, difficulty: big.NewInt(90)} rand.Read(block.hashNoNonce[:]) - nonce, md := eth.Search(block, nil) + nonce, md := eth.Search(block, nil, 0) block.nonce = nonce block.mixDigest = common.BytesToHash(md) if !eth.Verify(block) { diff --git a/Makefile b/Makefile index 8c7b80ea6..56f250a92 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ GOBIN = build/bin geth: - build/env.sh go install -v $(shell build/ldflags.sh) ./cmd/geth + build/env.sh go install -v $(shell build/flags.sh) ./cmd/geth @echo "Done building." @echo "Run \"$(GOBIN)/geth\" to launch geth." @@ -39,12 +39,12 @@ evm: @echo "Done building." @echo "Run \"$(GOBIN)/evm to start the evm." mist: - build/env.sh go install -v $(shell build/ldflags.sh) ./cmd/mist + build/env.sh go install -v $(shell build/flags.sh) ./cmd/mist @echo "Done building." @echo "Run \"$(GOBIN)/mist --asset_path=cmd/mist/assets\" to launch mist." all: - build/env.sh go install -v $(shell build/ldflags.sh) ./... + build/env.sh go install -v $(shell build/flags.sh) ./... test: all build/env.sh go test ./... diff --git a/build/flags.sh b/build/flags.sh new file mode 100755 index 000000000..e021dbad4 --- /dev/null +++ b/build/flags.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +set -e + +if [ ! -f "build/env.sh" ]; then + echo "$0 must be run from the root of the repository." + exit 2 +fi + +# Since Go 1.5, the separator char for link time assignments +# is '=' and using ' ' prints a warning. However, Go < 1.5 does +# not support using '='. +sep=$(go version | awk '{ if ($3 >= "go1.5" || index($3, "devel")) print "="; else print " "; }' -) + +# set gitCommit when running from a Git checkout. +if [ -f ".git/HEAD" ]; then + echo "-ldflags '-X main.gitCommit$sep$(git rev-parse HEAD)'" +fi + +if [ ! -z "$GO_OPENCL" ]; then + echo "-tags opencl" +fi diff --git a/build/ldflags.sh b/build/ldflags.sh deleted file mode 100755 index 3f055d416..000000000 --- a/build/ldflags.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -set -e - -if [ ! -f "build/env.sh" ]; then - echo "$0 must be run from the root of the repository." - exit 2 -fi - -# Since Go 1.5, the separator char for link time assignments -# is '=' and using ' ' prints a warning. However, Go < 1.5 does -# not support using '='. -sep=$(go version | awk '{ if ($3 >= "go1.5" || index($3, "devel")) print "="; else print " "; }' -) - -# set gitCommit when running from a Git checkout. -if [ -f ".git/HEAD" ]; then - echo "-ldflags '-X main.gitCommit$sep$(git rev-parse HEAD)'" -fi diff --git a/cmd/geth/js_test.go b/cmd/geth/js_test.go index 1f5b28e3a..7b3bb09a8 100644 --- a/cmd/geth/js_test.go +++ b/cmd/geth/js_test.go @@ -468,8 +468,7 @@ func processTxs(repl *testjethre, t *testing.T, expTxc int) bool { t.Errorf("incorrect number of pending transactions, expected %v, got %v", expTxc, txc) return false } - - err = repl.ethereum.StartMining(runtime.NumCPU()) + err = repl.ethereum.StartMining(runtime.NumCPU(), "") if err != nil { t.Errorf("unexpected error mining: %v", err) return false diff --git a/cmd/geth/main.go b/cmd/geth/main.go index a9aa9f61f..ec61dedff 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -104,6 +104,22 @@ The makedag command generates an ethash DAG in /tmp/dag. This command exists to support the system testing project. Regular users do not need to execute it. +`, + }, + { + Action: gpuinfo, + Name: "gpuinfo", + Usage: "gpuinfo", + Description: ` +Prints OpenCL device info for all found GPUs. +`, + }, + { + Action: gpubench, + Name: "gpubench", + Usage: "benchmark GPU", + Description: ` +Runs quick benchmark on first GPU found. `, }, { @@ -298,6 +314,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso utils.GasPriceFlag, utils.MinerThreadsFlag, utils.MiningEnabledFlag, + utils.MiningGPUFlag, utils.AutoDAGFlag, utils.NATFlag, utils.NatspecEnabledFlag, @@ -586,7 +603,10 @@ func startEth(ctx *cli.Context, eth *eth.Ethereum) { } } if ctx.GlobalBool(utils.MiningEnabledFlag.Name) { - if err := eth.StartMining(ctx.GlobalInt(utils.MinerThreadsFlag.Name)); err != nil { + err := eth.StartMining( + ctx.GlobalInt(utils.MinerThreadsFlag.Name), + ctx.GlobalString(utils.MiningGPUFlag.Name)) + if err != nil { utils.Fatalf("%v", err) } } @@ -740,6 +760,29 @@ func makedag(ctx *cli.Context) { } } +func gpuinfo(ctx *cli.Context) { + eth.PrintOpenCLDevices() +} + +func gpubench(ctx *cli.Context) { + args := ctx.Args() + wrongArgs := func() { + utils.Fatalf(`Usage: geth gpubench `) + } + switch { + case len(args) == 1: + n, err := strconv.ParseUint(args[0], 0, 64) + if err != nil { + wrongArgs() + } + eth.GPUBench(n) + case len(args) == 0: + eth.GPUBench(0) + default: + wrongArgs() + } +} + func version(c *cli.Context) { fmt.Println(ClientIdentifier) fmt.Println("Version:", Version) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index ad474f17d..a5395424a 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -149,6 +149,12 @@ var ( } // miner settings + // TODO: refactor CPU vs GPU mining flags + MiningGPUFlag = cli.StringFlag{ + Name: "minegpu", + Usage: "Mine with given GPUs. '--minegpu 0,1' will mine with the first two GPUs found.", + } + MinerThreadsFlag = cli.IntFlag{ Name: "minerthreads", Usage: "Number of miner threads", diff --git a/common/natspec/natspec_e2e_test.go b/common/natspec/natspec_e2e_test.go index 57f81f652..02c2014ba 100644 --- a/common/natspec/natspec_e2e_test.go +++ b/common/natspec/natspec_e2e_test.go @@ -306,7 +306,7 @@ func processTxs(repl *testFrontend, t *testing.T, expTxc int) bool { return false } - err = repl.ethereum.StartMining(runtime.NumCPU()) + err = repl.ethereum.StartMining(runtime.NumCPU(), "") if err != nil { t.Errorf("unexpected error mining: %v", err) return false diff --git a/core/chain_makers.go b/core/chain_makers.go index 3af9b0b89..ea1f6edc8 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -32,7 +32,7 @@ import ( // It returns true from Verify for any block. type FakePow struct{} -func (f FakePow) Search(block pow.Block, stop <-chan struct{}) (uint64, []byte) { +func (f FakePow) Search(block pow.Block, stop <-chan struct{}, index int) (uint64, []byte) { return 0, nil } func (f FakePow) Verify(block pow.Block) bool { return true } diff --git a/core/chain_pow_test.go b/core/chain_pow_test.go index 80c6a1cc0..5aa8ed8a0 100644 --- a/core/chain_pow_test.go +++ b/core/chain_pow_test.go @@ -34,7 +34,7 @@ type failPow struct { failing uint64 } -func (pow failPow) Search(pow.Block, <-chan struct{}) (uint64, []byte) { +func (pow failPow) Search(pow.Block, <-chan struct{}, int) (uint64, []byte) { return 0, nil } func (pow failPow) Verify(block pow.Block) bool { return block.NumberU64() != pow.failing } @@ -47,7 +47,7 @@ type delayedPow struct { delay time.Duration } -func (pow delayedPow) Search(pow.Block, <-chan struct{}) (uint64, []byte) { +func (pow delayedPow) Search(pow.Block, <-chan struct{}, int) (uint64, []byte) { return 0, nil } func (pow delayedPow) Verify(block pow.Block) bool { time.Sleep(pow.delay); return true } diff --git a/eth/backend.go b/eth/backend.go index 349dfa613..8862e1670 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -481,18 +481,6 @@ func (s *Ethereum) ResetWithGenesisBlock(gb *types.Block) { s.chainManager.ResetWithGenesisBlock(gb) } -func (s *Ethereum) StartMining(threads int) error { - eb, err := s.Etherbase() - if err != nil { - err = fmt.Errorf("Cannot start mining without etherbase address: %v", err) - glog.V(logger.Error).Infoln(err) - return err - } - - go s.miner.Start(eb, threads) - return nil -} - func (s *Ethereum) Etherbase() (eb common.Address, err error) { eb = s.etherbase if (eb == common.Address{}) { diff --git a/eth/cpu_mining.go b/eth/cpu_mining.go new file mode 100644 index 000000000..f8795fd0c --- /dev/null +++ b/eth/cpu_mining.go @@ -0,0 +1,54 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +// +build !opencl + +package eth + +import ( + "errors" + "fmt" + + "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/logger/glog" +) + +const disabledInfo = "Set GO_OPENCL and re-build to enable." + +func (s *Ethereum) StartMining(threads int, gpus string) error { + eb, err := s.Etherbase() + if err != nil { + err = fmt.Errorf("Cannot start mining without etherbase address: %v", err) + glog.V(logger.Error).Infoln(err) + return err + } + + if gpus != "" { + return errors.New("GPU mining disabled. " + disabledInfo) + } + + // CPU mining + go s.miner.Start(eb, threads) + return nil +} + +func GPUBench(gpuid uint64) { + fmt.Println("GPU mining disabled. " + disabledInfo) +} + +func PrintOpenCLDevices() { + fmt.Println("OpenCL disabled. " + disabledInfo) +} diff --git a/eth/gpu_mining.go b/eth/gpu_mining.go new file mode 100644 index 000000000..c351c2bdd --- /dev/null +++ b/eth/gpu_mining.go @@ -0,0 +1,103 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +// +build opencl + +package eth + +import ( + "fmt" + "math/big" + "strconv" + "strings" + "time" + + "github.com/ethereum/ethash" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/logger/glog" + "github.com/ethereum/go-ethereum/miner" +) + +func (s *Ethereum) StartMining(threads int, gpus string) error { + eb, err := s.Etherbase() + if err != nil { + err = fmt.Errorf("Cannot start mining without etherbase address: %v", err) + glog.V(logger.Error).Infoln(err) + return err + } + + // GPU mining + if gpus != "" { + var ids []int + for _, s := range strings.Split(gpus, ",") { + i, err := strconv.Atoi(s) + if err != nil { + return fmt.Errorf("Invalid GPU id(s): %v", err) + } + if i < 0 { + return fmt.Errorf("Invalid GPU id: %v", i) + } + ids = append(ids, i) + } + + // TODO: re-creating miner is a bit ugly + cl := ethash.NewCL(ids) + s.miner = miner.New(s, s.EventMux(), cl) + go s.miner.Start(eb, len(ids)) + return nil + } + + // CPU mining + go s.miner.Start(eb, threads) + return nil +} + +func GPUBench(gpuid uint64) { + e := ethash.NewCL([]int{int(gpuid)}) + + var h common.Hash + bogoHeader := &types.Header{ + ParentHash: h, + Number: big.NewInt(int64(42)), + Difficulty: big.NewInt(int64(999999999999999)), + } + bogoBlock := types.NewBlock(bogoHeader, nil, nil, nil) + + err := ethash.InitCL(bogoBlock.NumberU64(), e) + if err != nil { + fmt.Println("OpenCL init error: ", err) + return + } + + stopChan := make(chan struct{}) + reportHashRate := func() { + for { + time.Sleep(3 * time.Second) + fmt.Printf("hashes/s : %v\n", e.GetHashrate()) + } + } + fmt.Printf("Starting benchmark (%v seconds)\n", 60) + go reportHashRate() + go e.Search(bogoBlock, stopChan, 0) + time.Sleep(60 * time.Second) + fmt.Println("OK.") +} + +func PrintOpenCLDevices() { + ethash.PrintDevices() +} diff --git a/miner/agent.go b/miner/agent.go index e80b222c8..4a4683bc6 100644 --- a/miner/agent.go +++ b/miner/agent.go @@ -118,7 +118,7 @@ func (self *CpuAgent) mine(work *Work, stop <-chan struct{}) { glog.V(logger.Debug).Infof("(re)started agent[%d]. mining...\n", self.index) // Mine - nonce, mixDigest := self.pow.Search(work.Block, stop) + nonce, mixDigest := self.pow.Search(work.Block, stop, self.index) if nonce != 0 { block := work.Block.WithMiningResult(nonce, common.BytesToHash(mixDigest)) self.returnCh <- &Result{work, block} diff --git a/pow/ezp/pow.go b/pow/ezp/pow.go index 03bb3da29..f7ae1cbf1 100644 --- a/pow/ezp/pow.go +++ b/pow/ezp/pow.go @@ -48,7 +48,7 @@ func (pow *EasyPow) Turbo(on bool) { pow.turbo = on } -func (pow *EasyPow) Search(block pow.Block, stop <-chan struct{}) (uint64, []byte) { +func (pow *EasyPow) Search(block pow.Block, stop <-chan struct{}, index int) (uint64, []byte) { r := rand.New(rand.NewSource(time.Now().UnixNano())) hash := block.HashNoNonce() diff := block.Difficulty() diff --git a/pow/pow.go b/pow/pow.go index 22daf35e4..592d96475 100644 --- a/pow/pow.go +++ b/pow/pow.go @@ -17,7 +17,7 @@ package pow type PoW interface { - Search(block Block, stop <-chan struct{}) (uint64, []byte) + Search(block Block, stop <-chan struct{}, index int) (uint64, []byte) Verify(block Block) bool GetHashrate() int64 Turbo(bool) diff --git a/rpc/api/miner.go b/rpc/api/miner.go index 5325a660a..e07855dd2 100644 --- a/rpc/api/miner.go +++ b/rpc/api/miner.go @@ -100,7 +100,7 @@ func (self *minerApi) StartMiner(req *shared.Request) (interface{}, error) { } self.ethereum.StartAutoDAG() - err := self.ethereum.StartMining(args.Threads) + err := self.ethereum.StartMining(args.Threads, "") if err == nil { return true, nil } diff --git a/xeth/xeth.go b/xeth/xeth.go index 623b3a963..1be42734d 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -452,7 +452,7 @@ func (self *XEth) ClientVersion() string { func (self *XEth) SetMining(shouldmine bool, threads int) bool { ismining := self.backend.IsMining() if shouldmine && !ismining { - err := self.backend.StartMining(threads) + err := self.backend.StartMining(threads, "") return err == nil } if ismining && !shouldmine { -- cgit v1.2.3 From 2547c9c9b70a66f11626cb199f7d288ab1985259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 7 Oct 2015 18:21:13 +0300 Subject: cmd: properly initialize Olympic for all subcommands --- cmd/geth/main.go | 4 +--- cmd/utils/cmd.go | 13 ------------- cmd/utils/flags.go | 17 ++++++++++++++++- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 1889cb2f2..2d2c38ce8 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -340,6 +340,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso } app.Before = func(ctx *cli.Context) error { utils.SetupLogger(ctx) + utils.SetupNetwork(ctx) utils.SetupVM(ctx) utils.SetupEth(ctx) if ctx.GlobalBool(utils.PProfEanbledFlag.Name) { @@ -391,9 +392,6 @@ func makeDefaultExtra() []byte { func run(ctx *cli.Context) { utils.CheckLegalese(utils.MustDataDir(ctx)) - if ctx.GlobalBool(utils.OlympicFlag.Name) { - utils.InitOlympic() - } cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx) cfg.ExtraData = makeExtra(ctx) diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index 5e4bfc937..1fbd96dc8 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -21,8 +21,6 @@ import ( "bufio" "fmt" "io" - "math" - "math/big" "os" "os/signal" "regexp" @@ -34,7 +32,6 @@ import ( "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" "github.com/peterh/liner" ) @@ -146,16 +143,6 @@ func StartEthereum(ethereum *eth.Ethereum) { }() } -func InitOlympic() { - params.DurationLimit = big.NewInt(8) - params.GenesisGasLimit = big.NewInt(3141592) - params.MinGasLimit = big.NewInt(125000) - params.MaximumExtraDataSize = big.NewInt(1024) - NetworkIdFlag.Value = 0 - core.BlockReward = big.NewInt(1.5e+18) - core.ExpDiffPeriod = big.NewInt(math.MaxInt64) -} - func FormatTransactionData(data string) []byte { d := common.StringToByteFunc(data, func(s string) (ret []byte) { slice := regexp.MustCompile("\\n|\\s").Split(s, 1000000000) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index dea43bc5c..e2184003c 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -20,6 +20,7 @@ import ( "crypto/ecdsa" "fmt" "log" + "math" "math/big" "net" "net/http" @@ -42,6 +43,7 @@ import ( "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/p2p/nat" + "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc/api" "github.com/ethereum/go-ethereum/rpc/codec" "github.com/ethereum/go-ethereum/rpc/comms" @@ -488,6 +490,20 @@ func SetupLogger(ctx *cli.Context) { glog.SetLogDir(ctx.GlobalString(LogFileFlag.Name)) } +// SetupNetwork configures the system for either the main net or some test network. +func SetupNetwork(ctx *cli.Context) { + switch { + case ctx.GlobalBool(OlympicFlag.Name): + params.DurationLimit = big.NewInt(8) + params.GenesisGasLimit = big.NewInt(3141592) + params.MinGasLimit = big.NewInt(125000) + params.MaximumExtraDataSize = big.NewInt(1024) + NetworkIdFlag.Value = 0 + core.BlockReward = big.NewInt(1.5e+18) + core.ExpDiffPeriod = big.NewInt(math.MaxInt64) + } +} + // SetupVM configured the VM package's global settings func SetupVM(ctx *cli.Context) { vm.EnableJit = ctx.GlobalBool(VMEnableJitFlag.Name) @@ -517,7 +533,6 @@ func MakeChain(ctx *cli.Context) (chain *core.BlockChain, chainDb ethdb.Database Fatalf("Could not open database: %v", err) } if ctx.GlobalBool(OlympicFlag.Name) { - InitOlympic() _, err := core.WriteTestNetGenesisBlock(chainDb, 42) if err != nil { glog.Fatalln(err) -- cgit v1.2.3 From 1de796f10134bb4aa245591e0d8802e320892efb Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Mon, 5 Oct 2015 13:01:34 +0200 Subject: cmd, core, eth: added official testnet --- cmd/geth/main.go | 1 + cmd/utils/flags.go | 18 ++++++++++++++++++ core/genesis.go | 21 +++++++++++++++++++++ core/state/statedb.go | 5 +++++ eth/backend.go | 18 +++++++++++++++++- 5 files changed, 62 insertions(+), 1 deletion(-) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index fa9beafd0..2c4cb5ae1 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -314,6 +314,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso utils.ExecFlag, utils.WhisperEnabledFlag, utils.DevModeFlag, + utils.TestNetFlag, utils.VMDebugFlag, utils.VMForceJitFlag, utils.VMJitCacheFlag, diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index dea43bc5c..67f8f0c57 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -125,6 +125,10 @@ var ( Name: "dev", Usage: "Developer mode. This mode creates a private network and sets several debugging flags", } + TestNetFlag = cli.BoolFlag{ + Name: "testnet", + Usage: "Testnet mode. This enables your node to operate on the testnet", + } IdentityFlag = cli.StringFlag{ Name: "identity", Usage: "Custom node name", @@ -452,6 +456,17 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config { AutoDAG: ctx.GlobalBool(AutoDAGFlag.Name) || ctx.GlobalBool(MiningEnabledFlag.Name), } + if ctx.GlobalBool(DevModeFlag.Name) && ctx.GlobalBool(TestNetFlag.Name) { + glog.Fatalf("%s and %s are mutually exclusive\n", DevModeFlag.Name, TestNetFlag.Name) + } + + if ctx.GlobalBool(TestNetFlag.Name) { + // testnet is always stored in the testnet folder + cfg.DataDir += "/testnet" + cfg.NetworkId = 2 + cfg.TestNet = true + } + if ctx.GlobalBool(DevModeFlag.Name) { if !ctx.GlobalIsSet(VMDebugFlag.Name) { cfg.VmDebug = true @@ -540,6 +555,9 @@ func MakeChain(ctx *cli.Context) (chain *core.BlockChain, chainDb ethdb.Database // MakeChain creates an account manager from set command line flags. func MakeAccountManager(ctx *cli.Context) *accounts.Manager { dataDir := MustDataDir(ctx) + if ctx.GlobalBool(TestNetFlag.Name) { + dataDir += "/testnet" + } ks := crypto.NewKeyStorePassphrase(filepath.Join(dataDir, "keystore")) return accounts.NewManager(ks) } diff --git a/core/genesis.go b/core/genesis.go index bf97da2e2..bfa8696af 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -155,6 +155,27 @@ func WriteGenesisBlockForTesting(db ethdb.Database, accounts ...GenesisAccount) } func WriteTestNetGenesisBlock(chainDb ethdb.Database, nonce uint64) (*types.Block, error) { + testGenesis := fmt.Sprintf(`{ + "nonce": "0x%x", + "difficulty": "0x20000", + "mixhash": "0x00000000000000000000000000000000000000647572616c65787365646c6578", + "coinbase": "0x0000000000000000000000000000000000000000", + "timestamp": "0x00", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "extraData": "0x", + "gasLimit": "0x2FEFD8", + "alloc": { + "0000000000000000000000000000000000000001": { "balance": "1" }, + "0000000000000000000000000000000000000002": { "balance": "1" }, + "0000000000000000000000000000000000000003": { "balance": "1" }, + "0000000000000000000000000000000000000004": { "balance": "1" }, + "102e61f5d8f9bc71d0ad4a084df4e65e05ce0e1c": { "balance": "1606938044258990275541962092341162602522202993782792835301376" } + } +}`, types.EncodeNonce(nonce)) + return WriteGenesisBlock(chainDb, strings.NewReader(testGenesis)) +} + +func WriteOlympicGenesisBlock(chainDb ethdb.Database, nonce uint64) (*types.Block, error) { testGenesis := fmt.Sprintf(`{ "nonce":"0x%x", "gasLimit":"0x%x", diff --git a/core/state/statedb.go b/core/state/statedb.go index 499ea5f52..ad673aecb 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -28,6 +28,10 @@ import ( "github.com/ethereum/go-ethereum/trie" ) +// The starting nonce determines the default nonce when new accounts are being +// created. +var StartingNonce uint64 + // StateDBs within the ethereum protocol are used to store anything // within the merkle trie. StateDBs take care of caching and storing // nested states. It's the general query interface to retrieve: @@ -263,6 +267,7 @@ func (self *StateDB) newStateObject(addr common.Address) *StateObject { } stateObject := NewStateObject(addr, self.db) + stateObject.SetNonce(StartingNonce) self.stateObjects[addr.Str()] = stateObject return stateObject diff --git a/eth/backend.go b/eth/backend.go index a480b4931..83eefca5b 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -34,6 +34,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/compiler" "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" @@ -69,12 +70,17 @@ var ( discover.MustParseNode("enode://979b7fa28feeb35a4741660a16076f1943202cb72b6af70d327f053e248bab9ba81760f39d0701ef1d8f89cc1fbd2cacba0710a12cd5314d5e0c9021aa3637f9@5.1.83.226:30303"), } + defaultTestNetBootNodes = []*discover.Node{ + discover.MustParseNode("enode://5374c1bff8df923d3706357eeb4983cd29a63be40a269aaa2296ee5f3b2119a8978c0ed68b8f6fc84aad0df18790417daadf91a4bfbb786a16c9b0a199fa254a@92.51.165.126:30303"), + } + staticNodes = "static-nodes.json" // Path within to search for the static node list trustedNodes = "trusted-nodes.json" // Path within to search for the trusted node list ) type Config struct { DevMode bool + TestNet bool Name string NetworkId int @@ -133,6 +139,10 @@ type Config struct { func (cfg *Config) parseBootNodes() []*discover.Node { if cfg.BootNodes == "" { + if cfg.TestNet { + return defaultTestNetBootNodes + } + return defaultBootNodes } var ns []*discover.Node @@ -309,7 +319,13 @@ func New(config *Config) (*Ethereum, error) { glog.V(logger.Error).Infoln("Starting Olympic network") fallthrough case config.DevMode: - _, err := core.WriteTestNetGenesisBlock(chainDb, 42) + _, err := core.WriteOlympicGenesisBlock(chainDb, 42) + if err != nil { + return nil, err + } + case config.TestNet: + state.StartingNonce = 1048576 // (2**20) + _, err := core.WriteTestNetGenesisBlock(chainDb, 0x6d6f7264656e) if err != nil { return nil, err } -- cgit v1.2.3 From f32fa075f14d2b3a1213098274e0ba88c7761283 Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Mon, 28 Sep 2015 11:19:23 +0200 Subject: core/secp256k1: update libsecp256k1 Go wrapper and tests --- crypto/crypto.go | 10 +- crypto/secp256k1/secp256.go | 196 +++++++++++++------------ crypto/secp256k1/secp256_test.go | 299 ++++++++++++++++++--------------------- 3 files changed, 256 insertions(+), 249 deletions(-) diff --git a/crypto/crypto.go b/crypto/crypto.go index b3a8d730b..672fb069a 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -198,7 +198,9 @@ func Sign(hash []byte, prv *ecdsa.PrivateKey) (sig []byte, err error) { return nil, fmt.Errorf("hash is required to be exactly 32 bytes (%d)", len(hash)) } - sig, err = secp256k1.Sign(hash, common.LeftPadBytes(prv.D.Bytes(), prv.Params().BitSize/8)) + seckey := common.LeftPadBytes(prv.D.Bytes(), prv.Params().BitSize/8) + defer zeroBytes(seckey) + sig, err = secp256k1.Sign(hash, seckey) return } @@ -337,3 +339,9 @@ func PubkeyToAddress(p ecdsa.PublicKey) common.Address { pubBytes := FromECDSAPub(&p) return common.BytesToAddress(Sha3(pubBytes[1:])[12:]) } + +func zeroBytes(bytes []byte) { + for i := range bytes { + bytes[i] = 0 + } +} diff --git a/crypto/secp256k1/secp256.go b/crypto/secp256k1/secp256.go index 7baa456bf..88b43034f 100644 --- a/crypto/secp256k1/secp256.go +++ b/crypto/secp256k1/secp256.go @@ -19,7 +19,7 @@ package secp256k1 // TODO: set USE_SCALAR_4X64 depending on platform? /* -#cgo CFLAGS: -I./secp256k1 +#cgo CFLAGS: -I./libsecp256k1 #cgo darwin CFLAGS: -I/usr/local/include #cgo freebsd CFLAGS: -I/usr/local/include #cgo linux,arm CFLAGS: -I/usr/local/arm/include @@ -33,7 +33,8 @@ package secp256k1 #define USE_SCALAR_8X32 #define USE_SCALAR_INV_BUILTIN #define NDEBUG -#include "./secp256k1/src/secp256k1.c" +#include "./libsecp256k1/src/secp256k1.c" +#include "./libsecp256k1/src/modules/recovery/main_impl.h" */ import "C" @@ -48,48 +49,51 @@ import ( //#define USE_FIELD_5X64 /* - Todo: - > Centralize key management in module - > add pubkey/private key struct - > Dont let keys leave module; address keys as ints - + TODO: > store private keys in buffer and shuffle (deters persistance on swap disc) - > Byte permutation (changing) + > byte permutation (changing) > xor with chaning random block (to deter scanning memory for 0x63) (stream cipher?) - - On Disk - > Store keys in wallets - > use slow key derivation function for wallet encryption key (2 seconds) + > on disk: store keys in wallets */ -func init() { - //takes 10ms to 100ms - C.secp256k1_start(3) // SECP256K1_START_SIGN | SECP256K1_START_VERIFY -} +// holds ptr to secp256k1_context_struct (see secp256k1/include/secp256k1.h) +var context *C.secp256k1_context -func Stop() { - C.secp256k1_stop() +func init() { + // around 20 ms on a modern CPU. + context = C.secp256k1_context_create(3) // SECP256K1_START_SIGN | SECP256K1_START_VERIFY } func GenerateKeyPair() ([]byte, []byte) { - - pubkey_len := C.int(65) - const seckey_len = 32 - - var pubkey []byte = make([]byte, pubkey_len) - var seckey []byte = randentropy.GetEntropyCSPRNG(seckey_len) - - var pubkey_ptr *C.uchar = (*C.uchar)(unsafe.Pointer(&pubkey[0])) + var seckey []byte = randentropy.GetEntropyCSPRNG(32) var seckey_ptr *C.uchar = (*C.uchar)(unsafe.Pointer(&seckey[0])) + var pubkey64 []byte = make([]byte, 64) // secp256k1_pubkey + var pubkey65 []byte = make([]byte, 65) // 65 byte uncompressed pubkey + pubkey64_ptr := (*C.secp256k1_pubkey)(unsafe.Pointer(&pubkey64[0])) + pubkey65_ptr := (*C.uchar)(unsafe.Pointer(&pubkey65[0])) + ret := C.secp256k1_ec_pubkey_create( - pubkey_ptr, &pubkey_len, - seckey_ptr, 0) + context, + pubkey64_ptr, + seckey_ptr, + ) if ret != C.int(1) { - return GenerateKeyPair() //invalid secret, try again + return GenerateKeyPair() // invalid secret, try again } - return pubkey, seckey + + var output_len C.size_t + + C.secp256k1_ec_pubkey_serialize( // always returns 1 + context, + pubkey65_ptr, + &output_len, + pubkey64_ptr, + 0, // SECP256K1_EC_COMPRESSED + ) + + return pubkey65, seckey } func GeneratePubKey(seckey []byte) ([]byte, error) { @@ -97,17 +101,16 @@ func GeneratePubKey(seckey []byte) ([]byte, error) { return nil, err } - pubkey_len := C.int(65) - const seckey_len = 32 + var pubkey []byte = make([]byte, 64) + var pubkey_ptr *C.secp256k1_pubkey = (*C.secp256k1_pubkey)(unsafe.Pointer(&pubkey[0])) - var pubkey []byte = make([]byte, pubkey_len) - - var pubkey_ptr *C.uchar = (*C.uchar)(unsafe.Pointer(&pubkey[0])) var seckey_ptr *C.uchar = (*C.uchar)(unsafe.Pointer(&seckey[0])) ret := C.secp256k1_ec_pubkey_create( - pubkey_ptr, &pubkey_len, - seckey_ptr, 0) + context, + pubkey_ptr, + seckey_ptr, + ) if ret != C.int(1) { return nil, errors.New("Unable to generate pubkey from seckey") @@ -117,38 +120,48 @@ func GeneratePubKey(seckey []byte) ([]byte, error) { } func Sign(msg []byte, seckey []byte) ([]byte, error) { - nonce := randentropy.GetEntropyCSPRNG(32) + msg_ptr := (*C.uchar)(unsafe.Pointer(&msg[0])) + seckey_ptr := (*C.uchar)(unsafe.Pointer(&seckey[0])) - var sig []byte = make([]byte, 65) - var recid C.int + sig := make([]byte, 65) + sig_ptr := (*C.secp256k1_ecdsa_recoverable_signature)(unsafe.Pointer(&sig[0])) - var msg_ptr *C.uchar = (*C.uchar)(unsafe.Pointer(&msg[0])) - var sig_ptr *C.uchar = (*C.uchar)(unsafe.Pointer(&sig[0])) - var seckey_ptr *C.uchar = (*C.uchar)(unsafe.Pointer(&seckey[0])) + nonce := randentropy.GetEntropyCSPRNG(32) + ndata_ptr := unsafe.Pointer(&nonce[0]) - var noncefp_ptr = &(*C.secp256k1_nonce_function_default) - var ndata_ptr = unsafe.Pointer(&nonce[0]) + noncefp_ptr := &(*C.secp256k1_nonce_function_default) - if C.secp256k1_ec_seckey_verify(seckey_ptr) != C.int(1) { + if C.secp256k1_ec_seckey_verify(context, seckey_ptr) != C.int(1) { return nil, errors.New("Invalid secret key") } - ret := C.secp256k1_ecdsa_sign_compact( - msg_ptr, + ret := C.secp256k1_ecdsa_sign_recoverable( + context, sig_ptr, + msg_ptr, seckey_ptr, noncefp_ptr, ndata_ptr, - &recid) - - sig[64] = byte(int(recid)) + ) - if ret != C.int(1) { - // nonce invalid, retry - return Sign(msg, seckey) + if ret == C.int(0) { + return Sign(msg, seckey) //invalid secret, try again } - return sig, nil + sig_serialized := make([]byte, 65) + sig_serialized_ptr := (*C.uchar)(unsafe.Pointer(&sig_serialized[0])) + var recid C.int + + C.secp256k1_ecdsa_recoverable_signature_serialize_compact( + context, + sig_serialized_ptr, // 64 byte compact signature + &recid, + sig_ptr, // 65 byte "recoverable" signature + ) + + sig_serialized[64] = byte(int(recid)) // add back recid to get 65 bytes sig + + return sig_serialized, nil } @@ -157,26 +170,13 @@ func VerifySeckeyValidity(seckey []byte) error { return errors.New("priv key is not 32 bytes") } var seckey_ptr *C.uchar = (*C.uchar)(unsafe.Pointer(&seckey[0])) - ret := C.secp256k1_ec_seckey_verify(seckey_ptr) + ret := C.secp256k1_ec_seckey_verify(context, seckey_ptr) if int(ret) != 1 { return errors.New("invalid seckey") } return nil } -func VerifyPubkeyValidity(pubkey []byte) error { - if len(pubkey) != 65 { - return errors.New("pub key is not 65 bytes") - } - var pubkey_ptr *C.uchar = (*C.uchar)(unsafe.Pointer(&pubkey[0])) - ret := C.secp256k1_ec_pubkey_verify(pubkey_ptr, 65) - if int(ret) != 1 { - return errors.New("invalid pubkey") - } - - return nil -} - func VerifySignatureValidity(sig []byte) bool { //64+1 if len(sig) != 65 { @@ -231,36 +231,58 @@ func VerifySignature(msg []byte, sig []byte, pubkey1 []byte) error { return nil } -//recovers the public key from the signature -//recovery of pubkey means correct signature +// recovers a public key from the signature func RecoverPubkey(msg []byte, sig []byte) ([]byte, error) { if len(sig) != 65 { return nil, errors.New("Invalid signature length") } - var pubkey []byte = make([]byte, 65) - - var msg_ptr *C.uchar = (*C.uchar)(unsafe.Pointer(&msg[0])) - var sig_ptr *C.uchar = (*C.uchar)(unsafe.Pointer(&sig[0])) - var pubkey_ptr *C.uchar = (*C.uchar)(unsafe.Pointer(&pubkey[0])) + msg_ptr := (*C.uchar)(unsafe.Pointer(&msg[0])) + sig_ptr := (*C.uchar)(unsafe.Pointer(&sig[0])) + + pubkey := make([]byte, 64) + /* + this slice is used for both the recoverable signature and the + resulting serialized pubkey (both types in libsecp256k1 are 65 + bytes). this saves one allocation of 65 bytes, which is nice as + pubkey recovery is one bottleneck during load in Ethereum + */ + bytes65 := make([]byte, 65) + + pubkey_ptr := (*C.secp256k1_pubkey)(unsafe.Pointer(&pubkey[0])) + recoverable_sig_ptr := (*C.secp256k1_ecdsa_recoverable_signature)(unsafe.Pointer(&bytes65[0])) + + recid := C.int(sig[64]) + ret := C.secp256k1_ecdsa_recoverable_signature_parse_compact( + context, + recoverable_sig_ptr, + sig_ptr, + recid) - var pubkeylen C.int + if ret == C.int(0) { + return nil, errors.New("Failed to parse signature") + } - ret := C.secp256k1_ecdsa_recover_compact( - msg_ptr, - sig_ptr, + ret = C.secp256k1_ecdsa_recover( + context, pubkey_ptr, - &pubkeylen, - C.int(0), - C.int(sig[64]), + recoverable_sig_ptr, + msg_ptr, ) if ret == C.int(0) { return nil, errors.New("Failed to recover public key") - } else if pubkeylen != C.int(65) { - return nil, errors.New("Impossible Error: Invalid recovered public key length") } else { - return pubkey, nil + serialized_pubkey_ptr := (*C.uchar)(unsafe.Pointer(&bytes65[0])) + + var output_len C.size_t + C.secp256k1_ec_pubkey_serialize( // always returns 1 + context, + serialized_pubkey_ptr, + &output_len, + pubkey_ptr, + 0, // SECP256K1_EC_COMPRESSED + ) + return bytes65, nil } - return nil, errors.New("Impossible Error: func RecoverPubkey has reached an unreachable state") } diff --git a/crypto/secp256k1/secp256_test.go b/crypto/secp256k1/secp256_test.go index deeec98d5..45c448f3c 100644 --- a/crypto/secp256k1/secp256_test.go +++ b/crypto/secp256k1/secp256_test.go @@ -18,169 +18,130 @@ package secp256k1 import ( "bytes" - "fmt" - "log" + "encoding/hex" "testing" "github.com/ethereum/go-ethereum/crypto/randentropy" ) -const TESTS = 10000 // how many tests -const SigSize = 65 //64+1 +const TestCount = 10000 -func Test_Secp256_00(t *testing.T) { - - var nonce []byte = randentropy.GetEntropyCSPRNG(32) //going to get bitcoins stolen! - - if len(nonce) != 32 { - t.Fatal() - } - -} - -//tests for Malleability -//highest bit of S must be 0; 32nd byte -func CompactSigTest(sig []byte) { - - var b int = int(sig[32]) - if b < 0 { - log.Panic() - } - if ((b >> 7) == 1) != ((b & 0x80) == 0x80) { - log.Panic("b= %v b2= %v \n", b, b>>7) - } - if (b & 0x80) == 0x80 { - log.Panic("b= %v b2= %v \n", b, b&0x80) - } -} - -//test pubkey/private generation -func Test_Secp256_01(t *testing.T) { - pubkey, seckey := GenerateKeyPair() +func TestPrivkeyGenerate(t *testing.T) { + _, seckey := GenerateKeyPair() if err := VerifySeckeyValidity(seckey); err != nil { - t.Fatal() - } - if err := VerifyPubkeyValidity(pubkey); err != nil { - t.Fatal() + t.Errorf("seckey not valid: %s", err) } } -//test size of messages -func Test_Secp256_02s(t *testing.T) { +func TestSignatureValidity(t *testing.T) { pubkey, seckey := GenerateKeyPair() msg := randentropy.GetEntropyCSPRNG(32) - sig, _ := Sign(msg, seckey) - CompactSigTest(sig) - if sig == nil { - t.Fatal("Signature nil") + sig, err := Sign(msg, seckey) + if err != nil { + t.Errorf("signature error: %s", err) } + compactSigCheck(t, sig) if len(pubkey) != 65 { - t.Fail() + t.Errorf("pubkey length mismatch: want: 65 have: %d", len(pubkey)) } if len(seckey) != 32 { - t.Fail() + t.Errorf("seckey length mismatch: want: 32 have: %d", len(seckey)) } - if len(sig) != 64+1 { - t.Fail() + if len(sig) != 65 { + t.Errorf("sig length mismatch: want: 65 have: %d", len(sig)) + } + recid := int(sig[64]) + if recid > 4 || recid < 0 { + t.Errorf("sig recid mismatch: want: within 0 to 4 have: %d", int(sig[64])) } - if int(sig[64]) > 4 { - t.Fail() - } //should be 0 to 4 } -//test signing message -func Test_Secp256_02(t *testing.T) { +func TestSignAndRecover(t *testing.T) { pubkey1, seckey := GenerateKeyPair() msg := randentropy.GetEntropyCSPRNG(32) - sig, _ := Sign(msg, seckey) - if sig == nil { - t.Fatal("Signature nil") + sig, err := Sign(msg, seckey) + if err != nil { + t.Errorf("signature error: %s", err) } - - pubkey2, _ := RecoverPubkey(msg, sig) - if pubkey2 == nil { - t.Fatal("Recovered pubkey invalid") + pubkey2, err := RecoverPubkey(msg, sig) + if err != nil { + t.Errorf("recover error: %s", err) } - if bytes.Equal(pubkey1, pubkey2) == false { - t.Fatal("Recovered pubkey does not match") + if !bytes.Equal(pubkey1, pubkey2) { + t.Errorf("pubkey mismatch: want: %x have: %x", pubkey1, pubkey2) } - - err := VerifySignature(msg, sig, pubkey1) + err = VerifySignature(msg, sig, pubkey1) if err != nil { - t.Fatal("Signature invalid") + t.Errorf("signature verification error: %s", err) } } -//test pubkey recovery -func Test_Secp256_02a(t *testing.T) { - pubkey1, seckey1 := GenerateKeyPair() - msg := randentropy.GetEntropyCSPRNG(32) - sig, _ := Sign(msg, seckey1) - - if sig == nil { - t.Fatal("Signature nil") - } - err := VerifySignature(msg, sig, pubkey1) - if err != nil { - t.Fatal("Signature invalid") +func TestRandomMessagesWithSameKey(t *testing.T) { + pubkey, seckey := GenerateKeyPair() + keys := func() ([]byte, []byte) { + // Sign function zeroes the privkey so we need a new one in each call + newkey := make([]byte, len(seckey)) + copy(newkey, seckey) + return pubkey, newkey } + signAndRecoverWithRandomMessages(t, keys) +} - pubkey2, _ := RecoverPubkey(msg, sig) - if len(pubkey1) != len(pubkey2) { - t.Fatal() - } - for i, _ := range pubkey1 { - if pubkey1[i] != pubkey2[i] { - t.Fatal() - } - } - if bytes.Equal(pubkey1, pubkey2) == false { - t.Fatal() +func TestRandomMessagesWithRandomKeys(t *testing.T) { + keys := func() ([]byte, []byte) { + pubkey, seckey := GenerateKeyPair() + return pubkey, seckey } + signAndRecoverWithRandomMessages(t, keys) } -//test random messages for the same pub/private key -func Test_Secp256_03(t *testing.T) { - _, seckey := GenerateKeyPair() - for i := 0; i < TESTS; i++ { +func signAndRecoverWithRandomMessages(t *testing.T, keys func() ([]byte, []byte)) { + for i := 0; i < TestCount; i++ { + pubkey1, seckey := keys() msg := randentropy.GetEntropyCSPRNG(32) - sig, _ := Sign(msg, seckey) - CompactSigTest(sig) + sig, err := Sign(msg, seckey) + if err != nil { + t.Fatalf("signature error: %s", err) + } + if sig == nil { + t.Fatal("signature is nil") + } + compactSigCheck(t, sig) + // TODO: why do we flip around the recovery id? sig[len(sig)-1] %= 4 - pubkey2, _ := RecoverPubkey(msg, sig) + + pubkey2, err := RecoverPubkey(msg, sig) + if err != nil { + t.Fatalf("recover error: %s", err) + } if pubkey2 == nil { - t.Fail() + t.Error("pubkey is nil") + } + if !bytes.Equal(pubkey1, pubkey2) { + t.Fatalf("pubkey mismatch: want: %x have: %x", pubkey1, pubkey2) } } } -//test random messages for different pub/private keys -func Test_Secp256_04(t *testing.T) { - for i := 0; i < TESTS; i++ { - pubkey1, seckey := GenerateKeyPair() - msg := randentropy.GetEntropyCSPRNG(32) - sig, _ := Sign(msg, seckey) - CompactSigTest(sig) +func TestRecoveryOfRandomSignature(t *testing.T) { + pubkey1, seckey := GenerateKeyPair() + msg := randentropy.GetEntropyCSPRNG(32) + sig, err := Sign(msg, seckey) + if err != nil { + t.Errorf("signature error: %s", err) + } - if sig[len(sig)-1] >= 4 { - t.Fail() - } + for i := 0; i < TestCount; i++ { + sig = randSig() pubkey2, _ := RecoverPubkey(msg, sig) - if pubkey2 == nil { - t.Fail() - } - if bytes.Equal(pubkey1, pubkey2) == false { - t.Fail() + // recovery can sometimes work, but if so should always give wrong pubkey + if bytes.Equal(pubkey1, pubkey2) { + t.Fatalf("iteration: %d: pubkey mismatch: do NOT want %x: ", i, pubkey2) } } } -//test random signatures against fixed messages; should fail - -//crashes: -// -SIPA look at this - func randSig() []byte { sig := randentropy.GetEntropyCSPRNG(65) sig[32] &= 0x70 @@ -188,67 +149,83 @@ func randSig() []byte { return sig } -func Test_Secp256_06a_alt0(t *testing.T) { +func TestRandomMessagesAgainstValidSig(t *testing.T) { pubkey1, seckey := GenerateKeyPair() msg := randentropy.GetEntropyCSPRNG(32) sig, _ := Sign(msg, seckey) - if sig == nil { - t.Fail() - } - if len(sig) != 65 { - t.Fail() - } - for i := 0; i < TESTS; i++ { - sig = randSig() + for i := 0; i < TestCount; i++ { + msg = randentropy.GetEntropyCSPRNG(32) pubkey2, _ := RecoverPubkey(msg, sig) - - if bytes.Equal(pubkey1, pubkey2) == true { - t.Fail() - } - - if pubkey2 != nil && VerifySignature(msg, sig, pubkey2) != nil { - t.Fail() - } - - if VerifySignature(msg, sig, pubkey1) == nil { - t.Fail() + // recovery can sometimes work, but if so should always give wrong pubkey + if bytes.Equal(pubkey1, pubkey2) { + t.Fatalf("iteration: %d: pubkey mismatch: do NOT want %x: ", i, pubkey2) } } } -//test random messages against valid signature: should fail - -func Test_Secp256_06b(t *testing.T) { - pubkey1, seckey := GenerateKeyPair() - msg := randentropy.GetEntropyCSPRNG(32) - sig, _ := Sign(msg, seckey) +func TestZeroPrivkey(t *testing.T) { + zeroedBytes := make([]byte, 32) + err := VerifySeckeyValidity(zeroedBytes) + if err == nil { + t.Errorf("zeroed bytes should have returned error") + } +} - fail_count := 0 - for i := 0; i < TESTS; i++ { - msg = randentropy.GetEntropyCSPRNG(32) - pubkey2, _ := RecoverPubkey(msg, sig) - if bytes.Equal(pubkey1, pubkey2) == true { - t.Fail() - } +// Useful when the underlying libsecp256k1 API changes to quickly +// check only recover function without use of signature function +func TestRecoverSanity(t *testing.T) { + msg, _ := hex.DecodeString("ce0677bb30baa8cf067c88db9811f4333d131bf8bcf12fe7065d211dce971008") + sig, _ := hex.DecodeString("90f27b8b488db00b00606796d2987f6a5f59ae62ea05effe84fef5b8b0e549984a691139ad57a3f0b906637673aa2f63d1f55cb1a69199d4009eea23ceaddc9301") + pubkey1, _ := hex.DecodeString("04e32df42865e97135acfb65f3bae71bdc86f4d49150ad6a440b6f15878109880a0a2b2667f7e725ceea70c673093bf67663e0312623c8e091b13cf2c0f11ef652") + pubkey2, err := RecoverPubkey(msg, sig) + if err != nil { + t.Fatalf("recover error: %s", err) + } + if !bytes.Equal(pubkey1, pubkey2) { + t.Errorf("pubkey mismatch: want: %x have: %x", pubkey1, pubkey2) + } +} - if pubkey2 != nil && VerifySignature(msg, sig, pubkey2) != nil { - t.Fail() - } +// tests for malleability +// highest bit of signature ECDSA s value must be 0, in the 33th byte +func compactSigCheck(t *testing.T, sig []byte) { + var b int = int(sig[32]) + if b < 0 { + t.Errorf("highest bit is negative: %d", b) + } + if ((b >> 7) == 1) != ((b & 0x80) == 0x80) { + t.Errorf("highest bit: %d bit >> 7: %d", b, b>>7) + } + if (b & 0x80) == 0x80 { + t.Errorf("highest bit: %d bit & 0x80: %d", b, b&0x80) + } +} - if VerifySignature(msg, sig, pubkey1) == nil { - t.Fail() +// godep go test -v -run=XXX -bench=BenchmarkSignRandomInputEachRound +// add -benchtime=10s to benchmark longer for more accurate average +func BenchmarkSignRandomInputEachRound(b *testing.B) { + for i := 0; i < b.N; i++ { + b.StopTimer() + _, seckey := GenerateKeyPair() + msg := randentropy.GetEntropyCSPRNG(32) + b.StartTimer() + if _, err := Sign(msg, seckey); err != nil { + b.Fatal(err) } } - if fail_count != 0 { - fmt.Printf("ERROR: Accepted signature for %v of %v random messages\n", fail_count, TESTS) - } } -func TestInvalidKey(t *testing.T) { - p1 := make([]byte, 32) - err := VerifySeckeyValidity(p1) - if err == nil { - t.Errorf("pvk %x varify sec key should have returned error", p1) +//godep go test -v -run=XXX -bench=BenchmarkRecoverRandomInputEachRound +func BenchmarkRecoverRandomInputEachRound(b *testing.B) { + for i := 0; i < b.N; i++ { + b.StopTimer() + _, seckey := GenerateKeyPair() + msg := randentropy.GetEntropyCSPRNG(32) + sig, _ := Sign(msg, seckey) + b.StartTimer() + if _, err := RecoverPubkey(msg, sig); err != nil { + b.Fatal(err) + } } } -- cgit v1.2.3 From af9afb686bbfcbb57fad80511983d155b26a4460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 12 Oct 2015 00:14:35 +0300 Subject: core/vm: copy stack element to prevent overwrites --- core/vm/vm.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/vm/vm.go b/core/vm/vm.go index 57dd4dac3..4b03e55f0 100644 --- a/core/vm/vm.go +++ b/core/vm/vm.go @@ -370,9 +370,11 @@ func (self *Vm) log(pc uint64, op OpCode, gas, cost *big.Int, memory *Memory, st if Debug { mem := make([]byte, len(memory.Data())) copy(mem, memory.Data()) - stck := make([]*big.Int, len(stack.Data())) - copy(stck, stack.Data()) + stck := make([]*big.Int, len(stack.Data())) + for i, item := range stack.Data() { + stck[i] = new(big.Int).Set(item) + } storage := make(map[common.Hash][]byte) /* object := contract.self.(*state.StateObject) @@ -380,7 +382,6 @@ func (self *Vm) log(pc uint64, op OpCode, gas, cost *big.Int, memory *Memory, st storage[common.BytesToHash(k)] = v }) */ - self.env.AddStructLog(StructLog{pc, op, new(big.Int).Set(gas), cost, mem, stck, storage, err}) } } -- cgit v1.2.3 From 402fd6e8c6a2e379351e0aae10a833fae6bcae6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 12 Oct 2015 15:04:38 +0300 Subject: core, eth, event, miner, xeth: fix event post / subscription race --- core/blockchain.go | 65 ++++++++++++++++++-------------------------- core/transaction_pool.go | 2 +- eth/filters/filter_system.go | 44 +++++++++++++++++++----------- eth/gasprice.go | 15 ++++------ eth/handler.go | 4 +-- event/event.go | 37 +++++++++++++++++++------ event/event_test.go | 2 +- event/example_test.go | 2 +- miner/miner.go | 2 +- miner/worker.go | 19 ++++++++----- xeth/xeth.go | 25 +++++++++++------ 11 files changed, 123 insertions(+), 94 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index ad545cf69..6c555e9ee 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -483,13 +483,6 @@ func (bc *BlockChain) Stop() { glog.V(logger.Info).Infoln("Chain manager stopped") } -type queueEvent struct { - queue []interface{} - canonicalCount int - sideCount int - splitCount int -} - func (self *BlockChain) procFutureBlocks() { blocks := make([]*types.Block, self.futureBlocks.Len()) for i, hash := range self.futureBlocks.Keys() { @@ -573,10 +566,9 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) { // faster than direct delivery and requires much less mutex // acquiring. var ( - queue = make([]interface{}, len(chain)) - queueEvent = queueEvent{queue: queue} - stats struct{ queued, processed, ignored int } - tstart = time.Now() + stats struct{ queued, processed, ignored int } + events = make([]interface{}, 0, len(chain)) + tstart = time.Now() nonceChecked = make([]bool, len(chain)) ) @@ -659,22 +651,21 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) { if glog.V(logger.Debug) { glog.Infof("[%v] inserted block #%d (%d TXs %v G %d UNCs) (%x...). Took %v\n", time.Now().UnixNano(), block.Number(), len(block.Transactions()), block.GasUsed(), len(block.Uncles()), block.Hash().Bytes()[0:4], time.Since(bstart)) } - queue[i] = ChainEvent{block, block.Hash(), logs} - queueEvent.canonicalCount++ + events = append(events, ChainEvent{block, block.Hash(), logs}) // This puts transactions in a extra db for rpc PutTransactions(self.chainDb, block, block.Transactions()) // store the receipts PutReceipts(self.chainDb, receipts) + case SideStatTy: if glog.V(logger.Detail) { glog.Infof("inserted forked block #%d (TD=%v) (%d TXs %d UNCs) (%x...). Took %v\n", block.Number(), block.Difficulty(), len(block.Transactions()), len(block.Uncles()), block.Hash().Bytes()[0:4], time.Since(bstart)) } - queue[i] = ChainSideEvent{block, logs} - queueEvent.sideCount++ + events = append(events, ChainSideEvent{block, logs}) + case SplitStatTy: - queue[i] = ChainSplitEvent{block, logs} - queueEvent.splitCount++ + events = append(events, ChainSplitEvent{block, logs}) } stats.processed++ } @@ -684,8 +675,7 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) { start, end := chain[0], chain[len(chain)-1] glog.Infof("imported %d block(s) (%d queued %d ignored) including %d txs in %v. #%v [%x / %x]\n", stats.processed, stats.queued, stats.ignored, txcount, tend, end.Number(), start.Hash().Bytes()[:4], end.Hash().Bytes()[:4]) } - - go self.eventMux.Post(queueEvent) + go self.postChainEvents(events) return 0, nil } @@ -774,32 +764,31 @@ func (self *BlockChain) reorg(oldBlock, newBlock *types.Block) error { return nil } +// postChainEvents iterates over the events generated by a chain insertion and +// posts them into the event mux. +func (self *BlockChain) postChainEvents(events []interface{}) { + for _, event := range events { + if event, ok := event.(ChainEvent); ok { + // We need some control over the mining operation. Acquiring locks and waiting for the miner to create new block takes too long + // and in most cases isn't even necessary. + if self.currentBlock.Hash() == event.Hash { + self.currentGasLimit = CalcGasLimit(event.Block) + self.eventMux.Post(ChainHeadEvent{event.Block}) + } + } + // Fire the insertion events individually too + self.eventMux.Post(event) + } +} + func (self *BlockChain) update() { - events := self.eventMux.Subscribe(queueEvent{}) futureTimer := time.Tick(5 * time.Second) -out: for { select { - case ev := <-events.Chan(): - switch ev := ev.(type) { - case queueEvent: - for _, event := range ev.queue { - switch event := event.(type) { - case ChainEvent: - // We need some control over the mining operation. Acquiring locks and waiting for the miner to create new block takes too long - // and in most cases isn't even necessary. - if self.currentBlock.Hash() == event.Hash { - self.currentGasLimit = CalcGasLimit(event.Block) - self.eventMux.Post(ChainHeadEvent{event.Block}) - } - } - self.eventMux.Post(event) - } - } case <-futureTimer: self.procFutureBlocks() case <-self.quit: - break out + return } } } diff --git a/core/transaction_pool.go b/core/transaction_pool.go index 11d0cb490..a4e6ce3e2 100644 --- a/core/transaction_pool.go +++ b/core/transaction_pool.go @@ -93,7 +93,7 @@ func (pool *TxPool) eventLoop() { // we need to know the new state. The new state will help us determine // the nonces in the managed state for ev := range pool.events.Chan() { - switch ev := ev.(type) { + switch ev := ev.Data.(type) { case ChainHeadEvent: pool.mu.Lock() pool.resetState() diff --git a/eth/filters/filter_system.go b/eth/filters/filter_system.go index 4972dcd59..ae6093525 100644 --- a/eth/filters/filter_system.go +++ b/eth/filters/filter_system.go @@ -20,6 +20,7 @@ package filters import ( "sync" + "time" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/vm" @@ -35,6 +36,7 @@ type FilterSystem struct { filterMu sync.RWMutex filterId int filters map[int]*Filter + created map[int]time.Time quit chan struct{} } @@ -44,6 +46,7 @@ func NewFilterSystem(mux *event.TypeMux) *FilterSystem { fs := &FilterSystem{ eventMux: mux, filters: make(map[int]*Filter), + created: make(map[int]time.Time), } go fs.filterLoop() return fs @@ -60,6 +63,7 @@ func (fs *FilterSystem) Add(filter *Filter) (id int) { defer fs.filterMu.Unlock() id = fs.filterId fs.filters[id] = filter + fs.created[id] = time.Now() fs.filterId++ return id @@ -69,15 +73,16 @@ func (fs *FilterSystem) Add(filter *Filter) (id int) { func (fs *FilterSystem) Remove(id int) { fs.filterMu.Lock() defer fs.filterMu.Unlock() - if _, ok := fs.filters[id]; ok { - delete(fs.filters, id) - } + + delete(fs.filters, id) + delete(fs.created, id) } // Get retrieves a filter installed using Add The filter may not be modified. func (fs *FilterSystem) Get(id int) *Filter { fs.filterMu.RLock() defer fs.filterMu.RUnlock() + return fs.filters[id] } @@ -85,42 +90,49 @@ func (fs *FilterSystem) Get(id int) *Filter { // when the filter matches the requirements. func (fs *FilterSystem) filterLoop() { // Subscribe to events - events := fs.eventMux.Subscribe( + eventCh := fs.eventMux.Subscribe( //core.PendingBlockEvent{}, core.ChainEvent{}, core.TxPreEvent{}, - vm.Logs(nil)) + vm.Logs(nil), + ).Chan() out: for { select { case <-fs.quit: break out - case event := <-events.Chan(): - switch event := event.(type) { + case event, ok := <-eventCh: + if !ok { + // Event subscription closed, set the channel to nil to stop spinning + eventCh = nil + continue + } + // A real event arrived, notify the registered filters + switch ev := event.Data.(type) { case core.ChainEvent: fs.filterMu.RLock() - for _, filter := range fs.filters { - if filter.BlockCallback != nil { - filter.BlockCallback(event.Block, event.Logs) + for id, filter := range fs.filters { + if filter.BlockCallback != nil && fs.created[id].Before(event.Time) { + filter.BlockCallback(ev.Block, ev.Logs) } } fs.filterMu.RUnlock() case core.TxPreEvent: fs.filterMu.RLock() - for _, filter := range fs.filters { - if filter.TransactionCallback != nil { - filter.TransactionCallback(event.Tx) + for id, filter := range fs.filters { + if filter.TransactionCallback != nil && fs.created[id].Before(event.Time) { + filter.TransactionCallback(ev.Tx) } } fs.filterMu.RUnlock() case vm.Logs: fs.filterMu.RLock() - for _, filter := range fs.filters { - if filter.LogsCallback != nil { - msgs := filter.FilterLogs(event) + for id, filter := range fs.filters { + if filter.LogsCallback != nil && fs.created[id].Before(event.Time) { + msgs := filter.FilterLogs(ev) if len(msgs) > 0 { filter.LogsCallback(msgs) } diff --git a/eth/gasprice.go b/eth/gasprice.go index c08b96129..b4409f346 100644 --- a/eth/gasprice.go +++ b/eth/gasprice.go @@ -84,19 +84,16 @@ func (self *GasPriceOracle) processPastBlocks() { } func (self *GasPriceOracle) listenLoop() { - for { - ev, isopen := <-self.events.Chan() - if !isopen { - break - } - switch ev := ev.(type) { + defer self.events.Unsubscribe() + + for event := range self.events.Chan() { + switch event := event.Data.(type) { case core.ChainEvent: - self.processBlock(ev.Block) + self.processBlock(event.Block) case core.ChainSplitEvent: - self.processBlock(ev.Block) + self.processBlock(event.Block) } } - self.events.Unsubscribe() } func (self *GasPriceOracle) processBlock(block *types.Block) { diff --git a/eth/handler.go b/eth/handler.go index fc92338b4..3fc909672 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -687,7 +687,7 @@ func (pm *ProtocolManager) BroadcastTx(hash common.Hash, tx *types.Transaction) func (self *ProtocolManager) minedBroadcastLoop() { // automatically stops if unsubscribe for obj := range self.minedBlockSub.Chan() { - switch ev := obj.(type) { + switch ev := obj.Data.(type) { case core.NewMinedBlockEvent: self.BroadcastBlock(ev.Block, true) // First propagate block to peers self.BroadcastBlock(ev.Block, false) // Only then announce to the rest @@ -698,7 +698,7 @@ func (self *ProtocolManager) minedBroadcastLoop() { func (self *ProtocolManager) txBroadcastLoop() { // automatically stops if unsubscribe for obj := range self.txSub.Chan() { - event := obj.(core.TxPreEvent) + event := obj.Data.(core.TxPreEvent) self.BroadcastTx(event.Tx.Hash(), event.Tx) } } diff --git a/event/event.go b/event/event.go index ce74e5286..57dd52baa 100644 --- a/event/event.go +++ b/event/event.go @@ -22,14 +22,21 @@ import ( "fmt" "reflect" "sync" + "time" ) +// Event is a time-tagged notification pushed to subscribers. +type Event struct { + Time time.Time + Data interface{} +} + // Subscription is implemented by event subscriptions. type Subscription interface { // Chan returns a channel that carries events. // Implementations should return the same channel // for any subsequent calls to Chan. - Chan() <-chan interface{} + Chan() <-chan *Event // Unsubscribe stops delivery of events to a subscription. // The event channel is closed. @@ -82,6 +89,10 @@ func (mux *TypeMux) Subscribe(types ...interface{}) Subscription { // Post sends an event to all receivers registered for the given type. // It returns ErrMuxClosed if the mux has been stopped. func (mux *TypeMux) Post(ev interface{}) error { + event := &Event{ + Time: time.Now(), + Data: ev, + } rtyp := reflect.TypeOf(ev) mux.mutex.RLock() if mux.stopped { @@ -91,7 +102,7 @@ func (mux *TypeMux) Post(ev interface{}) error { subs := mux.subm[rtyp] mux.mutex.RUnlock() for _, sub := range subs { - sub.deliver(ev) + sub.deliver(event) } return nil } @@ -143,6 +154,7 @@ func posdelete(slice []*muxsub, pos int) []*muxsub { type muxsub struct { mux *TypeMux + created time.Time closeMu sync.Mutex closing chan struct{} closed bool @@ -151,21 +163,22 @@ type muxsub struct { // postC can be set to nil without affecting the return value of // Chan. postMu sync.RWMutex - readC <-chan interface{} - postC chan<- interface{} + readC <-chan *Event + postC chan<- *Event } func newsub(mux *TypeMux) *muxsub { - c := make(chan interface{}) + c := make(chan *Event) return &muxsub{ mux: mux, + created: time.Now(), readC: c, postC: c, closing: make(chan struct{}), } } -func (s *muxsub) Chan() <-chan interface{} { +func (s *muxsub) Chan() <-chan *Event { return s.readC } @@ -189,11 +202,17 @@ func (s *muxsub) closewait() { s.postMu.Unlock() } -func (s *muxsub) deliver(ev interface{}) { +func (s *muxsub) deliver(event *Event) { + // Short circuit delivery if stale event + if s.created.After(event.Time) { + return + } + // Otherwise deliver the event s.postMu.RLock() + defer s.postMu.RUnlock() + select { - case s.postC <- ev: + case s.postC <- event: case <-s.closing: } - s.postMu.RUnlock() } diff --git a/event/event_test.go b/event/event_test.go index 465af38cd..323cfea49 100644 --- a/event/event_test.go +++ b/event/event_test.go @@ -37,7 +37,7 @@ func TestSub(t *testing.T) { }() ev := <-sub.Chan() - if ev.(testEvent) != testEvent(5) { + if ev.Data.(testEvent) != testEvent(5) { t.Errorf("Got %v (%T), expected event %v (%T)", ev, ev, testEvent(5), testEvent(5)) } diff --git a/event/example_test.go b/event/example_test.go index d4642ef2f..29938e853 100644 --- a/event/example_test.go +++ b/event/example_test.go @@ -30,7 +30,7 @@ func ExampleTypeMux() { sub := mux.Subscribe(someEvent{}, otherEvent{}) go func() { for event := range sub.Chan() { - fmt.Printf("Received: %#v\n", event) + fmt.Printf("Received: %#v\n", event.Data) } fmt.Println("done") close(done) diff --git a/miner/miner.go b/miner/miner.go index b550ed6d6..769db79d1 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -66,7 +66,7 @@ func (self *Miner) update() { events := self.mux.Subscribe(downloader.StartEvent{}, downloader.DoneEvent{}, downloader.FailedEvent{}) out: for ev := range events.Chan() { - switch ev.(type) { + switch ev.Data.(type) { case downloader.StartEvent: atomic.StoreInt32(&self.canStart, 0) if self.Mining() { diff --git a/miner/worker.go b/miner/worker.go index 8be2db93e..43f6f9909 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -215,13 +215,20 @@ func (self *worker) register(agent Agent) { } func (self *worker) update() { - events := self.mux.Subscribe(core.ChainHeadEvent{}, core.ChainSideEvent{}, core.TxPreEvent{}) + eventSub := self.mux.Subscribe(core.ChainHeadEvent{}, core.ChainSideEvent{}, core.TxPreEvent{}) + defer eventSub.Unsubscribe() -out: + eventCh := eventSub.Chan() for { select { - case event := <-events.Chan(): - switch ev := event.(type) { + case event, ok := <-eventCh: + if !ok { + // Event subscription closed, set the channel to nil to stop spinning + eventCh = nil + continue + } + // A real event arrived, process interesting content + switch ev := event.Data.(type) { case core.ChainHeadEvent: self.commitNewWork() case core.ChainSideEvent: @@ -237,11 +244,9 @@ out: } } case <-self.quit: - break out + return } } - - events.Unsubscribe() } func newLocalMinedBlock(blockNumber uint64, prevMinedBlocks *uint64RingBuffer) (minedBlocks *uint64RingBuffer) { diff --git a/xeth/xeth.go b/xeth/xeth.go index da712a984..13e171270 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -244,30 +244,37 @@ func (self *XEth) State() *State { return self.state } func (self *XEth) UpdateState() (wait chan *big.Int) { wait = make(chan *big.Int) go func() { - sub := self.backend.EventMux().Subscribe(core.ChainHeadEvent{}) + eventSub := self.backend.EventMux().Subscribe(core.ChainHeadEvent{}) + defer eventSub.Unsubscribe() + var m, n *big.Int var ok bool - out: + + eventCh := eventSub.Chan() for { select { - case event := <-sub.Chan(): - ev, ok := event.(core.ChainHeadEvent) - if ok { - m = ev.Block.Number() + case event, ok := <-eventCh: + if !ok { + // Event subscription closed, set the channel to nil to stop spinning + eventCh = nil + continue + } + // A real event arrived, process if new head block assignment + if event, ok := event.Data.(core.ChainHeadEvent); ok { + m = event.Block.Number() if n != nil && n.Cmp(m) < 0 { wait <- n n = nil } - statedb := state.New(ev.Block.Root(), self.backend.ChainDb()) + statedb := state.New(event.Block.Root(), self.backend.ChainDb()) self.state = NewState(self, statedb) } case n, ok = <-wait: if !ok { - break out + return } } } - sub.Unsubscribe() }() return } -- cgit v1.2.3 From 2db97986460c57ba74a563d97a704a45a270df7d Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Tue, 6 Oct 2015 18:39:42 +0200 Subject: common, crypto: add ICAP functions --- common/big.go | 3 + common/icap.go | 190 +++++++++++++++++++++++++++++++++++++++++++++++ common/icap_test.go | 91 +++++++++++++++++++++++ crypto/key.go | 22 ++++++ crypto/key_store_test.go | 8 ++ 5 files changed, 314 insertions(+) create mode 100644 common/icap.go create mode 100644 common/icap_test.go diff --git a/common/big.go b/common/big.go index a5d512d0d..4ce87ee0c 100644 --- a/common/big.go +++ b/common/big.go @@ -27,6 +27,9 @@ var ( BigTrue = Big1 BigFalse = Big0 Big32 = big.NewInt(32) + Big36 = big.NewInt(36) + Big97 = big.NewInt(97) + Big98 = big.NewInt(98) Big256 = big.NewInt(0xff) Big257 = big.NewInt(257) MaxBig = String2Big("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff") diff --git a/common/icap.go b/common/icap.go new file mode 100644 index 000000000..a36e669b3 --- /dev/null +++ b/common/icap.go @@ -0,0 +1,190 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +// Spec at https://github.com/ethereum/wiki/wiki/ICAP:-Inter-exchange-Client-Address-Protocol + +package common + +import ( + "errors" + "math/big" + "strconv" + "strings" +) + +var ( + Base36Chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" + ICAPLengthError = errors.New("Invalid ICAP length") + ICAPEncodingError = errors.New("Invalid ICAP encoding") + ICAPChecksumError = errors.New("Invalid ICAP checksum") + ICAPCountryCodeError = errors.New("Invalid ICAP country code") + ICAPAssetIdentError = errors.New("Invalid ICAP asset identifier") + ICAPInstCodeError = errors.New("Invalid ICAP institution code") + ICAPClientIdentError = errors.New("Invalid ICAP client identifier") +) + +func ICAPToAddress(s string) (Address, error) { + switch len(s) { + case 35: // "XE" + 2 digit checksum + 31 base-36 chars of address + return parseICAP(s) + case 34: // "XE" + 2 digit checksum + 30 base-36 chars of address + return parseICAP(s) + case 20: // "XE" + 2 digit checksum + 3-char asset identifier + + // 4-char institution identifier + 9-char institution client identifier + return parseIndirectICAP(s) + default: + return Address{}, ICAPLengthError + } +} + +func parseICAP(s string) (Address, error) { + if !strings.HasPrefix(s, "XE") { + return Address{}, ICAPCountryCodeError + } + if err := validCheckSum(s); err != nil { + return Address{}, err + } + // checksum is ISO13616, Ethereum address is base-36 + bigAddr, _ := new(big.Int).SetString(s[4:], 36) + return BigToAddress(bigAddr), nil +} + +func parseIndirectICAP(s string) (Address, error) { + if !strings.HasPrefix(s, "XE") { + return Address{}, ICAPCountryCodeError + } + if s[4:7] != "ETH" { + return Address{}, ICAPAssetIdentError + } + if err := validCheckSum(s); err != nil { + return Address{}, err + } + // TODO: integrate with ICAP namereg + return Address{}, errors.New("not implemented") +} + +func AddressToICAP(a Address) (string, error) { + enc := base36Encode(a.Big()) + // zero padd encoded address to Direct ICAP length if needed + if len(enc) < 30 { + enc = join(strings.Repeat("0", 30-len(enc)), enc) + } + icap := join("XE", checkDigits(enc), enc) + return icap, nil +} + +// TODO: integrate with ICAP namereg when it's available +func AddressToIndirectICAP(a Address, instCode string) (string, error) { + // return addressToIndirectICAP(a, instCode) + return "", errors.New("not implemented") +} + +func addressToIndirectICAP(a Address, instCode string) (string, error) { + // TODO: add addressToClientIdent which grabs client ident from ICAP namereg + //clientIdent := addressToClientIdent(a) + clientIdent := "todo" + return clientIdentToIndirectICAP(instCode, clientIdent) +} + +func clientIdentToIndirectICAP(instCode, clientIdent string) (string, error) { + if len(instCode) != 4 || !validBase36(instCode) { + return "", ICAPInstCodeError + } + if len(clientIdent) != 9 || !validBase36(instCode) { + return "", ICAPClientIdentError + } + + // currently ETH is only valid asset identifier + s := join("ETH", instCode, clientIdent) + return join("XE", checkDigits(s), s), nil +} + +// https://en.wikipedia.org/wiki/International_Bank_Account_Number#Validating_the_IBAN +func validCheckSum(s string) error { + s = join(s[4:], s[:4]) + expanded, err := iso13616Expand(s) + if err != nil { + return err + } + checkSumNum, _ := new(big.Int).SetString(expanded, 10) + if checkSumNum.Mod(checkSumNum, Big97).Cmp(Big1) != 0 { + return ICAPChecksumError + } + return nil +} + +func checkDigits(s string) string { + expanded, _ := iso13616Expand(strings.Join([]string{s, "XE00"}, "")) + num, _ := new(big.Int).SetString(expanded, 10) + num.Sub(Big98, num.Mod(num, Big97)) + + checkDigits := num.String() + // zero padd checksum + if len(checkDigits) == 1 { + checkDigits = join("0", checkDigits) + } + return checkDigits +} + +// not base-36, but expansion to decimal literal: A = 10, B = 11, ... Z = 35 +func iso13616Expand(s string) (string, error) { + var parts []string + if !validBase36(s) { + return "", ICAPEncodingError + } + for _, c := range s { + i := uint64(c) + if i >= 65 { + parts = append(parts, strconv.FormatUint(uint64(c)-55, 10)) + } else { + parts = append(parts, string(c)) + } + } + return join(parts...), nil +} + +func base36Encode(i *big.Int) string { + var chars []rune + x := new(big.Int) + for { + x.Mod(i, Big36) + chars = append(chars, rune(Base36Chars[x.Uint64()])) + i.Div(i, Big36) + if i.Cmp(Big0) == 0 { + break + } + } + // reverse slice + for i, j := 0, len(chars)-1; i < j; i, j = i+1, j-1 { + chars[i], chars[j] = chars[j], chars[i] + } + return string(chars) +} + +func validBase36(s string) bool { + for _, c := range s { + i := uint64(c) + // 0-9 or A-Z + if i < 48 || (i > 57 && i < 65) || i > 90 { + return false + } + } + return true +} + +func join(s ...string) string { + return strings.Join(s, "") +} diff --git a/common/icap_test.go b/common/icap_test.go new file mode 100644 index 000000000..6306686d1 --- /dev/null +++ b/common/icap_test.go @@ -0,0 +1,91 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package common + +import "testing" + +/* More test vectors: +https://github.com/ethereum/web3.js/blob/master/test/iban.fromAddress.js +https://github.com/ethereum/web3.js/blob/master/test/iban.toAddress.js +https://github.com/ethereum/web3.js/blob/master/test/iban.isValid.js +https://github.com/ethereum/libethereum/blob/develop/test/libethcore/icap.cpp +*/ + +type icapTest struct { + name string + addr string + icap string +} + +var icapOKTests = []icapTest{ + {"Direct1", "0x52dc504a422f0e2a9e7632a34a50f1a82f8224c7", "XE499OG1EH8ZZI0KXC6N83EKGT1BM97P2O7"}, + {"Direct2", "0x11c5496aee77c1ba1f0854206a26dda82a81d6d8", "XE1222Q908LN1QBBU6XUQSO1OHWJIOS46OO"}, + {"DirectZeroPrefix", "0x00c5496aee77c1ba1f0854206a26dda82a81d6d8", "XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS"}, + {"DirectDoubleZeroPrefix", "0x0000a5327eab78357cbf2ae8f3d49fd9d90c7d22", "XE0600DQK33XDTYUCRI0KYM5ELAKXDWWF6"}, +} + +var icapInvalidTests = []icapTest{ + {"DirectInvalidCheckSum", "", "XE7438O073KYGTWWZN0F2WZ0R8PX5ZPPZS"}, + {"DirectInvalidCountryCode", "", "XD7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS"}, + {"DirectInvalidLength36", "", "XE499OG1EH8ZZI0KXC6N83EKGT1BM97P2O77"}, + {"DirectInvalidLength33", "", "XE499OG1EH8ZZI0KXC6N83EKGT1BM97P2"}, + + {"IndirectInvalidCheckSum", "", "XE35ETHXREGGOPHERSSS"}, + {"IndirectInvalidAssetIdentifier", "", "XE34ETHXREGGOPHERSSS"}, + {"IndirectInvalidLength19", "", "XE34ETHXREGGOPHERSS"}, + {"IndirectInvalidLength21", "", "XE34ETHXREGGOPHERSSSS"}, +} + +func TestICAPOK(t *testing.T) { + for _, test := range icapOKTests { + decodeEncodeTest(HexToAddress(test.addr), test.icap, t) + } +} + +func TestICAPInvalid(t *testing.T) { + for _, test := range icapInvalidTests { + failedDecodingTest(test.icap, t) + } +} + +func decodeEncodeTest(addr0 Address, icap0 string, t *testing.T) { + icap1, err := AddressToICAP(addr0) + if err != nil { + t.Errorf("ICAP encoding failed: %s", err) + } + if icap1 != icap0 { + t.Errorf("ICAP mismatch: have: %s want: %s", icap1, icap0) + } + + addr1, err := ICAPToAddress(icap0) + if err != nil { + t.Errorf("ICAP decoding failed: %s", err) + } + if addr1 != addr0 { + t.Errorf("Address mismatch: have: %x want: %x", addr1, addr0) + } +} + +func failedDecodingTest(icap string, t *testing.T) { + addr, err := ICAPToAddress(icap) + if err == nil { + t.Errorf("Expected ICAP decoding to fail.") + } + if addr != (Address{}) { + t.Errorf("Expected empty Address on failed ICAP decoding.") + } +} diff --git a/crypto/key.go b/crypto/key.go index 35139b67f..4ec43dfd7 100644 --- a/crypto/key.go +++ b/crypto/key.go @@ -22,6 +22,7 @@ import ( "encoding/hex" "encoding/json" "io" + "strings" "github.com/ethereum/go-ethereum/common" "github.com/pborman/uuid" @@ -143,3 +144,24 @@ func NewKey(rand io.Reader) *Key { return NewKeyFromECDSA(privateKeyECDSA) } + +// generate key whose address fits into < 155 bits so it can fit into +// the Direct ICAP spec. for simplicity and easier compatibility with +// other libs, we retry until the first byte is 0. +func NewKeyForDirectICAP(rand io.Reader) *Key { + randBytes := make([]byte, 64) + _, err := rand.Read(randBytes) + if err != nil { + panic("key generation: could not read from random source: " + err.Error()) + } + reader := bytes.NewReader(randBytes) + privateKeyECDSA, err := ecdsa.GenerateKey(S256(), reader) + if err != nil { + panic("key generation: ecdsa.GenerateKey failed: " + err.Error()) + } + key := NewKeyFromECDSA(privateKeyECDSA) + if !strings.HasPrefix(key.Address.Hex(), "0x00") { + return NewKeyForDirectICAP(rand) + } + return key +} diff --git a/crypto/key_store_test.go b/crypto/key_store_test.go index fda87ddc8..de4a21dcf 100644 --- a/crypto/key_store_test.go +++ b/crypto/key_store_test.go @@ -20,6 +20,7 @@ import ( "encoding/hex" "fmt" "reflect" + "strings" "testing" "github.com/ethereum/go-ethereum/common" @@ -223,3 +224,10 @@ func loadKeyStoreTestV1(file string, t *testing.T) map[string]KeyStoreTestV1 { } return tests } + +func TestKeyForDirectICAP(t *testing.T) { + key := NewKeyForDirectICAP(randentropy.Reader) + if !strings.HasPrefix(key.Address.Hex(), "0x00") { + t.Errorf("Expected first address byte to be zero, have: %s", key.Address.Hex()) + } +} -- cgit v1.2.3 From 30f057aaf9891fb37f82d94c24b8aa35d388e07b Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Mon, 12 Oct 2015 17:54:59 +0200 Subject: eth/filters: added benchmark --- core/chain_makers.go | 4 ++ eth/filters/filter.go | 8 +--- eth/filters/filter_test.go | 95 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 7 deletions(-) create mode 100644 eth/filters/filter_test.go diff --git a/core/chain_makers.go b/core/chain_makers.go index ba09b3029..c2871a097 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -105,6 +105,10 @@ func (b *BlockGen) AddTx(tx *types.Transaction) { b.receipts = append(b.receipts, receipt) } +func (b *BlockGen) AddReceipt(receipt *types.Receipt) { + b.receipts = append(b.receipts, receipt) +} + // TxNonce returns the next valid transaction nonce for the // account at addr. It panics if the account does not exist. func (b *BlockGen) TxNonce(addr common.Address) uint64 { diff --git a/eth/filters/filter.go b/eth/filters/filter.go index 2bcf20d0c..d3d430775 100644 --- a/eth/filters/filter.go +++ b/eth/filters/filter.go @@ -17,8 +17,6 @@ package filters import ( - "math" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" @@ -107,8 +105,6 @@ done: break done case block.NumberU64() < earliestBlockNo: break done - case self.max <= len(logs): - break done } // Use bloom filtering to see if this block is interesting given the @@ -128,9 +124,7 @@ done: block = core.GetBlock(self.db, block.ParentHash()) } - skip := int(math.Min(float64(len(logs)), float64(self.skip))) - - return logs[skip:] + return logs } func includes(addresses []common.Address, a common.Address) bool { diff --git a/eth/filters/filter_test.go b/eth/filters/filter_test.go new file mode 100644 index 000000000..950a84579 --- /dev/null +++ b/eth/filters/filter_test.go @@ -0,0 +1,95 @@ +package filters + +import ( + "math/big" + "os" + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethdb" +) + +func makeReceipt(addr common.Address) *types.Receipt { + receipt := types.NewReceipt(nil, new(big.Int)) + receipt.SetLogs(vm.Logs{ + &vm.Log{Address: addr}, + }) + receipt.Bloom = types.CreateBloom(types.Receipts{receipt}) + return receipt +} + +func BenchmarkMipmaps(b *testing.B) { + const dbname = "/tmp/mipmap" + var ( + db, _ = ethdb.NewLDBDatabase(dbname, 16) + key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") + addr1 = crypto.PubkeyToAddress(key1.PublicKey) + addr2 = common.BytesToAddress([]byte("jeff")) + addr3 = common.BytesToAddress([]byte("ethereum")) + addr4 = common.BytesToAddress([]byte("random addresses please")) + ) + defer func() { + db.Close() + os.Remove(dbname) + }() + + genesis := core.WriteGenesisBlockForTesting(db, core.GenesisAccount{addr1, big.NewInt(1000000)}) + chain := core.GenerateChain(genesis, db, 100000, func(i int, gen *core.BlockGen) { + var receipts types.Receipts + switch i { + case 2403: + receipt := makeReceipt(addr1) + receipts = types.Receipts{receipt} + gen.AddReceipt(receipt) + case 10340: + receipt := makeReceipt(addr2) + receipts = types.Receipts{receipt} + gen.AddReceipt(receipt) + case 34: + receipt := makeReceipt(addr3) + receipts = types.Receipts{receipt} + gen.AddReceipt(receipt) + case 99999: + receipt := makeReceipt(addr4) + receipts = types.Receipts{receipt} + gen.AddReceipt(receipt) + + } + + // store the receipts + err := core.PutReceipts(db, receipts) + if err != nil { + b.Fatal(err) + } + }) + for _, block := range chain { + core.WriteBlock(db, block) + if err := core.WriteCanonicalHash(db, block.Hash(), block.NumberU64()); err != nil { + b.Fatalf("failed to insert block number: %v", err) + } + if err := core.WriteHeadBlockHash(db, block.Hash()); err != nil { + b.Fatalf("failed to insert block number: %v", err) + } + if err := core.PutBlockReceipts(db, block, block.Receipts()); err != nil { + b.Fatal("error writing block receipts:", err) + } + } + + b.ResetTimer() + + filter := New(db) + filter.SetAddress([]common.Address{addr1, addr2, addr3, addr4}) + filter.SetEarliestBlock(0) + filter.SetLatestBlock(-1) + + for i := 0; i < b.N; i++ { + logs := filter.Find() + if len(logs) != 4 { + b.Fatal("expected 4 log, got", len(logs)) + } + } +} -- cgit v1.2.3 From 1b1f293082044c43d8d1c5df9ac40aab8fdb2ae8 Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Tue, 6 Oct 2015 16:35:55 +0200 Subject: core/state, core, miner: handle missing root error from state.New --- cmd/evm/main.go | 2 +- cmd/geth/blocktestcmd.go | 10 +++++--- cmd/geth/chaincmd.go | 6 ++++- core/block_processor.go | 5 +++- core/block_processor_test.go | 2 +- core/blockchain.go | 2 +- core/chain_makers.go | 5 +++- core/chain_makers_test.go | 2 +- core/genesis.go | 7 +++--- core/state/managed_state_test.go | 2 +- core/state/state_test.go | 6 ++--- core/state/statedb.go | 10 ++++---- core/transaction_pool.go | 51 ++++++++++++++++++++++++++++++-------- core/transaction_pool_test.go | 53 ++++++++++++++++++++++++---------------- eth/backend.go | 3 ++- eth/handler_test.go | 5 ++-- eth/helper_test.go | 3 ++- miner/worker.go | 15 +++++++++--- rpc/api/debug.go | 6 ++--- tests/block_test_util.go | 51 ++++++++++++++++++++------------------ tests/state_test_util.go | 4 +-- tests/vm_test_util.go | 4 +-- xeth/xeth.go | 23 ++++++++++++++--- 23 files changed, 182 insertions(+), 95 deletions(-) diff --git a/cmd/evm/main.go b/cmd/evm/main.go index e170dc190..64044c421 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -113,7 +113,7 @@ func run(ctx *cli.Context) { glog.SetV(ctx.GlobalInt(VerbosityFlag.Name)) db, _ := ethdb.NewMemDatabase() - statedb := state.New(common.Hash{}, db) + statedb, _ := state.New(common.Hash{}, db) sender := statedb.CreateAccount(common.StringToAddress("sender")) receiver := statedb.CreateAccount(common.StringToAddress("receiver")) receiver.SetCode(common.Hex2Bytes(ctx.GlobalString(CodeFlag.Name))) diff --git a/cmd/geth/blocktestcmd.go b/cmd/geth/blocktestcmd.go index e0a5becdc..e4d97aa53 100644 --- a/cmd/geth/blocktestcmd.go +++ b/cmd/geth/blocktestcmd.go @@ -101,7 +101,8 @@ func runBlockTest(ctx *cli.Context) { func runOneBlockTest(ctx *cli.Context, test *tests.BlockTest) (*eth.Ethereum, error) { cfg := utils.MakeEthConfig(ClientIdentifier, Version, ctx) - cfg.NewDB = func(path string) (ethdb.Database, error) { return ethdb.NewMemDatabase() } + db, _ := ethdb.NewMemDatabase() + cfg.NewDB = func(path string) (ethdb.Database, error) { return db, nil } cfg.MaxPeers = 0 // disable network cfg.Shh = false // disable whisper cfg.NAT = nil // disable port mapping @@ -113,7 +114,7 @@ func runOneBlockTest(ctx *cli.Context, test *tests.BlockTest) (*eth.Ethereum, er // import the genesis block ethereum.ResetWithGenesisBlock(test.Genesis) // import pre accounts - _, err = test.InsertPreState(ethereum) + _, err = test.InsertPreState(db, cfg.AccountManager) if err != nil { return ethereum, fmt.Errorf("InsertPreState: %v", err) } @@ -123,7 +124,10 @@ func runOneBlockTest(ctx *cli.Context, test *tests.BlockTest) (*eth.Ethereum, er if err != nil { return ethereum, fmt.Errorf("Block Test load error: %v", err) } - newDB := cm.State() + newDB, err := cm.State() + if err != nil { + return ethereum, fmt.Errorf("Block Test get state error: %v", err) + } if err := test.ValidatePostState(newDB); err != nil { return ethereum, fmt.Errorf("post state validation failed: %v", err) } diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go index c5bc4b66a..80f3777d6 100644 --- a/cmd/geth/chaincmd.go +++ b/cmd/geth/chaincmd.go @@ -179,7 +179,11 @@ func dump(ctx *cli.Context) { fmt.Println("{}") utils.Fatalf("block not found") } else { - state := state.New(block.Root(), chainDb) + state, err := state.New(block.Root(), chainDb) + if err != nil { + utils.Fatalf("could not create new state: %v", err) + return + } fmt.Printf("%s\n", state.Dump()) } } diff --git a/core/block_processor.go b/core/block_processor.go index 783e15687..a07d79bcf 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -207,7 +207,10 @@ func (sm *BlockProcessor) Process(block *types.Block) (logs vm.Logs, receipts ty func (sm *BlockProcessor) processWithParent(block, parent *types.Block) (logs vm.Logs, receipts types.Receipts, err error) { // Create a new state based on the parent's root (e.g., create copy) - state := state.New(parent.Root(), sm.chainDb) + state, err := state.New(parent.Root(), sm.chainDb) + if err != nil { + return nil, nil, err + } header := block.Header() uncles := block.Uncles() txs := block.Transactions() diff --git a/core/block_processor_test.go b/core/block_processor_test.go index ba8bd7bcd..e0e5607b9 100644 --- a/core/block_processor_test.go +++ b/core/block_processor_test.go @@ -46,7 +46,7 @@ func TestNumber(t *testing.T) { pow := ezp.New() _, chain := proc() - statedb := state.New(chain.Genesis().Root(), chain.chainDb) + statedb, _ := state.New(chain.Genesis().Root(), chain.chainDb) header := makeHeader(chain.Genesis(), statedb) header.Number = big.NewInt(3) err := ValidateHeader(pow, header, chain.Genesis().Header(), false, false) diff --git a/core/blockchain.go b/core/blockchain.go index 6c555e9ee..62a306265 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -199,7 +199,7 @@ func (self *BlockChain) SetProcessor(proc types.BlockProcessor) { self.processor = proc } -func (self *BlockChain) State() *state.StateDB { +func (self *BlockChain) State() (*state.StateDB, error) { return state.New(self.CurrentBlock().Root(), self.chainDb) } diff --git a/core/chain_makers.go b/core/chain_makers.go index ba09b3029..4347d9173 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -156,7 +156,10 @@ func (b *BlockGen) OffsetTime(seconds int64) { // values. Inserting them into BlockChain requires use of FakePow or // a similar non-validating proof of work implementation. func GenerateChain(parent *types.Block, db ethdb.Database, n int, gen func(int, *BlockGen)) []*types.Block { - statedb := state.New(parent.Root(), db) + statedb, err := state.New(parent.Root(), db) + if err != nil { + panic(err) + } blocks := make(types.Blocks, n) genblock := func(i int, h *types.Header) *types.Block { b := &BlockGen{parent: parent, i: i, chain: blocks, header: h, statedb: statedb} diff --git a/core/chain_makers_test.go b/core/chain_makers_test.go index b33af8d87..63825c261 100644 --- a/core/chain_makers_test.go +++ b/core/chain_makers_test.go @@ -84,7 +84,7 @@ func ExampleGenerateChain() { return } - state := chainman.State() + state, _ := chainman.State() fmt.Printf("last block: #%d\n", chainman.CurrentBlock().Number()) fmt.Println("balance of addr1:", state.GetBalance(addr1)) fmt.Println("balance of addr2:", state.GetBalance(addr2)) diff --git a/core/genesis.go b/core/genesis.go index 4c5c17f60..16c1598c2 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -60,7 +60,8 @@ func WriteGenesisBlock(chainDb ethdb.Database, reader io.Reader) (*types.Block, return nil, err } - statedb := state.New(common.Hash{}, chainDb) + // creating with empty hash always works + statedb, _ := state.New(common.Hash{}, chainDb) for addr, account := range genesis.Alloc { address := common.HexToAddress(addr) statedb.AddBalance(address, common.String2Big(account.Balance)) @@ -115,9 +116,9 @@ func WriteGenesisBlock(chainDb ethdb.Database, reader io.Reader) (*types.Block, } // GenesisBlockForTesting creates a block in which addr has the given wei balance. -// The state trie of the block is written to db. +// The state trie of the block is written to db. the passed db needs to contain a state root func GenesisBlockForTesting(db ethdb.Database, addr common.Address, balance *big.Int) *types.Block { - statedb := state.New(common.Hash{}, db) + statedb, _ := state.New(common.Hash{}, db) obj := statedb.GetOrNewStateObject(addr) obj.SetBalance(balance) root, err := statedb.Commit() diff --git a/core/state/managed_state_test.go b/core/state/managed_state_test.go index 58e77d842..0b53a42c5 100644 --- a/core/state/managed_state_test.go +++ b/core/state/managed_state_test.go @@ -27,7 +27,7 @@ var addr = common.BytesToAddress([]byte("test")) func create() (*ManagedState, *account) { db, _ := ethdb.NewMemDatabase() - statedb := New(common.Hash{}, db) + statedb, _ := New(common.Hash{}, db) ms := ManageState(statedb) so := &StateObject{address: addr, nonce: 100} ms.StateDB.stateObjects[addr.Str()] = so diff --git a/core/state/state_test.go b/core/state/state_test.go index b5a7f4081..08fbc47fa 100644 --- a/core/state/state_test.go +++ b/core/state/state_test.go @@ -77,12 +77,12 @@ func (s *StateSuite) TestDump(c *checker.C) { func (s *StateSuite) SetUpTest(c *checker.C) { db, _ := ethdb.NewMemDatabase() - s.state = New(common.Hash{}, db) + s.state, _ = New(common.Hash{}, db) } func TestNull(t *testing.T) { db, _ := ethdb.NewMemDatabase() - state := New(common.Hash{}, db) + state, _ := New(common.Hash{}, db) address := common.HexToAddress("0x823140710bf13990e4500136726d8b55") state.CreateAccount(address) @@ -122,7 +122,7 @@ func (s *StateSuite) TestSnapshot(c *checker.C) { // printing/logging in tests (-check.vv does not work) func TestSnapshot2(t *testing.T) { db, _ := ethdb.NewMemDatabase() - state := New(common.Hash{}, db) + state, _ := New(common.Hash{}, db) stateobjaddr0 := toAddr([]byte("so0")) stateobjaddr1 := toAddr([]byte("so1")) diff --git a/core/state/statedb.go b/core/state/statedb.go index ad673aecb..a9de71409 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -52,12 +52,11 @@ type StateDB struct { } // Create a new state from a given trie -func New(root common.Hash, db ethdb.Database) *StateDB { +func New(root common.Hash, db ethdb.Database) (*StateDB, error) { tr, err := trie.NewSecure(root, db) if err != nil { - // TODO: bubble this up - tr, _ = trie.NewSecure(common.Hash{}, db) glog.Errorf("can't create state trie with root %x: %v", root[:], err) + return nil, err } return &StateDB{ db: db, @@ -65,7 +64,7 @@ func New(root common.Hash, db ethdb.Database) *StateDB { stateObjects: make(map[string]*StateObject), refund: new(big.Int), logs: make(map[common.Hash]vm.Logs), - } + }, nil } func (self *StateDB) StartRecord(thash, bhash common.Hash, ti int) { @@ -297,7 +296,8 @@ func (self *StateDB) CreateAccount(addr common.Address) vm.Account { // func (self *StateDB) Copy() *StateDB { - state := New(common.Hash{}, self.db) + // ignore error - we assume state-to-be-copied always exists + state, _ := New(common.Hash{}, self.db) state.trie = self.trie for k, stateObject := range self.stateObjects { state.stateObjects[k] = stateObject.Copy() diff --git a/core/transaction_pool.go b/core/transaction_pool.go index a4e6ce3e2..16f66efdc 100644 --- a/core/transaction_pool.go +++ b/core/transaction_pool.go @@ -48,7 +48,7 @@ const ( maxQueued = 64 // max limit of queued txs per address ) -type stateFn func() *state.StateDB +type stateFn func() (*state.StateDB, error) // TxPool contains all currently known transactions. Transactions // enter the pool when they are received from the network or submitted @@ -80,7 +80,7 @@ func NewTxPool(eventMux *event.TypeMux, currentStateFn stateFn, gasLimitFn func( currentState: currentStateFn, gasLimit: gasLimitFn, minGasPrice: new(big.Int), - pendingState: state.ManageState(currentStateFn()), + pendingState: nil, events: eventMux.Subscribe(ChainHeadEvent{}, GasPriceChanged{}, RemovedTransactionEvent{}), } go pool.eventLoop() @@ -109,7 +109,17 @@ func (pool *TxPool) eventLoop() { } func (pool *TxPool) resetState() { - pool.pendingState = state.ManageState(pool.currentState()) + currentState, err := pool.currentState() + if err != nil { + glog.V(logger.Info).Infoln("failed to get current state: %v", err) + return + } + managedState := state.ManageState(currentState) + if err != nil { + glog.V(logger.Info).Infoln("failed to get managed state: %v", err) + return + } + pool.pendingState = managedState // validate the pool of pending transactions, this will remove // any transactions that have been included in the block or @@ -180,12 +190,16 @@ func (pool *TxPool) validateTx(tx *types.Transaction) error { // Make sure the account exist. Non existent accounts // haven't got funds and well therefor never pass. - if !pool.currentState().HasAccount(from) { + currentState, err := pool.currentState() + if err != nil { + return err + } + if !currentState.HasAccount(from) { return ErrNonExistentAccount } // Last but not least check for nonce errors - if pool.currentState().GetNonce(from) > tx.Nonce() { + if currentState.GetNonce(from) > tx.Nonce() { return ErrNonce } @@ -204,7 +218,7 @@ func (pool *TxPool) validateTx(tx *types.Transaction) error { // Transactor should have enough funds to cover the costs // cost == V + GP * GL - if pool.currentState().GetBalance(from).Cmp(tx.Cost()) < 0 { + if currentState.GetBalance(from).Cmp(tx.Cost()) < 0 { return ErrInsufficientFunds } @@ -257,6 +271,11 @@ func (self *TxPool) queueTx(hash common.Hash, tx *types.Transaction) { // addTx will add a transaction to the pending (processable queue) list of transactions func (pool *TxPool) addTx(hash common.Hash, addr common.Address, tx *types.Transaction) { + // init delayed since tx pool could have been started before any state sync + if pool.pendingState == nil { + pool.resetState() + } + if _, ok := pool.pending[hash]; !ok { pool.pending[hash] = tx @@ -382,14 +401,22 @@ func (pool *TxPool) RemoveTx(hash common.Hash) { // checkQueue moves transactions that have become processable to main pool. func (pool *TxPool) checkQueue() { - state := pool.pendingState + // init delayed since tx pool could have been started before any state sync + if pool.pendingState == nil { + pool.resetState() + } var addq txQueue for address, txs := range pool.queue { // guessed nonce is the nonce currently kept by the tx pool (pending state) - guessedNonce := state.GetNonce(address) + guessedNonce := pool.pendingState.GetNonce(address) // true nonce is the nonce known by the last state - trueNonce := pool.currentState().GetNonce(address) + currentState, err := pool.currentState() + if err != nil { + glog.Errorf("could not get current state: %v", err) + return + } + trueNonce := currentState.GetNonce(address) addq := addq[:0] for hash, tx := range txs { if tx.Nonce() < trueNonce { @@ -434,7 +461,11 @@ func (pool *TxPool) checkQueue() { // validatePool removes invalid and processed transactions from the main pool. func (pool *TxPool) validatePool() { - state := pool.currentState() + state, err := pool.currentState() + if err != nil { + glog.V(logger.Info).Infoln("failed to get current state: %v", err) + return + } for hash, tx := range pool.pending { from, _ := tx.From() // err already checked // perform light nonce validation diff --git a/core/transaction_pool_test.go b/core/transaction_pool_test.go index 37cd20c96..229dcacf3 100644 --- a/core/transaction_pool_test.go +++ b/core/transaction_pool_test.go @@ -36,11 +36,13 @@ func transaction(nonce uint64, gaslimit *big.Int, key *ecdsa.PrivateKey) *types. func setupTxPool() (*TxPool, *ecdsa.PrivateKey) { db, _ := ethdb.NewMemDatabase() - statedb := state.New(common.Hash{}, db) + statedb, _ := state.New(common.Hash{}, db) var m event.TypeMux key, _ := crypto.GenerateKey() - return NewTxPool(&m, func() *state.StateDB { return statedb }, func() *big.Int { return big.NewInt(1000000) }), key + newPool := NewTxPool(&m, func() (*state.StateDB, error) { return statedb, nil }, func() *big.Int { return big.NewInt(1000000) }) + newPool.resetState() + return newPool, key } func TestInvalidTransactions(t *testing.T) { @@ -52,19 +54,20 @@ func TestInvalidTransactions(t *testing.T) { } from, _ := tx.From() - pool.currentState().AddBalance(from, big.NewInt(1)) + currentState, _ := pool.currentState() + currentState.AddBalance(from, big.NewInt(1)) if err := pool.Add(tx); err != ErrInsufficientFunds { t.Error("expected", ErrInsufficientFunds) } balance := new(big.Int).Add(tx.Value(), new(big.Int).Mul(tx.Gas(), tx.GasPrice())) - pool.currentState().AddBalance(from, balance) + currentState.AddBalance(from, balance) if err := pool.Add(tx); err != ErrIntrinsicGas { t.Error("expected", ErrIntrinsicGas, "got", err) } - pool.currentState().SetNonce(from, 1) - pool.currentState().AddBalance(from, big.NewInt(0xffffffffffffff)) + currentState.SetNonce(from, 1) + currentState.AddBalance(from, big.NewInt(0xffffffffffffff)) tx = transaction(0, big.NewInt(100000), key) if err := pool.Add(tx); err != ErrNonce { t.Error("expected", ErrNonce) @@ -75,7 +78,8 @@ func TestTransactionQueue(t *testing.T) { pool, key := setupTxPool() tx := transaction(0, big.NewInt(100), key) from, _ := tx.From() - pool.currentState().AddBalance(from, big.NewInt(1)) + currentState, _ := pool.currentState() + currentState.AddBalance(from, big.NewInt(1)) pool.queueTx(tx.Hash(), tx) pool.checkQueue() @@ -85,7 +89,7 @@ func TestTransactionQueue(t *testing.T) { tx = transaction(1, big.NewInt(100), key) from, _ = tx.From() - pool.currentState().SetNonce(from, 2) + currentState.SetNonce(from, 2) pool.queueTx(tx.Hash(), tx) pool.checkQueue() if _, ok := pool.pending[tx.Hash()]; ok { @@ -119,7 +123,8 @@ func TestRemoveTx(t *testing.T) { pool, key := setupTxPool() tx := transaction(0, big.NewInt(100), key) from, _ := tx.From() - pool.currentState().AddBalance(from, big.NewInt(1)) + currentState, _ := pool.currentState() + currentState.AddBalance(from, big.NewInt(1)) pool.queueTx(tx.Hash(), tx) pool.addTx(tx.Hash(), from, tx) if len(pool.queue) != 1 { @@ -146,7 +151,8 @@ func TestNegativeValue(t *testing.T) { tx, _ := types.NewTransaction(0, common.Address{}, big.NewInt(-1), big.NewInt(100), big.NewInt(1), nil).SignECDSA(key) from, _ := tx.From() - pool.currentState().AddBalance(from, big.NewInt(1)) + currentState, _ := pool.currentState() + currentState.AddBalance(from, big.NewInt(1)) if err := pool.Add(tx); err != ErrNegativeValue { t.Error("expected", ErrNegativeValue, "got", err) } @@ -157,9 +163,10 @@ func TestTransactionChainFork(t *testing.T) { addr := crypto.PubkeyToAddress(key.PublicKey) resetState := func() { db, _ := ethdb.NewMemDatabase() - statedb := state.New(common.Hash{}, db) - pool.currentState = func() *state.StateDB { return statedb } - pool.currentState().AddBalance(addr, big.NewInt(100000000000000)) + statedb, _ := state.New(common.Hash{}, db) + pool.currentState = func() (*state.StateDB, error) { return statedb, nil } + currentState, _ := pool.currentState() + currentState.AddBalance(addr, big.NewInt(100000000000000)) pool.resetState() } resetState() @@ -182,9 +189,10 @@ func TestTransactionDoubleNonce(t *testing.T) { addr := crypto.PubkeyToAddress(key.PublicKey) resetState := func() { db, _ := ethdb.NewMemDatabase() - statedb := state.New(common.Hash{}, db) - pool.currentState = func() *state.StateDB { return statedb } - pool.currentState().AddBalance(addr, big.NewInt(100000000000000)) + statedb, _ := state.New(common.Hash{}, db) + pool.currentState = func() (*state.StateDB, error) { return statedb, nil } + currentState, _ := pool.currentState() + currentState.AddBalance(addr, big.NewInt(100000000000000)) pool.resetState() } resetState() @@ -207,7 +215,8 @@ func TestTransactionDoubleNonce(t *testing.T) { func TestMissingNonce(t *testing.T) { pool, key := setupTxPool() addr := crypto.PubkeyToAddress(key.PublicKey) - pool.currentState().AddBalance(addr, big.NewInt(100000000000000)) + currentState, _ := pool.currentState() + currentState.AddBalance(addr, big.NewInt(100000000000000)) tx := transaction(1, big.NewInt(100000), key) if err := pool.add(tx); err != nil { t.Error("didn't expect error", err) @@ -224,15 +233,16 @@ func TestNonceRecovery(t *testing.T) { const n = 10 pool, key := setupTxPool() addr := crypto.PubkeyToAddress(key.PublicKey) - pool.currentState().SetNonce(addr, n) - pool.currentState().AddBalance(addr, big.NewInt(100000000000000)) + currentState, _ := pool.currentState() + currentState.SetNonce(addr, n) + currentState.AddBalance(addr, big.NewInt(100000000000000)) pool.resetState() tx := transaction(n, big.NewInt(100000), key) if err := pool.Add(tx); err != nil { t.Error(err) } // simulate some weird re-order of transactions and missing nonce(s) - pool.currentState().SetNonce(addr, n-1) + currentState.SetNonce(addr, n-1) pool.resetState() if fn := pool.pendingState.GetNonce(addr); fn != n+1 { t.Errorf("expected nonce to be %d, got %d", n+1, fn) @@ -243,7 +253,8 @@ func TestRemovedTxEvent(t *testing.T) { pool, key := setupTxPool() tx := transaction(0, big.NewInt(1000000), key) from, _ := tx.From() - pool.currentState().AddBalance(from, big.NewInt(1000000000000)) + currentState, _ := pool.currentState() + currentState.AddBalance(from, big.NewInt(1000000000000)) pool.eventMux.Post(RemovedTransactionEvent{types.Transactions{tx}}) pool.eventMux.Post(ChainHeadEvent{nil}) if len(pool.pending) != 1 { diff --git a/eth/backend.go b/eth/backend.go index 83eefca5b..18900c91e 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -389,7 +389,8 @@ func New(config *Config) (*Ethereum, error) { return nil, err } - eth.txPool = core.NewTxPool(eth.EventMux(), eth.blockchain.State, eth.blockchain.GasLimit) + newPool := core.NewTxPool(eth.EventMux(), eth.blockchain.State, eth.blockchain.GasLimit) + eth.txPool = newPool eth.blockProcessor = core.NewBlockProcessor(chainDb, eth.pow, eth.blockchain, eth.EventMux()) eth.blockchain.SetProcessor(eth.blockProcessor) diff --git a/eth/handler_test.go b/eth/handler_test.go index 2b8c6168a..dde2ecbd5 100644 --- a/eth/handler_test.go +++ b/eth/handler_test.go @@ -443,10 +443,11 @@ func testGetNodeData(t *testing.T, protocol int) { } accounts := []common.Address{testBankAddress, acc1Addr, acc2Addr} for i := uint64(0); i <= pm.blockchain.CurrentBlock().NumberU64(); i++ { - trie := state.New(pm.blockchain.GetBlockByNumber(i).Root(), statedb) + trie, _ := state.New(pm.blockchain.GetBlockByNumber(i).Root(), statedb) for j, acc := range accounts { - bw := pm.blockchain.State().GetBalance(acc) + state, _ := pm.blockchain.State() + bw := state.GetBalance(acc) bh := trie.GetBalance(acc) if (bw != nil && bh == nil) || (bw == nil && bh != nil) { diff --git a/eth/helper_test.go b/eth/helper_test.go index e42fa1f82..9314884ef 100644 --- a/eth/helper_test.go +++ b/eth/helper_test.go @@ -38,7 +38,8 @@ func newTestProtocolManager(blocks int, generator func(int, *core.BlockGen), new blockproc = core.NewBlockProcessor(db, pow, blockchain, evmux) ) blockchain.SetProcessor(blockproc) - if _, err := blockchain.InsertChain(core.GenerateChain(genesis, db, blocks, generator)); err != nil { + chain := core.GenerateChain(genesis, db, blocks, generator) + if _, err := blockchain.InsertChain(chain); err != nil { panic(err) } pm := NewProtocolManager(NetworkId, evmux, &testTxPool{added: newtx}, pow, blockchain, db) diff --git a/miner/worker.go b/miner/worker.go index 43f6f9909..83653e327 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -353,8 +353,11 @@ func (self *worker) push(work *Work) { } // makeCurrent creates a new environment for the current cycle. -func (self *worker) makeCurrent(parent *types.Block, header *types.Header) { - state := state.New(parent.Root(), self.eth.ChainDb()) +func (self *worker) makeCurrent(parent *types.Block, header *types.Header) error { + state, err := state.New(parent.Root(), self.eth.ChainDb()) + if err != nil { + return err + } work := &Work{ state: state, ancestors: set.New(), @@ -385,6 +388,7 @@ func (self *worker) makeCurrent(parent *types.Block, header *types.Header) { work.localMinedBlocks = self.current.localMinedBlocks } self.current = work + return nil } func (w *worker) setGasPrice(p *big.Int) { @@ -464,7 +468,12 @@ func (self *worker) commitNewWork() { } previous := self.current - self.makeCurrent(parent, header) + // Could potentially happen if starting to mine in an odd state. + err := self.makeCurrent(parent, header) + if err != nil { + glog.V(logger.Info).Infoln("Could not create new env for mining, retrying on next block.") + return + } work := self.current /* //approach 1 diff --git a/rpc/api/debug.go b/rpc/api/debug.go index e193f7ad2..003b4d994 100644 --- a/rpc/api/debug.go +++ b/rpc/api/debug.go @@ -119,9 +119,9 @@ func (self *debugApi) DumpBlock(req *shared.Request) (interface{}, error) { return nil, fmt.Errorf("block #%d not found", args.BlockNumber) } - stateDb := state.New(block.Root(), self.ethereum.ChainDb()) - if stateDb == nil { - return nil, nil + stateDb, err := state.New(block.Root(), self.ethereum.ChainDb()) + if err != nil { + return nil, err } return stateDb.RawDump(), nil diff --git a/tests/block_test_util.go b/tests/block_test_util.go index fb9ca16e6..4c329631a 100644 --- a/tests/block_test_util.go +++ b/tests/block_test_util.go @@ -162,23 +162,33 @@ func runBlockTests(bt map[string]*BlockTest, skipTests []string) error { } func runBlockTest(test *BlockTest) error { - cfg := test.makeEthConfig() + ks := crypto.NewKeyStorePassphrase(filepath.Join(common.DefaultDataDir(), "keystore")) + am := accounts.NewManager(ks) + db, _ := ethdb.NewMemDatabase() + cfg := ð.Config{ + DataDir: common.DefaultDataDir(), + Verbosity: 5, + Etherbase: common.Address{}, + AccountManager: am, + NewDB: func(path string) (ethdb.Database, error) { return db, nil }, + } + cfg.GenesisBlock = test.Genesis - ethereum, err := eth.New(cfg) + // import pre accounts & construct test genesis block & state root + _, err := test.InsertPreState(db, am) if err != nil { - return err + return fmt.Errorf("InsertPreState: %v", err) } - err = ethereum.Start() + ethereum, err := eth.New(cfg) if err != nil { return err } - // import pre accounts - _, err = test.InsertPreState(ethereum) + err = ethereum.Start() if err != nil { - return fmt.Errorf("InsertPreState: %v", err) + return err } cm := ethereum.BlockChain() @@ -193,7 +203,10 @@ func runBlockTest(test *BlockTest) error { return fmt.Errorf("lastblockhash validation mismatch: want: %x, have: %x", lastblockhash, cmlast) } - newDB := cm.State() + newDB, err := cm.State() + if err != nil { + return err + } if err = test.ValidatePostState(newDB); err != nil { return fmt.Errorf("post state validation failed: %v", err) } @@ -201,23 +214,13 @@ func runBlockTest(test *BlockTest) error { return test.ValidateImportedHeaders(cm, validBlocks) } -func (test *BlockTest) makeEthConfig() *eth.Config { - ks := crypto.NewKeyStorePassphrase(filepath.Join(common.DefaultDataDir(), "keystore")) - - return ð.Config{ - DataDir: common.DefaultDataDir(), - Verbosity: 5, - Etherbase: common.Address{}, - AccountManager: accounts.NewManager(ks), - NewDB: func(path string) (ethdb.Database, error) { return ethdb.NewMemDatabase() }, - } -} - // InsertPreState populates the given database with the genesis // accounts defined by the test. -func (t *BlockTest) InsertPreState(ethereum *eth.Ethereum) (*state.StateDB, error) { - db := ethereum.ChainDb() - statedb := state.New(common.Hash{}, db) +func (t *BlockTest) InsertPreState(db ethdb.Database, am *accounts.Manager) (*state.StateDB, error) { + statedb, err := state.New(common.Hash{}, db) + if err != nil { + return nil, err + } for addrString, acct := range t.preAccounts { addr, err := hex.DecodeString(addrString) if err != nil { @@ -239,7 +242,7 @@ func (t *BlockTest) InsertPreState(ethereum *eth.Ethereum) (*state.StateDB, erro if acct.PrivateKey != "" { privkey, err := hex.DecodeString(strings.TrimPrefix(acct.PrivateKey, "0x")) err = crypto.ImportBlockTestKey(privkey) - err = ethereum.AccountManager().TimedUnlock(common.BytesToAddress(addr), "", 999999*time.Second) + err = am.TimedUnlock(common.BytesToAddress(addr), "", 999999*time.Second) if err != nil { return nil, err } diff --git a/tests/state_test_util.go b/tests/state_test_util.go index a1c066c82..676d9ed8c 100644 --- a/tests/state_test_util.go +++ b/tests/state_test_util.go @@ -103,7 +103,7 @@ func BenchStateTest(p string, conf bconf, b *testing.B) error { func benchStateTest(test VmTest, env map[string]string, b *testing.B) { b.StopTimer() db, _ := ethdb.NewMemDatabase() - statedb := state.New(common.Hash{}, db) + statedb, _ := state.New(common.Hash{}, db) for addr, account := range test.Pre { obj := StateObjectFromAccount(db, addr, account) statedb.SetStateObject(obj) @@ -142,7 +142,7 @@ func runStateTests(tests map[string]VmTest, skipTests []string) error { func runStateTest(test VmTest) error { db, _ := ethdb.NewMemDatabase() - statedb := state.New(common.Hash{}, db) + statedb, _ := state.New(common.Hash{}, db) for addr, account := range test.Pre { obj := StateObjectFromAccount(db, addr, account) statedb.SetStateObject(obj) diff --git a/tests/vm_test_util.go b/tests/vm_test_util.go index b61995e31..ddd14b1a3 100644 --- a/tests/vm_test_util.go +++ b/tests/vm_test_util.go @@ -108,7 +108,7 @@ func BenchVmTest(p string, conf bconf, b *testing.B) error { func benchVmTest(test VmTest, env map[string]string, b *testing.B) { b.StopTimer() db, _ := ethdb.NewMemDatabase() - statedb := state.New(common.Hash{}, db) + statedb, _ := state.New(common.Hash{}, db) for addr, account := range test.Pre { obj := StateObjectFromAccount(db, addr, account) statedb.SetStateObject(obj) @@ -159,7 +159,7 @@ func runVmTests(tests map[string]VmTest, skipTests []string) error { func runVmTest(test VmTest) error { db, _ := ethdb.NewMemDatabase() - statedb := state.New(common.Hash{}, db) + statedb, _ := state.New(common.Hash{}, db) for addr, account := range test.Pre { obj := StateObjectFromAccount(db, addr, account) statedb.SetStateObject(obj) diff --git a/xeth/xeth.go b/xeth/xeth.go index 13e171270..3b487fed8 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -126,7 +126,11 @@ func New(ethereum *eth.Ethereum, frontend Frontend) *XEth { if frontend == nil { xeth.frontend = dummyFrontend{} } - xeth.state = NewState(xeth, xeth.backend.BlockChain().State()) + state, err := xeth.backend.BlockChain().State() + if err != nil { + return nil + } + xeth.state = NewState(xeth, state) go xeth.start() @@ -207,14 +211,21 @@ func (self *XEth) RemoteMining() *miner.RemoteAgent { return self.agent } func (self *XEth) AtStateNum(num int64) *XEth { var st *state.StateDB + var err error switch num { case -2: st = self.backend.Miner().PendingState().Copy() default: if block := self.getBlockByHeight(num); block != nil { - st = state.New(block.Root(), self.backend.ChainDb()) + st, err = state.New(block.Root(), self.backend.ChainDb()) + if err != nil { + return nil + } } else { - st = state.New(self.backend.BlockChain().GetBlockByNumber(0).Root(), self.backend.ChainDb()) + st, err = state.New(self.backend.BlockChain().GetBlockByNumber(0).Root(), self.backend.ChainDb()) + if err != nil { + return nil + } } } @@ -266,7 +277,11 @@ func (self *XEth) UpdateState() (wait chan *big.Int) { wait <- n n = nil } - statedb := state.New(event.Block.Root(), self.backend.ChainDb()) + statedb, err := state.New(event.Block.Root(), self.backend.ChainDb()) + if err != nil { + glog.V(logger.Error).Infoln("Could not create new state: %v", err) + return + } self.state = NewState(self, statedb) } case n, ok = <-wait: -- cgit v1.2.3 From d5f56ad5c5dcdc393da46c5bfab1274e1596697d Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Fri, 16 Oct 2015 16:27:51 +0200 Subject: godeps: update ethash following GPU miner merge --- Godeps/Godeps.json | 4 ++-- .../src/github.com/ethereum/ethash/ethash.go | 18 ++++++++++++++++++ .../src/github.com/ethereum/ethash/ethash_test.go | 17 +++++++++++++++++ .../src/github.com/ethereum/ethash/ethashc.go | 16 ++++++++++++++++ 4 files changed, 53 insertions(+), 2 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 01bda12bf..ee77a1c76 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -16,8 +16,8 @@ }, { "ImportPath": "github.com/ethereum/ethash", - "Comment": "v23.1-235-gb39e007", - "Rev": "b39e007d393ab5945b4c0748a7415b7e31c5db04" + "Comment": "v23.1-238-g9401881", + "Rev": "9401881ab040d1a3b0ae9e4780a115bc284a8a1a" }, { "ImportPath": "github.com/fatih/color", diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go index ddb8ba583..2199dbec1 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go @@ -1,3 +1,21 @@ +// Copyright 2015 The go-ethereum Authors +// Copyright 2015 Lefteris Karapetsas +// Copyright 2015 Matthew Wampler-Doty +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + package ethash /* diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go index c19e45d1d..e0ca0bd85 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash_test.go @@ -1,3 +1,20 @@ +// Copyright 2015 The go-ethereum Authors +// Copyright 2015 Lefteris Karapetsas +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + package ethash import ( diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethashc.go b/Godeps/_workspace/src/github.com/ethereum/ethash/ethashc.go index 8a441525d..1d2ba1613 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/ethashc.go +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/ethashc.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + package ethash /* -- cgit v1.2.3 From 6dc14788a238f3e0ec786c6c04d476a3b957e645 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Mon, 12 Oct 2015 17:58:51 +0200 Subject: core, eth/filters, miner, xeth: Optimised log filtering Log filtering is now using a MIPmap like approach where addresses of logs are added to a mapped bloom bin. The current levels for the MIP are in ranges of 1.000.000, 500.000, 100.000, 50.000, 1.000. Logs are therefor filtered in batches of 1.000. --- core/blockchain.go | 27 ++++-- core/chain_makers.go | 7 +- core/chain_util.go | 44 ++++++++++ core/chain_util_test.go | 112 +++++++++++++++++++++++++ core/transaction_util.go | 32 +++---- core/types/bloom9.go | 41 +++++++++ core/types/bloom9_test.go | 34 ++++++++ core/types/common.go | 35 +------- eth/backend.go | 46 +++++++++++ eth/backend_test.go | 67 +++++++++++++++ eth/filters/filter.go | 116 +++++++++++++++----------- eth/filters/filter_test.go | 202 +++++++++++++++++++++++++++++++++++++++++---- miner/worker.go | 2 + xeth/xeth.go | 16 ++-- 14 files changed, 647 insertions(+), 134 deletions(-) create mode 100644 eth/backend_test.go diff --git a/core/blockchain.go b/core/blockchain.go index 6c555e9ee..5cb800f1d 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -654,10 +654,17 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) { events = append(events, ChainEvent{block, block.Hash(), logs}) // This puts transactions in a extra db for rpc - PutTransactions(self.chainDb, block, block.Transactions()) + if err := PutTransactions(self.chainDb, block, block.Transactions()); err != nil { + return i, err + } // store the receipts - PutReceipts(self.chainDb, receipts) - + if err := PutReceipts(self.chainDb, receipts); err != nil { + return i, err + } + // Write map map bloom filters + if err := WriteMipmapBloom(self.chainDb, block.NumberU64(), receipts); err != nil { + return i, err + } case SideStatTy: if glog.V(logger.Detail) { glog.Infof("inserted forked block #%d (TD=%v) (%d TXs %d UNCs) (%x...). Took %v\n", block.Number(), block.Difficulty(), len(block.Transactions()), len(block.Uncles()), block.Hash().Bytes()[0:4], time.Since(bstart)) @@ -743,8 +750,18 @@ func (self *BlockChain) reorg(oldBlock, newBlock *types.Block) error { // insert the block in the canonical way, re-writing history self.insert(block) // write canonical receipts and transactions - PutTransactions(self.chainDb, block, block.Transactions()) - PutReceipts(self.chainDb, GetBlockReceipts(self.chainDb, block.Hash())) + if err := PutTransactions(self.chainDb, block, block.Transactions()); err != nil { + return err + } + receipts := GetBlockReceipts(self.chainDb, block.Hash()) + // write receipts + if err := PutReceipts(self.chainDb, receipts); err != nil { + return err + } + // Write map map bloom filters + if err := WriteMipmapBloom(self.chainDb, block.NumberU64(), receipts); err != nil { + return err + } addedTxs = append(addedTxs, block.Transactions()...) } diff --git a/core/chain_makers.go b/core/chain_makers.go index c2871a097..5f2cfeb63 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -105,7 +105,12 @@ func (b *BlockGen) AddTx(tx *types.Transaction) { b.receipts = append(b.receipts, receipt) } -func (b *BlockGen) AddReceipt(receipt *types.Receipt) { +// AddUncheckedReceipts forcefully adds a receipts to the block without a +// backing transaction. +// +// AddUncheckedReceipts will cause consensus failures when used during real +// chain processing. This is best used in conjuction with raw block insertion. +func (b *BlockGen) AddUncheckedReceipt(receipt *types.Receipt) { b.receipts = append(b.receipts, receipt) } diff --git a/core/chain_util.go b/core/chain_util.go index 33d94cebd..42b6a5be2 100644 --- a/core/chain_util.go +++ b/core/chain_util.go @@ -18,6 +18,8 @@ package core import ( "bytes" + "encoding/binary" + "fmt" "math/big" "github.com/ethereum/go-ethereum/common" @@ -42,6 +44,9 @@ var ( ExpDiffPeriod = big.NewInt(100000) blockHashPre = []byte("block-hash-") // [deprecated by eth/63] + + mipmapPre = []byte("mipmap-log-bloom-") + MIPMapLevels = []uint64{1000000, 500000, 100000, 50000, 1000} ) // CalcDifficulty is the difficulty adjustment algorithm. It returns @@ -346,3 +351,42 @@ func GetBlockByHashOld(db ethdb.Database, hash common.Hash) *types.Block { } return (*types.Block)(&block) } + +// returns a formatted MIP mapped key by adding prefix, canonical number and level +// +// ex. fn(98, 1000) = (prefix || 1000 || 0) +func mipmapKey(num, level uint64) []byte { + lkey := make([]byte, 8) + binary.BigEndian.PutUint64(lkey, level) + key := new(big.Int).SetUint64(num / level * level) + + return append(mipmapPre, append(lkey, key.Bytes()...)...) +} + +// WriteMapmapBloom writes each address included in the receipts' logs to the +// MIP bloom bin. +func WriteMipmapBloom(db ethdb.Database, number uint64, receipts types.Receipts) error { + batch := db.NewBatch() + for _, level := range MIPMapLevels { + key := mipmapKey(number, level) + bloomDat, _ := db.Get(key) + bloom := types.BytesToBloom(bloomDat) + for _, receipt := range receipts { + for _, log := range receipt.Logs() { + bloom.Add(log.Address.Big()) + } + } + batch.Put(key, bloom.Bytes()) + } + if err := batch.Write(); err != nil { + return fmt.Errorf("mipmap write fail for: %d: %v", number, err) + } + return nil +} + +// GetMipmapBloom returns a bloom filter using the number and level as input +// parameters. For available levels see MIPMapLevels. +func GetMipmapBloom(db ethdb.Database, number, level uint64) types.Bloom { + bloomDat, _ := db.Get(mipmapKey(number, level)) + return types.BytesToBloom(bloomDat) +} diff --git a/core/chain_util_test.go b/core/chain_util_test.go index 3f0446715..62b73a064 100644 --- a/core/chain_util_test.go +++ b/core/chain_util_test.go @@ -18,12 +18,15 @@ package core import ( "encoding/json" + "io/ioutil" "math/big" "os" "testing" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto/sha3" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/rlp" @@ -318,3 +321,112 @@ func TestHeadStorage(t *testing.T) { t.Fatalf("Head block hash mismatch: have %v, want %v", entry, blockFull.Hash()) } } + +func TestMipmapBloom(t *testing.T) { + db, _ := ethdb.NewMemDatabase() + + receipt1 := new(types.Receipt) + receipt1.SetLogs(vm.Logs{ + &vm.Log{Address: common.BytesToAddress([]byte("test"))}, + &vm.Log{Address: common.BytesToAddress([]byte("address"))}, + }) + receipt2 := new(types.Receipt) + receipt2.SetLogs(vm.Logs{ + &vm.Log{Address: common.BytesToAddress([]byte("test"))}, + &vm.Log{Address: common.BytesToAddress([]byte("address1"))}, + }) + + WriteMipmapBloom(db, 1, types.Receipts{receipt1}) + WriteMipmapBloom(db, 2, types.Receipts{receipt2}) + + for _, level := range MIPMapLevels { + bloom := GetMipmapBloom(db, 2, level) + if !bloom.Test(new(big.Int).SetBytes([]byte("address1"))) { + t.Error("expected test to be included on level:", level) + } + } + + // reset + db, _ = ethdb.NewMemDatabase() + receipt := new(types.Receipt) + receipt.SetLogs(vm.Logs{ + &vm.Log{Address: common.BytesToAddress([]byte("test"))}, + }) + WriteMipmapBloom(db, 999, types.Receipts{receipt1}) + + receipt = new(types.Receipt) + receipt.SetLogs(vm.Logs{ + &vm.Log{Address: common.BytesToAddress([]byte("test 1"))}, + }) + WriteMipmapBloom(db, 1000, types.Receipts{receipt}) + + bloom := GetMipmapBloom(db, 1000, 1000) + if bloom.TestBytes([]byte("test")) { + t.Error("test should not have been included") + } +} + +func TestMipmapChain(t *testing.T) { + dir, err := ioutil.TempDir("", "mipmap") + if err != nil { + t.Fatal(err) + } + defer os.RemoveAll(dir) + + var ( + db, _ = ethdb.NewLDBDatabase(dir, 16) + key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") + addr = crypto.PubkeyToAddress(key1.PublicKey) + addr2 = common.BytesToAddress([]byte("jeff")) + + hash1 = common.BytesToHash([]byte("topic1")) + ) + defer db.Close() + + genesis := WriteGenesisBlockForTesting(db, GenesisAccount{addr, big.NewInt(1000000)}) + chain := GenerateChain(genesis, db, 1010, func(i int, gen *BlockGen) { + var receipts types.Receipts + switch i { + case 1: + receipt := types.NewReceipt(nil, new(big.Int)) + receipt.SetLogs(vm.Logs{ + &vm.Log{ + Address: addr, + Topics: []common.Hash{hash1}, + }, + }) + gen.AddUncheckedReceipt(receipt) + receipts = types.Receipts{receipt} + case 1000: + receipt := types.NewReceipt(nil, new(big.Int)) + receipt.SetLogs(vm.Logs{&vm.Log{Address: addr2}}) + gen.AddUncheckedReceipt(receipt) + receipts = types.Receipts{receipt} + + } + + // store the receipts + err := PutReceipts(db, receipts) + if err != nil { + t.Fatal(err) + } + WriteMipmapBloom(db, uint64(i+1), receipts) + }) + for _, block := range chain { + WriteBlock(db, block) + if err := WriteCanonicalHash(db, block.Hash(), block.NumberU64()); err != nil { + t.Fatalf("failed to insert block number: %v", err) + } + if err := WriteHeadBlockHash(db, block.Hash()); err != nil { + t.Fatalf("failed to insert block number: %v", err) + } + if err := PutBlockReceipts(db, block, block.Receipts()); err != nil { + t.Fatal("error writing block receipts:", err) + } + } + + bloom := GetMipmapBloom(db, 0, 1000) + if bloom.TestBytes(addr2[:]) { + t.Error("address was included in bloom and should not have") + } +} diff --git a/core/transaction_util.go b/core/transaction_util.go index ebe095abb..d55ed14da 100644 --- a/core/transaction_util.go +++ b/core/transaction_util.go @@ -17,6 +17,8 @@ package core import ( + "fmt" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethdb" @@ -32,22 +34,16 @@ var ( ) // PutTransactions stores the transactions in the given database -func PutTransactions(db ethdb.Database, block *types.Block, txs types.Transactions) { - batch := new(leveldb.Batch) - _, batchWrite := db.(*ethdb.LDBDatabase) +func PutTransactions(db ethdb.Database, block *types.Block, txs types.Transactions) error { + batch := db.NewBatch() for i, tx := range block.Transactions() { rlpEnc, err := rlp.EncodeToBytes(tx) if err != nil { - glog.V(logger.Debug).Infoln("Failed encoding tx", err) - return + return fmt.Errorf("failed encoding tx: %v", err) } - if batchWrite { - batch.Put(tx.Hash().Bytes(), rlpEnc) - } else { - db.Put(tx.Hash().Bytes(), rlpEnc) - } + batch.Put(tx.Hash().Bytes(), rlpEnc) var txExtra struct { BlockHash common.Hash @@ -59,22 +55,16 @@ func PutTransactions(db ethdb.Database, block *types.Block, txs types.Transactio txExtra.Index = uint64(i) rlpMeta, err := rlp.EncodeToBytes(txExtra) if err != nil { - glog.V(logger.Debug).Infoln("Failed encoding tx meta data", err) - return + return fmt.Errorf("failed encoding tx meta data: %v", err) } - if batchWrite { - batch.Put(append(tx.Hash().Bytes(), 0x0001), rlpMeta) - } else { - db.Put(append(tx.Hash().Bytes(), 0x0001), rlpMeta) - } + batch.Put(append(tx.Hash().Bytes(), 0x0001), rlpMeta) } - if db, ok := db.(*ethdb.LDBDatabase); ok { - if err := db.LDB().Write(batch, nil); err != nil { - glog.V(logger.Error).Infoln("db write err:", err) - } + if err := batch.Write(); err != nil { + return fmt.Errorf("failed writing tx to db: %v", err) } + return nil } func DeleteTransaction(db ethdb.Database, txHash common.Hash) { diff --git a/core/types/bloom9.go b/core/types/bloom9.go index f87ae58e6..97db20ee9 100644 --- a/core/types/bloom9.go +++ b/core/types/bloom9.go @@ -17,6 +17,7 @@ package types import ( + "fmt" "math/big" "github.com/ethereum/go-ethereum/common" @@ -28,6 +29,46 @@ type bytesBacked interface { Bytes() []byte } +const bloomLength = 256 + +type Bloom [bloomLength]byte + +func BytesToBloom(b []byte) Bloom { + var bloom Bloom + bloom.SetBytes(b) + return bloom +} + +func (b *Bloom) SetBytes(d []byte) { + if len(b) < len(d) { + panic(fmt.Sprintf("bloom bytes too big %d %d", len(b), len(d))) + } + + copy(b[bloomLength-len(d):], d) +} + +func (b *Bloom) Add(d *big.Int) { + bin := new(big.Int).SetBytes(b[:]) + bin.Or(bin, bloom9(d.Bytes())) + b.SetBytes(bin.Bytes()) +} + +func (b Bloom) Big() *big.Int { + return common.Bytes2Big(b[:]) +} + +func (b Bloom) Bytes() []byte { + return b[:] +} + +func (b Bloom) Test(test *big.Int) bool { + return BloomLookup(b, test) +} + +func (b Bloom) TestBytes(test []byte) bool { + return b.Test(common.BytesToBig(test)) +} + func CreateBloom(receipts Receipts) Bloom { bin := new(big.Int) for _, receipt := range receipts { diff --git a/core/types/bloom9_test.go b/core/types/bloom9_test.go index f020670b1..5744bec6c 100644 --- a/core/types/bloom9_test.go +++ b/core/types/bloom9_test.go @@ -16,6 +16,40 @@ package types +import ( + "math/big" + "testing" +) + +func TestBloom(t *testing.T) { + positive := []string{ + "testtest", + "test", + "hallo", + "other", + } + negative := []string{ + "tes", + "lo", + } + + var bloom Bloom + for _, data := range positive { + bloom.Add(new(big.Int).SetBytes([]byte(data))) + } + + for _, data := range positive { + if !bloom.Test(new(big.Int).SetBytes([]byte(data))) { + t.Error("expected", data, "to test true") + } + } + for _, data := range negative { + if bloom.Test(new(big.Int).SetBytes([]byte(data))) { + t.Error("did not expect", data, "to test true") + } + } +} + /* import ( "testing" diff --git a/core/types/common.go b/core/types/common.go index dc428c00c..29019a1b4 100644 --- a/core/types/common.go +++ b/core/types/common.go @@ -16,41 +16,8 @@ package types -import ( - "math/big" - - "fmt" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/vm" -) +import "github.com/ethereum/go-ethereum/core/vm" type BlockProcessor interface { Process(*Block) (vm.Logs, Receipts, error) } - -const bloomLength = 256 - -type Bloom [bloomLength]byte - -func BytesToBloom(b []byte) Bloom { - var bloom Bloom - bloom.SetBytes(b) - return bloom -} - -func (b *Bloom) SetBytes(d []byte) { - if len(b) < len(d) { - panic(fmt.Sprintf("bloom bytes too big %d %d", len(b), len(d))) - } - - copy(b[bloomLength-len(d):], d) -} - -func (b Bloom) Big() *big.Int { - return common.Bytes2Big(b[:]) -} - -func (b Bloom) Bytes() []byte { - return b[:] -} diff --git a/eth/backend.go b/eth/backend.go index 83eefca5b..f703b4ac0 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -47,6 +47,7 @@ import ( "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/discover" "github.com/ethereum/go-ethereum/p2p/nat" + "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/whisper" ) @@ -288,6 +289,9 @@ func New(config *Config) (*Ethereum, error) { if err := upgradeChainDatabase(chainDb); err != nil { return nil, err } + if err := addMipmapBloomBins(chainDb); err != nil { + return nil, err + } dappDb, err := newdb(filepath.Join(config.DataDir, "dapp")) if err != nil { @@ -769,3 +773,45 @@ func upgradeChainDatabase(db ethdb.Database) error { } return nil } + +func addMipmapBloomBins(db ethdb.Database) (err error) { + const mipmapVersion uint = 2 + + // check if the version is set. We ignore data for now since there's + // only one version so we can easily ignore it for now + var data []byte + data, _ = db.Get([]byte("setting-mipmap-version")) + if len(data) > 0 { + var version uint + if err := rlp.DecodeBytes(data, &version); err == nil && version == mipmapVersion { + return nil + } + } + + defer func() { + if err == nil { + var val []byte + val, err = rlp.EncodeToBytes(mipmapVersion) + if err == nil { + err = db.Put([]byte("setting-mipmap-version"), val) + } + return + } + }() + latestBlock := core.GetBlock(db, core.GetHeadBlockHash(db)) + if latestBlock == nil { // clean database + return + } + + tstart := time.Now() + glog.V(logger.Info).Infoln("upgrading db log bloom bins") + for i := uint64(0); i <= latestBlock.NumberU64(); i++ { + hash := core.GetCanonicalHash(db, i) + if (hash == common.Hash{}) { + return fmt.Errorf("chain db corrupted. Could not find block %d.", i) + } + core.WriteMipmapBloom(db, i, core.GetBlockReceipts(db, hash)) + } + glog.V(logger.Info).Infoln("upgrade completed in", time.Since(tstart)) + return nil +} diff --git a/eth/backend_test.go b/eth/backend_test.go new file mode 100644 index 000000000..220426c17 --- /dev/null +++ b/eth/backend_test.go @@ -0,0 +1,67 @@ +package eth + +import ( + "math/big" + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/ethdb" +) + +func TestMipmapUpgrade(t *testing.T) { + db, _ := ethdb.NewMemDatabase() + addr := common.BytesToAddress([]byte("jeff")) + genesis := core.WriteGenesisBlockForTesting(db) + + chain := core.GenerateChain(genesis, db, 10, func(i int, gen *core.BlockGen) { + var receipts types.Receipts + switch i { + case 1: + receipt := types.NewReceipt(nil, new(big.Int)) + receipt.SetLogs(vm.Logs{&vm.Log{Address: addr}}) + gen.AddUncheckedReceipt(receipt) + receipts = types.Receipts{receipt} + case 2: + receipt := types.NewReceipt(nil, new(big.Int)) + receipt.SetLogs(vm.Logs{&vm.Log{Address: addr}}) + gen.AddUncheckedReceipt(receipt) + receipts = types.Receipts{receipt} + } + + // store the receipts + err := core.PutReceipts(db, receipts) + if err != nil { + t.Fatal(err) + } + }) + for _, block := range chain { + core.WriteBlock(db, block) + if err := core.WriteCanonicalHash(db, block.Hash(), block.NumberU64()); err != nil { + t.Fatalf("failed to insert block number: %v", err) + } + if err := core.WriteHeadBlockHash(db, block.Hash()); err != nil { + t.Fatalf("failed to insert block number: %v", err) + } + if err := core.PutBlockReceipts(db, block, block.Receipts()); err != nil { + t.Fatal("error writing block receipts:", err) + } + } + + err := addMipmapBloomBins(db) + if err != nil { + t.Fatal(err) + } + + bloom := core.GetMipmapBloom(db, 1, core.MIPMapLevels[0]) + if (bloom == types.Bloom{}) { + t.Error("got empty bloom filter") + } + + data, _ := db.Get([]byte("setting-mipmap-version")) + if len(data) == 0 { + t.Error("setting-mipmap-version not written to database") + } +} diff --git a/eth/filters/filter.go b/eth/filters/filter.go index d3d430775..2e81ea177 100644 --- a/eth/filters/filter.go +++ b/eth/filters/filter.go @@ -17,6 +17,8 @@ package filters import ( + "math" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" @@ -30,13 +32,10 @@ type AccountChange struct { // Filtering interface type Filter struct { - db ethdb.Database - earliest int64 - latest int64 - skip int - address []common.Address - max int - topics [][]common.Hash + db ethdb.Database + begin, end int64 + addresses []common.Address + topics [][]common.Hash BlockCallback func(*types.Block, vm.Logs) TransactionCallback func(*types.Transaction) @@ -52,59 +51,82 @@ func New(db ethdb.Database) *Filter { // Set the earliest and latest block for filtering. // -1 = latest block (i.e., the current block) // hash = particular hash from-to -func (self *Filter) SetEarliestBlock(earliest int64) { - self.earliest = earliest +func (self *Filter) SetBeginBlock(begin int64) { + self.begin = begin } -func (self *Filter) SetLatestBlock(latest int64) { - self.latest = latest +func (self *Filter) SetEndBlock(end int64) { + self.end = end } -func (self *Filter) SetAddress(addr []common.Address) { - self.address = addr +func (self *Filter) SetAddresses(addr []common.Address) { + self.addresses = addr } func (self *Filter) SetTopics(topics [][]common.Hash) { self.topics = topics } -func (self *Filter) SetMax(max int) { - self.max = max -} - -func (self *Filter) SetSkip(skip int) { - self.skip = skip -} - // Run filters logs with the current parameters set func (self *Filter) Find() vm.Logs { - earliestBlock := core.GetBlock(self.db, core.GetHeadBlockHash(self.db)) - var earliestBlockNo uint64 = uint64(self.earliest) - if self.earliest == -1 { - earliestBlockNo = earliestBlock.NumberU64() + latestBlock := core.GetBlock(self.db, core.GetHeadBlockHash(self.db)) + var beginBlockNo uint64 = uint64(self.begin) + if self.begin == -1 { + beginBlockNo = latestBlock.NumberU64() } - var latestBlockNo uint64 = uint64(self.latest) - if self.latest == -1 { - latestBlockNo = earliestBlock.NumberU64() + var endBlockNo uint64 = uint64(self.end) + if self.end == -1 { + endBlockNo = latestBlock.NumberU64() } - var ( - logs vm.Logs - block *types.Block - ) - hash := core.GetCanonicalHash(self.db, latestBlockNo) - if hash != (common.Hash{}) { - block = core.GetBlock(self.db, hash) + // if no addresses are present we can't make use of fast search which + // uses the mipmap bloom filters to check for fast inclusion and uses + // higher range probability in order to ensure at least a false positive + if len(self.addresses) == 0 { + return self.getLogs(beginBlockNo, endBlockNo) } + return self.mipFind(beginBlockNo, endBlockNo, 0) +} -done: - for i := 0; block != nil; i++ { - // Quit on latest - switch { - case block.NumberU64() == 0: - break done - case block.NumberU64() < earliestBlockNo: - break done +func (self *Filter) mipFind(start, end uint64, depth int) (logs vm.Logs) { + level := core.MIPMapLevels[depth] + // normalise numerator so we can work in level specific batches and + // work with the proper range checks + for num := start / level * level; num <= end; num += level { + // find addresses in bloom filters + bloom := core.GetMipmapBloom(self.db, num, level) + for _, addr := range self.addresses { + if bloom.TestBytes(addr[:]) { + // range check normalised values and make sure that + // we're resolving the correct range instead of the + // normalised values. + start := uint64(math.Max(float64(num), float64(start))) + end := uint64(math.Min(float64(num+level-1), float64(end))) + if depth+1 == len(core.MIPMapLevels) { + logs = append(logs, self.getLogs(start, end)...) + } else { + logs = append(logs, self.mipFind(start, end, depth+1)...) + } + // break so we don't check the same range for each + // possible address. Checks on multiple addresses + // are handled further down the stack. + break + } + } + } + + return logs +} + +func (self *Filter) getLogs(start, end uint64) (logs vm.Logs) { + var block *types.Block + + for i := start; i <= end; i++ { + hash := core.GetCanonicalHash(self.db, i) + if hash != (common.Hash{}) { + block = core.GetBlock(self.db, hash) + } else { // block not found + return logs } // Use bloom filtering to see if this block is interesting given the @@ -120,8 +142,6 @@ done: } logs = append(logs, self.FilterLogs(unfiltered)...) } - - block = core.GetBlock(self.db, block.ParentHash()) } return logs @@ -143,7 +163,7 @@ func (self *Filter) FilterLogs(logs vm.Logs) vm.Logs { // Filter the logs for interesting stuff Logs: for _, log := range logs { - if len(self.address) > 0 && !includes(self.address, log.Address) { + if len(self.addresses) > 0 && !includes(self.addresses, log.Address) { continue } @@ -179,9 +199,9 @@ Logs: } func (self *Filter) bloomFilter(block *types.Block) bool { - if len(self.address) > 0 { + if len(self.addresses) > 0 { var included bool - for _, addr := range self.address { + for _, addr := range self.addresses { if types.BloomLookup(block.Bloom(), addr) { included = true break diff --git a/eth/filters/filter_test.go b/eth/filters/filter_test.go index 950a84579..9e7538fac 100644 --- a/eth/filters/filter_test.go +++ b/eth/filters/filter_test.go @@ -1,6 +1,7 @@ package filters import ( + "io/ioutil" "math/big" "os" "testing" @@ -23,40 +24,42 @@ func makeReceipt(addr common.Address) *types.Receipt { } func BenchmarkMipmaps(b *testing.B) { - const dbname = "/tmp/mipmap" + dir, err := ioutil.TempDir("", "mipmap") + if err != nil { + b.Fatal(err) + } + defer os.RemoveAll(dir) + var ( - db, _ = ethdb.NewLDBDatabase(dbname, 16) + db, _ = ethdb.NewLDBDatabase(dir, 16) key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") addr1 = crypto.PubkeyToAddress(key1.PublicKey) addr2 = common.BytesToAddress([]byte("jeff")) addr3 = common.BytesToAddress([]byte("ethereum")) addr4 = common.BytesToAddress([]byte("random addresses please")) ) - defer func() { - db.Close() - os.Remove(dbname) - }() + defer db.Close() genesis := core.WriteGenesisBlockForTesting(db, core.GenesisAccount{addr1, big.NewInt(1000000)}) - chain := core.GenerateChain(genesis, db, 100000, func(i int, gen *core.BlockGen) { + chain := core.GenerateChain(genesis, db, 100010, func(i int, gen *core.BlockGen) { var receipts types.Receipts switch i { case 2403: receipt := makeReceipt(addr1) receipts = types.Receipts{receipt} - gen.AddReceipt(receipt) - case 10340: + gen.AddUncheckedReceipt(receipt) + case 1034: receipt := makeReceipt(addr2) receipts = types.Receipts{receipt} - gen.AddReceipt(receipt) + gen.AddUncheckedReceipt(receipt) case 34: receipt := makeReceipt(addr3) receipts = types.Receipts{receipt} - gen.AddReceipt(receipt) + gen.AddUncheckedReceipt(receipt) case 99999: receipt := makeReceipt(addr4) receipts = types.Receipts{receipt} - gen.AddReceipt(receipt) + gen.AddUncheckedReceipt(receipt) } @@ -65,6 +68,7 @@ func BenchmarkMipmaps(b *testing.B) { if err != nil { b.Fatal(err) } + core.WriteMipmapBloom(db, uint64(i+1), receipts) }) for _, block := range chain { core.WriteBlock(db, block) @@ -82,9 +86,9 @@ func BenchmarkMipmaps(b *testing.B) { b.ResetTimer() filter := New(db) - filter.SetAddress([]common.Address{addr1, addr2, addr3, addr4}) - filter.SetEarliestBlock(0) - filter.SetLatestBlock(-1) + filter.SetAddresses([]common.Address{addr1, addr2, addr3, addr4}) + filter.SetBeginBlock(0) + filter.SetEndBlock(-1) for i := 0; i < b.N; i++ { logs := filter.Find() @@ -93,3 +97,171 @@ func BenchmarkMipmaps(b *testing.B) { } } } + +func TestFilters(t *testing.T) { + dir, err := ioutil.TempDir("", "mipmap") + if err != nil { + t.Fatal(err) + } + defer os.RemoveAll(dir) + + var ( + db, _ = ethdb.NewLDBDatabase(dir, 16) + key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") + addr = crypto.PubkeyToAddress(key1.PublicKey) + + hash1 = common.BytesToHash([]byte("topic1")) + hash2 = common.BytesToHash([]byte("topic2")) + hash3 = common.BytesToHash([]byte("topic3")) + hash4 = common.BytesToHash([]byte("topic4")) + ) + defer db.Close() + + genesis := core.WriteGenesisBlockForTesting(db, core.GenesisAccount{addr, big.NewInt(1000000)}) + chain := core.GenerateChain(genesis, db, 1000, func(i int, gen *core.BlockGen) { + var receipts types.Receipts + switch i { + case 1: + receipt := types.NewReceipt(nil, new(big.Int)) + receipt.SetLogs(vm.Logs{ + &vm.Log{ + Address: addr, + Topics: []common.Hash{hash1}, + }, + }) + gen.AddUncheckedReceipt(receipt) + receipts = types.Receipts{receipt} + case 2: + receipt := types.NewReceipt(nil, new(big.Int)) + receipt.SetLogs(vm.Logs{ + &vm.Log{ + Address: addr, + Topics: []common.Hash{hash2}, + }, + }) + gen.AddUncheckedReceipt(receipt) + receipts = types.Receipts{receipt} + case 998: + receipt := types.NewReceipt(nil, new(big.Int)) + receipt.SetLogs(vm.Logs{ + &vm.Log{ + Address: addr, + Topics: []common.Hash{hash3}, + }, + }) + gen.AddUncheckedReceipt(receipt) + receipts = types.Receipts{receipt} + case 999: + receipt := types.NewReceipt(nil, new(big.Int)) + receipt.SetLogs(vm.Logs{ + &vm.Log{ + Address: addr, + Topics: []common.Hash{hash4}, + }, + }) + gen.AddUncheckedReceipt(receipt) + receipts = types.Receipts{receipt} + } + + // store the receipts + err := core.PutReceipts(db, receipts) + if err != nil { + t.Fatal(err) + } + // i is used as block number for the writes but since the i + // starts at 0 and block 0 (genesis) is already present increment + // by one + core.WriteMipmapBloom(db, uint64(i+1), receipts) + }) + for _, block := range chain { + core.WriteBlock(db, block) + if err := core.WriteCanonicalHash(db, block.Hash(), block.NumberU64()); err != nil { + t.Fatalf("failed to insert block number: %v", err) + } + if err := core.WriteHeadBlockHash(db, block.Hash()); err != nil { + t.Fatalf("failed to insert block number: %v", err) + } + if err := core.PutBlockReceipts(db, block, block.Receipts()); err != nil { + t.Fatal("error writing block receipts:", err) + } + } + + filter := New(db) + filter.SetAddresses([]common.Address{addr}) + filter.SetTopics([][]common.Hash{[]common.Hash{hash1, hash2, hash3, hash4}}) + filter.SetBeginBlock(0) + filter.SetEndBlock(-1) + + logs := filter.Find() + if len(logs) != 4 { + t.Error("expected 4 log, got", len(logs)) + } + + filter = New(db) + filter.SetAddresses([]common.Address{addr}) + filter.SetTopics([][]common.Hash{[]common.Hash{hash3}}) + filter.SetBeginBlock(900) + filter.SetEndBlock(999) + logs = filter.Find() + if len(logs) != 1 { + t.Error("expected 1 log, got", len(logs)) + } + if len(logs) > 0 && logs[0].Topics[0] != hash3 { + t.Errorf("expected log[0].Topics[0] to be %x, got %x", hash3, logs[0].Topics[0]) + } + + filter = New(db) + filter.SetAddresses([]common.Address{addr}) + filter.SetTopics([][]common.Hash{[]common.Hash{hash3}}) + filter.SetBeginBlock(990) + filter.SetEndBlock(-1) + logs = filter.Find() + if len(logs) != 1 { + t.Error("expected 1 log, got", len(logs)) + } + if len(logs) > 0 && logs[0].Topics[0] != hash3 { + t.Errorf("expected log[0].Topics[0] to be %x, got %x", hash3, logs[0].Topics[0]) + } + + filter = New(db) + filter.SetTopics([][]common.Hash{[]common.Hash{hash1, hash2}}) + filter.SetBeginBlock(1) + filter.SetEndBlock(10) + + logs = filter.Find() + if len(logs) != 2 { + t.Error("expected 2 log, got", len(logs)) + } + + failHash := common.BytesToHash([]byte("fail")) + filter = New(db) + filter.SetTopics([][]common.Hash{[]common.Hash{failHash}}) + filter.SetBeginBlock(0) + filter.SetEndBlock(-1) + + logs = filter.Find() + if len(logs) != 0 { + t.Error("expected 0 log, got", len(logs)) + } + + failAddr := common.BytesToAddress([]byte("failmenow")) + filter = New(db) + filter.SetAddresses([]common.Address{failAddr}) + filter.SetBeginBlock(0) + filter.SetEndBlock(-1) + + logs = filter.Find() + if len(logs) != 0 { + t.Error("expected 0 log, got", len(logs)) + } + + filter = New(db) + filter.SetTopics([][]common.Hash{[]common.Hash{failHash}, []common.Hash{hash1}}) + filter.SetBeginBlock(0) + filter.SetEndBlock(-1) + + logs = filter.Find() + if len(logs) != 0 { + t.Error("expected 0 log, got", len(logs)) + } +} diff --git a/miner/worker.go b/miner/worker.go index 43f6f9909..57f668d49 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -301,6 +301,8 @@ func (self *worker) wait() { core.PutTransactions(self.chainDb, block, block.Transactions()) // store the receipts core.PutReceipts(self.chainDb, work.receipts) + // Write map map bloom filters + core.WriteMipmapBloom(self.chainDb, block.NumberU64(), work.receipts) } // broadcast before waiting for validation diff --git a/xeth/xeth.go b/xeth/xeth.go index 13e171270..ae03471d5 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -543,11 +543,9 @@ func (self *XEth) NewLogFilter(earliest, latest int64, skip, max int, address [] id := self.filterManager.Add(filter) self.logQueue[id] = &logQueue{timeout: time.Now()} - filter.SetEarliestBlock(earliest) - filter.SetLatestBlock(latest) - filter.SetSkip(skip) - filter.SetMax(max) - filter.SetAddress(cAddress(address)) + filter.SetBeginBlock(earliest) + filter.SetEndBlock(latest) + filter.SetAddresses(cAddress(address)) filter.SetTopics(cTopics(topics)) filter.LogsCallback = func(logs vm.Logs) { self.logMu.Lock() @@ -652,11 +650,9 @@ func (self *XEth) Logs(id int) vm.Logs { func (self *XEth) AllLogs(earliest, latest int64, skip, max int, address []string, topics [][]string) vm.Logs { filter := filters.New(self.backend.ChainDb()) - filter.SetEarliestBlock(earliest) - filter.SetLatestBlock(latest) - filter.SetSkip(skip) - filter.SetMax(max) - filter.SetAddress(cAddress(address)) + filter.SetBeginBlock(earliest) + filter.SetEndBlock(latest) + filter.SetAddresses(cAddress(address)) filter.SetTopics(cTopics(topics)) return filter.Find() -- cgit v1.2.3 From 9d61d78de6ad20822b2b48d6c4e3779369ea7331 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Tue, 6 Oct 2015 18:16:03 +0200 Subject: core/vm: abstracted instruction execution away from JIT Moved the execution of instructions to the instruction it self. This will allow for specialised instructions (e.g. segments) to be execution in the same manner as regular instructions. --- core/vm/instructions.go | 82 ++++++++++++++++++++++++++++++++++++++++++++----- core/vm/jit.go | 82 +++++++++---------------------------------------- 2 files changed, 88 insertions(+), 76 deletions(-) diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 6c6039f74..5dcab6e08 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -17,6 +17,7 @@ package vm import ( + "fmt" "math/big" "github.com/ethereum/go-ethereum/common" @@ -25,16 +26,16 @@ import ( ) type programInstruction interface { - Do(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) + // executes the program instruction and allows the instruction to modify the state of the program + do(program *Program, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) ([]byte, error) + // returns whether the program instruction halts the execution of the JIT + halts() bool + // Returns the current op code (debugging purposes) + Op() OpCode } type instrFn func(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) -// Do executes the function. This implements programInstruction -func (fn instrFn) Do(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { - fn(instr, pc, env, contract, memory, stack) -} - type instruction struct { op OpCode pc uint64 @@ -44,6 +45,73 @@ type instruction struct { gas *big.Int spop int spush int + + returns bool +} + +func jump(mapping map[uint64]uint64, destinations map[uint64]struct{}, contract *Contract, to *big.Int) (uint64, error) { + if !validDest(destinations, to) { + nop := contract.GetOp(to.Uint64()) + return 0, fmt.Errorf("invalid jump destination (%v) %v", nop, to) + } + + return mapping[to.Uint64()], nil +} + +func (instr instruction) do(program *Program, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) ([]byte, error) { + // calculate the new memory size and gas price for the current executing opcode + newMemSize, cost, err := jitCalculateGasAndSize(env, contract, instr, env.Db(), memory, stack) + if err != nil { + return nil, err + } + + // Use the calculated gas. When insufficient gas is present, use all gas and return an + // Out Of Gas error + if !contract.UseGas(cost) { + return nil, OutOfGasError + } + // Resize the memory calculated previously + memory.Resize(newMemSize.Uint64()) + + // These opcodes return an argument and are thefor handled + // differently from the rest of the opcodes + switch instr.op { + case JUMP: + if pos, err := jump(program.mapping, program.destinations, contract, stack.pop()); err != nil { + return nil, err + } else { + *pc = pos + return nil, nil + } + case JUMPI: + pos, cond := stack.pop(), stack.pop() + if cond.Cmp(common.BigTrue) >= 0 { + if pos, err := jump(program.mapping, program.destinations, contract, pos); err != nil { + return nil, err + } else { + *pc = pos + return nil, nil + } + } + case RETURN: + offset, size := stack.pop(), stack.pop() + return memory.GetPtr(offset.Int64(), size.Int64()), nil + default: + if instr.fn == nil { + return nil, fmt.Errorf("Invalid opcode 0x%x", instr.op) + } + instr.fn(instr, pc, env, contract, memory, stack) + } + *pc++ + return nil, nil +} + +func (instr instruction) halts() bool { + return instr.returns +} + +func (instr instruction) Op() OpCode { + return instr.op } func opStaticJump(instr instruction, pc *uint64, ret *big.Int, env Environment, contract *Contract, memory *Memory, stack *stack) { @@ -536,8 +604,6 @@ func opStop(instr instruction, pc *uint64, env Environment, contract *Contract, } func opSuicide(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) { - //receiver := env.Db().GetOrNewStateObject(common.BigToAddress(stack.pop())) - //receiver.AddBalance(balance) balance := env.Db().GetBalance(contract.Address()) env.Db().AddBalance(common.BigToAddress(stack.pop()), balance) diff --git a/core/vm/jit.go b/core/vm/jit.go index 6ad574917..8cb95b860 100644 --- a/core/vm/jit.go +++ b/core/vm/jit.go @@ -86,9 +86,9 @@ type Program struct { contract *Contract - instructions []instruction // instruction set - mapping map[uint64]int // real PC mapping to array indices - destinations map[uint64]struct{} // cached jump destinations + instructions []programInstruction // instruction set + mapping map[uint64]uint64 // real PC mapping to array indices + destinations map[uint64]struct{} // cached jump destinations code []byte } @@ -97,7 +97,7 @@ type Program struct { func NewProgram(code []byte) *Program { program := &Program{ Id: crypto.Sha3Hash(code), - mapping: make(map[uint64]int), + mapping: make(map[uint64]uint64), destinations: make(map[uint64]struct{}), code: code, } @@ -118,10 +118,12 @@ func (p *Program) addInstr(op OpCode, pc uint64, fn instrFn, data *big.Int) { baseOp = DUP1 } base := _baseCheck[baseOp] - instr := instruction{op, pc, fn, data, base.gas, base.stackPop, base.stackPush} + + returns := op == RETURN || op == SUICIDE || op == STOP + instr := instruction{op, pc, fn, data, base.gas, base.stackPop, base.stackPush, returns} p.instructions = append(p.instructions, instr) - p.mapping[pc] = len(p.instructions) - 1 + p.mapping[pc] = uint64(len(p.instructions) - 1) } // CompileProgram compiles the given program and return an error when it fails @@ -301,21 +303,8 @@ func runProgram(program *Program, pcstart uint64, mem *Memory, stack *stack, env contract.Input = input var ( - caller = contract.caller - statedb = env.Db() - pc int = program.mapping[pcstart] - instrCount = 0 - - jump = func(to *big.Int) error { - if !validDest(program.destinations, to) { - nop := contract.GetOp(to.Uint64()) - return fmt.Errorf("invalid jump destination (%v) %v", nop, to) - } - - pc = program.mapping[to.Uint64()] - - return nil - } + pc uint64 = program.mapping[pcstart] + instrCount = 0 ) if glog.V(logger.Debug) { @@ -326,62 +315,19 @@ func runProgram(program *Program, pcstart uint64, mem *Memory, stack *stack, env }() } - for pc < len(program.instructions) { + for pc < uint64(len(program.instructions)) { instrCount++ instr := program.instructions[pc] - // calculate the new memory size and gas price for the current executing opcode - newMemSize, cost, err := jitCalculateGasAndSize(env, contract, caller, instr, statedb, mem, stack) + ret, err := instr.do(program, &pc, env, contract, mem, stack) if err != nil { return nil, err } - // Use the calculated gas. When insufficient gas is present, use all gas and return an - // Out Of Gas error - if !contract.UseGas(cost) { - return nil, OutOfGasError - } - // Resize the memory calculated previously - mem.Resize(newMemSize.Uint64()) - - // These opcodes return an argument and are thefor handled - // differently from the rest of the opcodes - switch instr.op { - case JUMP: - if err := jump(stack.pop()); err != nil { - return nil, err - } - continue - case JUMPI: - pos, cond := stack.pop(), stack.pop() - - if cond.Cmp(common.BigTrue) >= 0 { - if err := jump(pos); err != nil { - return nil, err - } - continue - } - case RETURN: - offset, size := stack.pop(), stack.pop() - ret := mem.GetPtr(offset.Int64(), size.Int64()) - + if instr.halts() { return contract.Return(ret), nil - case SUICIDE: - instr.fn(instr, nil, env, contract, mem, stack) - - return contract.Return(nil), nil - case STOP: - return contract.Return(nil), nil - default: - if instr.fn == nil { - return nil, fmt.Errorf("Invalid opcode %x", instr.op) - } - - instr.fn(instr, nil, env, contract, mem, stack) } - - pc++ } contract.Input = nil @@ -403,7 +349,7 @@ func validDest(dests map[uint64]struct{}, dest *big.Int) bool { // jitCalculateGasAndSize calculates the required given the opcode and stack items calculates the new memorysize for // the operation. This does not reduce gas or resizes the memory. -func jitCalculateGasAndSize(env Environment, contract *Contract, caller ContractRef, instr instruction, statedb Database, mem *Memory, stack *stack) (*big.Int, *big.Int, error) { +func jitCalculateGasAndSize(env Environment, contract *Contract, instr instruction, statedb Database, mem *Memory, stack *stack) (*big.Int, *big.Int, error) { var ( gas = new(big.Int) newMemSize *big.Int = new(big.Int) -- cgit v1.2.3 From b19627804400901ba003f6e401366cb7d3c4290f Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Tue, 6 Oct 2015 23:39:43 +0200 Subject: core/vm: added JIT segmenting / optimisations * multi-push segments * static jumps segments --- cmd/utils/flags.go | 3 ++ core/vm/doc.go | 11 +++--- core/vm/instructions.go | 2 +- core/vm/jit.go | 2 ++ core/vm/jit_optimiser.go | 90 ++++++++++++++++++++++++++++++++++++++++++++++++ core/vm/jit_test.go | 43 +++++++++++++++++++++++ core/vm/opcodes.go | 12 +++++++ core/vm/segments.go | 44 +++++++++++++++++++++++ core/vm/stack.go | 3 ++ 9 files changed, 205 insertions(+), 5 deletions(-) create mode 100644 core/vm/jit_optimiser.go create mode 100644 core/vm/segments.go diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index ca9dd76fd..19e6033a3 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -475,6 +475,9 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config { cfg.TestNet = true } + if ctx.GlobalBool(VMEnableJitFlag.Name) { + cfg.Name += "/JIT" + } if ctx.GlobalBool(DevModeFlag.Name) { if !ctx.GlobalIsSet(VMDebugFlag.Name) { cfg.VmDebug = true diff --git a/core/vm/doc.go b/core/vm/doc.go index ab87bf934..debbdb35e 100644 --- a/core/vm/doc.go +++ b/core/vm/doc.go @@ -24,9 +24,12 @@ invokes the JIT VM in a seperate goroutine and compiles the byte code in JIT instructions. The JIT VM, when invoked, loops around a set of pre-defined instructions until -it either runs of gas, causes an internal error, returns or stops. At a later -stage the JIT VM will see some additional features that will cause sets of -instructions to be compiled down to segments. Segments are sets of instructions -that can be run in one go saving precious time during execution. +it either runs of gas, causes an internal error, returns or stops. + +The JIT optimiser attempts to pre-compile instructions in to chunks or segments +such as multiple PUSH operations and static JUMPs. It does this by analysing the +opcodes and attempts to match certain regions to known sets. Whenever the +optimiser finds said segments it creates a new instruction and replaces the +first occurrence in the sequence. */ package vm diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 5dcab6e08..2e868521e 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -73,7 +73,7 @@ func (instr instruction) do(program *Program, pc *uint64, env Environment, contr // Resize the memory calculated previously memory.Resize(newMemSize.Uint64()) - // These opcodes return an argument and are thefor handled + // These opcodes return an argument and are therefor handled // differently from the rest of the opcodes switch instr.op { case JUMP: diff --git a/core/vm/jit.go b/core/vm/jit.go index 8cb95b860..1aa7d7ef2 100644 --- a/core/vm/jit.go +++ b/core/vm/jit.go @@ -290,6 +290,8 @@ func CompileProgram(program *Program) (err error) { } } + optimiseProgram(program) + return nil } diff --git a/core/vm/jit_optimiser.go b/core/vm/jit_optimiser.go new file mode 100644 index 000000000..4823cc1a0 --- /dev/null +++ b/core/vm/jit_optimiser.go @@ -0,0 +1,90 @@ +package vm + +import ( + "math/big" + "time" + + "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/logger/glog" +) + +// optimeProgram optimises a JIT program creating segments out of program +// instructions. Currently covered are multi-pushes and static jumps +func optimiseProgram(program *Program) { + var load []instruction + + var ( + statsJump = 0 + statsPush = 0 + ) + + if glog.V(logger.Debug) { + glog.Infof("optimising %x\n", program.Id[:4]) + tstart := time.Now() + defer func() { + glog.Infof("optimised %x done in %v with JMP: %d PSH: %d\n", program.Id[:4], time.Since(tstart), statsJump, statsPush) + }() + } + + for i := 0; i < len(program.instructions); i++ { + instr := program.instructions[i].(instruction) + + switch { + case instr.op.IsPush(): + load = append(load, instr) + case instr.op.IsStaticJump(): + if len(load) == 0 { + continue + } + // if the push load is greater than 1, finalise that + // segment first + if len(load) > 2 { + seg, size := makePushSeg(load[:len(load)-1]) + program.instructions[i-size-1] = seg + statsPush++ + } + // create a segment consisting of a pre determined + // jump, destination and validity. + seg := makeStaticJumpSeg(load[len(load)-1].data, program) + program.instructions[i-1] = seg + statsJump++ + + load = nil + default: + // create a new N pushes segment + if len(load) > 1 { + seg, size := makePushSeg(load) + program.instructions[i-size] = seg + statsPush++ + } + load = nil + } + } +} + +// makePushSeg creates a new push segment from N amount of push instructions +func makePushSeg(instrs []instruction) (pushSeg, int) { + var ( + data []*big.Int + gas = new(big.Int) + ) + + for _, instr := range instrs { + data = append(data, instr.data) + gas.Add(gas, instr.gas) + } + + return pushSeg{data, gas}, len(instrs) +} + +// makeStaticJumpSeg creates a new static jump segment from a predefined +// destination (PUSH, JUMP). +func makeStaticJumpSeg(to *big.Int, program *Program) jumpSeg { + gas := new(big.Int) + gas.Add(gas, _baseCheck[PUSH1].gas) + gas.Add(gas, _baseCheck[JUMP].gas) + + contract := &Contract{Code: program.code} + pos, err := jump(program.mapping, program.destinations, contract, to) + return jumpSeg{pos, err, gas} +} diff --git a/core/vm/jit_test.go b/core/vm/jit_test.go index cb09e179d..aa97e5184 100644 --- a/core/vm/jit_test.go +++ b/core/vm/jit_test.go @@ -26,6 +26,49 @@ import ( const maxRun = 1000 +func TestSegmenting(t *testing.T) { + prog := NewProgram([]byte{byte(PUSH1), 0x1, byte(PUSH1), 0x1, 0x0}) + err := CompileProgram(prog) + if err != nil { + t.Fatal(err) + } + + if instr, ok := prog.instructions[0].(pushSeg); ok { + if len(instr.data) != 2 { + t.Error("expected 2 element width pushSegment, got", len(instr.data)) + } + } else { + t.Errorf("expected instr[0] to be a pushSeg, got %T", prog.instructions[0]) + } + + prog = NewProgram([]byte{byte(PUSH1), 0x1, byte(PUSH1), 0x1, byte(JUMP)}) + err = CompileProgram(prog) + if err != nil { + t.Fatal(err) + } + if _, ok := prog.instructions[1].(jumpSeg); ok { + } else { + t.Errorf("expected instr[1] to be jumpSeg, got %T", prog.instructions[1]) + } + + prog = NewProgram([]byte{byte(PUSH1), 0x1, byte(PUSH1), 0x1, byte(PUSH1), 0x1, byte(JUMP)}) + err = CompileProgram(prog) + if err != nil { + t.Fatal(err) + } + if instr, ok := prog.instructions[0].(pushSeg); ok { + if len(instr.data) != 2 { + t.Error("expected 2 element width pushSegment, got", len(instr.data)) + } + } else { + t.Errorf("expected instr[0] to be a pushSeg, got %T", prog.instructions[0]) + } + if _, ok := prog.instructions[2].(jumpSeg); ok { + } else { + t.Errorf("expected instr[1] to be jumpSeg, got %T", prog.instructions[1]) + } +} + func TestCompiling(t *testing.T) { prog := NewProgram([]byte{0x60, 0x10}) err := CompileProgram(prog) diff --git a/core/vm/opcodes.go b/core/vm/opcodes.go index 986c35ef8..46905baac 100644 --- a/core/vm/opcodes.go +++ b/core/vm/opcodes.go @@ -23,6 +23,18 @@ import ( // OpCode is an EVM opcode type OpCode byte +func (op OpCode) IsPush() bool { + switch op { + case PUSH1, PUSH2, PUSH3, PUSH4, PUSH5, PUSH6, PUSH7, PUSH8, PUSH9, PUSH10, PUSH11, PUSH12, PUSH13, PUSH14, PUSH15, PUSH16, PUSH17, PUSH18, PUSH19, PUSH20, PUSH21, PUSH22, PUSH23, PUSH24, PUSH25, PUSH26, PUSH27, PUSH28, PUSH29, PUSH30, PUSH31, PUSH32: + return true + } + return false +} + +func (op OpCode) IsStaticJump() bool { + return op == JUMP +} + const ( // 0x0 range - arithmetic ops STOP OpCode = iota diff --git a/core/vm/segments.go b/core/vm/segments.go new file mode 100644 index 000000000..fd4065149 --- /dev/null +++ b/core/vm/segments.go @@ -0,0 +1,44 @@ +package vm + +import "math/big" + +type jumpSeg struct { + pos uint64 + err error + gas *big.Int +} + +func (j jumpSeg) do(program *Program, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) ([]byte, error) { + if !contract.UseGas(j.gas) { + return nil, OutOfGasError + } + if j.err != nil { + return nil, j.err + } + *pc = j.pos + return nil, nil +} +func (s jumpSeg) halts() bool { return false } +func (s jumpSeg) Op() OpCode { return 0 } + +type pushSeg struct { + data []*big.Int + gas *big.Int +} + +func (s pushSeg) do(program *Program, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *stack) ([]byte, error) { + // Use the calculated gas. When insufficient gas is present, use all gas and return an + // Out Of Gas error + if !contract.UseGas(s.gas) { + return nil, OutOfGasError + } + + for _, d := range s.data { + stack.push(new(big.Int).Set(d)) + } + *pc += uint64(len(s.data)) + return nil, nil +} + +func (s pushSeg) halts() bool { return false } +func (s pushSeg) Op() OpCode { return 0 } diff --git a/core/vm/stack.go b/core/vm/stack.go index 009ac9e1b..0046edec2 100644 --- a/core/vm/stack.go +++ b/core/vm/stack.go @@ -42,6 +42,9 @@ func (st *stack) push(d *big.Int) { //st.data = append(st.data, stackItem) st.data = append(st.data, d) } +func (st *stack) pushN(ds ...*big.Int) { + st.data = append(st.data, ds...) +} func (st *stack) pop() (ret *big.Int) { ret = st.data[len(st.data)-1] -- cgit v1.2.3 From 8c855324128fa824bb6a7ea8f4ed1224e727fad0 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Mon, 12 Oct 2015 13:33:46 +0200 Subject: core/vm: added parsing utilities --- core/vm/jit_optimiser.go | 17 ++++++++++ core/vm/jit_util.go | 68 +++++++++++++++++++++++++++++++++++++++ core/vm/jit_util_test.go | 84 ++++++++++++++++++++++++++++++++++++++++++++++++ core/vm/opcodes.go | 14 ++++++-- 4 files changed, 180 insertions(+), 3 deletions(-) create mode 100644 core/vm/jit_util.go create mode 100644 core/vm/jit_util_test.go diff --git a/core/vm/jit_optimiser.go b/core/vm/jit_optimiser.go index 4823cc1a0..845ffbbdf 100644 --- a/core/vm/jit_optimiser.go +++ b/core/vm/jit_optimiser.go @@ -26,6 +26,23 @@ func optimiseProgram(program *Program) { }() } + /* + code := Parse(program.code) + for _, test := range [][]OpCode{ + []OpCode{PUSH, PUSH, ADD}, + []OpCode{PUSH, PUSH, SUB}, + []OpCode{PUSH, PUSH, MUL}, + []OpCode{PUSH, PUSH, DIV}, + } { + matchCount := 0 + MatchFn(code, test, func(i int) bool { + matchCount++ + return true + }) + fmt.Printf("found %d match count on: %v\n", matchCount, test) + } + */ + for i := 0; i < len(program.instructions); i++ { instr := program.instructions[i].(instruction) diff --git a/core/vm/jit_util.go b/core/vm/jit_util.go new file mode 100644 index 000000000..0d3d6d701 --- /dev/null +++ b/core/vm/jit_util.go @@ -0,0 +1,68 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +// Parse parses all opcodes from the given code byte slice. This function +// performs no error checking and may return non-existing opcodes. +func Parse(code []byte) (opcodes []OpCode) { + for pc := uint64(0); pc < uint64(len(code)); pc++ { + op := OpCode(code[pc]) + + switch op { + case PUSH1, PUSH2, PUSH3, PUSH4, PUSH5, PUSH6, PUSH7, PUSH8, PUSH9, PUSH10, PUSH11, PUSH12, PUSH13, PUSH14, PUSH15, PUSH16, PUSH17, PUSH18, PUSH19, PUSH20, PUSH21, PUSH22, PUSH23, PUSH24, PUSH25, PUSH26, PUSH27, PUSH28, PUSH29, PUSH30, PUSH31, PUSH32: + a := uint64(op) - uint64(PUSH1) + 1 + pc += a + opcodes = append(opcodes, PUSH) + case DUP1, DUP2, DUP3, DUP4, DUP5, DUP6, DUP7, DUP8, DUP9, DUP10, DUP11, DUP12, DUP13, DUP14, DUP15, DUP16: + opcodes = append(opcodes, DUP) + case SWAP1, SWAP2, SWAP3, SWAP4, SWAP5, SWAP6, SWAP7, SWAP8, SWAP9, SWAP10, SWAP11, SWAP12, SWAP13, SWAP14, SWAP15, SWAP16: + opcodes = append(opcodes, SWAP) + default: + opcodes = append(opcodes, op) + } + } + + return opcodes +} + +// MatchFn searcher for match in the given input and calls matcheFn if it finds +// an appropriate match. matcherFn yields the starting position in the input. +// MatchFn will continue to search for a match until it reacher the end of the +// buffer or if matcherFn return false. +func MatchFn(input, match []OpCode, matcherFn func(int) bool) { + // short circuit if either input or match is empty or if the match is + // greater than the input + if len(input) == 0 || len(match) == 0 || len(match) > len(input) { + return + } + +main: + for i, op := range input[:len(input)+1-len(match)] { + // match first opcode and continue search + if op == match[0] { + for j := 1; j < len(match); j++ { + if input[i+j] != match[j] { + continue main + } + } + // check for abort instruction + if !matcherFn(i) { + return + } + } + } +} diff --git a/core/vm/jit_util_test.go b/core/vm/jit_util_test.go new file mode 100644 index 000000000..686bee0ac --- /dev/null +++ b/core/vm/jit_util_test.go @@ -0,0 +1,84 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import "testing" + +type matchTest struct { + input []OpCode + match []OpCode + matches int +} + +func TestMatchFn(t *testing.T) { + tests := []matchTest{ + matchTest{ + []OpCode{PUSH1, PUSH1, MSTORE, JUMP}, + []OpCode{PUSH1, MSTORE}, + 1, + }, + matchTest{ + []OpCode{PUSH1, PUSH1, MSTORE, JUMP}, + []OpCode{PUSH1, MSTORE, PUSH1}, + 0, + }, + matchTest{ + []OpCode{}, + []OpCode{PUSH1}, + 0, + }, + } + + for i, test := range tests { + var matchCount int + MatchFn(test.input, test.match, func(i int) bool { + matchCount++ + return true + }) + if matchCount != test.matches { + t.Errorf("match count failed on test[%d]: expected %d matches, got %d", i, test.matches, matchCount) + } + } +} + +type parseTest struct { + base OpCode + size int + output OpCode +} + +func TestParser(t *testing.T) { + tests := []parseTest{ + parseTest{PUSH1, 32, PUSH}, + parseTest{DUP1, 16, DUP}, + parseTest{SWAP1, 16, SWAP}, + parseTest{MSTORE, 1, MSTORE}, + } + + for _, test := range tests { + for i := 0; i < test.size; i++ { + code := append([]byte{byte(byte(test.base) + byte(i))}, make([]byte, i+1)...) + output := Parse(code) + if len(output) == 0 { + t.Fatal("empty output") + } + if output[0] != test.output { + t.Error("%v failed: expected %v but got %v", test.base+OpCode(i), output[0]) + } + } + } +} diff --git a/core/vm/opcodes.go b/core/vm/opcodes.go index 46905baac..dc4139092 100644 --- a/core/vm/opcodes.go +++ b/core/vm/opcodes.go @@ -187,6 +187,13 @@ const ( LOG4 ) +// unofficial opcodes used for parsing +const ( + PUSH OpCode = 0xb0 + iota + DUP + SWAP +) + const ( // 0xf0 range - closures CREATE OpCode = 0xf0 + iota @@ -194,7 +201,6 @@ const ( CALLCODE RETURN - // 0x70 range - other SUICIDE = 0xff ) @@ -347,9 +353,11 @@ var opCodeToString = map[OpCode]string{ CALL: "CALL", RETURN: "RETURN", CALLCODE: "CALLCODE", + SUICIDE: "SUICIDE", - // 0x70 range - other - SUICIDE: "SUICIDE", + PUSH: "PUSH", + DUP: "DUP", + SWAP: "SWAP", } func (o OpCode) String() string { -- cgit v1.2.3 From de8d5aaa92ff843e6960eb9b7bd7ec1c1ebc6608 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 2 Sep 2015 12:55:11 +0200 Subject: core, core/state: move gas tracking out of core/state The amount of gas available for tx execution was tracked in the StateObject representing the coinbase account. This commit makes the gas counter a separate type in package core, which avoids unintended consequences of intertwining the counter with state logic. --- core/block_processor.go | 41 ++++++++++++++++++++++++++----------- core/chain_makers.go | 11 +++++----- core/error.go | 13 ++++++++++++ core/state/errors.go | 39 ------------------------------------ core/state/state_object.go | 37 +--------------------------------- core/state/state_test.go | 5 ----- core/state_transition.go | 50 +++++++++++++++++++++++++--------------------- miner/worker.go | 25 +++++++++++------------ tests/state_test_util.go | 8 +++----- xeth/xeth.go | 5 ++--- 10 files changed, 92 insertions(+), 142 deletions(-) delete mode 100644 core/state/errors.go diff --git a/core/block_processor.go b/core/block_processor.go index a07d79bcf..7032c077c 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -58,16 +58,31 @@ type BlockProcessor struct { eventMux *event.TypeMux } -// TODO: type GasPool big.Int -// -// GasPool is implemented by state.StateObject. This is a historical -// coincidence. Gas tracking should move out of StateObject. - // GasPool tracks the amount of gas available during // execution of the transactions in a block. -type GasPool interface { - AddGas(gas, price *big.Int) - SubGas(gas, price *big.Int) error +// The zero value is a pool with zero gas available. +type GasPool big.Int + +// AddGas makes gas available for execution. +func (gp *GasPool) AddGas(amount *big.Int) *GasPool { + i := (*big.Int)(gp) + i.Add(i, amount) + return gp +} + +// SubGas deducts the given amount from the pool if enough gas is +// available and returns an error otherwise. +func (gp *GasPool) SubGas(amount *big.Int) error { + i := (*big.Int)(gp) + if i.Cmp(amount) < 0 { + return &GasLimitErr{Have: new(big.Int).Set(i), Want: amount} + } + i.Sub(i, amount) + return nil +} + +func (gp *GasPool) String() string { + return (*big.Int)(gp).String() } func NewBlockProcessor(db ethdb.Database, pow pow.PoW, blockchain *BlockChain, eventMux *event.TypeMux) *BlockProcessor { @@ -82,8 +97,10 @@ func NewBlockProcessor(db ethdb.Database, pow pow.PoW, blockchain *BlockChain, e } func (sm *BlockProcessor) TransitionState(statedb *state.StateDB, parent, block *types.Block, transientProcess bool) (receipts types.Receipts, err error) { - gp := statedb.GetOrNewStateObject(block.Coinbase()) - gp.SetGasLimit(block.GasLimit()) + gp := new(GasPool).AddGas(block.GasLimit()) + if glog.V(logger.Core) { + glog.Infof("%x: gas (+ %v)", block.Coinbase(), gp) + } // Process the transactions on to parent state receipts, err = sm.ApplyTransactions(gp, statedb, block, block.Transactions(), transientProcess) @@ -94,7 +111,7 @@ func (sm *BlockProcessor) TransitionState(statedb *state.StateDB, parent, block return receipts, nil } -func (self *BlockProcessor) ApplyTransaction(gp GasPool, statedb *state.StateDB, header *types.Header, tx *types.Transaction, usedGas *big.Int, transientProcess bool) (*types.Receipt, *big.Int, error) { +func (self *BlockProcessor) ApplyTransaction(gp *GasPool, statedb *state.StateDB, header *types.Header, tx *types.Transaction, usedGas *big.Int, transientProcess bool) (*types.Receipt, *big.Int, error) { _, gas, err := ApplyMessage(NewEnv(statedb, self.bc, tx, header), tx, gp) if err != nil { return nil, nil, err @@ -128,7 +145,7 @@ func (self *BlockProcessor) BlockChain() *BlockChain { return self.bc } -func (self *BlockProcessor) ApplyTransactions(gp GasPool, statedb *state.StateDB, block *types.Block, txs types.Transactions, transientProcess bool) (types.Receipts, error) { +func (self *BlockProcessor) ApplyTransactions(gp *GasPool, statedb *state.StateDB, block *types.Block, txs types.Transactions, transientProcess bool) (types.Receipts, error) { var ( receipts types.Receipts totalUsedGas = big.NewInt(0) diff --git a/core/chain_makers.go b/core/chain_makers.go index 85a4955db..e20a05c7d 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -54,7 +54,7 @@ type BlockGen struct { header *types.Header statedb *state.StateDB - coinbase *state.StateObject + gasPool *GasPool txs []*types.Transaction receipts []*types.Receipt uncles []*types.Header @@ -63,15 +63,14 @@ type BlockGen struct { // SetCoinbase sets the coinbase of the generated block. // It can be called at most once. func (b *BlockGen) SetCoinbase(addr common.Address) { - if b.coinbase != nil { + if b.gasPool != nil { if len(b.txs) > 0 { panic("coinbase must be set before adding transactions") } panic("coinbase can only be set once") } b.header.Coinbase = addr - b.coinbase = b.statedb.GetOrNewStateObject(addr) - b.coinbase.SetGasLimit(b.header.GasLimit) + b.gasPool = new(GasPool).AddGas(b.header.GasLimit) } // SetExtra sets the extra data field of the generated block. @@ -88,10 +87,10 @@ func (b *BlockGen) SetExtra(data []byte) { // added. Notably, contract code relying on the BLOCKHASH instruction // will panic during execution. func (b *BlockGen) AddTx(tx *types.Transaction) { - if b.coinbase == nil { + if b.gasPool == nil { b.SetCoinbase(common.Address{}) } - _, gas, err := ApplyMessage(NewEnv(b.statedb, nil, tx, b.header), tx, b.coinbase) + _, gas, err := ApplyMessage(NewEnv(b.statedb, nil, tx, b.header), tx, b.gasPool) if err != nil { panic(err) } diff --git a/core/error.go b/core/error.go index 5e32124a7..6498194cd 100644 --- a/core/error.go +++ b/core/error.go @@ -188,3 +188,16 @@ func IsBadHashError(err error) bool { _, ok := err.(BadHashError) return ok } + +type GasLimitErr struct { + Have, Want *big.Int +} + +func IsGasLimitErr(err error) bool { + _, ok := err.(*GasLimitErr) + return ok +} + +func (err *GasLimitErr) Error() string { + return fmt.Sprintf("GasLimit reached. Have %d gas, transaction requires %d", err.Have, err.Want) +} diff --git a/core/state/errors.go b/core/state/errors.go deleted file mode 100644 index a08ed2d23..000000000 --- a/core/state/errors.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package state - -import ( - "fmt" - "math/big" -) - -type GasLimitErr struct { - Message string - Is, Max *big.Int -} - -func IsGasLimitErr(err error) bool { - _, ok := err.(*GasLimitErr) - - return ok -} -func (err *GasLimitErr) Error() string { - return err.Message -} -func GasLimitError(is, max *big.Int) *GasLimitErr { - return &GasLimitErr{Message: fmt.Sprintf("GasLimit error. Max %s, transaction would take it to %s", max, is), Is: is, Max: max} -} diff --git a/core/state/state_object.go b/core/state/state_object.go index 40af9ed9c..c06e3d227 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -75,11 +75,6 @@ type StateObject struct { // Cached storage (flushed when updated) storage Storage - // Total gas pool is the total amount of gas currently - // left if this object is the coinbase. Gas is directly - // purchased of the coinbase. - gasPool *big.Int - // Mark for deletion // When an object is marked for deletion it will be delete from the trie // during the "update" phase of the state transition @@ -89,10 +84,9 @@ type StateObject struct { } func NewStateObject(address common.Address, db ethdb.Database) *StateObject { - object := &StateObject{db: db, address: address, balance: new(big.Int), gasPool: new(big.Int), dirty: true} + object := &StateObject{db: db, address: address, balance: new(big.Int), dirty: true} object.trie, _ = trie.NewSecure(common.Hash{}, db) object.storage = make(Storage) - object.gasPool = new(big.Int) return object } @@ -121,7 +115,6 @@ func NewStateObjectFromBytes(address common.Address, data []byte, db ethdb.Datab object.codeHash = extobject.CodeHash object.trie = trie object.storage = make(map[string]common.Hash) - object.gasPool = new(big.Int) object.code, _ = db.Get(extobject.CodeHash) return object } @@ -209,36 +202,9 @@ func (c *StateObject) St() Storage { return c.storage } -// -// Gas setters and getters -// - // Return the gas back to the origin. Used by the Virtual machine or Closures func (c *StateObject) ReturnGas(gas, price *big.Int) {} -func (self *StateObject) SetGasLimit(gasLimit *big.Int) { - self.gasPool = new(big.Int).Set(gasLimit) - self.dirty = true - - if glog.V(logger.Core) { - glog.Infof("%x: gas (+ %v)", self.Address(), self.gasPool) - } -} - -func (self *StateObject) SubGas(gas, price *big.Int) error { - if self.gasPool.Cmp(gas) < 0 { - return GasLimitError(self.gasPool, gas) - } - self.gasPool.Sub(self.gasPool, gas) - self.dirty = true - return nil -} - -func (self *StateObject) AddGas(gas, price *big.Int) { - self.gasPool.Add(self.gasPool, gas) - self.dirty = true -} - func (self *StateObject) Copy() *StateObject { stateObject := NewStateObject(self.Address(), self.db) stateObject.balance.Set(self.balance) @@ -248,7 +214,6 @@ func (self *StateObject) Copy() *StateObject { stateObject.code = common.CopyBytes(self.code) stateObject.initCode = common.CopyBytes(self.initCode) stateObject.storage = self.storage.Copy() - stateObject.gasPool.Set(self.gasPool) stateObject.remove = self.remove stateObject.dirty = self.dirty stateObject.deleted = self.deleted diff --git a/core/state/state_test.go b/core/state/state_test.go index 08fbc47fa..7ddbe11a1 100644 --- a/core/state/state_test.go +++ b/core/state/state_test.go @@ -138,7 +138,6 @@ func TestSnapshot2(t *testing.T) { so0 := state.GetStateObject(stateobjaddr0) so0.balance = big.NewInt(42) so0.nonce = 43 - so0.gasPool = big.NewInt(44) so0.code = []byte{'c', 'a', 'f', 'e'} so0.codeHash = so0.CodeHash() so0.remove = true @@ -150,7 +149,6 @@ func TestSnapshot2(t *testing.T) { so1 := state.GetStateObject(stateobjaddr1) so1.balance = big.NewInt(52) so1.nonce = 53 - so1.gasPool = big.NewInt(54) so1.code = []byte{'c', 'a', 'f', 'e', '2'} so1.codeHash = so1.CodeHash() so1.remove = true @@ -207,9 +205,6 @@ func compareStateObjects(so0, so1 *StateObject, t *testing.T) { } } - if so0.gasPool.Cmp(so1.gasPool) != 0 { - t.Fatalf("GasPool mismatch: have %v, want %v", so0.gasPool, so1.gasPool) - } if so0.remove != so1.remove { t.Fatalf("Remove mismatch: have %v, want %v", so0.remove, so1.remove) } diff --git a/core/state_transition.go b/core/state_transition.go index e83019229..7ecc01d4c 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -21,7 +21,6 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" @@ -29,23 +28,24 @@ import ( ) /* - * The State transitioning model - * - * A state transition is a change made when a transaction is applied to the current world state - * The state transitioning model does all all the necessary work to work out a valid new state root. - * 1) Nonce handling - * 2) Pre pay / buy gas of the coinbase (miner) - * 3) Create a new state object if the recipient is \0*32 - * 4) Value transfer - * == If contract creation == - * 4a) Attempt to run transaction data - * 4b) If valid, use result as code for the new state object - * == end == - * 5) Run Script section - * 6) Derive new state root - */ +The State Transitioning Model + +A state transition is a change made when a transaction is applied to the current world state +The state transitioning model does all all the necessary work to work out a valid new state root. + +1) Nonce handling +2) Pre pay gas +3) Create a new state object if the recipient is \0*32 +4) Value transfer +== If contract creation == + 4a) Attempt to run transaction data + 4b) If valid, use result as code for the new state object +== end == +5) Run Script section +6) Derive new state root +*/ type StateTransition struct { - gp GasPool + gp *GasPool msg Message gas, gasPrice *big.Int initialGas *big.Int @@ -94,7 +94,7 @@ func IntrinsicGas(data []byte) *big.Int { return igas } -func ApplyMessage(env vm.Environment, msg Message, gp GasPool) ([]byte, *big.Int, error) { +func ApplyMessage(env vm.Environment, msg Message, gp *GasPool) ([]byte, *big.Int, error) { var st = StateTransition{ gp: gp, env: env, @@ -158,7 +158,7 @@ func (self *StateTransition) buyGas() error { if sender.Balance().Cmp(mgval) < 0 { return fmt.Errorf("insufficient ETH for gas (%x). Req %v, has %v", sender.Address().Bytes()[:4], mgval, sender.Balance()) } - if err = self.gp.SubGas(mgas, self.gasPrice); err != nil { + if err = self.gp.SubGas(mgas); err != nil { return err } self.addGas(mgas) @@ -180,9 +180,9 @@ func (self *StateTransition) preCheck() (err error) { return NonceError(msg.Nonce(), n) } - // Pre-pay gas / Buy gas of the coinbase account + // Pre-pay gas if err = self.buyGas(); err != nil { - if state.IsGasLimitErr(err) { + if IsGasLimitErr(err) { return err } return InvalidTxError(err) @@ -246,17 +246,21 @@ func (self *StateTransition) transitionDb() (ret []byte, usedGas *big.Int, err e } func (self *StateTransition) refundGas() { + // Return eth for remaining gas to the sender account, + // exchanged at the original rate. sender, _ := self.from() // err already checked - // Return remaining gas remaining := new(big.Int).Mul(self.gas, self.gasPrice) sender.AddBalance(remaining) + // Apply refund counter, capped to half of the used gas. uhalf := remaining.Div(self.gasUsed(), common.Big2) refund := common.BigMin(uhalf, self.state.GetRefund()) self.gas.Add(self.gas, refund) self.state.AddBalance(sender.Address(), refund.Mul(refund, self.gasPrice)) - self.gp.AddGas(self.gas, self.gasPrice) + // Also return remaining gas to the block gas counter so it is + // available for the next transaction. + self.gp.AddGas(self.gas) } func (self *StateTransition) gasUsed() *big.Int { diff --git a/miner/worker.go b/miner/worker.go index 5bce32f21..d827cb97d 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -62,13 +62,12 @@ type uint64RingBuffer struct { // environment is the workers current environment and holds // all of the current state information type Work struct { - state *state.StateDB // apply state changes here - coinbase *state.StateObject // the miner's account - ancestors *set.Set // ancestor set (used for checking uncle parent validity) - family *set.Set // family set (used for checking uncle invalidity) - uncles *set.Set // uncle set - remove *set.Set // tx which will be removed - tcount int // tx count in cycle + state *state.StateDB // apply state changes here + ancestors *set.Set // ancestor set (used for checking uncle parent validity) + family *set.Set // family set (used for checking uncle invalidity) + uncles *set.Set // uncle set + remove *set.Set // tx which will be removed + tcount int // tx count in cycle ignoredTransactors *set.Set lowGasTransactors *set.Set ownedAccounts *set.Set @@ -366,7 +365,6 @@ func (self *worker) makeCurrent(parent *types.Block, header *types.Header) error family: set.New(), uncles: set.New(), header: header, - coinbase: state.GetOrNewStateObject(self.coinbase), createdAt: time.Now(), } @@ -514,7 +512,6 @@ func (self *worker) commitNewWork() { transactions := append(singleTxOwner, multiTxOwner...) */ - work.coinbase.SetGasLimit(header.GasLimit) work.commitTransactions(transactions, self.gasPrice, self.proc) self.eth.TxPool().RemoveTransactions(work.lowGasTxs) @@ -575,6 +572,8 @@ func (self *worker) commitUncle(work *Work, uncle *types.Header) error { } func (env *Work) commitTransactions(transactions types.Transactions, gasPrice *big.Int, proc *core.BlockProcessor) { + gp := new(core.GasPool).AddGas(env.header.GasLimit) + for _, tx := range transactions { // We can skip err. It has already been validated in the tx pool from, _ := tx.From() @@ -612,9 +611,9 @@ func (env *Work) commitTransactions(transactions types.Transactions, gasPrice *b env.state.StartRecord(tx.Hash(), common.Hash{}, 0) - err := env.commitTransaction(tx, proc) + err := env.commitTransaction(tx, proc, gp) switch { - case state.IsGasLimitErr(err): + case core.IsGasLimitErr(err): // ignore the transactor so no nonce errors will be thrown for this account // next time the worker is run, they'll be picked up again. env.ignoredTransactors.Add(from) @@ -632,9 +631,9 @@ func (env *Work) commitTransactions(transactions types.Transactions, gasPrice *b } } -func (env *Work) commitTransaction(tx *types.Transaction, proc *core.BlockProcessor) error { +func (env *Work) commitTransaction(tx *types.Transaction, proc *core.BlockProcessor, gp *core.GasPool) error { snap := env.state.Copy() - receipt, _, err := proc.ApplyTransaction(env.coinbase, env.state, env.header, tx, env.header.GasUsed, true) + receipt, _, err := proc.ApplyTransaction(gp, env.state, env.header, tx, env.header.GasUsed, true) if err != nil { env.state.Set(snap) return err diff --git a/tests/state_test_util.go b/tests/state_test_util.go index 676d9ed8c..352fe3570 100644 --- a/tests/state_test_util.go +++ b/tests/state_test_util.go @@ -223,7 +223,6 @@ func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, vm.Log price = common.Big(tx["gasPrice"]) value = common.Big(tx["value"]) nonce = common.Big(tx["nonce"]).Uint64() - caddr = common.HexToAddress(env["currentCoinbase"]) ) var to *common.Address @@ -235,16 +234,15 @@ func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, vm.Log vm.Precompiled = vm.PrecompiledContracts() snapshot := statedb.Copy() - coinbase := statedb.GetOrNewStateObject(caddr) - coinbase.SetGasLimit(common.Big(env["currentGasLimit"])) + gaspool := new(core.GasPool).AddGas(common.Big(env["currentGasLimit"])) key, _ := hex.DecodeString(tx["secretKey"]) addr := crypto.PubkeyToAddress(crypto.ToECDSA(key).PublicKey) message := NewMessage(addr, to, data, value, gas, price, nonce) vmenv := NewEnvFromMap(statedb, env, tx) vmenv.origin = addr - ret, _, err := core.ApplyMessage(vmenv, message, coinbase) - if core.IsNonceErr(err) || core.IsInvalidTxErr(err) || state.IsGasLimitErr(err) { + ret, _, err := core.ApplyMessage(vmenv, message, gaspool) + if core.IsNonceErr(err) || core.IsInvalidTxErr(err) || core.IsGasLimitErr(err) { statedb.Set(snapshot) } statedb.Commit() diff --git a/xeth/xeth.go b/xeth/xeth.go index baa8314ad..1cb072f0d 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -850,7 +850,6 @@ func (self *XEth) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, dataStr st } from.SetBalance(common.MaxBig) - from.SetGasLimit(common.MaxBig) msg := callmsg{ from: from, @@ -874,8 +873,8 @@ func (self *XEth) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, dataStr st header := self.CurrentBlock().Header() vmenv := core.NewEnv(statedb, self.backend.BlockChain(), msg, header) - - res, gas, err := core.ApplyMessage(vmenv, msg, from) + gp := new(core.GasPool).AddGas(common.MaxBig) + res, gas, err := core.ApplyMessage(vmenv, msg, gp) return common.ToHex(res), gas.String(), err } -- cgit v1.2.3 From 92f9a3e5fa29e0f05c81b348b87cab4f7a94f0c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 1 Sep 2015 17:35:14 +0300 Subject: cmd, eth: support switching client modes of operation --- cmd/geth/main.go | 1 + cmd/utils/flags.go | 24 +++++++++++++++++++++--- eth/backend.go | 6 ++++-- eth/handler.go | 40 ++++++++++++++++++++++------------------ eth/handler_test.go | 44 +++++++++++++++++++++++++++++++++++++------- eth/helper_test.go | 19 +++++++++++++++++-- eth/protocol.go | 17 +++++++++++++++++ eth/protocol_test.go | 6 +++--- 8 files changed, 122 insertions(+), 35 deletions(-) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 3422d9500..ca86fb26f 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -304,6 +304,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso utils.DataDirFlag, utils.BlockchainVersionFlag, utils.OlympicFlag, + utils.EthModeFlag, utils.EthVersionFlag, utils.CacheFlag, utils.JSpathFlag, diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index ca9dd76fd..792fcb41d 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -28,6 +28,7 @@ import ( "path/filepath" "runtime" "strconv" + "strings" "github.com/codegangsta/cli" "github.com/ethereum/ethash" @@ -148,9 +149,14 @@ var ( Name: "olympic", Usage: "Use olympic style protocol", } + EthModeFlag = cli.StringFlag{ + Name: "mode", + Value: "archive", + Usage: "Client mode of operation (archive, full, light)", + } EthVersionFlag = cli.IntFlag{ Name: "eth", - Value: 62, + Value: 63, Usage: "Highest eth protocol to advertise (temporary, dev option)", } @@ -425,12 +431,25 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config { if err != nil { glog.V(logger.Error).Infoln("WARNING: No etherbase set and no accounts found as default") } - + // Resolve the mode of opeation from the string flag + var clientMode eth.Mode + switch strings.ToLower(ctx.GlobalString(EthModeFlag.Name)) { + case "archive": + clientMode = eth.ArchiveMode + case "full": + clientMode = eth.FullMode + case "light": + clientMode = eth.LightMode + default: + glog.Fatalf("Unknown node type requested: %s", ctx.GlobalString(EthModeFlag.Name)) + } + // Assemble the entire eth configuration and return cfg := ð.Config{ Name: common.MakeName(clientID, version), DataDir: MustDataDir(ctx), GenesisNonce: ctx.GlobalInt(GenesisNonceFlag.Name), GenesisFile: ctx.GlobalString(GenesisFileFlag.Name), + Mode: clientMode, BlockChainVersion: ctx.GlobalInt(BlockchainVersionFlag.Name), DatabaseCache: ctx.GlobalInt(CacheFlag.Name), SkipBcVersionCheck: false, @@ -499,7 +518,6 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config { glog.V(logger.Info).Infoln("dev mode enabled") } - return cfg } diff --git a/eth/backend.go b/eth/backend.go index 9ec3c1440..04dd3767a 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -89,6 +89,7 @@ type Config struct { GenesisFile string GenesisBlock *types.Block // used by block tests Olympic bool + Mode Mode BlockChainVersion int SkipBcVersionCheck bool // e.g. blockchain export @@ -398,8 +399,9 @@ func New(config *Config) (*Ethereum, error) { eth.blockProcessor = core.NewBlockProcessor(chainDb, eth.pow, eth.blockchain, eth.EventMux()) eth.blockchain.SetProcessor(eth.blockProcessor) - eth.protocolManager = NewProtocolManager(config.NetworkId, eth.eventMux, eth.txPool, eth.pow, eth.blockchain, chainDb) - + if eth.protocolManager, err = NewProtocolManager(config.Mode, config.NetworkId, eth.eventMux, eth.txPool, eth.pow, eth.blockchain, chainDb); err != nil { + return nil, err + } eth.miner = miner.New(eth, eth.EventMux(), eth.pow) eth.miner.SetGasPrice(config.GasPrice) eth.miner.SetExtra(config.ExtraData) diff --git a/eth/handler.go b/eth/handler.go index 3fc909672..5716350af 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -17,6 +17,7 @@ package eth import ( + "errors" "fmt" "math" "math/big" @@ -42,6 +43,10 @@ const ( estHeaderRlpSize = 500 // Approximate size of an RLP encoded block header ) +// errIncompatibleConfig is returned if the requested protocols and configs are +// not compatible (low protocol version restrictions and high requirements). +var errIncompatibleConfig = errors.New("incompatible configuration") + func errResp(code errCode, format string, v ...interface{}) error { return fmt.Errorf("%v - %v", code, fmt.Sprintf(format, v...)) } @@ -49,17 +54,8 @@ func errResp(code errCode, format string, v ...interface{}) error { type hashFetcherFn func(common.Hash) error type blockFetcherFn func([]common.Hash) error -// extProt is an interface which is passed around so we can expose GetHashes and GetBlock without exposing it to the rest of the protocol -// extProt is passed around to peers which require to GetHashes and GetBlocks -type extProt struct { - getHashes hashFetcherFn - getBlocks blockFetcherFn -} - -func (ep extProt) GetHashes(hash common.Hash) error { return ep.getHashes(hash) } -func (ep extProt) GetBlock(hashes []common.Hash) error { return ep.getBlocks(hashes) } - type ProtocolManager struct { + mode Mode txpool txPool blockchain *core.BlockChain chaindb ethdb.Database @@ -87,9 +83,10 @@ type ProtocolManager struct { // NewProtocolManager returns a new ethereum sub protocol manager. The Ethereum sub protocol manages peers capable // with the ethereum network. -func NewProtocolManager(networkId int, mux *event.TypeMux, txpool txPool, pow pow.PoW, blockchain *core.BlockChain, chaindb ethdb.Database) *ProtocolManager { +func NewProtocolManager(mode Mode, networkId int, mux *event.TypeMux, txpool txPool, pow pow.PoW, blockchain *core.BlockChain, chaindb ethdb.Database) (*ProtocolManager, error) { // Create the protocol manager with the base fields manager := &ProtocolManager{ + mode: mode, eventMux: mux, txpool: txpool, blockchain: blockchain, @@ -100,11 +97,15 @@ func NewProtocolManager(networkId int, mux *event.TypeMux, txpool txPool, pow po quitSync: make(chan struct{}), } // Initiate a sub-protocol for every implemented version we can handle - manager.SubProtocols = make([]p2p.Protocol, len(ProtocolVersions)) - for i := 0; i < len(manager.SubProtocols); i++ { - version := ProtocolVersions[i] - - manager.SubProtocols[i] = p2p.Protocol{ + manager.SubProtocols = make([]p2p.Protocol, 0, len(ProtocolVersions)) + for i, version := range ProtocolVersions { + // Skip protocol version if incompatible with the mode of operation + if minimumProtocolVersion[mode] > version { + continue + } + // Compatible, initialize the sub-protocol + version := version // Closure for the run + manager.SubProtocols = append(manager.SubProtocols, p2p.Protocol{ Name: "eth", Version: version, Length: ProtocolLengths[i], @@ -113,7 +114,10 @@ func NewProtocolManager(networkId int, mux *event.TypeMux, txpool txPool, pow po manager.newPeerCh <- peer return manager.handle(peer) }, - } + }) + } + if len(manager.SubProtocols) == 0 { + return nil, errIncompatibleConfig } // Construct the different synchronisation mechanisms manager.downloader = downloader.New(manager.eventMux, manager.blockchain.HasBlock, manager.blockchain.GetBlock, manager.blockchain.CurrentBlock, manager.blockchain.GetTd, manager.blockchain.InsertChain, manager.removePeer) @@ -126,7 +130,7 @@ func NewProtocolManager(networkId int, mux *event.TypeMux, txpool txPool, pow po } manager.fetcher = fetcher.New(manager.blockchain.GetBlock, validator, manager.BroadcastBlock, heighter, manager.blockchain.InsertChain, manager.removePeer) - return manager + return manager, nil } func (pm *ProtocolManager) removePeer(id string) { diff --git a/eth/handler_test.go b/eth/handler_test.go index dde2ecbd5..8ab5c1aad 100644 --- a/eth/handler_test.go +++ b/eth/handler_test.go @@ -17,12 +17,42 @@ import ( "github.com/ethereum/go-ethereum/params" ) +// Tests that protocol versions and modes of operations are matched up properly. +func TestProtocolCompatibility(t *testing.T) { + // Define the compatibility chart + tests := []struct { + version uint + mode Mode + compatible bool + }{ + {61, ArchiveMode, true}, {62, ArchiveMode, true}, {63, ArchiveMode, true}, {64, ArchiveMode, true}, + {61, FullMode, false}, {62, FullMode, false}, {63, FullMode, true}, {64, FullMode, true}, + {61, LightMode, false}, {62, LightMode, false}, {63, LightMode, false}, {64, LightMode, true}, + } + // Make sure anything we screw up is restored + backup := ProtocolVersions + defer func() { ProtocolVersions = backup }() + + // Try all available compatibility configs and check for errors + for i, tt := range tests { + ProtocolVersions = []uint{tt.version} + + pm, err := newTestProtocolManager(tt.mode, 0, nil, nil) + if pm != nil { + defer pm.Stop() + } + if (err == nil && !tt.compatible) || (err != nil && tt.compatible) { + t.Errorf("test %d: compatibility mismatch: have error %v, want compatibility %v", i, err, tt.compatible) + } + } +} + // Tests that hashes can be retrieved from a remote chain by hashes in reverse // order. func TestGetBlockHashes61(t *testing.T) { testGetBlockHashes(t, 61) } func testGetBlockHashes(t *testing.T, protocol int) { - pm := newTestProtocolManager(downloader.MaxHashFetch+15, nil, nil) + pm := newTestProtocolManagerMust(t, ArchiveMode, downloader.MaxHashFetch+15, nil, nil) peer, _ := newTestPeer("peer", protocol, pm, true) defer peer.close() @@ -65,7 +95,7 @@ func testGetBlockHashes(t *testing.T, protocol int) { func TestGetBlockHashesFromNumber61(t *testing.T) { testGetBlockHashesFromNumber(t, 61) } func testGetBlockHashesFromNumber(t *testing.T, protocol int) { - pm := newTestProtocolManager(downloader.MaxHashFetch+15, nil, nil) + pm := newTestProtocolManagerMust(t, ArchiveMode, downloader.MaxHashFetch+15, nil, nil) peer, _ := newTestPeer("peer", protocol, pm, true) defer peer.close() @@ -105,7 +135,7 @@ func testGetBlockHashesFromNumber(t *testing.T, protocol int) { func TestGetBlocks61(t *testing.T) { testGetBlocks(t, 61) } func testGetBlocks(t *testing.T, protocol int) { - pm := newTestProtocolManager(downloader.MaxHashFetch+15, nil, nil) + pm := newTestProtocolManagerMust(t, ArchiveMode, downloader.MaxHashFetch+15, nil, nil) peer, _ := newTestPeer("peer", protocol, pm, true) defer peer.close() @@ -177,7 +207,7 @@ func TestGetBlockHeaders63(t *testing.T) { testGetBlockHeaders(t, 63) } func TestGetBlockHeaders64(t *testing.T) { testGetBlockHeaders(t, 64) } func testGetBlockHeaders(t *testing.T, protocol int) { - pm := newTestProtocolManager(downloader.MaxHashFetch+15, nil, nil) + pm := newTestProtocolManagerMust(t, ArchiveMode, downloader.MaxHashFetch+15, nil, nil) peer, _ := newTestPeer("peer", protocol, pm, true) defer peer.close() @@ -303,7 +333,7 @@ func TestGetBlockBodies63(t *testing.T) { testGetBlockBodies(t, 63) } func TestGetBlockBodies64(t *testing.T) { testGetBlockBodies(t, 64) } func testGetBlockBodies(t *testing.T, protocol int) { - pm := newTestProtocolManager(downloader.MaxBlockFetch+15, nil, nil) + pm := newTestProtocolManagerMust(t, ArchiveMode, downloader.MaxBlockFetch+15, nil, nil) peer, _ := newTestPeer("peer", protocol, pm, true) defer peer.close() @@ -410,7 +440,7 @@ func testGetNodeData(t *testing.T, protocol int) { } } // Assemble the test environment - pm := newTestProtocolManager(4, generator, nil) + pm := newTestProtocolManagerMust(t, ArchiveMode, 4, generator, nil) peer, _ := newTestPeer("peer", protocol, pm, true) defer peer.close() @@ -500,7 +530,7 @@ func testGetReceipt(t *testing.T, protocol int) { } } // Assemble the test environment - pm := newTestProtocolManager(4, generator, nil) + pm := newTestProtocolManagerMust(t, ArchiveMode, 4, generator, nil) peer, _ := newTestPeer("peer", protocol, pm, true) defer peer.close() diff --git a/eth/helper_test.go b/eth/helper_test.go index 9314884ef..bd65b49f8 100644 --- a/eth/helper_test.go +++ b/eth/helper_test.go @@ -28,7 +28,7 @@ var ( // newTestProtocolManager creates a new protocol manager for testing purposes, // with the given number of blocks already known, and potential notification // channels for different events. -func newTestProtocolManager(blocks int, generator func(int, *core.BlockGen), newtx chan<- []*types.Transaction) *ProtocolManager { +func newTestProtocolManager(mode Mode, blocks int, generator func(int, *core.BlockGen), newtx chan<- []*types.Transaction) (*ProtocolManager, error) { var ( evmux = new(event.TypeMux) pow = new(core.FakePow) @@ -42,8 +42,23 @@ func newTestProtocolManager(blocks int, generator func(int, *core.BlockGen), new if _, err := blockchain.InsertChain(chain); err != nil { panic(err) } - pm := NewProtocolManager(NetworkId, evmux, &testTxPool{added: newtx}, pow, blockchain, db) + pm, err := NewProtocolManager(mode, NetworkId, evmux, &testTxPool{added: newtx}, pow, blockchain, db) + if err != nil { + return nil, err + } pm.Start() + return pm, nil +} + +// newTestProtocolManagerMust creates a new protocol manager for testing purposes, +// with the given number of blocks already known, and potential notification +// channels for different events. In case of an error, the constructor force- +// fails the test. +func newTestProtocolManagerMust(t *testing.T, mode Mode, blocks int, generator func(int, *core.BlockGen), newtx chan<- []*types.Transaction) *ProtocolManager { + pm, err := newTestProtocolManager(mode, blocks, generator, newtx) + if err != nil { + t.Fatalf("Failed to create protocol manager: %v", err) + } return pm } diff --git a/eth/protocol.go b/eth/protocol.go index 49f096a3b..0d2b5128d 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -26,6 +26,15 @@ import ( "github.com/ethereum/go-ethereum/rlp" ) +// Mode represents the mode of operation of the eth client. +type Mode int + +const ( + ArchiveMode Mode = iota // Maintain the entire blockchain history + FullMode // Maintain only a recent view of the blockchain + LightMode // Don't maintain any history, rather fetch on demand +) + // Constants to match up protocol versions and messages const ( eth61 = 61 @@ -34,6 +43,14 @@ const ( eth64 = 64 ) +// minimumProtocolVersion is the minimum version of the protocol eth must run to +// support the desired mode of operation. +var minimumProtocolVersion = map[Mode]uint{ + ArchiveMode: eth61, + FullMode: eth63, + LightMode: eth64, +} + // Supported versions of the eth protocol (first is primary). var ProtocolVersions = []uint{eth64, eth63, eth62, eth61} diff --git a/eth/protocol_test.go b/eth/protocol_test.go index 523e6c1eb..bac519ae3 100644 --- a/eth/protocol_test.go +++ b/eth/protocol_test.go @@ -44,7 +44,7 @@ func TestStatusMsgErrors63(t *testing.T) { testStatusMsgErrors(t, 63) } func TestStatusMsgErrors64(t *testing.T) { testStatusMsgErrors(t, 64) } func testStatusMsgErrors(t *testing.T, protocol int) { - pm := newTestProtocolManager(0, nil, nil) + pm := newTestProtocolManagerMust(t, ArchiveMode, 0, nil, nil) td, currentBlock, genesis := pm.blockchain.Status() defer pm.Stop() @@ -99,7 +99,7 @@ func TestRecvTransactions64(t *testing.T) { testRecvTransactions(t, 64) } func testRecvTransactions(t *testing.T, protocol int) { txAdded := make(chan []*types.Transaction) - pm := newTestProtocolManager(0, nil, txAdded) + pm := newTestProtocolManagerMust(t, ArchiveMode, 0, nil, txAdded) p, _ := newTestPeer("peer", protocol, pm, true) defer pm.Stop() defer p.close() @@ -127,7 +127,7 @@ func TestSendTransactions63(t *testing.T) { testSendTransactions(t, 63) } func TestSendTransactions64(t *testing.T) { testSendTransactions(t, 64) } func testSendTransactions(t *testing.T, protocol int) { - pm := newTestProtocolManager(0, nil, nil) + pm := newTestProtocolManagerMust(t, ArchiveMode, 0, nil, nil) defer pm.Stop() // Fill the pool with big transactions. -- cgit v1.2.3 From c33cc382b3561ca91871111933f81653bfd8532f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 21 Sep 2015 15:36:29 +0300 Subject: core: support inserting pure header chains --- core/block_processor.go | 15 +- core/blockchain.go | 298 ++++++++++++++++++------ core/blockchain_test.go | 587 +++++++++++++++++++++++++++++------------------- core/chain_makers.go | 50 +++-- core/types/block.go | 16 +- eth/backend.go | 2 +- eth/handler.go | 18 +- eth/sync.go | 3 +- rpc/api/debug.go | 8 +- 9 files changed, 651 insertions(+), 346 deletions(-) diff --git a/core/block_processor.go b/core/block_processor.go index a07d79bcf..5dadd2a27 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -369,13 +369,26 @@ func (sm *BlockProcessor) GetLogs(block *types.Block) (logs vm.Logs, err error) return logs, nil } +// ValidateHeader verifies the validity of a header, relying on the database and +// POW behind the block processor. +func (sm *BlockProcessor) ValidateHeader(header *types.Header, checkPow, uncle bool) error { + // Short circuit if the header's already known or its parent missing + if sm.bc.HasHeader(header.Hash()) { + return nil + } + if parent := sm.bc.GetHeader(header.ParentHash); parent == nil { + return ParentError(header.ParentHash) + } else { + return ValidateHeader(sm.Pow, header, parent, checkPow, uncle) + } +} + // See YP section 4.3.4. "Block Header Validity" // Validates a header. Returns an error if the header is invalid. func ValidateHeader(pow pow.PoW, header *types.Header, parent *types.Header, checkPow, uncle bool) error { if big.NewInt(int64(len(header.Extra))).Cmp(params.MaximumExtraDataSize) == 1 { return fmt.Errorf("Header extra data too long (%d)", len(header.Extra)) } - if uncle { if header.Time.Cmp(common.MaxBig) == 1 { return BlockTSTooBigErr diff --git a/core/blockchain.go b/core/blockchain.go index 7bfe13a11..48c935eac 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -67,9 +67,9 @@ type BlockChain struct { chainmu sync.RWMutex tsmu sync.RWMutex - td *big.Int - currentBlock *types.Block - currentGasLimit *big.Int + checkpoint int // checkpoint counts towards the new checkpoint + currentHeader *types.Header // Current head of the header chain (may be above the block chain!) + currentBlock *types.Block // Current head of the block chain headerCache *lru.Cache // Cache for the most recent block headers bodyCache *lru.Cache // Cache for the most recent block bodies @@ -120,20 +120,15 @@ func NewBlockChain(chainDb ethdb.Database, pow pow.PoW, mux *event.TypeMux) (*Bl } glog.V(logger.Info).Infoln("WARNING: Wrote default ethereum genesis block") } - if err := bc.setLastState(); err != nil { + if err := bc.loadLastState(); err != nil { return nil, err } // Check the current state of the block hashes and make sure that we do not have any of the bad blocks in our chain for hash, _ := range BadHashes { - if block := bc.GetBlock(hash); block != nil { - glog.V(logger.Error).Infof("Found bad hash. Reorganising chain to state %x\n", block.ParentHash().Bytes()[:4]) - block = bc.GetBlock(block.ParentHash()) - if block == nil { - glog.Fatal("Unable to complete. Parent block not found. Corrupted DB?") - } - bc.SetHead(block) - - glog.V(logger.Error).Infoln("Chain reorg was successfull. Resuming normal operation") + if header := bc.GetHeader(hash); header != nil { + glog.V(logger.Error).Infof("Found bad hash, rewinding chain to block #%d [%x…]", header.Number, header.ParentHash[:4]) + bc.SetHead(header.Number.Uint64() - 1) + glog.V(logger.Error).Infoln("Chain rewind was successful, resuming normal operation") } } // Take ownership of this particular state @@ -141,46 +136,104 @@ func NewBlockChain(chainDb ethdb.Database, pow pow.PoW, mux *event.TypeMux) (*Bl return bc, nil } -func (bc *BlockChain) SetHead(head *types.Block) { +// loadLastState loads the last known chain state from the database. This method +// assumes that the chain manager mutex is held. +func (self *BlockChain) loadLastState() error { + // Restore the last known head block + head := GetHeadBlockHash(self.chainDb) + if head == (common.Hash{}) { + // Corrupt or empty database, init from scratch + self.Reset() + } else { + if block := self.GetBlock(head); block != nil { + // Block found, set as the current head + self.currentBlock = block + } else { + // Corrupt or empty database, init from scratch + self.Reset() + } + } + // Restore the last known head header + self.currentHeader = self.currentBlock.Header() + if head := GetHeadHeaderHash(self.chainDb); head != (common.Hash{}) { + if header := self.GetHeader(head); header != nil { + self.currentHeader = header + } + } + // Issue a status log and return + headerTd := self.GetTd(self.currentHeader.Hash()) + blockTd := self.GetTd(self.currentBlock.Hash()) + + glog.V(logger.Info).Infof("Last header: #%d [%x…] TD=%v", self.currentHeader.Number, self.currentHeader.Hash(), headerTd) + glog.V(logger.Info).Infof("Last block: #%d [%x…] TD=%v", self.currentBlock.Number(), self.currentBlock.Hash(), blockTd) + + return nil +} + +// SetHead rewind the local chain to a new head entity. In the case of headers, +// everything above the new head will be deleted and the new one set. In the case +// of blocks though, the head may be further rewound if block bodies are missing +// (non-archive nodes after a fast sync). +func (bc *BlockChain) SetHead(head uint64) { bc.mu.Lock() defer bc.mu.Unlock() - for block := bc.currentBlock; block != nil && block.Hash() != head.Hash(); block = bc.GetBlock(block.ParentHash()) { - DeleteBlock(bc.chainDb, block.Hash()) + // Delete everything from the current header head (is above block head) + for i := bc.currentHeader.Number.Uint64(); i > head; i-- { + if hash := GetCanonicalHash(bc.chainDb, i); hash != (common.Hash{}) { + DeleteCanonicalHash(bc.chainDb, i) + DeleteHeader(bc.chainDb, hash) + DeleteBody(bc.chainDb, hash) + DeleteTd(bc.chainDb, hash) + } + } + bc.currentHeader = GetHeader(bc.chainDb, GetCanonicalHash(bc.chainDb, head)) + + // Rewind the block chain until a whole block is found + for bc.GetBlockByNumber(head) == nil { + head-- } + bc.currentBlock = bc.GetBlockByNumber(head) + + // Clear out any stale content from the caches bc.headerCache.Purge() bc.bodyCache.Purge() bc.bodyRLPCache.Purge() bc.blockCache.Purge() bc.futureBlocks.Purge() - bc.currentBlock = head - bc.setTotalDifficulty(bc.GetTd(head.Hash())) - bc.insert(head) - bc.setLastState() + // Update all computed fields to the new head + bc.insert(bc.currentBlock) + bc.loadLastState() } -func (self *BlockChain) Td() *big.Int { +func (self *BlockChain) GasLimit() *big.Int { self.mu.RLock() defer self.mu.RUnlock() - return new(big.Int).Set(self.td) + return self.currentBlock.GasLimit() } -func (self *BlockChain) GasLimit() *big.Int { +func (self *BlockChain) LastBlockHash() common.Hash { self.mu.RLock() defer self.mu.RUnlock() - return self.currentBlock.GasLimit() + return self.currentBlock.Hash() } -func (self *BlockChain) LastBlockHash() common.Hash { +// CurrentHeader retrieves the current head header of the canonical chain. The +// header is retrieved from the chain manager's internal cache, involving no +// database operations. +func (self *BlockChain) CurrentHeader() *types.Header { self.mu.RLock() defer self.mu.RUnlock() - return self.currentBlock.Hash() + return self.currentHeader } +// CurrentBlock retrieves the current head block of the canonical chain. The +// block is retrieved from the chain manager's internal cache, involving no +// database operations. func (self *BlockChain) CurrentBlock() *types.Block { self.mu.RLock() defer self.mu.RUnlock() @@ -192,7 +245,7 @@ func (self *BlockChain) Status() (td *big.Int, currentBlock common.Hash, genesis self.mu.RLock() defer self.mu.RUnlock() - return new(big.Int).Set(self.td), self.currentBlock.Hash(), self.genesisBlock.Hash() + return self.GetTd(self.currentBlock.Hash()), self.currentBlock.Hash(), self.genesisBlock.Hash() } func (self *BlockChain) SetProcessor(proc types.BlockProcessor) { @@ -203,26 +256,6 @@ func (self *BlockChain) State() (*state.StateDB, error) { return state.New(self.CurrentBlock().Root(), self.chainDb) } -func (bc *BlockChain) setLastState() error { - head := GetHeadBlockHash(bc.chainDb) - if head != (common.Hash{}) { - block := bc.GetBlock(head) - if block != nil { - bc.currentBlock = block - } - } else { - bc.Reset() - } - bc.td = bc.GetTd(bc.currentBlock.Hash()) - bc.currentGasLimit = CalcGasLimit(bc.currentBlock) - - if glog.V(logger.Info) { - glog.Infof("Last block (#%v) %x TD=%v\n", bc.currentBlock.Number(), bc.currentBlock.Hash(), bc.td) - } - - return nil -} - // Reset purges the entire blockchain, restoring it to its genesis state. func (bc *BlockChain) Reset() { bc.ResetWithGenesisBlock(bc.genesisBlock) @@ -238,6 +271,9 @@ func (bc *BlockChain) ResetWithGenesisBlock(genesis *types.Block) { for block := bc.currentBlock; block != nil; block = bc.GetBlock(block.ParentHash()) { DeleteBlock(bc.chainDb, block.Hash()) } + for header := bc.currentHeader; header != nil; header = bc.GetHeader(header.ParentHash) { + DeleteBlock(bc.chainDb, header.Hash()) + } bc.headerCache.Purge() bc.bodyCache.Purge() bc.bodyRLPCache.Purge() @@ -254,7 +290,7 @@ func (bc *BlockChain) ResetWithGenesisBlock(genesis *types.Block) { bc.genesisBlock = genesis bc.insert(bc.genesisBlock) bc.currentBlock = bc.genesisBlock - bc.setTotalDifficulty(genesis.Difficulty()) + bc.currentHeader = bc.genesisBlock.Header() } // Export writes the active chain to the given writer. @@ -290,17 +326,26 @@ func (self *BlockChain) ExportN(w io.Writer, first uint64, last uint64) error { return nil } -// insert injects a block into the current chain block chain. Note, this function -// assumes that the `mu` mutex is held! +// insert injects a new head block into the current block chain. This method +// assumes that the block is indeed a true head. It will also reset the head +// header to this very same block to prevent the headers from diverging on a +// different header chain. +// +// Note, this function assumes that the `mu` mutex is held! func (bc *BlockChain) insert(block *types.Block) { // Add the block to the canonical chain number scheme and mark as the head if err := WriteCanonicalHash(bc.chainDb, block.Hash(), block.NumberU64()); err != nil { glog.Fatalf("failed to insert block number: %v", err) } if err := WriteHeadBlockHash(bc.chainDb, block.Hash()); err != nil { - glog.Fatalf("failed to insert block number: %v", err) + glog.Fatalf("failed to insert head block hash: %v", err) } + if err := WriteHeadHeaderHash(bc.chainDb, block.Hash()); err != nil { + glog.Fatalf("failed to insert head header hash: %v", err) + } + // Update the internal state with the head block bc.currentBlock = block + bc.currentHeader = block.Header() } // Accessors @@ -456,19 +501,15 @@ func (self *BlockChain) GetBlocksFromHash(hash common.Hash, n int) (blocks []*ty return } -func (self *BlockChain) GetUnclesInChain(block *types.Block, length int) (uncles []*types.Header) { +// GetUnclesInChain retrieves all the uncles from a given block backwards until +// a specific distance is reached. +func (self *BlockChain) GetUnclesInChain(block *types.Block, length int) []*types.Header { + uncles := []*types.Header{} for i := 0; block != nil && i < length; i++ { uncles = append(uncles, block.Uncles()...) block = self.GetBlock(block.ParentHash()) } - - return -} - -// setTotalDifficulty updates the TD of the chain manager. Note, this function -// assumes that the `mu` mutex is held! -func (bc *BlockChain) setTotalDifficulty(td *big.Int) { - bc.td = new(big.Int).Set(td) + return uncles } func (bc *BlockChain) Stop() { @@ -504,6 +545,135 @@ const ( SideStatTy ) +// writeHeader writes a header into the local chain, given that its parent is +// already known. If the total difficulty of the newly inserted header becomes +// greater than the old known TD, the canonical chain is re-routed. +// +// Note: This method is not concurrent-safe with inserting blocks simultaneously +// into the chain, as side effects caused by reorganizations cannot be emulated +// without the real blocks. Hence, writing headers directly should only be done +// in two scenarios: pure-header mode of operation (light clients), or properly +// separated header/block phases (non-archive clients). +func (self *BlockChain) writeHeader(header *types.Header) error { + self.wg.Add(1) + defer self.wg.Done() + + // Calculate the total difficulty of the header + ptd := self.GetTd(header.ParentHash) + if ptd == nil { + return ParentError(header.ParentHash) + } + td := new(big.Int).Add(header.Difficulty, ptd) + + // Make sure no inconsistent state is leaked during insertion + self.mu.Lock() + defer self.mu.Unlock() + + // If the total difficulty is higher than our known, add it to the canonical chain + if td.Cmp(self.GetTd(self.currentHeader.Hash())) > 0 { + // Delete any canonical number assignments above the new head + for i := header.Number.Uint64() + 1; GetCanonicalHash(self.chainDb, i) != (common.Hash{}); i++ { + DeleteCanonicalHash(self.chainDb, i) + } + // Overwrite any stale canonical number assignments + head := self.GetHeader(header.ParentHash) + for GetCanonicalHash(self.chainDb, head.Number.Uint64()) != head.Hash() { + WriteCanonicalHash(self.chainDb, head.Hash(), head.Number.Uint64()) + head = self.GetHeader(head.ParentHash) + } + // Extend the canonical chain with the new header + if err := WriteCanonicalHash(self.chainDb, header.Hash(), header.Number.Uint64()); err != nil { + glog.Fatalf("failed to insert header number: %v", err) + } + if err := WriteHeadHeaderHash(self.chainDb, header.Hash()); err != nil { + glog.Fatalf("failed to insert head header hash: %v", err) + } + self.currentHeader = types.CopyHeader(header) + } + // Irrelevant of the canonical status, write the header itself to the database + if err := WriteTd(self.chainDb, header.Hash(), td); err != nil { + glog.Fatalf("failed to write header total difficulty: %v", err) + } + if err := WriteHeader(self.chainDb, header); err != nil { + glog.Fatalf("filed to write header contents: %v", err) + } + return nil +} + +// InsertHeaderChain will attempt to insert the given header chain in to the +// local chain, possibly creating a dork. If an error is returned, it will +// return the index number of the failing header as well an error describing +// what went wrong. +// +// The verify parameter can be used to fine tune whether nonce verification +// should be done or not. The reason behind the optional check is because some +// of the header retrieval mechanisms already need to verfy nonces, as well as +// because nonces can be verified sparsely, not needing to check each. +func (self *BlockChain) InsertHeaderChain(chain []*types.Header, verify bool) (int, error) { + self.wg.Add(1) + defer self.wg.Done() + + // Make sure only one thread manipulates the chain at once + self.chainmu.Lock() + defer self.chainmu.Unlock() + + // Collect some import statistics to report on + stats := struct{ processed, ignored int }{} + start := time.Now() + + // Start the parallel nonce verifier, with a fake nonce if not requested + verifier := self.pow + if !verify { + verifier = FakePow{} + } + nonceAbort, nonceResults := verifyNoncesFromHeaders(verifier, chain) + defer close(nonceAbort) + + // Iterate over the headers, inserting any new ones + complete := make([]bool, len(chain)) + for i, header := range chain { + // Short circuit insertion if shutting down + if atomic.LoadInt32(&self.procInterrupt) == 1 { + glog.V(logger.Debug).Infoln("Premature abort during header chain processing") + break + } + hash := header.Hash() + + // Accumulate verification results until the next header is verified + for !complete[i] { + if res := <-nonceResults; res.valid { + complete[res.index] = true + } else { + header := chain[res.index] + return res.index, &BlockNonceErr{ + Hash: header.Hash(), + Number: new(big.Int).Set(header.Number), + Nonce: header.Nonce.Uint64(), + } + } + } + if BadHashes[hash] { + glog.V(logger.Error).Infof("Bad header %d [%x…], known bad hash", header.Number, hash) + return i, BadHashError(hash) + } + // Write the header to the chain and get the status + if self.HasHeader(hash) { + stats.ignored++ + continue + } + if err := self.writeHeader(header); err != nil { + return i, err + } + stats.processed++ + } + // Report some public statistics so the user has a clue what's going on + first, last := chain[0], chain[len(chain)-1] + glog.V(logger.Info).Infof("imported %d header(s) (%d ignored) in %v. #%v [%x… / %x…]", stats.processed, stats.ignored, + time.Since(start), last.Number, first.Hash().Bytes()[:4], last.Hash().Bytes()[:4]) + + return 0, nil +} + // WriteBlock writes the block to the chain. func (self *BlockChain) WriteBlock(block *types.Block) (status writeStatus, err error) { self.wg.Add(1) @@ -522,7 +692,7 @@ func (self *BlockChain) WriteBlock(block *types.Block) (status writeStatus, err // Compare the TD of the last known block in the canonical chain to make sure it's greater. // At this point it's possible that a different chain (fork) becomes the new canonical chain. - if td.Cmp(self.Td()) > 0 { + if td.Cmp(self.GetTd(self.currentBlock.Hash())) > 0 { // chain fork if block.ParentHash() != cblock.Hash() { // during split we merge two different chains and create the new canonical chain @@ -534,7 +704,6 @@ func (self *BlockChain) WriteBlock(block *types.Block) (status writeStatus, err status = CanonStatTy self.mu.Lock() - self.setTotalDifficulty(td) self.insert(block) self.mu.Unlock() } else { @@ -580,7 +749,7 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) { txcount := 0 for i, block := range chain { if atomic.LoadInt32(&self.procInterrupt) == 1 { - glog.V(logger.Debug).Infoln("Premature abort during chain processing") + glog.V(logger.Debug).Infoln("Premature abort during block chain processing") break } @@ -788,8 +957,7 @@ func (self *BlockChain) postChainEvents(events []interface{}) { if event, ok := event.(ChainEvent); ok { // We need some control over the mining operation. Acquiring locks and waiting for the miner to create new block takes too long // and in most cases isn't even necessary. - if self.currentBlock.Hash() == event.Hash { - self.currentGasLimit = CalcGasLimit(event.Block) + if self.LastBlockHash() == event.Hash { self.eventMux.Post(ChainHeadEvent{event.Block}) } } diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 13971ccba..4d0f13ef1 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -64,44 +64,58 @@ func theBlockChain(db ethdb.Database, t *testing.T) *BlockChain { } // Test fork of length N starting from block i -func testFork(t *testing.T, bman *BlockProcessor, i, N int, f func(td1, td2 *big.Int)) { - // switch databases to process the new chain - db, err := ethdb.NewMemDatabase() - if err != nil { - t.Fatal("Failed to create db:", err) - } - // copy old chain up to i into new db with deterministic canonical - bman2, err := newCanonical(i, db) +func testFork(t *testing.T, processor *BlockProcessor, i, n int, full bool, comparator func(td1, td2 *big.Int)) { + // Copy old chain up to #i into a new db + db, processor2, err := newCanonical(i, full) if err != nil { t.Fatal("could not make new canonical in testFork", err) } - // assert the bmans have the same block at i - bi1 := bman.bc.GetBlockByNumber(uint64(i)).Hash() - bi2 := bman2.bc.GetBlockByNumber(uint64(i)).Hash() - if bi1 != bi2 { - fmt.Printf("%+v\n%+v\n\n", bi1, bi2) - t.Fatal("chains do not have the same hash at height", i) + // Assert the chains have the same header/block at #i + var hash1, hash2 common.Hash + if full { + hash1 = processor.bc.GetBlockByNumber(uint64(i)).Hash() + hash2 = processor2.bc.GetBlockByNumber(uint64(i)).Hash() + } else { + hash1 = processor.bc.GetHeaderByNumber(uint64(i)).Hash() + hash2 = processor2.bc.GetHeaderByNumber(uint64(i)).Hash() } - bman2.bc.SetProcessor(bman2) - - // extend the fork - parent := bman2.bc.CurrentBlock() - chainB := makeChain(parent, N, db, forkSeed) - _, err = bman2.bc.InsertChain(chainB) - if err != nil { - t.Fatal("Insert chain error for fork:", err) + if hash1 != hash2 { + t.Errorf("chain content mismatch at %d: have hash %v, want hash %v", i, hash2, hash1) } - - tdpre := bman.bc.Td() - // Test the fork's blocks on the original chain - td, err := testChain(chainB, bman) - if err != nil { - t.Fatal("expected chainB not to give errors:", err) + // Extend the newly created chain + var ( + blockChainB []*types.Block + headerChainB []*types.Header + ) + if full { + blockChainB = makeBlockChain(processor2.bc.CurrentBlock(), n, db, forkSeed) + if _, err := processor2.bc.InsertChain(blockChainB); err != nil { + t.Fatalf("failed to insert forking chain: %v", err) + } + } else { + headerChainB = makeHeaderChain(processor2.bc.CurrentHeader(), n, db, forkSeed) + if _, err := processor2.bc.InsertHeaderChain(headerChainB, true); err != nil { + t.Fatalf("failed to insert forking chain: %v", err) + } } - // Compare difficulties - f(tdpre, td) + // Sanity check that the forked chain can be imported into the original + var tdPre, tdPost *big.Int - // Loop over parents making sure reconstruction is done properly + if full { + tdPre = processor.bc.GetTd(processor.bc.CurrentBlock().Hash()) + if err := testBlockChainImport(blockChainB, processor); err != nil { + t.Fatalf("failed to import forked block chain: %v", err) + } + tdPost = processor.bc.GetTd(blockChainB[len(blockChainB)-1].Hash()) + } else { + tdPre = processor.bc.GetTd(processor.bc.CurrentHeader().Hash()) + if err := testHeaderChainImport(headerChainB, processor); err != nil { + t.Fatalf("failed to import forked header chain: %v", err) + } + tdPost = processor.bc.GetTd(headerChainB[len(headerChainB)-1].Hash()) + } + // Compare the total difficulties of the chains + comparator(tdPre, tdPost) } func printChain(bc *BlockChain) { @@ -111,22 +125,41 @@ func printChain(bc *BlockChain) { } } -// process blocks against a chain -func testChain(chainB types.Blocks, bman *BlockProcessor) (*big.Int, error) { - for _, block := range chainB { - _, _, err := bman.bc.processor.Process(block) - if err != nil { +// testBlockChainImport tries to process a chain of blocks, writing them into +// the database if successful. +func testBlockChainImport(chain []*types.Block, processor *BlockProcessor) error { + for _, block := range chain { + // Try and process the block + if _, _, err := processor.Process(block); err != nil { if IsKnownBlockErr(err) { continue } - return nil, err + return err } - bman.bc.mu.Lock() - WriteTd(bman.bc.chainDb, block.Hash(), new(big.Int).Add(block.Difficulty(), bman.bc.GetTd(block.ParentHash()))) - WriteBlock(bman.bc.chainDb, block) - bman.bc.mu.Unlock() + // Manually insert the block into the database, but don't reorganize (allows subsequent testing) + processor.bc.mu.Lock() + WriteTd(processor.chainDb, block.Hash(), new(big.Int).Add(block.Difficulty(), processor.bc.GetTd(block.ParentHash()))) + WriteBlock(processor.chainDb, block) + processor.bc.mu.Unlock() } - return bman.bc.GetTd(chainB[len(chainB)-1].Hash()), nil + return nil +} + +// testHeaderChainImport tries to process a chain of header, writing them into +// the database if successful. +func testHeaderChainImport(chain []*types.Header, processor *BlockProcessor) error { + for _, header := range chain { + // Try and validate the header + if err := processor.ValidateHeader(header, false, false); err != nil { + return err + } + // Manually insert the header into the database, but don't reorganize (allows subsequent testing) + processor.bc.mu.Lock() + WriteTd(processor.chainDb, header.Hash(), new(big.Int).Add(header.Difficulty, processor.bc.GetTd(header.ParentHash))) + WriteHeader(processor.chainDb, header) + processor.bc.mu.Unlock() + } + return nil } func loadChain(fn string, t *testing.T) (types.Blocks, error) { @@ -154,139 +187,147 @@ func insertChain(done chan bool, blockchain *BlockChain, chain types.Blocks, t * } func TestLastBlock(t *testing.T) { - db, err := ethdb.NewMemDatabase() - if err != nil { - t.Fatal("Failed to create db:", err) - } + db, _ := ethdb.NewMemDatabase() + bchain := theBlockChain(db, t) - block := makeChain(bchain.CurrentBlock(), 1, db, 0)[0] + block := makeBlockChain(bchain.CurrentBlock(), 1, db, 0)[0] bchain.insert(block) if block.Hash() != GetHeadBlockHash(db) { t.Errorf("Write/Get HeadBlockHash failed") } } -func TestExtendCanonical(t *testing.T) { - CanonicalLength := 5 - db, err := ethdb.NewMemDatabase() - if err != nil { - t.Fatal("Failed to create db:", err) - } - // make first chain starting from genesis - bman, err := newCanonical(CanonicalLength, db) +// Tests that given a starting canonical chain of a given size, it can be extended +// with various length chains. +func TestExtendCanonicalHeaders(t *testing.T) { testExtendCanonical(t, false) } +func TestExtendCanonicalBlocks(t *testing.T) { testExtendCanonical(t, true) } + +func testExtendCanonical(t *testing.T, full bool) { + length := 5 + + // Make first chain starting from genesis + _, processor, err := newCanonical(length, full) if err != nil { - t.Fatal("Could not make new canonical chain:", err) + t.Fatalf("failed to make new canonical chain: %v", err) } - f := func(td1, td2 *big.Int) { + // Define the difficulty comparator + better := func(td1, td2 *big.Int) { if td2.Cmp(td1) <= 0 { - t.Error("expected chainB to have higher difficulty. Got", td2, "expected more than", td1) + t.Errorf("total difficulty mismatch: have %v, expected more than %v", td2, td1) } } - // Start fork from current height (CanonicalLength) - testFork(t, bman, CanonicalLength, 1, f) - testFork(t, bman, CanonicalLength, 2, f) - testFork(t, bman, CanonicalLength, 5, f) - testFork(t, bman, CanonicalLength, 10, f) + // Start fork from current height + testFork(t, processor, length, 1, full, better) + testFork(t, processor, length, 2, full, better) + testFork(t, processor, length, 5, full, better) + testFork(t, processor, length, 10, full, better) } -func TestShorterFork(t *testing.T) { - db, err := ethdb.NewMemDatabase() - if err != nil { - t.Fatal("Failed to create db:", err) - } - // make first chain starting from genesis - bman, err := newCanonical(10, db) +// Tests that given a starting canonical chain of a given size, creating shorter +// forks do not take canonical ownership. +func TestShorterForkHeaders(t *testing.T) { testShorterFork(t, false) } +func TestShorterForkBlocks(t *testing.T) { testShorterFork(t, true) } + +func testShorterFork(t *testing.T, full bool) { + length := 10 + + // Make first chain starting from genesis + _, processor, err := newCanonical(length, full) if err != nil { - t.Fatal("Could not make new canonical chain:", err) + t.Fatalf("failed to make new canonical chain: %v", err) } - f := func(td1, td2 *big.Int) { + // Define the difficulty comparator + worse := func(td1, td2 *big.Int) { if td2.Cmp(td1) >= 0 { - t.Error("expected chainB to have lower difficulty. Got", td2, "expected less than", td1) + t.Errorf("total difficulty mismatch: have %v, expected less than %v", td2, td1) } } - // Sum of numbers must be less than 10 - // for this to be a shorter fork - testFork(t, bman, 0, 3, f) - testFork(t, bman, 0, 7, f) - testFork(t, bman, 1, 1, f) - testFork(t, bman, 1, 7, f) - testFork(t, bman, 5, 3, f) - testFork(t, bman, 5, 4, f) + // Sum of numbers must be less than `length` for this to be a shorter fork + testFork(t, processor, 0, 3, full, worse) + testFork(t, processor, 0, 7, full, worse) + testFork(t, processor, 1, 1, full, worse) + testFork(t, processor, 1, 7, full, worse) + testFork(t, processor, 5, 3, full, worse) + testFork(t, processor, 5, 4, full, worse) } -func TestLongerFork(t *testing.T) { - db, err := ethdb.NewMemDatabase() - if err != nil { - t.Fatal("Failed to create db:", err) - } - // make first chain starting from genesis - bman, err := newCanonical(10, db) +// Tests that given a starting canonical chain of a given size, creating longer +// forks do take canonical ownership. +func TestLongerForkHeaders(t *testing.T) { testLongerFork(t, false) } +func TestLongerForkBlocks(t *testing.T) { testLongerFork(t, true) } + +func testLongerFork(t *testing.T, full bool) { + length := 10 + + // Make first chain starting from genesis + _, processor, err := newCanonical(length, full) if err != nil { - t.Fatal("Could not make new canonical chain:", err) + t.Fatalf("failed to make new canonical chain: %v", err) } - f := func(td1, td2 *big.Int) { + // Define the difficulty comparator + better := func(td1, td2 *big.Int) { if td2.Cmp(td1) <= 0 { - t.Error("expected chainB to have higher difficulty. Got", td2, "expected more than", td1) + t.Errorf("total difficulty mismatch: have %v, expected more than %v", td2, td1) } } - // Sum of numbers must be greater than 10 - // for this to be a longer fork - testFork(t, bman, 0, 11, f) - testFork(t, bman, 0, 15, f) - testFork(t, bman, 1, 10, f) - testFork(t, bman, 1, 12, f) - testFork(t, bman, 5, 6, f) - testFork(t, bman, 5, 8, f) + // Sum of numbers must be greater than `length` for this to be a longer fork + testFork(t, processor, 0, 11, full, better) + testFork(t, processor, 0, 15, full, better) + testFork(t, processor, 1, 10, full, better) + testFork(t, processor, 1, 12, full, better) + testFork(t, processor, 5, 6, full, better) + testFork(t, processor, 5, 8, full, better) } -func TestEqualFork(t *testing.T) { - db, err := ethdb.NewMemDatabase() - if err != nil { - t.Fatal("Failed to create db:", err) - } - bman, err := newCanonical(10, db) +// Tests that given a starting canonical chain of a given size, creating equal +// forks do take canonical ownership. +func TestEqualForkHeaders(t *testing.T) { testEqualFork(t, false) } +func TestEqualForkBlocks(t *testing.T) { testEqualFork(t, true) } + +func testEqualFork(t *testing.T, full bool) { + length := 10 + + // Make first chain starting from genesis + _, processor, err := newCanonical(length, full) if err != nil { - t.Fatal("Could not make new canonical chain:", err) + t.Fatalf("failed to make new canonical chain: %v", err) } - f := func(td1, td2 *big.Int) { + // Define the difficulty comparator + equal := func(td1, td2 *big.Int) { if td2.Cmp(td1) != 0 { - t.Error("expected chainB to have equal difficulty. Got", td2, "expected ", td1) + t.Errorf("total difficulty mismatch: have %v, want %v", td2, td1) } } - // Sum of numbers must be equal to 10 - // for this to be an equal fork - testFork(t, bman, 0, 10, f) - testFork(t, bman, 1, 9, f) - testFork(t, bman, 2, 8, f) - testFork(t, bman, 5, 5, f) - testFork(t, bman, 6, 4, f) - testFork(t, bman, 9, 1, f) + // Sum of numbers must be equal to `length` for this to be an equal fork + testFork(t, processor, 0, 10, full, equal) + testFork(t, processor, 1, 9, full, equal) + testFork(t, processor, 2, 8, full, equal) + testFork(t, processor, 5, 5, full, equal) + testFork(t, processor, 6, 4, full, equal) + testFork(t, processor, 9, 1, full, equal) } -func TestBrokenChain(t *testing.T) { - db, err := ethdb.NewMemDatabase() - if err != nil { - t.Fatal("Failed to create db:", err) - } - bman, err := newCanonical(10, db) - if err != nil { - t.Fatal("Could not make new canonical chain:", err) - } - db2, err := ethdb.NewMemDatabase() - if err != nil { - t.Fatal("Failed to create db:", err) - } - bman2, err := newCanonical(10, db2) +// Tests that chains missing links do not get accepted by the processor. +func TestBrokenHeaderChain(t *testing.T) { testBrokenChain(t, false) } +func TestBrokenBlockChain(t *testing.T) { testBrokenChain(t, true) } + +func testBrokenChain(t *testing.T, full bool) { + // Make chain starting from genesis + db, processor, err := newCanonical(10, full) if err != nil { - t.Fatal("Could not make new canonical chain:", err) + t.Fatalf("failed to make new canonical chain: %v", err) } - bman2.bc.SetProcessor(bman2) - parent := bman2.bc.CurrentBlock() - chainB := makeChain(parent, 5, db2, forkSeed) - chainB = chainB[1:] - _, err = testChain(chainB, bman) - if err == nil { - t.Error("expected broken chain to return error") + // Create a forked chain, and try to insert with a missing link + if full { + chain := makeBlockChain(processor.bc.CurrentBlock(), 5, db, forkSeed)[1:] + if err := testBlockChainImport(chain, processor); err == nil { + t.Errorf("broken block chain not reported") + } + } else { + chain := makeHeaderChain(processor.bc.CurrentHeader(), 5, db, forkSeed)[1:] + if err := testHeaderChainImport(chain, processor); err == nil { + t.Errorf("broken header chain not reported") + } } } @@ -376,7 +417,16 @@ type bproc struct{} func (bproc) Process(*types.Block) (vm.Logs, types.Receipts, error) { return nil, nil, nil } -func makeChainWithDiff(genesis *types.Block, d []int, seed byte) []*types.Block { +func makeHeaderChainWithDiff(genesis *types.Block, d []int, seed byte) []*types.Header { + blocks := makeBlockChainWithDiff(genesis, d, seed) + headers := make([]*types.Header, len(blocks)) + for i, block := range blocks { + headers[i] = block.Header() + } + return headers +} + +func makeBlockChainWithDiff(genesis *types.Block, d []int, seed byte) []*types.Block { var chain []*types.Block for i, difficulty := range d { header := &types.Header{ @@ -410,142 +460,209 @@ func chm(genesis *types.Block, db ethdb.Database) *BlockChain { return bc } -func TestReorgLongest(t *testing.T) { - db, _ := ethdb.NewMemDatabase() +// Tests that reorganizing a long difficult chain after a short easy one +// overwrites the canonical numbers and links in the database. +func TestReorgLongHeaders(t *testing.T) { testReorgLong(t, false) } +func TestReorgLongBlocks(t *testing.T) { testReorgLong(t, true) } - genesis, err := WriteTestNetGenesisBlock(db, 0) - if err != nil { - t.Error(err) - t.FailNow() - } - bc := chm(genesis, db) +func testReorgLong(t *testing.T, full bool) { + testReorg(t, []int{1, 2, 4}, []int{1, 2, 3, 4}, 10, full) +} - chain1 := makeChainWithDiff(genesis, []int{1, 2, 4}, 10) - chain2 := makeChainWithDiff(genesis, []int{1, 2, 3, 4}, 11) +// Tests that reorganizing a short difficult chain after a long easy one +// overwrites the canonical numbers and links in the database. +func TestReorgShortHeaders(t *testing.T) { testReorgShort(t, false) } +func TestReorgShortBlocks(t *testing.T) { testReorgShort(t, true) } - bc.InsertChain(chain1) - bc.InsertChain(chain2) +func testReorgShort(t *testing.T, full bool) { + testReorg(t, []int{1, 2, 3, 4}, []int{1, 10}, 11, full) +} - prev := bc.CurrentBlock() - for block := bc.GetBlockByNumber(bc.CurrentBlock().NumberU64() - 1); block.NumberU64() != 0; prev, block = block, bc.GetBlockByNumber(block.NumberU64()-1) { - if prev.ParentHash() != block.Hash() { - t.Errorf("parent hash mismatch %x - %x", prev.ParentHash(), block.Hash()) +func testReorg(t *testing.T, first, second []int, td int64, full bool) { + // Create a pristine block chain + db, _ := ethdb.NewMemDatabase() + genesis, _ := WriteTestNetGenesisBlock(db, 0) + bc := chm(genesis, db) + + // Insert an easy and a difficult chain afterwards + if full { + bc.InsertChain(makeBlockChainWithDiff(genesis, first, 11)) + bc.InsertChain(makeBlockChainWithDiff(genesis, second, 22)) + } else { + bc.InsertHeaderChain(makeHeaderChainWithDiff(genesis, first, 11), false) + bc.InsertHeaderChain(makeHeaderChainWithDiff(genesis, second, 22), false) + } + // Check that the chain is valid number and link wise + if full { + prev := bc.CurrentBlock() + for block := bc.GetBlockByNumber(bc.CurrentBlock().NumberU64() - 1); block.NumberU64() != 0; prev, block = block, bc.GetBlockByNumber(block.NumberU64()-1) { + if prev.ParentHash() != block.Hash() { + t.Errorf("parent block hash mismatch: have %x, want %x", prev.ParentHash(), block.Hash()) + } + } + } else { + prev := bc.CurrentHeader() + for header := bc.GetHeaderByNumber(bc.CurrentHeader().Number.Uint64() - 1); header.Number.Uint64() != 0; prev, header = header, bc.GetHeaderByNumber(header.Number.Uint64()-1) { + if prev.ParentHash != header.Hash() { + t.Errorf("parent header hash mismatch: have %x, want %x", prev.ParentHash, header.Hash()) + } + } + } + // Make sure the chain total difficulty is the correct one + want := new(big.Int).Add(genesis.Difficulty(), big.NewInt(td)) + if full { + if have := bc.GetTd(bc.CurrentBlock().Hash()); have.Cmp(want) != 0 { + t.Errorf("total difficulty mismatch: have %v, want %v", have, want) + } + } else { + if have := bc.GetTd(bc.CurrentHeader().Hash()); have.Cmp(want) != 0 { + t.Errorf("total difficulty mismatch: have %v, want %v", have, want) } } } -func TestBadHashes(t *testing.T) { +// Tests that the insertion functions detect banned hashes. +func TestBadHeaderHashes(t *testing.T) { testBadHashes(t, false) } +func TestBadBlockHashes(t *testing.T) { testBadHashes(t, true) } + +func testBadHashes(t *testing.T, full bool) { + // Create a pristine block chain db, _ := ethdb.NewMemDatabase() - genesis, err := WriteTestNetGenesisBlock(db, 0) - if err != nil { - t.Error(err) - t.FailNow() - } + genesis, _ := WriteTestNetGenesisBlock(db, 0) bc := chm(genesis, db) - chain := makeChainWithDiff(genesis, []int{1, 2, 4}, 10) - BadHashes[chain[2].Header().Hash()] = true - - _, err = bc.InsertChain(chain) + // Create a chain, ban a hash and try to import + var err error + if full { + blocks := makeBlockChainWithDiff(genesis, []int{1, 2, 4}, 10) + BadHashes[blocks[2].Header().Hash()] = true + _, err = bc.InsertChain(blocks) + } else { + headers := makeHeaderChainWithDiff(genesis, []int{1, 2, 4}, 10) + BadHashes[headers[2].Hash()] = true + _, err = bc.InsertHeaderChain(headers, true) + } if !IsBadHashError(err) { t.Errorf("error mismatch: want: BadHashError, have: %v", err) } } -func TestReorgBadHashes(t *testing.T) { +// Tests that bad hashes are detected on boot, and the chan rolled back to a +// good state prior to the bad hash. +func TestReorgBadHeaderHashes(t *testing.T) { testReorgBadHashes(t, false) } +func TestReorgBadBlockHashes(t *testing.T) { testReorgBadHashes(t, true) } + +func testReorgBadHashes(t *testing.T, full bool) { + // Create a pristine block chain db, _ := ethdb.NewMemDatabase() - genesis, err := WriteTestNetGenesisBlock(db, 0) - if err != nil { - t.Error(err) - t.FailNow() - } + genesis, _ := WriteTestNetGenesisBlock(db, 0) bc := chm(genesis, db) - chain := makeChainWithDiff(genesis, []int{1, 2, 3, 4}, 11) - bc.InsertChain(chain) - - if chain[3].Header().Hash() != bc.LastBlockHash() { - t.Errorf("last block hash mismatch: want: %x, have: %x", chain[3].Header().Hash(), bc.LastBlockHash()) - } - - // NewChainManager should check BadHashes when loading it db - BadHashes[chain[3].Header().Hash()] = true - - var eventMux event.TypeMux - ncm, err := NewBlockChain(db, FakePow{}, &eventMux) - if err != nil { - t.Errorf("NewChainManager err: %s", err) - } - - // check it set head to (valid) parent of bad hash block - if chain[2].Header().Hash() != ncm.LastBlockHash() { - t.Errorf("last block hash mismatch: want: %x, have: %x", chain[2].Header().Hash(), ncm.LastBlockHash()) - } + // Create a chain, import and ban aferwards + headers := makeHeaderChainWithDiff(genesis, []int{1, 2, 3, 4}, 10) + blocks := makeBlockChainWithDiff(genesis, []int{1, 2, 3, 4}, 10) - if chain[2].Header().GasLimit.Cmp(ncm.GasLimit()) != 0 { - t.Errorf("current block gasLimit mismatch: want: %x, have: %x", chain[2].Header().GasLimit, ncm.GasLimit()) + if full { + if _, err := bc.InsertChain(blocks); err != nil { + t.Fatalf("failed to import blocks: %v", err) + } + if bc.CurrentBlock().Hash() != blocks[3].Hash() { + t.Errorf("last block hash mismatch: have: %x, want %x", bc.CurrentBlock().Hash(), blocks[3].Header().Hash()) + } + BadHashes[blocks[3].Header().Hash()] = true + defer func() { delete(BadHashes, blocks[3].Header().Hash()) }() + } else { + if _, err := bc.InsertHeaderChain(headers, true); err != nil { + t.Fatalf("failed to import headers: %v", err) + } + if bc.CurrentHeader().Hash() != headers[3].Hash() { + t.Errorf("last header hash mismatch: have: %x, want %x", bc.CurrentHeader().Hash(), headers[3].Hash()) + } + BadHashes[headers[3].Hash()] = true + defer func() { delete(BadHashes, headers[3].Hash()) }() } -} - -func TestReorgShortest(t *testing.T) { - db, _ := ethdb.NewMemDatabase() - genesis, err := WriteTestNetGenesisBlock(db, 0) + // Create a new chain manager and check it rolled back the state + ncm, err := NewBlockChain(db, FakePow{}, new(event.TypeMux)) if err != nil { - t.Error(err) - t.FailNow() + t.Fatalf("failed to create new chain manager: %v", err) } - bc := chm(genesis, db) - - chain1 := makeChainWithDiff(genesis, []int{1, 2, 3, 4}, 10) - chain2 := makeChainWithDiff(genesis, []int{1, 10}, 11) - - bc.InsertChain(chain1) - bc.InsertChain(chain2) - - prev := bc.CurrentBlock() - for block := bc.GetBlockByNumber(bc.CurrentBlock().NumberU64() - 1); block.NumberU64() != 0; prev, block = block, bc.GetBlockByNumber(block.NumberU64()-1) { - if prev.ParentHash() != block.Hash() { - t.Errorf("parent hash mismatch %x - %x", prev.ParentHash(), block.Hash()) + if full { + if ncm.CurrentBlock().Hash() != blocks[2].Header().Hash() { + t.Errorf("last block hash mismatch: have: %x, want %x", ncm.CurrentBlock().Hash(), blocks[2].Header().Hash()) + } + if blocks[2].Header().GasLimit.Cmp(ncm.GasLimit()) != 0 { + t.Errorf("last block gasLimit mismatch: have: %x, want %x", ncm.GasLimit(), blocks[2].Header().GasLimit) + } + } else { + if ncm.CurrentHeader().Hash() != genesis.Hash() { + t.Errorf("last header hash mismatch: have: %x, want %x", ncm.CurrentHeader().Hash(), genesis.Hash()) } } } -func TestInsertNonceError(t *testing.T) { +// Tests chain insertions in the face of one entity containing an invalid nonce. +func TestHeadersInsertNonceError(t *testing.T) { testInsertNonceError(t, false) } +func TestBlocksInsertNonceError(t *testing.T) { testInsertNonceError(t, true) } + +func testInsertNonceError(t *testing.T, full bool) { for i := 1; i < 25 && !t.Failed(); i++ { - db, _ := ethdb.NewMemDatabase() - genesis, err := WriteTestNetGenesisBlock(db, 0) + // Create a pristine chain and database + db, processor, err := newCanonical(0, full) if err != nil { - t.Error(err) - t.FailNow() + t.Fatalf("failed to create pristine chain: %v", err) } - bc := chm(genesis, db) - bc.processor = NewBlockProcessor(db, bc.pow, bc, bc.eventMux) - blocks := makeChain(bc.currentBlock, i, db, 0) + bc := processor.bc + + // Create and insert a chain with a failing nonce + var ( + failAt int + failRes int + failNum uint64 + failHash common.Hash + ) + if full { + blocks := makeBlockChain(processor.bc.CurrentBlock(), i, db, 0) + + failAt = rand.Int() % len(blocks) + failNum = blocks[failAt].NumberU64() + failHash = blocks[failAt].Hash() + + processor.bc.pow = failPow{failNum} + failRes, err = processor.bc.InsertChain(blocks) + } else { + headers := makeHeaderChain(processor.bc.CurrentHeader(), i, db, 0) - fail := rand.Int() % len(blocks) - failblock := blocks[fail] - bc.pow = failPow{failblock.NumberU64()} - n, err := bc.InsertChain(blocks) + failAt = rand.Int() % len(headers) + failNum = headers[failAt].Number.Uint64() + failHash = headers[failAt].Hash() + processor.bc.pow = failPow{failNum} + failRes, err = processor.bc.InsertHeaderChain(headers, true) + } // Check that the returned error indicates the nonce failure. - if n != fail { - t.Errorf("(i=%d) wrong failed block index: got %d, want %d", i, n, fail) + if failRes != failAt { + t.Errorf("test %d: failure index mismatch: have %d, want %d", i, failRes, failAt) } if !IsBlockNonceErr(err) { - t.Fatalf("(i=%d) got %q, want a nonce error", i, err) + t.Fatalf("test %d: error mismatch: have %v, want nonce error", i, err) } nerr := err.(*BlockNonceErr) - if nerr.Number.Cmp(failblock.Number()) != 0 { - t.Errorf("(i=%d) wrong block number in error, got %v, want %v", i, nerr.Number, failblock.Number()) + if nerr.Number.Uint64() != failNum { + t.Errorf("test %d: number mismatch: have %v, want %v", i, nerr.Number, failNum) } - if nerr.Hash != failblock.Hash() { - t.Errorf("(i=%d) wrong block hash in error, got %v, want %v", i, nerr.Hash, failblock.Hash()) + if nerr.Hash != failHash { + t.Errorf("test %d: hash mismatch: have %x, want %x", i, nerr.Hash[:4], failHash[:4]) } - // Check that all no blocks after the failing block have been inserted. - for _, block := range blocks[fail:] { - if bc.HasBlock(block.Hash()) { - t.Errorf("(i=%d) invalid block %d present in chain", i, block.NumberU64()) + for j := 0; j < i-failAt; j++ { + if full { + if block := bc.GetBlockByNumber(failNum + uint64(j)); block != nil { + t.Errorf("test %d: invalid block in chain: %v", i, block) + } + } else { + if header := bc.GetHeaderByNumber(failNum + uint64(j)); header != nil { + t.Errorf("test %d: invalid header in chain: %v", i, header) + } } } } diff --git a/core/chain_makers.go b/core/chain_makers.go index 85a4955db..eb451c00d 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -211,25 +211,49 @@ func makeHeader(parent *types.Block, state *state.StateDB) *types.Header { } } -// newCanonical creates a new deterministic canonical chain by running -// InsertChain on the result of makeChain. -func newCanonical(n int, db ethdb.Database) (*BlockProcessor, error) { +// newCanonical creates a chain database, and injects a deterministic canonical +// chain. Depending on the full flag, if creates either a full block chain or a +// header only chain. +func newCanonical(n int, full bool) (ethdb.Database, *BlockProcessor, error) { + // Create te new chain database + db, _ := ethdb.NewMemDatabase() evmux := &event.TypeMux{} - WriteTestNetGenesisBlock(db, 0) - chainman, _ := NewBlockChain(db, FakePow{}, evmux) - bman := NewBlockProcessor(db, FakePow{}, chainman, evmux) - bman.bc.SetProcessor(bman) - parent := bman.bc.CurrentBlock() + // Initialize a fresh chain with only a genesis block + genesis, _ := WriteTestNetGenesisBlock(db, 0) + + blockchain, _ := NewBlockChain(db, FakePow{}, evmux) + processor := NewBlockProcessor(db, FakePow{}, blockchain, evmux) + processor.bc.SetProcessor(processor) + + // Create and inject the requested chain if n == 0 { - return bman, nil + return db, processor, nil + } + if full { + // Full block-chain requested + blocks := makeBlockChain(genesis, n, db, canonicalSeed) + _, err := blockchain.InsertChain(blocks) + return db, processor, err + } + // Header-only chain requested + headers := makeHeaderChain(genesis.Header(), n, db, canonicalSeed) + _, err := blockchain.InsertHeaderChain(headers, true) + return db, processor, err +} + +// makeHeaderChain creates a deterministic chain of headers rooted at parent. +func makeHeaderChain(parent *types.Header, n int, db ethdb.Database, seed int) []*types.Header { + blocks := makeBlockChain(types.NewBlockWithHeader(parent), n, db, seed) + headers := make([]*types.Header, len(blocks)) + for i, block := range blocks { + headers[i] = block.Header() } - lchain := makeChain(parent, n, db, canonicalSeed) - _, err := bman.bc.InsertChain(lchain) - return bman, err + return headers } -func makeChain(parent *types.Block, n int, db ethdb.Database, seed int) []*types.Block { +// makeBlockChain creates a deterministic chain of blocks rooted at parent. +func makeBlockChain(parent *types.Block, n int, db ethdb.Database, seed int) []*types.Block { return GenerateChain(parent, db, n, func(i int, b *BlockGen) { b.SetCoinbase(common.Address{0: byte(seed), 19: byte(i)}) }) diff --git a/core/types/block.go b/core/types/block.go index 7a84045a6..f7baa2175 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -184,7 +184,7 @@ var ( // are ignored and set to values derived from the given txs, uncles // and receipts. func NewBlock(header *Header, txs []*Transaction, uncles []*Header, receipts []*Receipt) *Block { - b := &Block{header: copyHeader(header), td: new(big.Int)} + b := &Block{header: CopyHeader(header), td: new(big.Int)} // TODO: panic if len(txs) != len(receipts) if len(txs) == 0 { @@ -210,7 +210,7 @@ func NewBlock(header *Header, txs []*Transaction, uncles []*Header, receipts []* b.header.UncleHash = CalcUncleHash(uncles) b.uncles = make([]*Header, len(uncles)) for i := range uncles { - b.uncles[i] = copyHeader(uncles[i]) + b.uncles[i] = CopyHeader(uncles[i]) } } @@ -221,10 +221,12 @@ func NewBlock(header *Header, txs []*Transaction, uncles []*Header, receipts []* // header data is copied, changes to header and to the field values // will not affect the block. func NewBlockWithHeader(header *Header) *Block { - return &Block{header: copyHeader(header)} + return &Block{header: CopyHeader(header)} } -func copyHeader(h *Header) *Header { +// CopyHeader creates a deep copy of a block header to prevent side effects from +// modifying a header variable. +func CopyHeader(h *Header) *Header { cpy := *h if cpy.Time = new(big.Int); h.Time != nil { cpy.Time.Set(h.Time) @@ -326,7 +328,7 @@ func (b *Block) ReceiptHash() common.Hash { return b.header.ReceiptHash } func (b *Block) UncleHash() common.Hash { return b.header.UncleHash } func (b *Block) Extra() []byte { return common.CopyBytes(b.header.Extra) } -func (b *Block) Header() *Header { return copyHeader(b.header) } +func (b *Block) Header() *Header { return CopyHeader(b.header) } func (b *Block) HashNoNonce() common.Hash { return b.header.HashNoNonce() @@ -370,13 +372,13 @@ func (b *Block) WithMiningResult(nonce uint64, mixDigest common.Hash) *Block { // WithBody returns a new block with the given transaction and uncle contents. func (b *Block) WithBody(transactions []*Transaction, uncles []*Header) *Block { block := &Block{ - header: copyHeader(b.header), + header: CopyHeader(b.header), transactions: make([]*Transaction, len(transactions)), uncles: make([]*Header, len(uncles)), } copy(block.transactions, transactions) for i := range uncles { - block.uncles[i] = copyHeader(uncles[i]) + block.uncles[i] = CopyHeader(uncles[i]) } return block } diff --git a/eth/backend.go b/eth/backend.go index 04dd3767a..f4acc76cb 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -464,7 +464,7 @@ func (s *Ethereum) NodeInfo() *NodeInfo { DiscPort: int(node.UDP), TCPPort: int(node.TCP), ListenAddr: s.net.ListenAddr, - Td: s.BlockChain().Td().String(), + Td: s.BlockChain().GetTd(s.BlockChain().CurrentBlock().Hash()).String(), } } diff --git a/eth/handler.go b/eth/handler.go index 5716350af..021be1024 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -589,15 +589,6 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { } request.Block.ReceivedAt = msg.ReceivedAt - // Mark the block's arrival for whatever reason - _, chainHead, _ := pm.blockchain.Status() - jsonlogger.LogJson(&logger.EthChainReceivedNewBlock{ - BlockHash: request.Block.Hash().Hex(), - BlockNumber: request.Block.Number(), - ChainHeadHash: chainHead.Hex(), - BlockPrevHash: request.Block.ParentHash().Hex(), - RemoteId: p.ID().String(), - }) // Mark the peer as owning the block and schedule it for import p.MarkBlock(request.Block.Hash()) p.SetHead(request.Block.Hash()) @@ -607,7 +598,8 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { // Update the peers total difficulty if needed, schedule a download if gapped if request.TD.Cmp(p.Td()) > 0 { p.SetTd(request.TD) - if request.TD.Cmp(new(big.Int).Add(pm.blockchain.Td(), request.Block.Difficulty())) > 0 { + td := pm.blockchain.GetTd(pm.blockchain.CurrentBlock().Hash()) + if request.TD.Cmp(new(big.Int).Add(td, request.Block.Difficulty())) > 0 { go pm.synchronise(p) } } @@ -624,12 +616,6 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { return errResp(ErrDecode, "transaction %d is nil", i) } p.MarkTransaction(tx.Hash()) - - // Log it's arrival for later analysis - jsonlogger.LogJson(&logger.EthTxReceived{ - TxHash: tx.Hash().Hex(), - RemoteId: p.ID().String(), - }) } pm.txpool.AddTransactions(txs) diff --git a/eth/sync.go b/eth/sync.go index 5a2031c68..6295083e2 100644 --- a/eth/sync.go +++ b/eth/sync.go @@ -160,7 +160,8 @@ func (pm *ProtocolManager) synchronise(peer *peer) { return } // Make sure the peer's TD is higher than our own. If not drop. - if peer.Td().Cmp(pm.blockchain.Td()) <= 0 { + td := pm.blockchain.GetTd(pm.blockchain.CurrentBlock().Hash()) + if peer.Td().Cmp(td) <= 0 { return } // Otherwise try to sync with the downloader diff --git a/rpc/api/debug.go b/rpc/api/debug.go index 003b4d994..d2cbc7f19 100644 --- a/rpc/api/debug.go +++ b/rpc/api/debug.go @@ -146,13 +146,7 @@ func (self *debugApi) SetHead(req *shared.Request) (interface{}, error) { if err := self.codec.Decode(req.Params, &args); err != nil { return nil, shared.NewDecodeParamError(err.Error()) } - - block := self.xeth.EthBlockByNumber(args.BlockNumber) - if block == nil { - return nil, fmt.Errorf("block #%d not found", args.BlockNumber) - } - - self.ethereum.BlockChain().SetHead(block) + self.ethereum.BlockChain().SetHead(uint64(args.BlockNumber)) return nil, nil } -- cgit v1.2.3 From f186b390182da7af368e7a5a1e9eff8d690b7414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 28 Sep 2015 19:27:31 +0300 Subject: eth/downloader: add fast and light sync strategies --- core/transaction_util.go | 11 +- core/types/block.go | 10 +- eth/downloader/downloader.go | 667 ++++++++++++++++++++++------------ eth/downloader/downloader_test.go | 739 +++++++++++++++++++++++--------------- eth/downloader/metrics.go | 5 + eth/downloader/modes.go | 26 ++ eth/downloader/peer.go | 192 ++++++---- eth/downloader/queue.go | 534 +++++++++++++++++---------- eth/handler.go | 43 ++- eth/handler_test.go | 13 +- eth/peer.go | 6 +- 11 files changed, 1437 insertions(+), 809 deletions(-) create mode 100644 eth/downloader/modes.go diff --git a/core/transaction_util.go b/core/transaction_util.go index d55ed14da..9a82ec4dc 100644 --- a/core/transaction_util.go +++ b/core/transaction_util.go @@ -140,13 +140,12 @@ func GetBlockReceipts(db ethdb.Database, hash common.Hash) types.Receipts { if len(data) == 0 { return nil } - - var receipts types.Receipts - err := rlp.DecodeBytes(data, &receipts) - if err != nil { - glog.V(logger.Core).Infoln("GetReceiptse err", err) + receipts := new(types.Receipts) + if err := rlp.DecodeBytes(data, receipts); err != nil { + glog.V(logger.Error).Infof("invalid receipt array RLP for hash %x: %v", hash, err) + return nil } - return receipts + return *receipts } // PutBlockReceipts stores the block's transactions associated receipts diff --git a/core/types/block.go b/core/types/block.go index f7baa2175..c4377ffa1 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -172,8 +172,8 @@ type storageblock struct { } var ( - emptyRootHash = DeriveSha(Transactions{}) - emptyUncleHash = CalcUncleHash(nil) + EmptyRootHash = DeriveSha(Transactions{}) + EmptyUncleHash = CalcUncleHash(nil) ) // NewBlock creates a new block. The input data is copied, @@ -188,7 +188,7 @@ func NewBlock(header *Header, txs []*Transaction, uncles []*Header, receipts []* // TODO: panic if len(txs) != len(receipts) if len(txs) == 0 { - b.header.TxHash = emptyRootHash + b.header.TxHash = EmptyRootHash } else { b.header.TxHash = DeriveSha(Transactions(txs)) b.transactions = make(Transactions, len(txs)) @@ -196,7 +196,7 @@ func NewBlock(header *Header, txs []*Transaction, uncles []*Header, receipts []* } if len(receipts) == 0 { - b.header.ReceiptHash = emptyRootHash + b.header.ReceiptHash = EmptyRootHash } else { b.header.ReceiptHash = DeriveSha(Receipts(receipts)) b.header.Bloom = CreateBloom(receipts) @@ -205,7 +205,7 @@ func NewBlock(header *Header, txs []*Transaction, uncles []*Header, receipts []* } if len(uncles) == 0 { - b.header.UncleHash = emptyUncleHash + b.header.UncleHash = EmptyUncleHash } else { b.header.UncleHash = CalcUncleHash(uncles) b.uncles = make([]*Header, len(uncles)) diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 64fb1b57b..7ae7aa221 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -19,8 +19,10 @@ package downloader import ( "errors" + "fmt" "math" "math/big" + "strings" "sync" "sync/atomic" "time" @@ -32,70 +34,96 @@ import ( "github.com/ethereum/go-ethereum/logger/glog" ) -const ( - eth61 = 61 // Constant to check for old protocol support - eth62 = 62 // Constant to check for new protocol support -) - var ( - MaxHashFetch = 512 // Amount of hashes to be fetched per retrieval request - MaxBlockFetch = 128 // Amount of blocks to be fetched per retrieval request - MaxHeaderFetch = 192 // Amount of block headers to be fetched per retrieval request - MaxBodyFetch = 128 // Amount of block bodies to be fetched per retrieval request - MaxStateFetch = 384 // Amount of node state values to allow fetching per request - MaxReceiptsFetch = 384 // Amount of transaction receipts to allow fetching per request - - hashTTL = 5 * time.Second // [eth/61] Time it takes for a hash request to time out - blockSoftTTL = 3 * time.Second // [eth/61] Request completion threshold for increasing or decreasing a peer's bandwidth - blockHardTTL = 3 * blockSoftTTL // [eth/61] Maximum time allowance before a block request is considered expired - headerTTL = 5 * time.Second // [eth/62] Time it takes for a header request to time out - bodySoftTTL = 3 * time.Second // [eth/62] Request completion threshold for increasing or decreasing a peer's bandwidth - bodyHardTTL = 3 * bodySoftTTL // [eth/62] Maximum time allowance before a block body request is considered expired - - maxQueuedHashes = 256 * 1024 // [eth/61] Maximum number of hashes to queue for import (DOS protection) - maxQueuedHeaders = 256 * 1024 // [eth/62] Maximum number of headers to queue for import (DOS protection) - maxBlockProcess = 256 // Number of blocks to import at once into the chain + MaxHashFetch = 512 // Amount of hashes to be fetched per retrieval request + MaxBlockFetch = 128 // Amount of blocks to be fetched per retrieval request + MaxHeaderFetch = 192 // Amount of block headers to be fetched per retrieval request + MaxBodyFetch = 128 // Amount of block bodies to be fetched per retrieval request + MaxStateFetch = 384 // Amount of node state values to allow fetching per request + MaxReceiptFetch = 256 // Amount of transaction receipts to allow fetching per request + + hashTTL = 5 * time.Second // [eth/61] Time it takes for a hash request to time out + blockSoftTTL = 3 * time.Second // [eth/61] Request completion threshold for increasing or decreasing a peer's bandwidth + blockHardTTL = 3 * blockSoftTTL // [eth/61] Maximum time allowance before a block request is considered expired + headerTTL = 5 * time.Second // [eth/62] Time it takes for a header request to time out + bodySoftTTL = 3 * time.Second // [eth/62] Request completion threshold for increasing or decreasing a peer's bandwidth + bodyHardTTL = 3 * bodySoftTTL // [eth/62] Maximum time allowance before a block body request is considered expired + receiptSoftTTL = 3 * time.Second // [eth/63] Request completion threshold for increasing or decreasing a peer's bandwidth + receiptHardTTL = 3 * receiptSoftTTL // [eth/63] Maximum time allowance before a block body request is considered expired + + maxQueuedHashes = 256 * 1024 // [eth/61] Maximum number of hashes to queue for import (DOS protection) + maxQueuedHeaders = 256 * 1024 // [eth/62] Maximum number of headers to queue for import (DOS protection) + maxResultsProcess = 256 // Number of download results to import at once into the chain + + headerCheckFrequency = 64 // Verification frequency of the downloaded headers during fast sync + minCheckedHeaders = 1024 // Number of headers to verify fully when approaching the chain head + minFullBlocks = 1024 // Number of blocks to retrieve fully even in fast sync ) var ( - errBusy = errors.New("busy") - errUnknownPeer = errors.New("peer is unknown or unhealthy") - errBadPeer = errors.New("action from bad peer ignored") - errStallingPeer = errors.New("peer is stalling") - errNoPeers = errors.New("no peers to keep download active") - errPendingQueue = errors.New("pending items in queue") - errTimeout = errors.New("timeout") - errEmptyHashSet = errors.New("empty hash set by peer") - errEmptyHeaderSet = errors.New("empty header set by peer") - errPeersUnavailable = errors.New("no peers available or all peers tried for block download process") - errAlreadyInPool = errors.New("hash already in pool") - errInvalidChain = errors.New("retrieved hash chain is invalid") - errInvalidBody = errors.New("retrieved block body is invalid") - errCancelHashFetch = errors.New("hash fetching canceled (requested)") - errCancelBlockFetch = errors.New("block downloading canceled (requested)") - errCancelHeaderFetch = errors.New("block header fetching canceled (requested)") - errCancelBodyFetch = errors.New("block body downloading canceled (requested)") - errNoSyncActive = errors.New("no sync active") + errBusy = errors.New("busy") + errUnknownPeer = errors.New("peer is unknown or unhealthy") + errBadPeer = errors.New("action from bad peer ignored") + errStallingPeer = errors.New("peer is stalling") + errNoPeers = errors.New("no peers to keep download active") + errPendingQueue = errors.New("pending items in queue") + errTimeout = errors.New("timeout") + errEmptyHashSet = errors.New("empty hash set by peer") + errEmptyHeaderSet = errors.New("empty header set by peer") + errPeersUnavailable = errors.New("no peers available or all tried for download") + errAlreadyInPool = errors.New("hash already in pool") + errInvalidChain = errors.New("retrieved hash chain is invalid") + errInvalidBlock = errors.New("retrieved block is invalid") + errInvalidBody = errors.New("retrieved block body is invalid") + errInvalidReceipt = errors.New("retrieved receipt is invalid") + errCancelHashFetch = errors.New("hash download canceled (requested)") + errCancelBlockFetch = errors.New("block download canceled (requested)") + errCancelHeaderFetch = errors.New("block header download canceled (requested)") + errCancelBodyFetch = errors.New("block body download canceled (requested)") + errCancelReceiptFetch = errors.New("receipt download canceled (requested)") + errNoSyncActive = errors.New("no sync active") ) -// hashCheckFn is a callback type for verifying a hash's presence in the local chain. -type hashCheckFn func(common.Hash) bool +// headerCheckFn is a callback type for verifying a header's presence in the local chain. +type headerCheckFn func(common.Hash) bool + +// blockCheckFn is a callback type for verifying a block's presence in the local chain. +type blockCheckFn func(common.Hash) bool + +// headerRetrievalFn is a callback type for retrieving a header from the local chain. +type headerRetrievalFn func(common.Hash) *types.Header // blockRetrievalFn is a callback type for retrieving a block from the local chain. type blockRetrievalFn func(common.Hash) *types.Block -// headRetrievalFn is a callback type for retrieving the head block from the local chain. -type headRetrievalFn func() *types.Block +// headHeaderRetrievalFn is a callback type for retrieving the head header from the local chain. +type headHeaderRetrievalFn func() *types.Header + +// headBlockRetrievalFn is a callback type for retrieving the head block from the local chain. +type headBlockRetrievalFn func() *types.Block // tdRetrievalFn is a callback type for retrieving the total difficulty of a local block. type tdRetrievalFn func(common.Hash) *big.Int -// chainInsertFn is a callback type to insert a batch of blocks into the local chain. -type chainInsertFn func(types.Blocks) (int, error) +// headerChainInsertFn is a callback type to insert a batch of headers into the local chain. +type headerChainInsertFn func([]*types.Header, bool) (int, error) + +// blockChainInsertFn is a callback type to insert a batch of blocks into the local chain. +type blockChainInsertFn func(types.Blocks) (int, error) + +// receiptChainInsertFn is a callback type to insert a batch of receipts into the local chain. +type receiptChainInsertFn func(types.Blocks, []types.Receipts) (int, error) // peerDropFn is a callback type for dropping a peer detected as malicious. type peerDropFn func(id string) +// dataPack is a data message returned by a peer for some query. +type dataPack interface { + PeerId() string + Empty() bool + Stats() string +} + // hashPack is a batch of block hashes returned by a peer (eth/61). type hashPack struct { peerId string @@ -121,8 +149,33 @@ type bodyPack struct { uncles [][]*types.Header } +// PeerId retrieves the origin peer who sent this block body packet. +func (p *bodyPack) PeerId() string { return p.peerId } + +// Empty returns whether the no block bodies were delivered. +func (p *bodyPack) Empty() bool { return len(p.transactions) == 0 || len(p.uncles) == 0 } + +// Stats creates a textual stats report for logging purposes. +func (p *bodyPack) Stats() string { return fmt.Sprintf("%d:%d", len(p.transactions), len(p.uncles)) } + +// receiptPack is a batch of receipts returned by a peer. +type receiptPack struct { + peerId string + receipts [][]*types.Receipt +} + +// PeerId retrieves the origin peer who sent this receipt packet. +func (p *receiptPack) PeerId() string { return p.peerId } + +// Empty returns whether the no receipts were delivered. +func (p *receiptPack) Empty() bool { return len(p.receipts) == 0 } + +// Stats creates a textual stats report for logging purposes. +func (p *receiptPack) Stats() string { return fmt.Sprintf("%d", len(p.receipts)) } + type Downloader struct { - mux *event.TypeMux + mode SyncMode // Synchronisation mode defining the strategies used + mux *event.TypeMux // Event multiplexer to announce sync operation events queue *queue // Scheduler for selecting the hashes to download peers *peerSet // Set of active peers from which download can proceed @@ -135,12 +188,17 @@ type Downloader struct { syncStatsLock sync.RWMutex // Lock protecting the sync stats fields // Callbacks - hasBlock hashCheckFn // Checks if a block is present in the chain - getBlock blockRetrievalFn // Retrieves a block from the chain - headBlock headRetrievalFn // Retrieves the head block from the chain - getTd tdRetrievalFn // Retrieves the TD of a block from the chain - insertChain chainInsertFn // Injects a batch of blocks into the chain - dropPeer peerDropFn // Drops a peer for misbehaving + hasHeader headerCheckFn // Checks if a header is present in the chain + hasBlock blockCheckFn // Checks if a block is present in the chain + getHeader headerRetrievalFn // Retrieves a header from the chain + getBlock blockRetrievalFn // Retrieves a block from the chain + headHeader headHeaderRetrievalFn // Retrieves the head header from the chain + headBlock headBlockRetrievalFn // Retrieves the head block from the chain + getTd tdRetrievalFn // Retrieves the TD of a block from the chain + insertHeaders headerChainInsertFn // Injects a batch of headers into the chain + insertBlocks blockChainInsertFn // Injects a batch of blocks into the chain + insertReceipts receiptChainInsertFn // Injects a batch of blocks and their receipts into the chain + dropPeer peerDropFn // Drops a peer for misbehaving // Status synchroniseMock func(id string, hash common.Hash) error // Replacement for synchronise during testing @@ -149,46 +207,56 @@ type Downloader struct { notified int32 // Channels - newPeerCh chan *peer - hashCh chan hashPack // [eth/61] Channel receiving inbound hashes - blockCh chan blockPack // [eth/61] Channel receiving inbound blocks - headerCh chan headerPack // [eth/62] Channel receiving inbound block headers - bodyCh chan bodyPack // [eth/62] Channel receiving inbound block bodies - wakeCh chan bool // Channel to signal the block/body fetcher of new tasks + newPeerCh chan *peer + hashCh chan hashPack // [eth/61] Channel receiving inbound hashes + blockCh chan blockPack // [eth/61] Channel receiving inbound blocks + headerCh chan headerPack // [eth/62] Channel receiving inbound block headers + bodyCh chan dataPack // [eth/62] Channel receiving inbound block bodies + receiptCh chan dataPack // [eth/63] Channel receiving inbound receipts + blockWakeCh chan bool // [eth/61] Channel to signal the block fetcher of new tasks + bodyWakeCh chan bool // [eth/62] Channel to signal the block body fetcher of new tasks + receiptWakeCh chan bool // [eth/63] Channel to signal the receipt fetcher of new tasks cancelCh chan struct{} // Channel to cancel mid-flight syncs cancelLock sync.RWMutex // Lock to protect the cancel channel in delivers // Testing hooks - syncInitHook func(uint64, uint64) // Method to call upon initiating a new sync run - bodyFetchHook func([]*types.Header) // Method to call upon starting a block body fetch - chainInsertHook func([]*Block) // Method to call upon inserting a chain of blocks (possibly in multiple invocations) -} - -// Block is an origin-tagged blockchain block. -type Block struct { - RawBlock *types.Block - OriginPeer string + syncInitHook func(uint64, uint64) // Method to call upon initiating a new sync run + bodyFetchHook func([]*types.Header) // Method to call upon starting a block body fetch + receiptFetchHook func([]*types.Header) // Method to call upon starting a receipt fetch + chainInsertHook func([]*fetchResult) // Method to call upon inserting a chain of blocks (possibly in multiple invocations) } // New creates a new downloader to fetch hashes and blocks from remote peers. -func New(mux *event.TypeMux, hasBlock hashCheckFn, getBlock blockRetrievalFn, headBlock headRetrievalFn, getTd tdRetrievalFn, insertChain chainInsertFn, dropPeer peerDropFn) *Downloader { +func New(mode SyncMode, mux *event.TypeMux, hasHeader headerCheckFn, hasBlock blockCheckFn, getHeader headerRetrievalFn, getBlock blockRetrievalFn, + headHeader headHeaderRetrievalFn, headBlock headBlockRetrievalFn, getTd tdRetrievalFn, insertHeaders headerChainInsertFn, insertBlocks blockChainInsertFn, + insertReceipts receiptChainInsertFn, dropPeer peerDropFn) *Downloader { + return &Downloader{ - mux: mux, - queue: newQueue(), - peers: newPeerSet(), - hasBlock: hasBlock, - getBlock: getBlock, - headBlock: headBlock, - getTd: getTd, - insertChain: insertChain, - dropPeer: dropPeer, - newPeerCh: make(chan *peer, 1), - hashCh: make(chan hashPack, 1), - blockCh: make(chan blockPack, 1), - headerCh: make(chan headerPack, 1), - bodyCh: make(chan bodyPack, 1), - wakeCh: make(chan bool, 1), + mode: mode, + mux: mux, + queue: newQueue(), + peers: newPeerSet(), + hasHeader: hasHeader, + hasBlock: hasBlock, + getHeader: getHeader, + getBlock: getBlock, + headHeader: headHeader, + headBlock: headBlock, + getTd: getTd, + insertHeaders: insertHeaders, + insertBlocks: insertBlocks, + insertReceipts: insertReceipts, + dropPeer: dropPeer, + newPeerCh: make(chan *peer, 1), + hashCh: make(chan hashPack, 1), + blockCh: make(chan blockPack, 1), + headerCh: make(chan headerPack, 1), + bodyCh: make(chan dataPack, 1), + receiptCh: make(chan dataPack, 1), + blockWakeCh: make(chan bool, 1), + bodyWakeCh: make(chan bool, 1), + receiptWakeCh: make(chan bool, 1), } } @@ -211,10 +279,10 @@ func (d *Downloader) Synchronising() bool { // used for fetching hashes and blocks from. func (d *Downloader) RegisterPeer(id string, version int, head common.Hash, getRelHashes relativeHashFetcherFn, getAbsHashes absoluteHashFetcherFn, getBlocks blockFetcherFn, // eth/61 callbacks, remove when upgrading - getRelHeaders relativeHeaderFetcherFn, getAbsHeaders absoluteHeaderFetcherFn, getBlockBodies blockBodyFetcherFn) error { + getRelHeaders relativeHeaderFetcherFn, getAbsHeaders absoluteHeaderFetcherFn, getBlockBodies blockBodyFetcherFn, getReceipts receiptFetcherFn) error { glog.V(logger.Detail).Infoln("Registering peer", id) - if err := d.peers.Register(newPeer(id, version, head, getRelHashes, getAbsHashes, getBlocks, getRelHeaders, getAbsHeaders, getBlockBodies)); err != nil { + if err := d.peers.Register(newPeer(id, version, head, getRelHashes, getAbsHashes, getBlocks, getRelHeaders, getAbsHeaders, getBlockBodies, getReceipts)); err != nil { glog.V(logger.Error).Infoln("Register failed:", err) return err } @@ -222,13 +290,15 @@ func (d *Downloader) RegisterPeer(id string, version int, head common.Hash, } // UnregisterPeer remove a peer from the known list, preventing any action from -// the specified peer. +// the specified peer. An effort is also made to return any pending fetches into +// the queue. func (d *Downloader) UnregisterPeer(id string) error { glog.V(logger.Detail).Infoln("Unregistering peer", id) if err := d.peers.Unregister(id); err != nil { glog.V(logger.Error).Infoln("Unregister failed:", err) return err } + d.queue.Revoke(id) return nil } @@ -275,16 +345,18 @@ func (d *Downloader) synchronise(id string, hash common.Hash, td *big.Int) error glog.V(logger.Info).Infoln("Block synchronisation started") } // Abort if the queue still contains some leftover data - if _, cached := d.queue.Size(); cached > 0 && d.queue.GetHeadBlock() != nil { + if d.queue.GetHeadResult() != nil { return errPendingQueue } - // Reset the queue and peer set to clean any internal leftover state + // Reset the queue, peer set and wake channels to clean any internal leftover state d.queue.Reset() d.peers.Reset() - select { - case <-d.wakeCh: - default: + for _, ch := range []chan bool{d.blockWakeCh, d.bodyWakeCh, d.receiptWakeCh} { + select { + case <-ch: + default: + } } // Create cancel channel for aborting mid-flight d.cancelLock.Lock() @@ -299,12 +371,13 @@ func (d *Downloader) synchronise(id string, hash common.Hash, td *big.Int) error return d.syncWithPeer(p, hash, td) } +/* // Has checks if the downloader knows about a particular hash, meaning that its // either already downloaded of pending retrieval. func (d *Downloader) Has(hash common.Hash) bool { return d.queue.Has(hash) } - +*/ // syncWithPeer starts a block synchronization based on the hash chain from the // specified peer and head hash. func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err error) { @@ -323,7 +396,7 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e defer glog.V(logger.Debug).Infof("Synchronisation terminated") switch { - case p.version == eth61: + case p.version == 61: // Look up the sync boundaries: the common ancestor and the target block latest, err := d.fetchHeight61(p) if err != nil { @@ -344,6 +417,8 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e if d.syncInitHook != nil { d.syncInitHook(origin, latest) } + d.queue.Prepare(origin+1, 1) + errc := make(chan error, 2) go func() { errc <- d.fetchHashes61(p, td, origin+1) }() go func() { errc <- d.fetchBlocks61(origin + 1) }() @@ -356,7 +431,7 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e } return <-errc - case p.version >= eth62: + case p.version >= 62: // Look up the sync boundaries: the common ancestor and the target block latest, err := d.fetchHeight(p) if err != nil { @@ -373,21 +448,32 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e d.syncStatsHeight = latest d.syncStatsLock.Unlock() - // Initiate the sync using a concurrent hash and block retrieval algorithm + // Initiate the sync using a concurrent header and content retrieval algorithm + parts := 1 + if d.mode == FastSync { + parts = 2 // receipts are fetched too + } + d.queue.Prepare(origin+1, parts) + if d.syncInitHook != nil { d.syncInitHook(origin, latest) } - errc := make(chan error, 2) - go func() { errc <- d.fetchHeaders(p, td, origin+1) }() - go func() { errc <- d.fetchBodies(origin + 1) }() - - // If any fetcher fails, cancel the other - if err := <-errc; err != nil { - d.cancel() - <-errc - return err + errc := make(chan error, 3) + go func() { errc <- d.fetchHeaders(p, td, origin+1) }() // Headers are always retrieved + go func() { errc <- d.fetchReceipts(origin + 1) }() // Receipts are retrieved during fast sync + go func() { errc <- d.fetchBodies(origin + 1) }() // Bodies are retrieved during normal sync + + // If any fetcher fails, cancel the others + var fail error + for i := 0; i < cap(errc); i++ { + if err := <-errc; err != nil { + if fail == nil { + fail = err + d.cancel() + } + } } - return <-errc + return fail default: // Something very wrong, stop right here @@ -637,7 +723,7 @@ func (d *Downloader) fetchHashes61(p *peer, td *big.Int, from uint64) error { glog.V(logger.Debug).Infof("%v: no available hashes", p) select { - case d.wakeCh <- false: + case d.blockWakeCh <- false: case <-d.cancelCh: } // If no hashes were retrieved at all, the peer violated it's TD promise that it had a @@ -660,24 +746,24 @@ func (d *Downloader) fetchHashes61(p *peer, td *big.Int, from uint64) error { gotHashes = true // Otherwise insert all the new hashes, aborting in case of junk - glog.V(logger.Detail).Infof("%v: inserting %d hashes from #%d", p, len(hashPack.hashes), from) + glog.V(logger.Detail).Infof("%v: scheduling %d hashes from #%d", p, len(hashPack.hashes), from) - inserts := d.queue.Insert61(hashPack.hashes, true) + inserts := d.queue.Schedule61(hashPack.hashes, true) if len(inserts) != len(hashPack.hashes) { glog.V(logger.Debug).Infof("%v: stale hashes", p) return errBadPeer } // Notify the block fetcher of new hashes, but stop if queue is full - if d.queue.Pending() < maxQueuedHashes { + if d.queue.PendingBlocks() < maxQueuedHashes { // We still have hashes to fetch, send continuation wake signal (potential) select { - case d.wakeCh <- true: + case d.blockWakeCh <- true: default: } } else { // Hash limit reached, send a termination wake signal (enforced) select { - case d.wakeCh <- false: + case d.blockWakeCh <- false: case <-d.cancelCh: } return nil @@ -707,10 +793,8 @@ func (d *Downloader) fetchBlocks61(from uint64) error { update := make(chan struct{}, 1) - // Prepare the queue and fetch blocks until the hash fetcher's done - d.queue.Prepare(from) + // Fetch blocks until the hash fetcher's done finished := false - for { select { case <-d.cancelCh: @@ -733,13 +817,13 @@ func (d *Downloader) fetchBlocks61(from uint64) error { // If no blocks were delivered, demote the peer (need the delivery above) if len(blockPack.blocks) == 0 { peer.Demote() - peer.SetIdle61() + peer.SetBlocksIdle() glog.V(logger.Detail).Infof("%s: no blocks delivered", peer) break } // All was successful, promote the peer and potentially start processing peer.Promote() - peer.SetIdle61() + peer.SetBlocksIdle() glog.V(logger.Detail).Infof("%s: delivered %d blocks", peer, len(blockPack.blocks)) go d.process() @@ -751,7 +835,7 @@ func (d *Downloader) fetchBlocks61(from uint64) error { // Peer probably timed out with its delivery but came through // in the end, demote, but allow to to pull from this peer. peer.Demote() - peer.SetIdle61() + peer.SetBlocksIdle() glog.V(logger.Detail).Infof("%s: out of bound delivery", peer) case errStaleDelivery: @@ -765,7 +849,7 @@ func (d *Downloader) fetchBlocks61(from uint64) error { default: // Peer did something semi-useful, demote but keep it around peer.Demote() - peer.SetIdle61() + peer.SetBlocksIdle() glog.V(logger.Detail).Infof("%s: delivery partially failed: %v", peer, err) go d.process() } @@ -776,7 +860,7 @@ func (d *Downloader) fetchBlocks61(from uint64) error { default: } - case cont := <-d.wakeCh: + case cont := <-d.blockWakeCh: // The hash fetcher sent a continuation flag, check if it's done if !cont { finished = true @@ -800,14 +884,14 @@ func (d *Downloader) fetchBlocks61(from uint64) error { return errNoPeers } // Check for block request timeouts and demote the responsible peers - for _, pid := range d.queue.Expire(blockHardTTL) { + for _, pid := range d.queue.Expire61(blockHardTTL) { if peer := d.peers.Peer(pid); peer != nil { peer.Demote() glog.V(logger.Detail).Infof("%s: block delivery timeout", peer) } } - // If there's noting more to fetch, wait or terminate - if d.queue.Pending() == 0 { + // If there's nothing more to fetch, wait or terminate + if d.queue.PendingBlocks() == 0 { if d.queue.InFlight() == 0 && finished { glog.V(logger.Debug).Infof("Block fetching completed") return nil @@ -816,16 +900,18 @@ func (d *Downloader) fetchBlocks61(from uint64) error { } // Send a download request to all idle peers, until throttled throttled := false - for _, peer := range d.peers.IdlePeers(eth61) { + idles, total := d.peers.BlockIdlePeers(61) + + for _, peer := range idles { // Short circuit if throttling activated - if d.queue.Throttle() { + if d.queue.ThrottleBlocks() { throttled = true break } // Reserve a chunk of hashes for a peer. A nil can mean either that // no more hashes are available, or that the peer is known not to // have them. - request := d.queue.Reserve61(peer, peer.Capacity()) + request := d.queue.Reserve61(peer, peer.BlockCapacity()) if request == nil { continue } @@ -835,12 +921,12 @@ func (d *Downloader) fetchBlocks61(from uint64) error { // Fetch the chunk and make sure any errors return the hashes to the queue if err := peer.Fetch61(request); err != nil { glog.V(logger.Error).Infof("%v: fetch failed, rescheduling", peer) - d.queue.Cancel(request) + d.queue.Cancel61(request) } } // Make sure that we have peers available for fetching. If all peers have been tried // and all failed throw an error - if !throttled && d.queue.InFlight() == 0 { + if !throttled && d.queue.InFlight() == 0 && len(idles) == total { return errPeersUnavailable } } @@ -891,16 +977,19 @@ func (d *Downloader) fetchHeight(p *peer) (uint64, error) { } } -// findAncestor tries to locate the common ancestor block of the local chain and +// findAncestor tries to locate the common ancestor link of the local chain and // a remote peers blockchain. In the general case when our node was in sync and -// on the correct chain, checking the top N blocks should already get us a match. +// on the correct chain, checking the top N links should already get us a match. // In the rare scenario when we ended up on a long reorganization (i.e. none of -// the head blocks match), we do a binary search to find the common ancestor. +// the head links match), we do a binary search to find the common ancestor. func (d *Downloader) findAncestor(p *peer) (uint64, error) { glog.V(logger.Debug).Infof("%v: looking for common ancestor", p) - // Request our head blocks to short circuit ancestor location - head := d.headBlock().NumberU64() + // Request our head headers to short circuit ancestor location + head := d.headHeader().Number.Uint64() + if d.mode == FullSync { + head = d.headBlock().NumberU64() + } from := int64(head) - int64(MaxHeaderFetch) + 1 if from < 0 { from = 0 @@ -931,7 +1020,7 @@ func (d *Downloader) findAncestor(p *peer) (uint64, error) { // Check if a common ancestor was found finished = true for i := len(headers) - 1; i >= 0; i-- { - if d.hasBlock(headers[i].Hash()) { + if (d.mode == FullSync && d.hasBlock(headers[i].Hash())) || (d.mode != FullSync && d.hasHeader(headers[i].Hash())) { number, hash = headers[i].Number.Uint64(), headers[i].Hash() break } @@ -986,13 +1075,13 @@ func (d *Downloader) findAncestor(p *peer) (uint64, error) { arrived = true // Modify the search interval based on the response - block := d.getBlock(headers[0].Hash()) - if block == nil { + if (d.mode == FullSync && !d.hasBlock(headers[0].Hash())) || (d.mode != FullSync && !d.hasHeader(headers[0].Hash())) { end = check break } - if block.NumberU64() != check { - glog.V(logger.Debug).Infof("%v: non requested header #%d [%x…], instead of #%d", p, block.NumberU64(), block.Hash().Bytes()[:4], check) + header := d.getHeader(headers[0].Hash()) // Independent of sync mode, header surely exists + if header.Number.Uint64() != check { + glog.V(logger.Debug).Infof("%v: non requested header #%d [%x…], instead of #%d", p, header.Number, header.Hash().Bytes()[:4], check) return 0, errBadPeer } start = check @@ -1017,6 +1106,9 @@ func (d *Downloader) findAncestor(p *peer) (uint64, error) { // fetchHeaders keeps retrieving headers from the requested number, until no more // are returned, potentially throttling on the way. +// +// The queue parameter can be used to switch between queuing headers for block +// body download too, or directly import as pure header chains. func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error { glog.V(logger.Debug).Infof("%v: downloading headers from #%d", p, from) defer glog.V(logger.Debug).Infof("%v: header download terminated", p) @@ -1058,13 +1150,15 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error { headerReqTimer.UpdateSince(request) timeout.Stop() - // If no more headers are inbound, notify the body fetcher and return + // If no more headers are inbound, notify the content fetchers and return if len(headerPack.headers) == 0 { glog.V(logger.Debug).Infof("%v: no available headers", p) - select { - case d.wakeCh <- false: - case <-d.cancelCh: + for _, ch := range []chan bool{d.bodyWakeCh, d.receiptWakeCh} { + select { + case ch <- false: + case <-d.cancelCh: + } } // If no headers were retrieved at all, the peer violated it's TD promise that it had a // better chain compared to ours. The only exception is if it's promised blocks were @@ -1086,27 +1180,37 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error { gotHeaders = true // Otherwise insert all the new headers, aborting in case of junk - glog.V(logger.Detail).Infof("%v: inserting %d headers from #%d", p, len(headerPack.headers), from) + glog.V(logger.Detail).Infof("%v: schedule %d headers from #%d", p, len(headerPack.headers), from) - inserts := d.queue.Insert(headerPack.headers, from) - if len(inserts) != len(headerPack.headers) { - glog.V(logger.Debug).Infof("%v: stale headers", p) - return errBadPeer - } - // Notify the block fetcher of new headers, but stop if queue is full - if d.queue.Pending() < maxQueuedHeaders { - // We still have headers to fetch, send continuation wake signal (potential) - select { - case d.wakeCh <- true: - default: + if d.mode == FullSync || d.mode == FastSync { + inserts := d.queue.Schedule(headerPack.headers, from, d.mode == FastSync) + if len(inserts) != len(headerPack.headers) { + glog.V(logger.Debug).Infof("%v: stale headers", p) + return errBadPeer } } else { - // Header limit reached, send a termination wake signal (enforced) - select { - case d.wakeCh <- false: - case <-d.cancelCh: + if n, err := d.insertHeaders(headerPack.headers, true); err != nil { + glog.V(logger.Debug).Infof("%v: invalid header #%d [%x…]: %v", p, headerPack.headers[n].Number, headerPack.headers[n].Hash().Bytes()[:4], err) + return errInvalidChain + } + } + // Notify the content fetchers of new headers, but stop if queue is full + cont := d.queue.PendingBlocks() < maxQueuedHeaders || d.queue.PendingReceipts() < maxQueuedHeaders + for _, ch := range []chan bool{d.bodyWakeCh, d.receiptWakeCh} { + if cont { + // We still have headers to fetch, send continuation wake signal (potential) + select { + case ch <- true: + default: + } + } else { + // Header limit reached, send a termination wake signal (enforced) + select { + case ch <- false: + case <-d.cancelCh: + } + return nil } - return nil } // Queue not yet full, fetch the next batch from += uint64(len(headerPack.headers)) @@ -1119,9 +1223,11 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error { d.dropPeer(p.id) // Finish the sync gracefully instead of dumping the gathered data though - select { - case d.wakeCh <- false: - case <-d.cancelCh: + for _, ch := range []chan bool{d.bodyWakeCh, d.receiptWakeCh} { + select { + case ch <- false: + case <-d.cancelCh: + } } return nil } @@ -1133,22 +1239,69 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error { // and also periodically checking for timeouts. func (d *Downloader) fetchBodies(from uint64) error { glog.V(logger.Debug).Infof("Downloading block bodies from #%d", from) - defer glog.V(logger.Debug).Infof("Block body download terminated") - // Create a timeout timer for scheduling expiration tasks + var ( + deliver = func(packet interface{}) error { + pack := packet.(*bodyPack) + return d.queue.DeliverBlocks(pack.peerId, pack.transactions, pack.uncles) + } + expire = func() []string { return d.queue.ExpireBlocks(bodyHardTTL) } + fetch = func(p *peer, req *fetchRequest) error { return p.FetchBodies(req) } + capacity = func(p *peer) int { return p.BlockCapacity() } + getIdles = func() ([]*peer, int) { return d.peers.BlockIdlePeers(62) } + setIdle = func(p *peer) { p.SetBlocksIdle() } + ) + err := d.fetchParts(from, errCancelBodyFetch, d.bodyCh, deliver, d.bodyWakeCh, expire, + d.queue.PendingBlocks, d.queue.ThrottleBlocks, d.queue.ReserveBlocks, d.bodyFetchHook, + fetch, d.queue.CancelBlocks, capacity, getIdles, setIdle, "Body") + + glog.V(logger.Debug).Infof("Block body download terminated: %v", err) + return err +} + +// fetchReceipts iteratively downloads the scheduled block receipts, taking any +// available peers, reserving a chunk of receipts for each, waiting for delivery +// and also periodically checking for timeouts. +func (d *Downloader) fetchReceipts(from uint64) error { + glog.V(logger.Debug).Infof("Downloading receipts from #%d", from) + + var ( + deliver = func(packet interface{}) error { + pack := packet.(*receiptPack) + return d.queue.DeliverReceipts(pack.peerId, pack.receipts) + } + expire = func() []string { return d.queue.ExpireReceipts(bodyHardTTL) } + fetch = func(p *peer, req *fetchRequest) error { return p.FetchReceipts(req) } + capacity = func(p *peer) int { return p.ReceiptCapacity() } + setIdle = func(p *peer) { p.SetReceiptsIdle() } + ) + err := d.fetchParts(from, errCancelReceiptFetch, d.receiptCh, deliver, d.receiptWakeCh, expire, + d.queue.PendingReceipts, d.queue.ThrottleReceipts, d.queue.ReserveReceipts, d.receiptFetchHook, + fetch, d.queue.CancelReceipts, capacity, d.peers.ReceiptIdlePeers, setIdle, "Receipt") + + glog.V(logger.Debug).Infof("Receipt download terminated: %v", err) + return err +} + +// fetchParts iteratively downloads scheduled block parts, taking any available +// peers, reserving a chunk of fetch requests for each, waiting for delivery and +// also periodically checking for timeouts. +func (d *Downloader) fetchParts(from uint64, errCancel error, deliveryCh chan dataPack, deliver func(packet interface{}) error, wakeCh chan bool, + expire func() []string, pending func() int, throttle func() bool, reserve func(*peer, int) (*fetchRequest, bool, error), fetchHook func([]*types.Header), + fetch func(*peer, *fetchRequest) error, cancel func(*fetchRequest), capacity func(*peer) int, idle func() ([]*peer, int), setIdle func(*peer), kind string) error { + + // Create a ticker to detect expired retreival tasks ticker := time.NewTicker(100 * time.Millisecond) defer ticker.Stop() update := make(chan struct{}, 1) - // Prepare the queue and fetch block bodies until the block header fetcher's done - d.queue.Prepare(from) + // Prepare the queue and fetch block parts until the block header fetcher's done finished := false - for { select { case <-d.cancelCh: - return errCancelBlockFetch + return errCancel case <-d.hashCh: // Out of bounds eth/61 hashes received, ignore them @@ -1156,42 +1309,41 @@ func (d *Downloader) fetchBodies(from uint64) error { case <-d.blockCh: // Out of bounds eth/61 blocks received, ignore them - case bodyPack := <-d.bodyCh: + case packet := <-deliveryCh: // If the peer was previously banned and failed to deliver it's pack // in a reasonable time frame, ignore it's message. - if peer := d.peers.Peer(bodyPack.peerId); peer != nil { - // Deliver the received chunk of bodies, and demote in case of errors - err := d.queue.Deliver(bodyPack.peerId, bodyPack.transactions, bodyPack.uncles) - switch err { + if peer := d.peers.Peer(packet.PeerId()); peer != nil { + // Deliver the received chunk of data, and demote in case of errors + switch err := deliver(packet); err { case nil: - // If no blocks were delivered, demote the peer (need the delivery above) - if len(bodyPack.transactions) == 0 || len(bodyPack.uncles) == 0 { + // If no blocks were delivered, demote the peer (need the delivery above to clean internal queue!) + if packet.Empty() { peer.Demote() - peer.SetIdle() - glog.V(logger.Detail).Infof("%s: no block bodies delivered", peer) + setIdle(peer) + glog.V(logger.Detail).Infof("%s: no %s delivered", peer, strings.ToLower(kind)) break } // All was successful, promote the peer and potentially start processing peer.Promote() - peer.SetIdle() - glog.V(logger.Detail).Infof("%s: delivered %d:%d block bodies", peer, len(bodyPack.transactions), len(bodyPack.uncles)) + setIdle(peer) + glog.V(logger.Detail).Infof("%s: delivered %s %s(s)", peer, packet.Stats(), strings.ToLower(kind)) go d.process() case errInvalidChain: // The hash chain is invalid (blocks are not ordered properly), abort return err - case errInvalidBody: + case errInvalidBody, errInvalidReceipt: // The peer delivered something very bad, drop immediately - glog.V(logger.Error).Infof("%s: delivered invalid block, dropping", peer) + glog.V(logger.Error).Infof("%s: delivered invalid %s, dropping", peer, strings.ToLower(kind)) d.dropPeer(peer.id) case errNoFetchesPending: // Peer probably timed out with its delivery but came through // in the end, demote, but allow to to pull from this peer. peer.Demote() - peer.SetIdle() - glog.V(logger.Detail).Infof("%s: out of bound delivery", peer) + setIdle(peer) + glog.V(logger.Detail).Infof("%s: out of bound %s delivery", peer, strings.ToLower(kind)) case errStaleDelivery: // Delivered something completely else than requested, usually @@ -1199,13 +1351,13 @@ func (d *Downloader) fetchBodies(from uint64) error { // Don't set it to idle as the original request should still be // in flight. peer.Demote() - glog.V(logger.Detail).Infof("%s: stale delivery", peer) + glog.V(logger.Detail).Infof("%s: %s stale delivery", peer, strings.ToLower(kind)) default: // Peer did something semi-useful, demote but keep it around peer.Demote() - peer.SetIdle() - glog.V(logger.Detail).Infof("%s: delivery partially failed: %v", peer, err) + setIdle(peer) + glog.V(logger.Detail).Infof("%s: %s delivery partially failed: %v", peer, strings.ToLower(kind), err) go d.process() } } @@ -1215,7 +1367,7 @@ func (d *Downloader) fetchBodies(from uint64) error { default: } - case cont := <-d.wakeCh: + case cont := <-wakeCh: // The header fetcher sent a continuation flag, check if it's done if !cont { finished = true @@ -1238,65 +1390,69 @@ func (d *Downloader) fetchBodies(from uint64) error { if d.peers.Len() == 0 { return errNoPeers } - // Check for block body request timeouts and demote the responsible peers - for _, pid := range d.queue.Expire(bodyHardTTL) { + // Check for fetch request timeouts and demote the responsible peers + for _, pid := range expire() { if peer := d.peers.Peer(pid); peer != nil { peer.Demote() - glog.V(logger.Detail).Infof("%s: block body delivery timeout", peer) + glog.V(logger.Detail).Infof("%s: %s delivery timeout", peer, strings.ToLower(kind)) } } - // If there's noting more to fetch, wait or terminate - if d.queue.Pending() == 0 { + // If there's nothing more to fetch, wait or terminate + if pending() == 0 { if d.queue.InFlight() == 0 && finished { - glog.V(logger.Debug).Infof("Block body fetching completed") + glog.V(logger.Debug).Infof("%s fetching completed", kind) return nil } break } // Send a download request to all idle peers, until throttled - queuedEmptyBlocks, throttled := false, false - for _, peer := range d.peers.IdlePeers(eth62) { + progressed, throttled := false, false + idles, total := idle() + + for _, peer := range idles { // Short circuit if throttling activated - if d.queue.Throttle() { + if throttle() { throttled = true break } - // Reserve a chunk of hashes for a peer. A nil can mean either that - // no more hashes are available, or that the peer is known not to + // Reserve a chunk of fetches for a peer. A nil can mean either that + // no more headers are available, or that the peer is known not to // have them. - request, process, err := d.queue.Reserve(peer, peer.Capacity()) + request, progress, err := reserve(peer, capacity(peer)) if err != nil { return err } - if process { - queuedEmptyBlocks = true + if progress { + progressed = true go d.process() } if request == nil { continue } if glog.V(logger.Detail) { - glog.Infof("%s: requesting %d block bodies", peer, len(request.Headers)) + glog.Infof("%s: requesting %d %s(s), first at #%d", peer, len(request.Headers), strings.ToLower(kind), request.Headers[0].Number) } // Fetch the chunk and make sure any errors return the hashes to the queue - if d.bodyFetchHook != nil { - d.bodyFetchHook(request.Headers) + if fetchHook != nil { + fetchHook(request.Headers) } - if err := peer.Fetch(request); err != nil { - glog.V(logger.Error).Infof("%v: fetch failed, rescheduling", peer) - d.queue.Cancel(request) + if err := fetch(peer, request); err != nil { + glog.V(logger.Error).Infof("%v: %s fetch failed, rescheduling", peer, strings.ToLower(kind)) + cancel(request) } } // Make sure that we have peers available for fetching. If all peers have been tried // and all failed throw an error - if !queuedEmptyBlocks && !throttled && d.queue.InFlight() == 0 { + if !progressed && !throttled && d.queue.InFlight() == 0 && len(idles) == total { return errPeersUnavailable } } } } -// process takes blocks from the queue and tries to import them into the chain. +// process takes fetch results from the queue and tries to import them into the +// chain. The type of import operation will depend on the result contents: +// - // // The algorithmic flow is as follows: // - The `processing` flag is swapped to 1 to ensure singleton access @@ -1317,10 +1473,10 @@ func (d *Downloader) process() { } // If the processor just exited, but there are freshly pending items, try to // reenter. This is needed because the goroutine spinned up for processing - // the fresh blocks might have been rejected entry to to this present thread + // the fresh results might have been rejected entry to to this present thread // not yet releasing the `processing` state. defer func() { - if atomic.LoadInt32(&d.interrupt) == 0 && d.queue.GetHeadBlock() != nil { + if atomic.LoadInt32(&d.interrupt) == 0 && d.queue.GetHeadResult() != nil { d.process() } }() @@ -1328,38 +1484,64 @@ func (d *Downloader) process() { // the import statistics to zero. defer atomic.StoreInt32(&d.processing, 0) - // Repeat the processing as long as there are blocks to import + // Repeat the processing as long as there are results to process for { - // Fetch the next batch of blocks - blocks := d.queue.TakeBlocks() - if len(blocks) == 0 { + // Fetch the next batch of results + results := d.queue.TakeResults() + if len(results) == 0 { return } if d.chainInsertHook != nil { - d.chainInsertHook(blocks) + d.chainInsertHook(results) } // Actually import the blocks - glog.V(logger.Debug).Infof("Inserting chain with %d blocks (#%v - #%v)\n", len(blocks), blocks[0].RawBlock.Number(), blocks[len(blocks)-1].RawBlock.Number()) - for len(blocks) != 0 { + if glog.V(logger.Debug) { + first, last := results[0].Header, results[len(results)-1].Header + glog.V(logger.Debug).Infof("Inserting chain with %d items (#%d [%x…] - #%d [%x…])", len(results), first.Number, first.Hash().Bytes()[:4], last.Number, last.Hash().Bytes()[:4]) + } + for len(results) != 0 { // Check for any termination requests if atomic.LoadInt32(&d.interrupt) == 1 { return } - // Retrieve the first batch of blocks to insert - max := int(math.Min(float64(len(blocks)), float64(maxBlockProcess))) - raw := make(types.Blocks, 0, max) - for _, block := range blocks[:max] { - raw = append(raw, block.RawBlock) + // Retrieve the a batch of results to import + var ( + headers = make([]*types.Header, 0, maxResultsProcess) + blocks = make([]*types.Block, 0, maxResultsProcess) + receipts = make([]types.Receipts, 0, maxResultsProcess) + ) + items := int(math.Min(float64(len(results)), float64(maxResultsProcess))) + for _, result := range results[:items] { + switch { + case d.mode == FullSync: + blocks = append(blocks, types.NewBlockWithHeader(result.Header).WithBody(result.Transactions, result.Uncles)) + case d.mode == FastSync: + blocks = append(blocks, types.NewBlockWithHeader(result.Header).WithBody(result.Transactions, result.Uncles)) + receipts = append(receipts, result.Receipts) + case d.mode == LightSync: + headers = append(headers, result.Header) + } + } + // Try to process the results, aborting if there's an error + var ( + err error + index int + ) + switch { + case d.mode == FullSync: + index, err = d.insertBlocks(blocks) + case d.mode == FastSync: + index, err = d.insertReceipts(blocks, receipts) + case d.mode == LightSync: + index, err = d.insertHeaders(headers, true) } - // Try to inset the blocks, drop the originating peer if there's an error - index, err := d.insertChain(raw) if err != nil { - glog.V(logger.Debug).Infof("Block #%d import failed: %v", raw[index].NumberU64(), err) - d.dropPeer(blocks[index].OriginPeer) + glog.V(logger.Debug).Infof("Result #%d [%x…] processing failed: %v", results[index].Header.Number, results[index].Header.Hash(), err) d.cancel() return } - blocks = blocks[max:] + // Shift the results to the next batch + results = results[items:] } } } @@ -1468,7 +1650,34 @@ func (d *Downloader) DeliverBodies(id string, transactions [][]*types.Transactio d.cancelLock.RUnlock() select { - case d.bodyCh <- bodyPack{id, transactions, uncles}: + case d.bodyCh <- &bodyPack{id, transactions, uncles}: + return nil + + case <-cancel: + return errNoSyncActive + } +} + +// DeliverReceipts injects a new batch of receipts received from a remote node. +func (d *Downloader) DeliverReceipts(id string, receipts [][]*types.Receipt) (err error) { + // Update the delivery metrics for both good and failed deliveries + receiptInMeter.Mark(int64(len(receipts))) + defer func() { + if err != nil { + receiptDropMeter.Mark(int64(len(receipts))) + } + }() + // Make sure the downloader is active + if atomic.LoadInt32(&d.synchronising) == 0 { + return errNoSyncActive + } + // Deliver or abort if the sync is canceled while queuing + d.cancelLock.RLock() + cancel := d.cancelCh + d.cancelLock.RUnlock() + + select { + case d.receiptCh <- &receiptPack{id, receipts}: return nil case <-cancel: diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index 96096527e..18bdb56dd 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -45,7 +45,8 @@ var ( // the returned hash chain is ordered head->parent. In addition, every 3rd block // contains a transaction and every 5th an uncle to allow testing correct block // reassembly. -func makeChain(n int, seed byte, parent *types.Block) ([]common.Hash, map[common.Hash]*types.Block) { +func makeChain(n int, seed byte, parent *types.Block) ([]common.Hash, map[common.Hash]*types.Header, map[common.Hash]*types.Block) { + // Generate the block chain blocks := core.GenerateChain(parent, testdb, n, func(i int, block *core.BlockGen) { block.SetCoinbase(common.Address{seed}) @@ -62,59 +63,80 @@ func makeChain(n int, seed byte, parent *types.Block) ([]common.Hash, map[common block.AddUncle(&types.Header{ParentHash: block.PrevBlock(i - 1).Hash(), Number: big.NewInt(int64(i - 1))}) } }) + // Convert the block-chain into a hash-chain and header/block maps hashes := make([]common.Hash, n+1) hashes[len(hashes)-1] = parent.Hash() + + headerm := make(map[common.Hash]*types.Header, n+1) + headerm[parent.Hash()] = parent.Header() + blockm := make(map[common.Hash]*types.Block, n+1) blockm[parent.Hash()] = parent + for i, b := range blocks { hashes[len(hashes)-i-2] = b.Hash() + headerm[b.Hash()] = b.Header() blockm[b.Hash()] = b } - return hashes, blockm + return hashes, headerm, blockm } // makeChainFork creates two chains of length n, such that h1[:f] and // h2[:f] are different but have a common suffix of length n-f. -func makeChainFork(n, f int, parent *types.Block) (h1, h2 []common.Hash, b1, b2 map[common.Hash]*types.Block) { - // Create the common suffix. - h, b := makeChain(n-f, 0, parent) - // Create the forks. - h1, b1 = makeChain(f, 1, b[h[0]]) - h1 = append(h1, h[1:]...) - h2, b2 = makeChain(f, 2, b[h[0]]) - h2 = append(h2, h[1:]...) - for hash, block := range b { - b1[hash] = block - b2[hash] = block - } - return h1, h2, b1, b2 +func makeChainFork(n, f int, parent *types.Block) ([]common.Hash, []common.Hash, map[common.Hash]*types.Header, map[common.Hash]*types.Header, map[common.Hash]*types.Block, map[common.Hash]*types.Block) { + // Create the common suffix + hashes, headers, blocks := makeChain(n-f, 0, parent) + + // Create the forks + hashes1, headers1, blocks1 := makeChain(f, 1, blocks[hashes[0]]) + hashes1 = append(hashes1, hashes[1:]...) + + hashes2, headers2, blocks2 := makeChain(f, 2, blocks[hashes[0]]) + hashes2 = append(hashes2, hashes[1:]...) + + for hash, header := range headers { + headers1[hash] = header + headers2[hash] = header + } + for hash, block := range blocks { + blocks1[hash] = block + blocks2[hash] = block + } + return hashes1, hashes2, headers1, headers2, blocks1, blocks2 } // downloadTester is a test simulator for mocking out local block chain. type downloadTester struct { downloader *Downloader - ownHashes []common.Hash // Hash chain belonging to the tester - ownBlocks map[common.Hash]*types.Block // Blocks belonging to the tester - ownChainTd map[common.Hash]*big.Int // Total difficulties of the blocks in the local chain - peerHashes map[string][]common.Hash // Hash chain belonging to different test peers - peerBlocks map[string]map[common.Hash]*types.Block // Blocks belonging to different test peers - peerChainTds map[string]map[common.Hash]*big.Int // Total difficulties of the blocks in the peer chains + ownHashes []common.Hash // Hash chain belonging to the tester + ownHeaders map[common.Hash]*types.Header // Headers belonging to the tester + ownBlocks map[common.Hash]*types.Block // Blocks belonging to the tester + ownReceipts map[common.Hash]types.Receipts // Receipts belonging to the tester + ownChainTd map[common.Hash]*big.Int // Total difficulties of the blocks in the local chain + peerHashes map[string][]common.Hash // Hash chain belonging to different test peers + peerHeaders map[string]map[common.Hash]*types.Header // Headers belonging to different test peers + peerBlocks map[string]map[common.Hash]*types.Block // Blocks belonging to different test peers + peerChainTds map[string]map[common.Hash]*big.Int // Total difficulties of the blocks in the peer chains lock sync.RWMutex } // newTester creates a new downloader test mocker. -func newTester() *downloadTester { +func newTester(mode SyncMode) *downloadTester { tester := &downloadTester{ ownHashes: []common.Hash{genesis.Hash()}, + ownHeaders: map[common.Hash]*types.Header{genesis.Hash(): genesis.Header()}, ownBlocks: map[common.Hash]*types.Block{genesis.Hash(): genesis}, + ownReceipts: map[common.Hash]types.Receipts{genesis.Hash(): genesis.Receipts()}, ownChainTd: map[common.Hash]*big.Int{genesis.Hash(): genesis.Difficulty()}, peerHashes: make(map[string][]common.Hash), + peerHeaders: make(map[string]map[common.Hash]*types.Header), peerBlocks: make(map[string]map[common.Hash]*types.Block), peerChainTds: make(map[string]map[common.Hash]*big.Int), } - tester.downloader = New(new(event.TypeMux), tester.hasBlock, tester.getBlock, tester.headBlock, tester.getTd, tester.insertChain, tester.dropPeer) + tester.downloader = New(mode, new(event.TypeMux), tester.hasHeader, tester.hasBlock, tester.getHeader, tester.getBlock, + tester.headHeader, tester.headBlock, tester.getTd, tester.insertHeaders, tester.insertBlocks, tester.insertConfirmedBlocks, tester.dropPeer) return tester } @@ -135,8 +157,7 @@ func (dl *downloadTester) sync(id string, td *big.Int) error { err := dl.downloader.synchronise(id, hash, td) for { // If the queue is empty and processing stopped, break - hashes, blocks := dl.downloader.queue.Size() - if hashes+blocks == 0 && atomic.LoadInt32(&dl.downloader.processing) == 0 { + if dl.downloader.queue.Idle() && atomic.LoadInt32(&dl.downloader.processing) == 0 { break } // Otherwise sleep a bit and retry @@ -145,12 +166,22 @@ func (dl *downloadTester) sync(id string, td *big.Int) error { return err } -// hasBlock checks if a block is pres ent in the testers canonical chain. +// hasHeader checks if a header is present in the testers canonical chain. +func (dl *downloadTester) hasHeader(hash common.Hash) bool { + return dl.getHeader(hash) != nil +} + +// hasBlock checks if a block is present in the testers canonical chain. func (dl *downloadTester) hasBlock(hash common.Hash) bool { + return dl.getBlock(hash) != nil +} + +// getHeader retrieves a header from the testers canonical chain. +func (dl *downloadTester) getHeader(hash common.Hash) *types.Header { dl.lock.RLock() defer dl.lock.RUnlock() - return dl.getBlock(hash) != nil + return dl.ownHeaders[hash] } // getBlock retrieves a block from the testers canonical chain. @@ -161,12 +192,25 @@ func (dl *downloadTester) getBlock(hash common.Hash) *types.Block { return dl.ownBlocks[hash] } +// headHeader retrieves the current head header from the canonical chain. +func (dl *downloadTester) headHeader() *types.Header { + dl.lock.RLock() + defer dl.lock.RUnlock() + + return dl.getHeader(dl.ownHashes[len(dl.ownHashes)-1]) +} + // headBlock retrieves the current head block from the canonical chain. func (dl *downloadTester) headBlock() *types.Block { dl.lock.RLock() defer dl.lock.RUnlock() - return dl.getBlock(dl.ownHashes[len(dl.ownHashes)-1]) + for i := len(dl.ownHashes) - 1; i >= 0; i-- { + if block := dl.getBlock(dl.ownHashes[i]); block != nil { + return block + } + } + return nil } // getTd retrieves the block's total difficulty from the canonical chain. @@ -177,8 +221,24 @@ func (dl *downloadTester) getTd(hash common.Hash) *big.Int { return dl.ownChainTd[hash] } -// insertChain injects a new batch of blocks into the simulated chain. -func (dl *downloadTester) insertChain(blocks types.Blocks) (int, error) { +// insertHeaders injects a new batch of headers into the simulated chain. +func (dl *downloadTester) insertHeaders(headers []*types.Header, verify bool) (int, error) { + dl.lock.Lock() + defer dl.lock.Unlock() + + for i, header := range headers { + if _, ok := dl.ownHeaders[header.ParentHash]; !ok { + return i, errors.New("unknown parent") + } + dl.ownHashes = append(dl.ownHashes, header.Hash()) + dl.ownHeaders[header.Hash()] = header + dl.ownChainTd[header.Hash()] = dl.ownChainTd[header.ParentHash] + } + return len(headers), nil +} + +// insertBlocks injects a new batch of blocks into the simulated chain. +func (dl *downloadTester) insertBlocks(blocks types.Blocks) (int, error) { dl.lock.Lock() defer dl.lock.Unlock() @@ -187,47 +247,74 @@ func (dl *downloadTester) insertChain(blocks types.Blocks) (int, error) { return i, errors.New("unknown parent") } dl.ownHashes = append(dl.ownHashes, block.Hash()) + dl.ownHeaders[block.Hash()] = block.Header() dl.ownBlocks[block.Hash()] = block dl.ownChainTd[block.Hash()] = dl.ownChainTd[block.ParentHash()] } return len(blocks), nil } +// insertBlocks injects a new batch of blocks into the simulated chain. +func (dl *downloadTester) insertConfirmedBlocks(blocks types.Blocks, receipts []types.Receipts) (int, error) { + dl.lock.Lock() + defer dl.lock.Unlock() + + for i := 0; i < len(blocks) && i < len(receipts); i++ { + if _, ok := dl.ownBlocks[blocks[i].ParentHash()]; !ok { + return i, errors.New("unknown parent") + } + dl.ownHashes = append(dl.ownHashes, blocks[i].Hash()) + dl.ownHeaders[blocks[i].Hash()] = blocks[i].Header() + dl.ownBlocks[blocks[i].Hash()] = blocks[i] + dl.ownReceipts[blocks[i].Hash()] = blocks[i].Receipts() + dl.ownChainTd[blocks[i].Hash()] = dl.ownChainTd[blocks[i].ParentHash()] + } + return len(blocks), nil +} + // newPeer registers a new block download source into the downloader. -func (dl *downloadTester) newPeer(id string, version int, hashes []common.Hash, blocks map[common.Hash]*types.Block) error { - return dl.newSlowPeer(id, version, hashes, blocks, 0) +func (dl *downloadTester) newPeer(id string, version int, hashes []common.Hash, headers map[common.Hash]*types.Header, blocks map[common.Hash]*types.Block) error { + return dl.newSlowPeer(id, version, hashes, headers, blocks, 0) } // newSlowPeer registers a new block download source into the downloader, with a // specific delay time on processing the network packets sent to it, simulating // potentially slow network IO. -func (dl *downloadTester) newSlowPeer(id string, version int, hashes []common.Hash, blocks map[common.Hash]*types.Block, delay time.Duration) error { +func (dl *downloadTester) newSlowPeer(id string, version int, hashes []common.Hash, headers map[common.Hash]*types.Header, blocks map[common.Hash]*types.Block, delay time.Duration) error { dl.lock.Lock() defer dl.lock.Unlock() var err error switch version { case 61: - err = dl.downloader.RegisterPeer(id, version, hashes[0], dl.peerGetRelHashesFn(id, delay), dl.peerGetAbsHashesFn(id, delay), dl.peerGetBlocksFn(id, delay), nil, nil, nil) + err = dl.downloader.RegisterPeer(id, version, hashes[0], dl.peerGetRelHashesFn(id, delay), dl.peerGetAbsHashesFn(id, delay), dl.peerGetBlocksFn(id, delay), nil, nil, nil, nil) case 62: - err = dl.downloader.RegisterPeer(id, version, hashes[0], nil, nil, nil, dl.peerGetRelHeadersFn(id, delay), dl.peerGetAbsHeadersFn(id, delay), dl.peerGetBodiesFn(id, delay)) + err = dl.downloader.RegisterPeer(id, version, hashes[0], nil, nil, nil, dl.peerGetRelHeadersFn(id, delay), dl.peerGetAbsHeadersFn(id, delay), dl.peerGetBodiesFn(id, delay), nil) case 63: - err = dl.downloader.RegisterPeer(id, version, hashes[0], nil, nil, nil, dl.peerGetRelHeadersFn(id, delay), dl.peerGetAbsHeadersFn(id, delay), dl.peerGetBodiesFn(id, delay)) + err = dl.downloader.RegisterPeer(id, version, hashes[0], nil, nil, nil, dl.peerGetRelHeadersFn(id, delay), dl.peerGetAbsHeadersFn(id, delay), dl.peerGetBodiesFn(id, delay), dl.peerGetReceiptsFn(id, delay)) case 64: - err = dl.downloader.RegisterPeer(id, version, hashes[0], nil, nil, nil, dl.peerGetRelHeadersFn(id, delay), dl.peerGetAbsHeadersFn(id, delay), dl.peerGetBodiesFn(id, delay)) + err = dl.downloader.RegisterPeer(id, version, hashes[0], nil, nil, nil, dl.peerGetRelHeadersFn(id, delay), dl.peerGetAbsHeadersFn(id, delay), dl.peerGetBodiesFn(id, delay), dl.peerGetReceiptsFn(id, delay)) } if err == nil { - // Assign the owned hashes and blocks to the peer (deep copy) + // Assign the owned hashes, headers and blocks to the peer (deep copy) dl.peerHashes[id] = make([]common.Hash, len(hashes)) copy(dl.peerHashes[id], hashes) + dl.peerHeaders[id] = make(map[common.Hash]*types.Header) dl.peerBlocks[id] = make(map[common.Hash]*types.Block) dl.peerChainTds[id] = make(map[common.Hash]*big.Int) + for _, hash := range hashes { + if header, ok := headers[hash]; ok { + dl.peerHeaders[id][hash] = header + if _, ok := dl.peerHeaders[id][header.ParentHash]; ok { + dl.peerChainTds[id][hash] = new(big.Int).Add(header.Difficulty, dl.peerChainTds[id][header.ParentHash]) + } + } if block, ok := blocks[hash]; ok { dl.peerBlocks[id][hash] = block - if parent, ok := dl.peerBlocks[id][block.ParentHash()]; ok { - dl.peerChainTds[id][hash] = new(big.Int).Add(block.Difficulty(), dl.peerChainTds[id][parent.Hash()]) + if _, ok := dl.peerBlocks[id][block.ParentHash()]; ok { + dl.peerChainTds[id][hash] = new(big.Int).Add(block.Difficulty(), dl.peerChainTds[id][block.ParentHash()]) } } } @@ -241,6 +328,7 @@ func (dl *downloadTester) dropPeer(id string) { defer dl.lock.Unlock() delete(dl.peerHashes, id) + delete(dl.peerHeaders, id) delete(dl.peerBlocks, id) delete(dl.peerChainTds, id) @@ -358,13 +446,13 @@ func (dl *downloadTester) peerGetAbsHeadersFn(id string, delay time.Duration) fu dl.lock.RLock() defer dl.lock.RUnlock() - // Gather the next batch of hashes + // Gather the next batch of headers hashes := dl.peerHashes[id] - blocks := dl.peerBlocks[id] + headers := dl.peerHeaders[id] result := make([]*types.Header, 0, amount) for i := 0; i < amount && len(hashes)-int(origin)-1-i >= 0; i++ { - if block, ok := blocks[hashes[len(hashes)-int(origin)-1-i]]; ok { - result = append(result, block.Header()) + if header, ok := headers[hashes[len(hashes)-int(origin)-1-i]]; ok { + result = append(result, header) } } // Delay delivery a bit to allow attacks to unfold @@ -403,50 +491,99 @@ func (dl *downloadTester) peerGetBodiesFn(id string, delay time.Duration) func([ } } +// peerGetReceiptsFn constructs a getReceipts method associated with a particular +// peer in the download tester. The returned function can be used to retrieve +// batches of block receipts from the particularly requested peer. +func (dl *downloadTester) peerGetReceiptsFn(id string, delay time.Duration) func([]common.Hash) error { + return func(hashes []common.Hash) error { + time.Sleep(delay) + + dl.lock.RLock() + defer dl.lock.RUnlock() + + blocks := dl.peerBlocks[id] + + receipts := make([][]*types.Receipt, 0, len(hashes)) + for _, hash := range hashes { + if block, ok := blocks[hash]; ok { + receipts = append(receipts, block.Receipts()) + } + } + go dl.downloader.DeliverReceipts(id, receipts) + + return nil + } +} + +// assertOwnChain checks if the local chain contains the correct number of items +// of the various chain components. +func assertOwnChain(t *testing.T, tester *downloadTester, length int) { + headers, blocks, receipts := length, length, length + switch tester.downloader.mode { + case FullSync: + receipts = 1 + case LightSync: + blocks, receipts = 1, 1 + } + + if hs := len(tester.ownHeaders); hs != headers { + t.Fatalf("synchronised headers mismatch: have %v, want %v", hs, headers) + } + if bs := len(tester.ownBlocks); bs != blocks { + t.Fatalf("synchronised blocks mismatch: have %v, want %v", bs, blocks) + } + if rs := len(tester.ownReceipts); rs != receipts { + t.Fatalf("synchronised receipts mismatch: have %v, want %v", rs, receipts) + } +} + // Tests that simple synchronization against a canonical chain works correctly. // In this test common ancestor lookup should be short circuited and not require // binary searching. -func TestCanonicalSynchronisation61(t *testing.T) { testCanonicalSynchronisation(t, 61) } -func TestCanonicalSynchronisation62(t *testing.T) { testCanonicalSynchronisation(t, 62) } -func TestCanonicalSynchronisation63(t *testing.T) { testCanonicalSynchronisation(t, 63) } -func TestCanonicalSynchronisation64(t *testing.T) { testCanonicalSynchronisation(t, 64) } - -func testCanonicalSynchronisation(t *testing.T, protocol int) { +func TestCanonicalSynchronisation61(t *testing.T) { testCanonicalSynchronisation(t, 61, FullSync) } +func TestCanonicalSynchronisation62(t *testing.T) { testCanonicalSynchronisation(t, 62, FullSync) } +func TestCanonicalSynchronisation63Full(t *testing.T) { testCanonicalSynchronisation(t, 63, FullSync) } +func TestCanonicalSynchronisation63Fast(t *testing.T) { testCanonicalSynchronisation(t, 63, FastSync) } +func TestCanonicalSynchronisation64Full(t *testing.T) { testCanonicalSynchronisation(t, 64, FullSync) } +func TestCanonicalSynchronisation64Fast(t *testing.T) { testCanonicalSynchronisation(t, 64, FastSync) } +func TestCanonicalSynchronisation64Light(t *testing.T) { testCanonicalSynchronisation(t, 64, LightSync) } + +func testCanonicalSynchronisation(t *testing.T, protocol int, mode SyncMode) { // Create a small enough block chain to download targetBlocks := blockCacheLimit - 15 - hashes, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) - tester := newTester() - tester.newPeer("peer", protocol, hashes, blocks) + tester := newTester(mode) + tester.newPeer("peer", protocol, hashes, headers, blocks) - // Synchronise with the peer and make sure all blocks were retrieved + // Synchronise with the peer and make sure all relevant data was retrieved if err := tester.sync("peer", nil); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } - if imported := len(tester.ownBlocks); imported != targetBlocks+1 { - t.Fatalf("synchronised block mismatch: have %v, want %v", imported, targetBlocks+1) - } + assertOwnChain(t, tester, targetBlocks+1) } // Tests that if a large batch of blocks are being downloaded, it is throttled // until the cached blocks are retrieved. -func TestThrottling61(t *testing.T) { testThrottling(t, 61) } -func TestThrottling62(t *testing.T) { testThrottling(t, 62) } -func TestThrottling63(t *testing.T) { testThrottling(t, 63) } -func TestThrottling64(t *testing.T) { testThrottling(t, 64) } - -func testThrottling(t *testing.T, protocol int) { +func TestThrottling61(t *testing.T) { testThrottling(t, 61, FullSync) } +func TestThrottling62(t *testing.T) { testThrottling(t, 62, FullSync) } +func TestThrottling63Full(t *testing.T) { testThrottling(t, 63, FullSync) } +func TestThrottling63Fast(t *testing.T) { testThrottling(t, 63, FastSync) } +func TestThrottling64Full(t *testing.T) { testThrottling(t, 64, FullSync) } +func TestThrottling64Fast(t *testing.T) { testThrottling(t, 64, FastSync) } + +func testThrottling(t *testing.T, protocol int, mode SyncMode) { // Create a long block chain to download and the tester targetBlocks := 8 * blockCacheLimit - hashes, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) - tester := newTester() - tester.newPeer("peer", protocol, hashes, blocks) + tester := newTester(mode) + tester.newPeer("peer", protocol, hashes, headers, blocks) // Wrap the importer to allow stepping blocked, proceed := uint32(0), make(chan struct{}) - tester.downloader.chainInsertHook = func(blocks []*Block) { - atomic.StoreUint32(&blocked, uint32(len(blocks))) + tester.downloader.chainInsertHook = func(results []*fetchResult) { + atomic.StoreUint32(&blocked, uint32(len(results))) <-proceed } // Start a synchronisation concurrently @@ -469,7 +606,12 @@ func testThrottling(t *testing.T, protocol int) { time.Sleep(25 * time.Millisecond) tester.downloader.queue.lock.RLock() - cached = len(tester.downloader.queue.blockPool) + cached = len(tester.downloader.queue.blockDonePool) + if mode == FastSync { + if receipts := len(tester.downloader.queue.receiptDonePool); receipts < cached { + cached = receipts + } + } tester.downloader.queue.lock.RUnlock() if cached == blockCacheLimit || len(tester.ownBlocks)+cached+int(atomic.LoadUint32(&blocked)) == targetBlocks+1 { @@ -488,9 +630,7 @@ func testThrottling(t *testing.T, protocol int) { } } // Check that we haven't pulled more blocks than available - if len(tester.ownBlocks) > targetBlocks+1 { - t.Fatalf("target block count mismatch: have %v, want %v", len(tester.ownBlocks), targetBlocks+1) - } + assertOwnChain(t, tester, targetBlocks+1) if err := <-errc; err != nil { t.Fatalf("block synchronization failed: %v", err) } @@ -499,39 +639,39 @@ func testThrottling(t *testing.T, protocol int) { // Tests that simple synchronization against a forked chain works correctly. In // this test common ancestor lookup should *not* be short circuited, and a full // binary search should be executed. -func TestForkedSynchronisation61(t *testing.T) { testForkedSynchronisation(t, 61) } -func TestForkedSynchronisation62(t *testing.T) { testForkedSynchronisation(t, 62) } -func TestForkedSynchronisation63(t *testing.T) { testForkedSynchronisation(t, 63) } -func TestForkedSynchronisation64(t *testing.T) { testForkedSynchronisation(t, 64) } - -func testForkedSynchronisation(t *testing.T, protocol int) { +func TestForkedSynchronisation61(t *testing.T) { testForkedSynchronisation(t, 61, FullSync) } +func TestForkedSynchronisation62(t *testing.T) { testForkedSynchronisation(t, 62, FullSync) } +func TestForkedSynchronisation63Full(t *testing.T) { testForkedSynchronisation(t, 63, FullSync) } +func TestForkedSynchronisation63Fast(t *testing.T) { testForkedSynchronisation(t, 63, FastSync) } +func TestForkedSynchronisation64Full(t *testing.T) { testForkedSynchronisation(t, 64, FullSync) } +func TestForkedSynchronisation64Fast(t *testing.T) { testForkedSynchronisation(t, 64, FastSync) } +func TestForkedSynchronisation64Light(t *testing.T) { testForkedSynchronisation(t, 64, LightSync) } + +func testForkedSynchronisation(t *testing.T, protocol int, mode SyncMode) { // Create a long enough forked chain common, fork := MaxHashFetch, 2*MaxHashFetch - hashesA, hashesB, blocksA, blocksB := makeChainFork(common+fork, fork, genesis) + hashesA, hashesB, headersA, headersB, blocksA, blocksB := makeChainFork(common+fork, fork, genesis) - tester := newTester() - tester.newPeer("fork A", protocol, hashesA, blocksA) - tester.newPeer("fork B", protocol, hashesB, blocksB) + tester := newTester(mode) + tester.newPeer("fork A", protocol, hashesA, headersA, blocksA) + tester.newPeer("fork B", protocol, hashesB, headersB, blocksB) // Synchronise with the peer and make sure all blocks were retrieved if err := tester.sync("fork A", nil); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } - if imported := len(tester.ownBlocks); imported != common+fork+1 { - t.Fatalf("synchronised block mismatch: have %v, want %v", imported, common+fork+1) - } + assertOwnChain(t, tester, common+fork+1) + // Synchronise with the second peer and make sure that fork is pulled too if err := tester.sync("fork B", nil); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } - if imported := len(tester.ownBlocks); imported != common+2*fork+1 { - t.Fatalf("synchronised block mismatch: have %v, want %v", imported, common+2*fork+1) - } + assertOwnChain(t, tester, common+2*fork+1) } // Tests that an inactive downloader will not accept incoming hashes and blocks. func TestInactiveDownloader61(t *testing.T) { - tester := newTester() + tester := newTester(FullSync) // Check that neither hashes nor blocks are accepted if err := tester.downloader.DeliverHashes61("bad peer", []common.Hash{}); err != errNoSyncActive { @@ -542,9 +682,10 @@ func TestInactiveDownloader61(t *testing.T) { } } -// Tests that an inactive downloader will not accept incoming block headers and bodies. +// Tests that an inactive downloader will not accept incoming block headers and +// bodies. func TestInactiveDownloader62(t *testing.T) { - tester := newTester() + tester := newTester(FullSync) // Check that neither block headers nor bodies are accepted if err := tester.downloader.DeliverHeaders("bad peer", []*types.Header{}); err != errNoSyncActive { @@ -555,13 +696,33 @@ func TestInactiveDownloader62(t *testing.T) { } } -// Tests that a canceled download wipes all previously accumulated state. -func TestCancel61(t *testing.T) { testCancel(t, 61) } -func TestCancel62(t *testing.T) { testCancel(t, 62) } -func TestCancel63(t *testing.T) { testCancel(t, 63) } -func TestCancel64(t *testing.T) { testCancel(t, 64) } +// Tests that an inactive downloader will not accept incoming block headers, +// bodies and receipts. +func TestInactiveDownloader63(t *testing.T) { + tester := newTester(FullSync) + + // Check that neither block headers nor bodies are accepted + if err := tester.downloader.DeliverHeaders("bad peer", []*types.Header{}); err != errNoSyncActive { + t.Errorf("error mismatch: have %v, want %v", err, errNoSyncActive) + } + if err := tester.downloader.DeliverBodies("bad peer", [][]*types.Transaction{}, [][]*types.Header{}); err != errNoSyncActive { + t.Errorf("error mismatch: have %v, want %v", err, errNoSyncActive) + } + if err := tester.downloader.DeliverReceipts("bad peer", [][]*types.Receipt{}); err != errNoSyncActive { + t.Errorf("error mismatch: have %v, want %v", err, errNoSyncActive) + } +} -func testCancel(t *testing.T, protocol int) { +// Tests that a canceled download wipes all previously accumulated state. +func TestCancel61(t *testing.T) { testCancel(t, 61, FullSync) } +func TestCancel62(t *testing.T) { testCancel(t, 62, FullSync) } +func TestCancel63Full(t *testing.T) { testCancel(t, 63, FullSync) } +func TestCancel63Fast(t *testing.T) { testCancel(t, 63, FastSync) } +func TestCancel64Full(t *testing.T) { testCancel(t, 64, FullSync) } +func TestCancel64Fast(t *testing.T) { testCancel(t, 64, FastSync) } +func TestCancel64Light(t *testing.T) { testCancel(t, 64, LightSync) } + +func testCancel(t *testing.T, protocol int, mode SyncMode) { // Create a small enough block chain to download and the tester targetBlocks := blockCacheLimit - 15 if targetBlocks >= MaxHashFetch { @@ -570,80 +731,81 @@ func testCancel(t *testing.T, protocol int) { if targetBlocks >= MaxHeaderFetch { targetBlocks = MaxHeaderFetch - 15 } - hashes, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) - tester := newTester() - tester.newPeer("peer", protocol, hashes, blocks) + tester := newTester(mode) + tester.newPeer("peer", protocol, hashes, headers, blocks) // Make sure canceling works with a pristine downloader tester.downloader.cancel() - downloading, importing := tester.downloader.queue.Size() - if downloading > 0 || importing > 0 { - t.Errorf("download or import count mismatch: %d downloading, %d importing, want 0", downloading, importing) + if !tester.downloader.queue.Idle() { + t.Errorf("download queue not idle") } // Synchronise with the peer, but cancel afterwards if err := tester.sync("peer", nil); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } tester.downloader.cancel() - downloading, importing = tester.downloader.queue.Size() - if downloading > 0 || importing > 0 { - t.Errorf("download or import count mismatch: %d downloading, %d importing, want 0", downloading, importing) + if !tester.downloader.queue.Idle() { + t.Errorf("download queue not idle") } } // Tests that synchronisation from multiple peers works as intended (multi thread sanity test). -func TestMultiSynchronisation61(t *testing.T) { testMultiSynchronisation(t, 61) } -func TestMultiSynchronisation62(t *testing.T) { testMultiSynchronisation(t, 62) } -func TestMultiSynchronisation63(t *testing.T) { testMultiSynchronisation(t, 63) } -func TestMultiSynchronisation64(t *testing.T) { testMultiSynchronisation(t, 64) } - -func testMultiSynchronisation(t *testing.T, protocol int) { +func TestMultiSynchronisation61(t *testing.T) { testMultiSynchronisation(t, 61, FullSync) } +func TestMultiSynchronisation62(t *testing.T) { testMultiSynchronisation(t, 62, FullSync) } +func TestMultiSynchronisation63Full(t *testing.T) { testMultiSynchronisation(t, 63, FullSync) } +func TestMultiSynchronisation63Fast(t *testing.T) { testMultiSynchronisation(t, 63, FastSync) } +func TestMultiSynchronisation64Full(t *testing.T) { testMultiSynchronisation(t, 64, FullSync) } +func TestMultiSynchronisation64Fast(t *testing.T) { testMultiSynchronisation(t, 64, FastSync) } +func TestMultiSynchronisation64Light(t *testing.T) { testMultiSynchronisation(t, 64, LightSync) } + +func testMultiSynchronisation(t *testing.T, protocol int, mode SyncMode) { // Create various peers with various parts of the chain targetPeers := 8 targetBlocks := targetPeers*blockCacheLimit - 15 - hashes, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) - tester := newTester() + tester := newTester(mode) for i := 0; i < targetPeers; i++ { id := fmt.Sprintf("peer #%d", i) - tester.newPeer(id, protocol, hashes[i*blockCacheLimit:], blocks) + tester.newPeer(id, protocol, hashes[i*blockCacheLimit:], headers, blocks) } // Synchronise with the middle peer and make sure half of the blocks were retrieved id := fmt.Sprintf("peer #%d", targetPeers/2) if err := tester.sync(id, nil); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } - if imported := len(tester.ownBlocks); imported != len(tester.peerHashes[id]) { - t.Fatalf("synchronised block mismatch: have %v, want %v", imported, len(tester.peerHashes[id])) - } + assertOwnChain(t, tester, len(tester.peerHashes[id])) + // Synchronise with the best peer and make sure everything is retrieved if err := tester.sync("peer #0", nil); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } - if imported := len(tester.ownBlocks); imported != targetBlocks+1 { - t.Fatalf("synchronised block mismatch: have %v, want %v", imported, targetBlocks+1) - } + assertOwnChain(t, tester, targetBlocks+1) } // Tests that synchronisations behave well in multi-version protocol environments // and not wreak havok on other nodes in the network. -func TestMultiProtocolSynchronisation61(t *testing.T) { testMultiProtocolSynchronisation(t, 61) } -func TestMultiProtocolSynchronisation62(t *testing.T) { testMultiProtocolSynchronisation(t, 62) } -func TestMultiProtocolSynchronisation63(t *testing.T) { testMultiProtocolSynchronisation(t, 63) } -func TestMultiProtocolSynchronisation64(t *testing.T) { testMultiProtocolSynchronisation(t, 64) } - -func testMultiProtocolSynchronisation(t *testing.T, protocol int) { +func TestMultiProtoSynchronisation61(t *testing.T) { testMultiProtoSync(t, 61, FullSync) } +func TestMultiProtoSynchronisation62(t *testing.T) { testMultiProtoSync(t, 62, FullSync) } +func TestMultiProtoSynchronisation63Full(t *testing.T) { testMultiProtoSync(t, 63, FullSync) } +func TestMultiProtoSynchronisation63Fast(t *testing.T) { testMultiProtoSync(t, 63, FastSync) } +func TestMultiProtoSynchronisation64Full(t *testing.T) { testMultiProtoSync(t, 64, FullSync) } +func TestMultiProtoSynchronisation64Fast(t *testing.T) { testMultiProtoSync(t, 64, FastSync) } +func TestMultiProtoSynchronisation64Light(t *testing.T) { testMultiProtoSync(t, 64, LightSync) } + +func testMultiProtoSync(t *testing.T, protocol int, mode SyncMode) { // Create a small enough block chain to download targetBlocks := blockCacheLimit - 15 - hashes, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) // Create peers of every type - tester := newTester() - tester.newPeer("peer 61", 61, hashes, blocks) - tester.newPeer("peer 62", 62, hashes, blocks) - tester.newPeer("peer 63", 63, hashes, blocks) - tester.newPeer("peer 64", 64, hashes, blocks) + tester := newTester(mode) + tester.newPeer("peer 61", 61, hashes, headers, blocks) + tester.newPeer("peer 62", 62, hashes, headers, blocks) + tester.newPeer("peer 63", 63, hashes, headers, blocks) + tester.newPeer("peer 64", 64, hashes, headers, blocks) // Synchronise with the requestd peer and make sure all blocks were retrieved if err := tester.sync(fmt.Sprintf("peer %d", protocol), nil); err != nil { @@ -661,150 +823,181 @@ func testMultiProtocolSynchronisation(t *testing.T, protocol int) { } } -// Tests that if a block is empty (i.e. header only), no body request should be +// Tests that if a block is empty (e.g. header only), no body request should be // made, and instead the header should be assembled into a whole block in itself. -func TestEmptyBlockShortCircuit62(t *testing.T) { testEmptyBlockShortCircuit(t, 62) } -func TestEmptyBlockShortCircuit63(t *testing.T) { testEmptyBlockShortCircuit(t, 63) } -func TestEmptyBlockShortCircuit64(t *testing.T) { testEmptyBlockShortCircuit(t, 64) } - -func testEmptyBlockShortCircuit(t *testing.T, protocol int) { +func TestEmptyShortCircuit62(t *testing.T) { testEmptyShortCircuit(t, 62, FullSync) } +func TestEmptyShortCircuit63Full(t *testing.T) { testEmptyShortCircuit(t, 63, FullSync) } +func TestEmptyShortCircuit63Fast(t *testing.T) { testEmptyShortCircuit(t, 63, FastSync) } +func TestEmptyShortCircuit64Full(t *testing.T) { testEmptyShortCircuit(t, 64, FullSync) } +func TestEmptyShortCircuit64Fast(t *testing.T) { testEmptyShortCircuit(t, 64, FastSync) } +func TestEmptyShortCircuit64Light(t *testing.T) { testEmptyShortCircuit(t, 64, LightSync) } + +func testEmptyShortCircuit(t *testing.T, protocol int, mode SyncMode) { // Create a small enough block chain to download targetBlocks := blockCacheLimit - 15 - hashes, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) - tester := newTester() - tester.newPeer("peer", protocol, hashes, blocks) + tester := newTester(mode) + tester.newPeer("peer", protocol, hashes, headers, blocks) // Instrument the downloader to signal body requests - requested := int32(0) + bodies, receipts := int32(0), int32(0) tester.downloader.bodyFetchHook = func(headers []*types.Header) { - atomic.AddInt32(&requested, int32(len(headers))) + atomic.AddInt32(&bodies, int32(len(headers))) + } + tester.downloader.receiptFetchHook = func(headers []*types.Header) { + atomic.AddInt32(&receipts, int32(len(headers))) } // Synchronise with the peer and make sure all blocks were retrieved if err := tester.sync("peer", nil); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } - if imported := len(tester.ownBlocks); imported != targetBlocks+1 { - t.Fatalf("synchronised block mismatch: have %v, want %v", imported, targetBlocks+1) - } + assertOwnChain(t, tester, targetBlocks+1) + // Validate the number of block bodies that should have been requested - needed := 0 + bodiesNeeded, receiptsNeeded := 0, 0 for _, block := range blocks { - if block != genesis && (len(block.Transactions()) > 0 || len(block.Uncles()) > 0) { - needed++ + if mode != LightSync && block != genesis && (len(block.Transactions()) > 0 || len(block.Uncles()) > 0) { + bodiesNeeded++ } + if mode == FastSync && block != genesis && len(block.Receipts()) > 0 { + receiptsNeeded++ + } + } + if int(bodies) != bodiesNeeded { + t.Errorf("body retrieval count mismatch: have %v, want %v", bodies, bodiesNeeded) } - if int(requested) != needed { - t.Fatalf("block body retrieval count mismatch: have %v, want %v", requested, needed) + if int(receipts) != receiptsNeeded { + t.Errorf("receipt retrieval count mismatch: have %v, want %v", receipts, receiptsNeeded) } } // Tests that headers are enqueued continuously, preventing malicious nodes from // stalling the downloader by feeding gapped header chains. -func TestMissingHeaderAttack62(t *testing.T) { testMissingHeaderAttack(t, 62) } -func TestMissingHeaderAttack63(t *testing.T) { testMissingHeaderAttack(t, 63) } -func TestMissingHeaderAttack64(t *testing.T) { testMissingHeaderAttack(t, 64) } - -func testMissingHeaderAttack(t *testing.T, protocol int) { +func TestMissingHeaderAttack62(t *testing.T) { testMissingHeaderAttack(t, 62, FullSync) } +func TestMissingHeaderAttack63Full(t *testing.T) { testMissingHeaderAttack(t, 63, FullSync) } +func TestMissingHeaderAttack63Fast(t *testing.T) { testMissingHeaderAttack(t, 63, FastSync) } +func TestMissingHeaderAttack64Full(t *testing.T) { testMissingHeaderAttack(t, 64, FullSync) } +func TestMissingHeaderAttack64Fast(t *testing.T) { testMissingHeaderAttack(t, 64, FastSync) } +func TestMissingHeaderAttack64Light(t *testing.T) { testMissingHeaderAttack(t, 64, LightSync) } + +func testMissingHeaderAttack(t *testing.T, protocol int, mode SyncMode) { // Create a small enough block chain to download targetBlocks := blockCacheLimit - 15 - hashes, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) - tester := newTester() + tester := newTester(mode) // Attempt a full sync with an attacker feeding gapped headers - tester.newPeer("attack", protocol, hashes, blocks) + tester.newPeer("attack", protocol, hashes, headers, blocks) missing := targetBlocks / 2 + delete(tester.peerHeaders["attack"], hashes[missing]) delete(tester.peerBlocks["attack"], hashes[missing]) if err := tester.sync("attack", nil); err == nil { t.Fatalf("succeeded attacker synchronisation") } // Synchronise with the valid peer and make sure sync succeeds - tester.newPeer("valid", protocol, hashes, blocks) + tester.newPeer("valid", protocol, hashes, headers, blocks) if err := tester.sync("valid", nil); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } - if imported := len(tester.ownBlocks); imported != len(hashes) { - t.Fatalf("synchronised block mismatch: have %v, want %v", imported, len(hashes)) - } + assertOwnChain(t, tester, targetBlocks+1) } // Tests that if requested headers are shifted (i.e. first is missing), the queue // detects the invalid numbering. -func TestShiftedHeaderAttack62(t *testing.T) { testShiftedHeaderAttack(t, 62) } -func TestShiftedHeaderAttack63(t *testing.T) { testShiftedHeaderAttack(t, 63) } -func TestShiftedHeaderAttack64(t *testing.T) { testShiftedHeaderAttack(t, 64) } - -func testShiftedHeaderAttack(t *testing.T, protocol int) { +func TestShiftedHeaderAttack62(t *testing.T) { testShiftedHeaderAttack(t, 62, FullSync) } +func TestShiftedHeaderAttack63Full(t *testing.T) { testShiftedHeaderAttack(t, 63, FullSync) } +func TestShiftedHeaderAttack63Fast(t *testing.T) { testShiftedHeaderAttack(t, 63, FastSync) } +func TestShiftedHeaderAttack64Full(t *testing.T) { testShiftedHeaderAttack(t, 64, FullSync) } +func TestShiftedHeaderAttack64Fast(t *testing.T) { testShiftedHeaderAttack(t, 64, FastSync) } +func TestShiftedHeaderAttack64Light(t *testing.T) { testShiftedHeaderAttack(t, 64, LightSync) } + +func testShiftedHeaderAttack(t *testing.T, protocol int, mode SyncMode) { // Create a small enough block chain to download targetBlocks := blockCacheLimit - 15 - hashes, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) - tester := newTester() + tester := newTester(mode) // Attempt a full sync with an attacker feeding shifted headers - tester.newPeer("attack", protocol, hashes, blocks) + tester.newPeer("attack", protocol, hashes, headers, blocks) + delete(tester.peerHeaders["attack"], hashes[len(hashes)-2]) delete(tester.peerBlocks["attack"], hashes[len(hashes)-2]) if err := tester.sync("attack", nil); err == nil { t.Fatalf("succeeded attacker synchronisation") } // Synchronise with the valid peer and make sure sync succeeds - tester.newPeer("valid", protocol, hashes, blocks) + tester.newPeer("valid", protocol, hashes, headers, blocks) if err := tester.sync("valid", nil); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } - if imported := len(tester.ownBlocks); imported != len(hashes) { - t.Fatalf("synchronised block mismatch: have %v, want %v", imported, len(hashes)) - } + assertOwnChain(t, tester, targetBlocks+1) } -// Tests that if a peer sends an invalid body for a requested block, it gets -// dropped immediately by the downloader. -func TestInvalidBlockBodyAttack62(t *testing.T) { testInvalidBlockBodyAttack(t, 62) } -func TestInvalidBlockBodyAttack63(t *testing.T) { testInvalidBlockBodyAttack(t, 63) } -func TestInvalidBlockBodyAttack64(t *testing.T) { testInvalidBlockBodyAttack(t, 64) } +// Tests that if a peer sends an invalid block piece (body or receipt) for a +// requested block, it gets dropped immediately by the downloader. +func TestInvalidContentAttack62(t *testing.T) { testInvalidContentAttack(t, 62, FullSync) } +func TestInvalidContentAttack63Full(t *testing.T) { testInvalidContentAttack(t, 63, FullSync) } +func TestInvalidContentAttack63Fast(t *testing.T) { testInvalidContentAttack(t, 63, FastSync) } +func TestInvalidContentAttack64Full(t *testing.T) { testInvalidContentAttack(t, 64, FullSync) } +func TestInvalidContentAttack64Fast(t *testing.T) { testInvalidContentAttack(t, 64, FastSync) } +func TestInvalidContentAttack64Light(t *testing.T) { testInvalidContentAttack(t, 64, LightSync) } -func testInvalidBlockBodyAttack(t *testing.T, protocol int) { +func testInvalidContentAttack(t *testing.T, protocol int, mode SyncMode) { // Create two peers, one feeding invalid block bodies targetBlocks := 4*blockCacheLimit - 15 - hashes, validBlocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, validBlocks := makeChain(targetBlocks, 0, genesis) invalidBlocks := make(map[common.Hash]*types.Block) for hash, block := range validBlocks { invalidBlocks[hash] = types.NewBlockWithHeader(block.Header()) } + invalidReceipts := make(map[common.Hash]*types.Block) + for hash, block := range validBlocks { + invalidReceipts[hash] = types.NewBlockWithHeader(block.Header()).WithBody(block.Transactions(), block.Uncles()) + } - tester := newTester() - tester.newPeer("valid", protocol, hashes, validBlocks) - tester.newPeer("attack", protocol, hashes, invalidBlocks) - + tester := newTester(mode) + tester.newPeer("valid", protocol, hashes, headers, validBlocks) + if mode != LightSync { + tester.newPeer("body attack", protocol, hashes, headers, invalidBlocks) + } + if mode == FastSync { + tester.newPeer("receipt attack", protocol, hashes, headers, invalidReceipts) + } // Synchronise with the valid peer (will pull contents from the attacker too) if err := tester.sync("valid", nil); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } - if imported := len(tester.ownBlocks); imported != len(hashes) { - t.Fatalf("synchronised block mismatch: have %v, want %v", imported, len(hashes)) - } + assertOwnChain(t, tester, targetBlocks+1) + // Make sure the attacker was detected and dropped in the mean time - if _, ok := tester.peerHashes["attack"]; ok { + if _, ok := tester.peerHashes["body attack"]; ok { t.Fatalf("block body attacker not detected/dropped") } + if _, ok := tester.peerHashes["receipt attack"]; ok { + t.Fatalf("receipt attacker not detected/dropped") + } } // Tests that a peer advertising an high TD doesn't get to stall the downloader // afterwards by not sending any useful hashes. -func TestHighTDStarvationAttack61(t *testing.T) { testHighTDStarvationAttack(t, 61) } -func TestHighTDStarvationAttack62(t *testing.T) { testHighTDStarvationAttack(t, 62) } -func TestHighTDStarvationAttack63(t *testing.T) { testHighTDStarvationAttack(t, 63) } -func TestHighTDStarvationAttack64(t *testing.T) { testHighTDStarvationAttack(t, 64) } - -func testHighTDStarvationAttack(t *testing.T, protocol int) { - tester := newTester() - hashes, blocks := makeChain(0, 0, genesis) - - tester.newPeer("attack", protocol, []common.Hash{hashes[0]}, blocks) +func TestHighTDStarvationAttack61(t *testing.T) { testHighTDStarvationAttack(t, 61, FullSync) } +func TestHighTDStarvationAttack62(t *testing.T) { testHighTDStarvationAttack(t, 62, FullSync) } +func TestHighTDStarvationAttack63Full(t *testing.T) { testHighTDStarvationAttack(t, 63, FullSync) } +func TestHighTDStarvationAttack63Fast(t *testing.T) { testHighTDStarvationAttack(t, 63, FastSync) } +func TestHighTDStarvationAttack64Full(t *testing.T) { testHighTDStarvationAttack(t, 64, FullSync) } +func TestHighTDStarvationAttack64Fast(t *testing.T) { testHighTDStarvationAttack(t, 64, FastSync) } +func TestHighTDStarvationAttack64Light(t *testing.T) { testHighTDStarvationAttack(t, 64, LightSync) } + +func testHighTDStarvationAttack(t *testing.T, protocol int, mode SyncMode) { + tester := newTester(mode) + hashes, headers, blocks := makeChain(0, 0, genesis) + + tester.newPeer("attack", protocol, []common.Hash{hashes[0]}, headers, blocks) if err := tester.sync("attack", big.NewInt(1000000)); err != errStallingPeer { t.Fatalf("synchronisation error mismatch: have %v, want %v", err, errStallingPeer) } @@ -834,18 +1027,20 @@ func testBlockHeaderAttackerDropping(t *testing.T, protocol int) { {errEmptyHeaderSet, true}, // No headers were returned as a response, drop as it's a dead end {errPeersUnavailable, true}, // Nobody had the advertised blocks, drop the advertiser {errInvalidChain, true}, // Hash chain was detected as invalid, definitely drop + {errInvalidBlock, false}, // A bad peer was detected, but not the sync origin {errInvalidBody, false}, // A bad peer was detected, but not the sync origin + {errInvalidReceipt, false}, // A bad peer was detected, but not the sync origin {errCancelHashFetch, false}, // Synchronisation was canceled, origin may be innocent, don't drop {errCancelBlockFetch, false}, // Synchronisation was canceled, origin may be innocent, don't drop {errCancelHeaderFetch, false}, // Synchronisation was canceled, origin may be innocent, don't drop {errCancelBodyFetch, false}, // Synchronisation was canceled, origin may be innocent, don't drop } // Run the tests and check disconnection status - tester := newTester() + tester := newTester(FullSync) for i, tt := range tests { // Register a new peer and ensure it's presence id := fmt.Sprintf("test %d", i) - if err := tester.newPeer(id, protocol, []common.Hash{genesis.Hash()}, nil); err != nil { + if err := tester.newPeer(id, protocol, []common.Hash{genesis.Hash()}, nil, nil); err != nil { t.Fatalf("test %d: failed to register new peer: %v", i, err) } if _, ok := tester.peerHashes[id]; !ok { @@ -861,67 +1056,26 @@ func testBlockHeaderAttackerDropping(t *testing.T, protocol int) { } } -// Tests that feeding bad blocks will result in a peer drop. -func TestBlockBodyAttackerDropping61(t *testing.T) { testBlockBodyAttackerDropping(t, 61) } -func TestBlockBodyAttackerDropping62(t *testing.T) { testBlockBodyAttackerDropping(t, 62) } -func TestBlockBodyAttackerDropping63(t *testing.T) { testBlockBodyAttackerDropping(t, 63) } -func TestBlockBodyAttackerDropping64(t *testing.T) { testBlockBodyAttackerDropping(t, 64) } - -func testBlockBodyAttackerDropping(t *testing.T, protocol int) { - // Define the disconnection requirement for individual block import errors - tests := []struct { - failure bool - drop bool - }{ - {true, true}, - {false, false}, - } - - // Run the tests and check disconnection status - tester := newTester() - for i, tt := range tests { - // Register a new peer and ensure it's presence - id := fmt.Sprintf("test %d", i) - if err := tester.newPeer(id, protocol, []common.Hash{common.Hash{}}, nil); err != nil { - t.Fatalf("test %d: failed to register new peer: %v", i, err) - } - if _, ok := tester.peerHashes[id]; !ok { - t.Fatalf("test %d: registered peer not found", i) - } - // Assemble a good or bad block, depending of the test - raw := core.GenerateChain(genesis, testdb, 1, nil)[0] - if tt.failure { - parent := types.NewBlock(&types.Header{}, nil, nil, nil) - raw = core.GenerateChain(parent, testdb, 1, nil)[0] - } - block := &Block{OriginPeer: id, RawBlock: raw} - - // Simulate block processing and check the result - tester.downloader.queue.blockCache[0] = block - tester.downloader.process() - if _, ok := tester.peerHashes[id]; !ok != tt.drop { - t.Errorf("test %d: peer drop mismatch for %v: have %v, want %v", i, tt.failure, !ok, tt.drop) - } - } -} - // Tests that synchronisation boundaries (origin block number and highest block // number) is tracked and updated correctly. -func TestSyncBoundaries61(t *testing.T) { testSyncBoundaries(t, 61) } -func TestSyncBoundaries62(t *testing.T) { testSyncBoundaries(t, 62) } -func TestSyncBoundaries63(t *testing.T) { testSyncBoundaries(t, 63) } -func TestSyncBoundaries64(t *testing.T) { testSyncBoundaries(t, 64) } - -func testSyncBoundaries(t *testing.T, protocol int) { +func TestSyncBoundaries61(t *testing.T) { testSyncBoundaries(t, 61, FullSync) } +func TestSyncBoundaries62(t *testing.T) { testSyncBoundaries(t, 62, FullSync) } +func TestSyncBoundaries63Full(t *testing.T) { testSyncBoundaries(t, 63, FullSync) } +func TestSyncBoundaries63Fast(t *testing.T) { testSyncBoundaries(t, 63, FastSync) } +func TestSyncBoundaries64Full(t *testing.T) { testSyncBoundaries(t, 64, FullSync) } +func TestSyncBoundaries64Fast(t *testing.T) { testSyncBoundaries(t, 64, FastSync) } +func TestSyncBoundaries64Light(t *testing.T) { testSyncBoundaries(t, 64, LightSync) } + +func testSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { // Create a small enough block chain to download targetBlocks := blockCacheLimit - 15 - hashes, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) // Set a sync init hook to catch boundary changes starting := make(chan struct{}) progress := make(chan struct{}) - tester := newTester() + tester := newTester(mode) tester.downloader.syncInitHook = func(origin, latest uint64) { starting <- struct{}{} <-progress @@ -931,7 +1085,7 @@ func testSyncBoundaries(t *testing.T, protocol int) { t.Fatalf("Pristine boundary mismatch: have %v/%v, want %v/%v", origin, latest, 0, 0) } // Synchronise half the blocks and check initial boundaries - tester.newPeer("peer-half", protocol, hashes[targetBlocks/2:], blocks) + tester.newPeer("peer-half", protocol, hashes[targetBlocks/2:], headers, blocks) pending := new(sync.WaitGroup) pending.Add(1) @@ -949,7 +1103,7 @@ func testSyncBoundaries(t *testing.T, protocol int) { pending.Wait() // Synchronise all the blocks and check continuation boundaries - tester.newPeer("peer-full", protocol, hashes, blocks) + tester.newPeer("peer-full", protocol, hashes, headers, blocks) pending.Add(1) go func() { @@ -969,21 +1123,24 @@ func testSyncBoundaries(t *testing.T, protocol int) { // Tests that synchronisation boundaries (origin block number and highest block // number) is tracked and updated correctly in case of a fork (or manual head // revertal). -func TestForkedSyncBoundaries61(t *testing.T) { testForkedSyncBoundaries(t, 61) } -func TestForkedSyncBoundaries62(t *testing.T) { testForkedSyncBoundaries(t, 62) } -func TestForkedSyncBoundaries63(t *testing.T) { testForkedSyncBoundaries(t, 63) } -func TestForkedSyncBoundaries64(t *testing.T) { testForkedSyncBoundaries(t, 64) } - -func testForkedSyncBoundaries(t *testing.T, protocol int) { +func TestForkedSyncBoundaries61(t *testing.T) { testForkedSyncBoundaries(t, 61, FullSync) } +func TestForkedSyncBoundaries62(t *testing.T) { testForkedSyncBoundaries(t, 62, FullSync) } +func TestForkedSyncBoundaries63Full(t *testing.T) { testForkedSyncBoundaries(t, 63, FullSync) } +func TestForkedSyncBoundaries63Fast(t *testing.T) { testForkedSyncBoundaries(t, 63, FastSync) } +func TestForkedSyncBoundaries64Full(t *testing.T) { testForkedSyncBoundaries(t, 64, FullSync) } +func TestForkedSyncBoundaries64Fast(t *testing.T) { testForkedSyncBoundaries(t, 64, FastSync) } +func TestForkedSyncBoundaries64Light(t *testing.T) { testForkedSyncBoundaries(t, 64, LightSync) } + +func testForkedSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { // Create a forked chain to simulate origin revertal common, fork := MaxHashFetch, 2*MaxHashFetch - hashesA, hashesB, blocksA, blocksB := makeChainFork(common+fork, fork, genesis) + hashesA, hashesB, headersA, headersB, blocksA, blocksB := makeChainFork(common+fork, fork, genesis) // Set a sync init hook to catch boundary changes starting := make(chan struct{}) progress := make(chan struct{}) - tester := newTester() + tester := newTester(mode) tester.downloader.syncInitHook = func(origin, latest uint64) { starting <- struct{}{} <-progress @@ -993,7 +1150,7 @@ func testForkedSyncBoundaries(t *testing.T, protocol int) { t.Fatalf("Pristine boundary mismatch: have %v/%v, want %v/%v", origin, latest, 0, 0) } // Synchronise with one of the forks and check boundaries - tester.newPeer("fork A", protocol, hashesA, blocksA) + tester.newPeer("fork A", protocol, hashesA, headersA, blocksA) pending := new(sync.WaitGroup) pending.Add(1) @@ -1014,7 +1171,7 @@ func testForkedSyncBoundaries(t *testing.T, protocol int) { tester.downloader.syncStatsOrigin = tester.downloader.syncStatsHeight // Synchronise with the second fork and check boundary resets - tester.newPeer("fork B", protocol, hashesB, blocksB) + tester.newPeer("fork B", protocol, hashesB, headersB, blocksB) pending.Add(1) go func() { @@ -1034,21 +1191,24 @@ func testForkedSyncBoundaries(t *testing.T, protocol int) { // Tests that if synchronisation is aborted due to some failure, then the boundary // origin is not updated in the next sync cycle, as it should be considered the // continuation of the previous sync and not a new instance. -func TestFailedSyncBoundaries61(t *testing.T) { testFailedSyncBoundaries(t, 61) } -func TestFailedSyncBoundaries62(t *testing.T) { testFailedSyncBoundaries(t, 62) } -func TestFailedSyncBoundaries63(t *testing.T) { testFailedSyncBoundaries(t, 63) } -func TestFailedSyncBoundaries64(t *testing.T) { testFailedSyncBoundaries(t, 64) } - -func testFailedSyncBoundaries(t *testing.T, protocol int) { +func TestFailedSyncBoundaries61(t *testing.T) { testFailedSyncBoundaries(t, 61, FullSync) } +func TestFailedSyncBoundaries62(t *testing.T) { testFailedSyncBoundaries(t, 62, FullSync) } +func TestFailedSyncBoundaries63Full(t *testing.T) { testFailedSyncBoundaries(t, 63, FullSync) } +func TestFailedSyncBoundaries63Fast(t *testing.T) { testFailedSyncBoundaries(t, 63, FastSync) } +func TestFailedSyncBoundaries64Full(t *testing.T) { testFailedSyncBoundaries(t, 64, FullSync) } +func TestFailedSyncBoundaries64Fast(t *testing.T) { testFailedSyncBoundaries(t, 64, FastSync) } +func TestFailedSyncBoundaries64Light(t *testing.T) { testFailedSyncBoundaries(t, 64, LightSync) } + +func testFailedSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { // Create a small enough block chain to download targetBlocks := blockCacheLimit - 15 - hashes, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) // Set a sync init hook to catch boundary changes starting := make(chan struct{}) progress := make(chan struct{}) - tester := newTester() + tester := newTester(mode) tester.downloader.syncInitHook = func(origin, latest uint64) { starting <- struct{}{} <-progress @@ -1058,8 +1218,9 @@ func testFailedSyncBoundaries(t *testing.T, protocol int) { t.Fatalf("Pristine boundary mismatch: have %v/%v, want %v/%v", origin, latest, 0, 0) } // Attempt a full sync with a faulty peer - tester.newPeer("faulty", protocol, hashes, blocks) + tester.newPeer("faulty", protocol, hashes, headers, blocks) missing := targetBlocks / 2 + delete(tester.peerHeaders["faulty"], hashes[missing]) delete(tester.peerBlocks["faulty"], hashes[missing]) pending := new(sync.WaitGroup) @@ -1079,7 +1240,7 @@ func testFailedSyncBoundaries(t *testing.T, protocol int) { pending.Wait() // Synchronise with a good peer and check that the boundary origin remind the same after a failure - tester.newPeer("valid", protocol, hashes, blocks) + tester.newPeer("valid", protocol, hashes, headers, blocks) pending.Add(1) go func() { @@ -1098,21 +1259,24 @@ func testFailedSyncBoundaries(t *testing.T, protocol int) { // Tests that if an attacker fakes a chain height, after the attack is detected, // the boundary height is successfully reduced at the next sync invocation. -func TestFakedSyncBoundaries61(t *testing.T) { testFakedSyncBoundaries(t, 61) } -func TestFakedSyncBoundaries62(t *testing.T) { testFakedSyncBoundaries(t, 62) } -func TestFakedSyncBoundaries63(t *testing.T) { testFakedSyncBoundaries(t, 63) } -func TestFakedSyncBoundaries64(t *testing.T) { testFakedSyncBoundaries(t, 64) } - -func testFakedSyncBoundaries(t *testing.T, protocol int) { +func TestFakedSyncBoundaries61(t *testing.T) { testFakedSyncBoundaries(t, 61, FullSync) } +func TestFakedSyncBoundaries62(t *testing.T) { testFakedSyncBoundaries(t, 62, FullSync) } +func TestFakedSyncBoundaries63Full(t *testing.T) { testFakedSyncBoundaries(t, 63, FullSync) } +func TestFakedSyncBoundaries63Fast(t *testing.T) { testFakedSyncBoundaries(t, 63, FastSync) } +func TestFakedSyncBoundaries64Full(t *testing.T) { testFakedSyncBoundaries(t, 64, FullSync) } +func TestFakedSyncBoundaries64Fast(t *testing.T) { testFakedSyncBoundaries(t, 64, FastSync) } +func TestFakedSyncBoundaries64Light(t *testing.T) { testFakedSyncBoundaries(t, 64, LightSync) } + +func testFakedSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { // Create a small block chain targetBlocks := blockCacheLimit - 15 - hashes, blocks := makeChain(targetBlocks+3, 0, genesis) + hashes, headers, blocks := makeChain(targetBlocks+3, 0, genesis) // Set a sync init hook to catch boundary changes starting := make(chan struct{}) progress := make(chan struct{}) - tester := newTester() + tester := newTester(mode) tester.downloader.syncInitHook = func(origin, latest uint64) { starting <- struct{}{} <-progress @@ -1122,8 +1286,9 @@ func testFakedSyncBoundaries(t *testing.T, protocol int) { t.Fatalf("Pristine boundary mismatch: have %v/%v, want %v/%v", origin, latest, 0, 0) } // Create and sync with an attacker that promises a higher chain than available - tester.newPeer("attack", protocol, hashes, blocks) + tester.newPeer("attack", protocol, hashes, headers, blocks) for i := 1; i < 3; i++ { + delete(tester.peerHeaders["attack"], hashes[i]) delete(tester.peerBlocks["attack"], hashes[i]) } @@ -1144,7 +1309,7 @@ func testFakedSyncBoundaries(t *testing.T, protocol int) { pending.Wait() // Synchronise with a good peer and check that the boundary height has been reduced to the true value - tester.newPeer("valid", protocol, hashes[3:], blocks) + tester.newPeer("valid", protocol, hashes[3:], headers, blocks) pending.Add(1) go func() { diff --git a/eth/downloader/metrics.go b/eth/downloader/metrics.go index fd926affd..92acb6ba8 100644 --- a/eth/downloader/metrics.go +++ b/eth/downloader/metrics.go @@ -42,4 +42,9 @@ var ( bodyReqTimer = metrics.NewTimer("eth/downloader/bodies/req") bodyDropMeter = metrics.NewMeter("eth/downloader/bodies/drop") bodyTimeoutMeter = metrics.NewMeter("eth/downloader/bodies/timeout") + + receiptInMeter = metrics.NewMeter("eth/downloader/receipts/in") + receiptReqTimer = metrics.NewTimer("eth/downloader/receipts/req") + receiptDropMeter = metrics.NewMeter("eth/downloader/receipts/drop") + receiptTimeoutMeter = metrics.NewMeter("eth/downloader/receipts/timeout") ) diff --git a/eth/downloader/modes.go b/eth/downloader/modes.go new file mode 100644 index 000000000..8916dbb79 --- /dev/null +++ b/eth/downloader/modes.go @@ -0,0 +1,26 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package downloader + +// SyncMode represents the synchronisation mode of the downloader. +type SyncMode int + +const ( + FullSync SyncMode = iota // Synchronise the entire block-chain history from full blocks + FastSync // Quikcly download the headers, full sync only at the chain head + LightSync // Download only the headers and terminate afterwards +) diff --git a/eth/downloader/peer.go b/eth/downloader/peer.go index c1d20ac61..5fc0db587 100644 --- a/eth/downloader/peer.go +++ b/eth/downloader/peer.go @@ -36,10 +36,11 @@ type relativeHashFetcherFn func(common.Hash) error type absoluteHashFetcherFn func(uint64, int) error type blockFetcherFn func([]common.Hash) error -// Block header and body fethers belonging to eth/62 and above +// Block header and body fetchers belonging to eth/62 and above type relativeHeaderFetcherFn func(common.Hash, int, int, bool) error type absoluteHeaderFetcherFn func(uint64, int, int, bool) error type blockBodyFetcherFn func([]common.Hash) error +type receiptFetcherFn func([]common.Hash) error var ( errAlreadyFetching = errors.New("already fetching blocks from peer") @@ -52,11 +53,14 @@ type peer struct { id string // Unique identifier of the peer head common.Hash // Hash of the peers latest known block - idle int32 // Current activity state of the peer (idle = 0, active = 1) - rep int32 // Simple peer reputation + blockIdle int32 // Current block activity state of the peer (idle = 0, active = 1) + receiptIdle int32 // Current receipt activity state of the peer (idle = 0, active = 1) + rep int32 // Simple peer reputation - capacity int32 // Number of blocks allowed to fetch per request - started time.Time // Time instance when the last fetch was started + blockCapacity int32 // Number of blocks (bodies) allowed to fetch per request + receiptCapacity int32 // Number of receipts allowed to fetch per request + blockStarted time.Time // Time instance when the last block (body)fetch was started + receiptStarted time.Time // Time instance when the last receipt fetch was started ignored *set.Set // Set of hashes not to request (didn't have previously) @@ -68,6 +72,8 @@ type peer struct { getAbsHeaders absoluteHeaderFetcherFn // [eth/62] Method to retrieve a batch of headers from an absolute position getBlockBodies blockBodyFetcherFn // [eth/62] Method to retrieve a batch of block bodies + getReceipts receiptFetcherFn // [eth/63] Method to retrieve a batch of block transaction receipts + version int // Eth protocol version number to switch strategies } @@ -75,12 +81,14 @@ type peer struct { // mechanisms. func newPeer(id string, version int, head common.Hash, getRelHashes relativeHashFetcherFn, getAbsHashes absoluteHashFetcherFn, getBlocks blockFetcherFn, // eth/61 callbacks, remove when upgrading - getRelHeaders relativeHeaderFetcherFn, getAbsHeaders absoluteHeaderFetcherFn, getBlockBodies blockBodyFetcherFn) *peer { + getRelHeaders relativeHeaderFetcherFn, getAbsHeaders absoluteHeaderFetcherFn, getBlockBodies blockBodyFetcherFn, + getReceipts receiptFetcherFn) *peer { return &peer{ - id: id, - head: head, - capacity: 1, - ignored: set.New(), + id: id, + head: head, + blockCapacity: 1, + receiptCapacity: 1, + ignored: set.New(), getRelHashes: getRelHashes, getAbsHashes: getAbsHashes, @@ -90,24 +98,28 @@ func newPeer(id string, version int, head common.Hash, getAbsHeaders: getAbsHeaders, getBlockBodies: getBlockBodies, + getReceipts: getReceipts, + version: version, } } // Reset clears the internal state of a peer entity. func (p *peer) Reset() { - atomic.StoreInt32(&p.idle, 0) - atomic.StoreInt32(&p.capacity, 1) + atomic.StoreInt32(&p.blockIdle, 0) + atomic.StoreInt32(&p.receiptIdle, 0) + atomic.StoreInt32(&p.blockCapacity, 1) + atomic.StoreInt32(&p.receiptCapacity, 1) p.ignored.Clear() } // Fetch61 sends a block retrieval request to the remote peer. func (p *peer) Fetch61(request *fetchRequest) error { // Short circuit if the peer is already fetching - if !atomic.CompareAndSwapInt32(&p.idle, 0, 1) { + if !atomic.CompareAndSwapInt32(&p.blockIdle, 0, 1) { return errAlreadyFetching } - p.started = time.Now() + p.blockStarted = time.Now() // Convert the hash set to a retrievable slice hashes := make([]common.Hash, 0, len(request.Hashes)) @@ -119,13 +131,13 @@ func (p *peer) Fetch61(request *fetchRequest) error { return nil } -// Fetch sends a block body retrieval request to the remote peer. -func (p *peer) Fetch(request *fetchRequest) error { +// FetchBodies sends a block body retrieval request to the remote peer. +func (p *peer) FetchBodies(request *fetchRequest) error { // Short circuit if the peer is already fetching - if !atomic.CompareAndSwapInt32(&p.idle, 0, 1) { + if !atomic.CompareAndSwapInt32(&p.blockIdle, 0, 1) { return errAlreadyFetching } - p.started = time.Now() + p.blockStarted = time.Now() // Convert the header set to a retrievable slice hashes := make([]common.Hash, 0, len(request.Headers)) @@ -137,55 +149,64 @@ func (p *peer) Fetch(request *fetchRequest) error { return nil } -// SetIdle61 sets the peer to idle, allowing it to execute new retrieval requests. -// Its block retrieval allowance will also be updated either up- or downwards, -// depending on whether the previous fetch completed in time or not. -func (p *peer) SetIdle61() { - // Update the peer's download allowance based on previous performance - scale := 2.0 - if time.Since(p.started) > blockSoftTTL { - scale = 0.5 - if time.Since(p.started) > blockHardTTL { - scale = 1 / float64(MaxBlockFetch) // reduces capacity to 1 - } +// FetchReceipts sends a receipt retrieval request to the remote peer. +func (p *peer) FetchReceipts(request *fetchRequest) error { + // Short circuit if the peer is already fetching + if !atomic.CompareAndSwapInt32(&p.receiptIdle, 0, 1) { + return errAlreadyFetching } - for { - // Calculate the new download bandwidth allowance - prev := atomic.LoadInt32(&p.capacity) - next := int32(math.Max(1, math.Min(float64(MaxBlockFetch), float64(prev)*scale))) + p.receiptStarted = time.Now() - // Try to update the old value - if atomic.CompareAndSwapInt32(&p.capacity, prev, next) { - // If we're having problems at 1 capacity, try to find better peers - if next == 1 { - p.Demote() - } - break - } + // Convert the header set to a retrievable slice + hashes := make([]common.Hash, 0, len(request.Headers)) + for _, header := range request.Headers { + hashes = append(hashes, header.Hash()) } - // Set the peer to idle to allow further block requests - atomic.StoreInt32(&p.idle, 0) + go p.getReceipts(hashes) + + return nil +} + +// SetBlocksIdle sets the peer to idle, allowing it to execute new retrieval requests. +// Its block retrieval allowance will also be updated either up- or downwards, +// depending on whether the previous fetch completed in time or not. +func (p *peer) SetBlocksIdle() { + p.setIdle(p.blockStarted, blockSoftTTL, blockHardTTL, MaxBlockFetch, &p.blockCapacity, &p.blockIdle) } -// SetIdle sets the peer to idle, allowing it to execute new retrieval requests. +// SetBodiesIdle sets the peer to idle, allowing it to execute new retrieval requests. // Its block body retrieval allowance will also be updated either up- or downwards, // depending on whether the previous fetch completed in time or not. -func (p *peer) SetIdle() { +func (p *peer) SetBodiesIdle() { + p.setIdle(p.blockStarted, bodySoftTTL, bodyHardTTL, MaxBlockFetch, &p.blockCapacity, &p.blockIdle) +} + +// SetReceiptsIdle sets the peer to idle, allowing it to execute new retrieval requests. +// Its receipt retrieval allowance will also be updated either up- or downwards, +// depending on whether the previous fetch completed in time or not. +func (p *peer) SetReceiptsIdle() { + p.setIdle(p.receiptStarted, receiptSoftTTL, receiptHardTTL, MaxReceiptFetch, &p.receiptCapacity, &p.receiptIdle) +} + +// setIdle sets the peer to idle, allowing it to execute new retrieval requests. +// Its data retrieval allowance will also be updated either up- or downwards, +// depending on whether the previous fetch completed in time or not. +func (p *peer) setIdle(started time.Time, softTTL, hardTTL time.Duration, maxFetch int, capacity, idle *int32) { // Update the peer's download allowance based on previous performance scale := 2.0 - if time.Since(p.started) > bodySoftTTL { + if time.Since(started) > softTTL { scale = 0.5 - if time.Since(p.started) > bodyHardTTL { - scale = 1 / float64(MaxBodyFetch) // reduces capacity to 1 + if time.Since(started) > hardTTL { + scale = 1 / float64(maxFetch) // reduces capacity to 1 } } for { // Calculate the new download bandwidth allowance - prev := atomic.LoadInt32(&p.capacity) - next := int32(math.Max(1, math.Min(float64(MaxBodyFetch), float64(prev)*scale))) + prev := atomic.LoadInt32(capacity) + next := int32(math.Max(1, math.Min(float64(maxFetch), float64(prev)*scale))) // Try to update the old value - if atomic.CompareAndSwapInt32(&p.capacity, prev, next) { + if atomic.CompareAndSwapInt32(capacity, prev, next) { // If we're having problems at 1 capacity, try to find better peers if next == 1 { p.Demote() @@ -193,14 +214,20 @@ func (p *peer) SetIdle() { break } } - // Set the peer to idle to allow further block requests - atomic.StoreInt32(&p.idle, 0) + // Set the peer to idle to allow further fetch requests + atomic.StoreInt32(idle, 0) +} + +// BlockCapacity retrieves the peers block download allowance based on its +// previously discovered bandwidth capacity. +func (p *peer) BlockCapacity() int { + return int(atomic.LoadInt32(&p.blockCapacity)) } -// Capacity retrieves the peers block download allowance based on its previously -// discovered bandwidth capacity. -func (p *peer) Capacity() int { - return int(atomic.LoadInt32(&p.capacity)) +// ReceiptCapacity retrieves the peers block download allowance based on its +// previously discovered bandwidth capacity. +func (p *peer) ReceiptCapacity() int { + return int(atomic.LoadInt32(&p.receiptCapacity)) } // Promote increases the peer's reputation. @@ -226,7 +253,8 @@ func (p *peer) Demote() { func (p *peer) String() string { return fmt.Sprintf("Peer %s [%s]", p.id, fmt.Sprintf("reputation %3d, ", atomic.LoadInt32(&p.rep))+ - fmt.Sprintf("capacity %3d, ", atomic.LoadInt32(&p.capacity))+ + fmt.Sprintf("block cap %3d, ", atomic.LoadInt32(&p.blockCapacity))+ + fmt.Sprintf("receipt cap %3d, ", atomic.LoadInt32(&p.receiptCapacity))+ fmt.Sprintf("ignored %4d", p.ignored.Size()), ) } @@ -310,26 +338,52 @@ func (ps *peerSet) AllPeers() []*peer { return list } -// IdlePeers retrieves a flat list of all the currently idle peers within the +// BlockIdlePeers retrieves a flat list of all the currently idle peers within the // active peer set, ordered by their reputation. -func (ps *peerSet) IdlePeers(version int) []*peer { +func (ps *peerSet) BlockIdlePeers(version int) ([]*peer, int) { ps.lock.RLock() defer ps.lock.RUnlock() - list := make([]*peer, 0, len(ps.peers)) + idle, total := make([]*peer, 0, len(ps.peers)), 0 for _, p := range ps.peers { - if (version == eth61 && p.version == eth61) || (version >= eth62 && p.version >= eth62) { - if atomic.LoadInt32(&p.idle) == 0 { - list = append(list, p) + if (version == 61 && p.version == 61) || (version >= 62 && p.version >= 62) { + if atomic.LoadInt32(&p.blockIdle) == 0 { + idle = append(idle, p) } + total++ } } - for i := 0; i < len(list); i++ { - for j := i + 1; j < len(list); j++ { - if atomic.LoadInt32(&list[i].rep) < atomic.LoadInt32(&list[j].rep) { - list[i], list[j] = list[j], list[i] + for i := 0; i < len(idle); i++ { + for j := i + 1; j < len(idle); j++ { + if atomic.LoadInt32(&idle[i].rep) < atomic.LoadInt32(&idle[j].rep) { + idle[i], idle[j] = idle[j], idle[i] } } } - return list + return idle, total +} + +// ReceiptIdlePeers retrieves a flat list of all the currently idle peers within the +// active peer set, ordered by their reputation. +func (ps *peerSet) ReceiptIdlePeers() ([]*peer, int) { + ps.lock.RLock() + defer ps.lock.RUnlock() + + idle, total := make([]*peer, 0, len(ps.peers)), 0 + for _, p := range ps.peers { + if p.version >= 63 { + if atomic.LoadInt32(&p.receiptIdle) == 0 { + idle = append(idle, p) + } + total++ + } + } + for i := 0; i < len(idle); i++ { + for j := i + 1; j < len(idle); j++ { + if atomic.LoadInt32(&idle[i].rep) < atomic.LoadInt32(&idle[j].rep) { + idle[i], idle[j] = idle[j], idle[i] + } + } + } + return idle, total } diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go index 49d1046fb..c53ad939e 100644 --- a/eth/downloader/queue.go +++ b/eth/downloader/queue.go @@ -29,11 +29,12 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" + "github.com/rcrowley/go-metrics" "gopkg.in/karalabe/cookiejar.v2/collections/prque" ) var ( - blockCacheLimit = 8 * MaxBlockFetch // Maximum number of blocks to cache before throttling the download + blockCacheLimit = 1024 // Maximum number of blocks to cache before throttling the download ) var ( @@ -41,29 +42,47 @@ var ( errStaleDelivery = errors.New("stale delivery") ) -// fetchRequest is a currently running block retrieval operation. +// fetchRequest is a currently running data retrieval operation. type fetchRequest struct { Peer *peer // Peer to which the request was sent - Hashes map[common.Hash]int // [eth/61] Requested hashes with their insertion index (priority) + Hashes map[common.Hash]int // [eth/61] Requested block with their insertion index (priority) Headers []*types.Header // [eth/62] Requested headers, sorted by request order Time time.Time // Time when the request was made } +// fetchResult is the assembly collecting partial results from potentially more +// than one fetcher routines, until all outstanding retrievals complete and the +// result as a whole can be processed. +type fetchResult struct { + Pending int // Number of data fetches still pending + + Header *types.Header + Uncles []*types.Header + Transactions types.Transactions + Receipts types.Receipts +} + // queue represents hashes that are either need fetching or are being fetched type queue struct { hashPool map[common.Hash]int // [eth/61] Pending hashes, mapping to their insertion index (priority) hashQueue *prque.Prque // [eth/61] Priority queue of the block hashes to fetch hashCounter int // [eth/61] Counter indexing the added hashes to ensure retrieval order - headerPool map[common.Hash]*types.Header // [eth/62] Pending headers, mapping from their hashes - headerQueue *prque.Prque // [eth/62] Priority queue of the headers to fetch the bodies for - headerHead common.Hash // [eth/62] Hash of the last queued header to verify order + headerHead common.Hash // [eth/62] Hash of the last queued header to verify order - pendPool map[string]*fetchRequest // Currently pending block retrieval operations + blockTaskPool map[common.Hash]*types.Header // [eth/62] Pending block (body) retrieval tasks, mapping hashes to headers + blockTaskQueue *prque.Prque // [eth/62] Priority queue of the headers to fetch the blocks (bodies) for + blockPendPool map[string]*fetchRequest // [eth/62] Currently pending block (body) retrieval operations + blockDonePool map[common.Hash]struct{} // [eth/62] Set of the completed block (body) fetches - blockPool map[common.Hash]uint64 // Hash-set of the downloaded data blocks, mapping to cache indexes - blockCache []*Block // Downloaded but not yet delivered blocks - blockOffset uint64 // Offset of the first cached block in the block-chain + receiptTaskPool map[common.Hash]*types.Header // [eth/63] Pending receipt retrieval tasks, mapping hashes to headers + receiptTaskQueue *prque.Prque // [eth/63] Priority queue of the headers to fetch the receipts for + receiptPendPool map[string]*fetchRequest // [eth/63] Currently pending receipt retrieval operations + receiptDonePool map[common.Hash]struct{} // [eth/63] Set of the completed receipt fetches + + resultCache []*fetchResult // Downloaded but not yet delivered fetch results + resultOffset uint64 // Offset of the first cached fetch result in the block-chain + resultParts int // Number of fetch components required to complete an item lock sync.RWMutex } @@ -71,13 +90,17 @@ type queue struct { // newQueue creates a new download queue for scheduling block retrieval. func newQueue() *queue { return &queue{ - hashPool: make(map[common.Hash]int), - hashQueue: prque.New(), - headerPool: make(map[common.Hash]*types.Header), - headerQueue: prque.New(), - pendPool: make(map[string]*fetchRequest), - blockPool: make(map[common.Hash]uint64), - blockCache: make([]*Block, blockCacheLimit), + hashPool: make(map[common.Hash]int), + hashQueue: prque.New(), + blockTaskPool: make(map[common.Hash]*types.Header), + blockTaskQueue: prque.New(), + blockPendPool: make(map[string]*fetchRequest), + blockDonePool: make(map[common.Hash]struct{}), + receiptTaskPool: make(map[common.Hash]*types.Header), + receiptTaskQueue: prque.New(), + receiptPendPool: make(map[string]*fetchRequest), + receiptDonePool: make(map[common.Hash]struct{}), + resultCache: make([]*fetchResult, blockCacheLimit), } } @@ -90,32 +113,37 @@ func (q *queue) Reset() { q.hashQueue.Reset() q.hashCounter = 0 - q.headerPool = make(map[common.Hash]*types.Header) - q.headerQueue.Reset() q.headerHead = common.Hash{} - q.pendPool = make(map[string]*fetchRequest) + q.blockTaskPool = make(map[common.Hash]*types.Header) + q.blockTaskQueue.Reset() + q.blockPendPool = make(map[string]*fetchRequest) + q.blockDonePool = make(map[common.Hash]struct{}) + + q.receiptTaskPool = make(map[common.Hash]*types.Header) + q.receiptTaskQueue.Reset() + q.receiptPendPool = make(map[string]*fetchRequest) + q.receiptDonePool = make(map[common.Hash]struct{}) - q.blockPool = make(map[common.Hash]uint64) - q.blockOffset = 0 - q.blockCache = make([]*Block, blockCacheLimit) + q.resultCache = make([]*fetchResult, blockCacheLimit) + q.resultOffset = 0 + q.resultParts = 0 } -// Size retrieves the number of blocks in the queue, returning separately for -// pending and already downloaded. -func (q *queue) Size() (int, int) { +// PendingBlocks retrieves the number of block (body) requests pending for retrieval. +func (q *queue) PendingBlocks() int { q.lock.RLock() defer q.lock.RUnlock() - return len(q.hashPool) + len(q.headerPool), len(q.blockPool) + return q.hashQueue.Size() + q.blockTaskQueue.Size() } -// Pending retrieves the number of blocks pending for retrieval. -func (q *queue) Pending() int { +// PendingReceipts retrieves the number of block receipts pending for retrieval. +func (q *queue) PendingReceipts() int { q.lock.RLock() defer q.lock.RUnlock() - return q.hashQueue.Size() + q.headerQueue.Size() + return q.receiptTaskQueue.Size() } // InFlight retrieves the number of fetch requests currently in flight. @@ -123,44 +151,55 @@ func (q *queue) InFlight() int { q.lock.RLock() defer q.lock.RUnlock() - return len(q.pendPool) + return len(q.blockPendPool) + len(q.receiptPendPool) +} + +// Idle returns if the queue is fully idle or has some data still inside. This +// method is used by the tester to detect termination events. +func (q *queue) Idle() bool { + q.lock.RLock() + defer q.lock.RUnlock() + + queued := q.hashQueue.Size() + q.blockTaskQueue.Size() + q.receiptTaskQueue.Size() + pending := len(q.blockPendPool) + len(q.receiptPendPool) + cached := len(q.blockDonePool) + len(q.receiptDonePool) + + return (queued + pending + cached) == 0 } -// Throttle checks if the download should be throttled (active block fetches -// exceed block cache). -func (q *queue) Throttle() bool { +// ThrottleBlocks checks if the download should be throttled (active block (body) +// fetches exceed block cache). +func (q *queue) ThrottleBlocks() bool { q.lock.RLock() defer q.lock.RUnlock() - // Calculate the currently in-flight block requests + // Calculate the currently in-flight block (body) requests pending := 0 - for _, request := range q.pendPool { + for _, request := range q.blockPendPool { pending += len(request.Hashes) + len(request.Headers) } - // Throttle if more blocks are in-flight than free space in the cache - return pending >= len(q.blockCache)-len(q.blockPool) + // Throttle if more blocks (bodies) are in-flight than free space in the cache + return pending >= len(q.resultCache)-len(q.blockDonePool) } -// Has checks if a hash is within the download queue or not. -func (q *queue) Has(hash common.Hash) bool { +// ThrottleReceipts checks if the download should be throttled (active receipt +// fetches exceed block cache). +func (q *queue) ThrottleReceipts() bool { q.lock.RLock() defer q.lock.RUnlock() - if _, ok := q.hashPool[hash]; ok { - return true - } - if _, ok := q.headerPool[hash]; ok { - return true - } - if _, ok := q.blockPool[hash]; ok { - return true + // Calculate the currently in-flight receipt requests + pending := 0 + for _, request := range q.receiptPendPool { + pending += len(request.Headers) } - return false + // Throttle if more receipts are in-flight than free space in the cache + return pending >= len(q.resultCache)-len(q.receiptDonePool) } -// Insert61 adds a set of hashes for the download queue for scheduling, returning +// Schedule61 adds a set of hashes for the download queue for scheduling, returning // the new hashes encountered. -func (q *queue) Insert61(hashes []common.Hash, fifo bool) []common.Hash { +func (q *queue) Schedule61(hashes []common.Hash, fifo bool) []common.Hash { q.lock.Lock() defer q.lock.Unlock() @@ -186,22 +225,17 @@ func (q *queue) Insert61(hashes []common.Hash, fifo bool) []common.Hash { return inserts } -// Insert adds a set of headers for the download queue for scheduling, returning +// Schedule adds a set of headers for the download queue for scheduling, returning // the new headers encountered. -func (q *queue) Insert(headers []*types.Header, from uint64) []*types.Header { +func (q *queue) Schedule(headers []*types.Header, from uint64, receipts bool) []*types.Header { q.lock.Lock() defer q.lock.Unlock() // Insert all the headers prioritized by the contained block number inserts := make([]*types.Header, 0, len(headers)) for _, header := range headers { - // Make sure no duplicate requests are executed - hash := header.Hash() - if _, ok := q.headerPool[hash]; ok { - glog.V(logger.Warn).Infof("Header #%d [%x] already scheduled", header.Number.Uint64(), hash[:4]) - continue - } // Make sure chain order is honored and preserved throughout + hash := header.Hash() if header.Number == nil || header.Number.Uint64() != from { glog.V(logger.Warn).Infof("Header #%v [%x] broke chain ordering, expected %d", header.Number, hash[:4], from) break @@ -210,69 +244,72 @@ func (q *queue) Insert(headers []*types.Header, from uint64) []*types.Header { glog.V(logger.Warn).Infof("Header #%v [%x] broke chain ancestry", header.Number, hash[:4]) break } - // Queue the header for body retrieval + // Make sure no duplicate requests are executed + if _, ok := q.blockTaskPool[hash]; ok { + glog.V(logger.Warn).Infof("Header #%d [%x] already scheduled for block fetch", header.Number.Uint64(), hash[:4]) + continue + } + if _, ok := q.receiptTaskPool[hash]; ok { + glog.V(logger.Warn).Infof("Header #%d [%x] already scheduled for receipt fetch", header.Number.Uint64(), hash[:4]) + continue + } + // Queue the header for content retrieval + q.blockTaskPool[hash] = header + q.blockTaskQueue.Push(header, -float32(header.Number.Uint64())) + if receipts { + q.receiptTaskPool[hash] = header + q.receiptTaskQueue.Push(header, -float32(header.Number.Uint64())) + } inserts = append(inserts, header) - q.headerPool[hash] = header - q.headerQueue.Push(header, -float32(header.Number.Uint64())) q.headerHead = hash from++ } return inserts } -// GetHeadBlock retrieves the first block from the cache, or nil if it hasn't +// GetHeadResult retrieves the first fetch result from the cache, or nil if it hasn't // been downloaded yet (or simply non existent). -func (q *queue) GetHeadBlock() *Block { +func (q *queue) GetHeadResult() *fetchResult { q.lock.RLock() defer q.lock.RUnlock() - if len(q.blockCache) == 0 { + if len(q.resultCache) == 0 || q.resultCache[0] == nil { return nil } - return q.blockCache[0] -} - -// GetBlock retrieves a downloaded block, or nil if non-existent. -func (q *queue) GetBlock(hash common.Hash) *Block { - q.lock.RLock() - defer q.lock.RUnlock() - - // Short circuit if the block hasn't been downloaded yet - index, ok := q.blockPool[hash] - if !ok { + if q.resultCache[0].Pending > 0 { return nil } - // Return the block if it's still available in the cache - if q.blockOffset <= index && index < q.blockOffset+uint64(len(q.blockCache)) { - return q.blockCache[index-q.blockOffset] - } - return nil + return q.resultCache[0] } -// TakeBlocks retrieves and permanently removes a batch of blocks from the cache. -func (q *queue) TakeBlocks() []*Block { +// TakeResults retrieves and permanently removes a batch of fetch results from +// the cache. +func (q *queue) TakeResults() []*fetchResult { q.lock.Lock() defer q.lock.Unlock() - // Accumulate all available blocks - blocks := []*Block{} - for _, block := range q.blockCache { - if block == nil { + // Accumulate all available results + results := []*fetchResult{} + for _, result := range q.resultCache { + if result == nil || result.Pending > 0 { break } - blocks = append(blocks, block) - delete(q.blockPool, block.RawBlock.Hash()) + results = append(results, result) + + hash := result.Header.Hash() + delete(q.blockDonePool, hash) + delete(q.receiptDonePool, hash) } - // Delete the blocks from the slice and let them be garbage collected - // without this slice trick the blocks would stay in memory until nil - // would be assigned to q.blocks - copy(q.blockCache, q.blockCache[len(blocks):]) - for k, n := len(q.blockCache)-len(blocks), len(q.blockCache); k < n; k++ { - q.blockCache[k] = nil + // Delete the results from the slice and let them be garbage collected + // without this slice trick the results would stay in memory until nil + // would be assigned to them. + copy(q.resultCache, q.resultCache[len(results):]) + for k, n := len(q.resultCache)-len(results), len(q.resultCache); k < n; k++ { + q.resultCache[k] = nil } - q.blockOffset += uint64(len(blocks)) + q.resultOffset += uint64(len(results)) - return blocks + return results } // Reserve61 reserves a set of hashes for the given peer, skipping any previously @@ -286,12 +323,12 @@ func (q *queue) Reserve61(p *peer, count int) *fetchRequest { if q.hashQueue.Empty() { return nil } - if _, ok := q.pendPool[p.id]; ok { + if _, ok := q.blockPendPool[p.id]; ok { return nil } // Calculate an upper limit on the hashes we might fetch (i.e. throttling) - space := len(q.blockCache) - len(q.blockPool) - for _, request := range q.pendPool { + space := len(q.resultCache) - len(q.blockDonePool) + for _, request := range q.blockPendPool { space -= len(request.Hashes) } // Retrieve a batch of hashes, skipping previously failed ones @@ -319,49 +356,82 @@ func (q *queue) Reserve61(p *peer, count int) *fetchRequest { Hashes: send, Time: time.Now(), } - q.pendPool[p.id] = request + q.blockPendPool[p.id] = request return request } -// Reserve reserves a set of headers for the given peer, skipping any previously -// failed download. Beside the next batch of needed fetches, it also returns a -// flag whether empty blocks were queued requiring processing. -func (q *queue) Reserve(p *peer, count int) (*fetchRequest, bool, error) { +// ReserveBlocks reserves a set of body fetches for the given peer, skipping any +// previously failed downloads. Beside the next batch of needed fetches, it also +// returns a flag whether empty blocks were queued requiring processing. +func (q *queue) ReserveBlocks(p *peer, count int) (*fetchRequest, bool, error) { + noop := func(header *types.Header) bool { + return header.TxHash == types.EmptyRootHash && header.UncleHash == types.EmptyUncleHash + } + return q.reserveFetch(p, count, q.blockTaskPool, q.blockTaskQueue, q.blockPendPool, q.blockDonePool, noop) +} + +// ReserveReceipts reserves a set of receipt fetches for the given peer, skipping +// any previously failed downloads. Beside the next batch of needed fetches, it +// also returns a flag whether empty receipts were queued requiring importing. +func (q *queue) ReserveReceipts(p *peer, count int) (*fetchRequest, bool, error) { + noop := func(header *types.Header) bool { + return header.ReceiptHash == types.EmptyRootHash + } + return q.reserveFetch(p, count, q.receiptTaskPool, q.receiptTaskQueue, q.receiptPendPool, q.receiptDonePool, noop) +} + +// reserveFetch reserves a set of data download operations for a given peer, +// skipping any previously failed ones. This method is a generic version used +// by the individual special reservation functions. +func (q *queue) reserveFetch(p *peer, count int, taskPool map[common.Hash]*types.Header, taskQueue *prque.Prque, + pendPool map[string]*fetchRequest, donePool map[common.Hash]struct{}, noop func(*types.Header) bool) (*fetchRequest, bool, error) { q.lock.Lock() defer q.lock.Unlock() // Short circuit if the pool has been depleted, or if the peer's already // downloading something (sanity check not to corrupt state) - if q.headerQueue.Empty() { + if taskQueue.Empty() { return nil, false, nil } - if _, ok := q.pendPool[p.id]; ok { + if _, ok := pendPool[p.id]; ok { return nil, false, nil } - // Calculate an upper limit on the bodies we might fetch (i.e. throttling) - space := len(q.blockCache) - len(q.blockPool) - for _, request := range q.pendPool { + // Calculate an upper limit on the items we might fetch (i.e. throttling) + space := len(q.resultCache) - len(donePool) + for _, request := range pendPool { space -= len(request.Headers) } - // Retrieve a batch of headers, skipping previously failed ones + // Retrieve a batch of tasks, skipping previously failed ones send := make([]*types.Header, 0, count) skip := make([]*types.Header, 0) - process := false - for proc := 0; proc < space && len(send) < count && !q.headerQueue.Empty(); proc++ { - header := q.headerQueue.PopItem().(*types.Header) + progress := false + for proc := 0; proc < space && len(send) < count && !taskQueue.Empty(); proc++ { + header := taskQueue.PopItem().(*types.Header) - // If the header defines an empty block, deliver straight - if header.TxHash == types.DeriveSha(types.Transactions{}) && header.UncleHash == types.CalcUncleHash([]*types.Header{}) { - if err := q.enqueue("", types.NewBlockWithHeader(header)); err != nil { - return nil, false, errInvalidChain + // If we're the first to request this task, initialize the result container + index := int(header.Number.Int64() - int64(q.resultOffset)) + if index >= len(q.resultCache) || index < 0 { + return nil, false, errInvalidChain + } + if q.resultCache[index] == nil { + q.resultCache[index] = &fetchResult{ + Pending: q.resultParts, + Header: header, } - delete(q.headerPool, header.Hash()) - process, space, proc = true, space-1, proc-1 + } + // If this fetch task is a noop, skip this fetch operation + if noop(header) { + donePool[header.Hash()] = struct{}{} + delete(taskPool, header.Hash()) + + space, proc = space-1, proc-1 + q.resultCache[index].Pending-- + progress = true continue } - // If it's a content block, add to the body fetch request + // Otherwise if not a known unknown block, add to the retrieve list if p.ignored.Has(header.Hash()) { skip = append(skip, header) } else { @@ -370,24 +440,41 @@ func (q *queue) Reserve(p *peer, count int) (*fetchRequest, bool, error) { } // Merge all the skipped headers back for _, header := range skip { - q.headerQueue.Push(header, -float32(header.Number.Uint64())) + taskQueue.Push(header, -float32(header.Number.Uint64())) } // Assemble and return the block download request if len(send) == 0 { - return nil, process, nil + return nil, progress, nil } request := &fetchRequest{ Peer: p, Headers: send, Time: time.Now(), } - q.pendPool[p.id] = request + pendPool[p.id] = request + + return request, progress, nil +} + +// Cancel61 aborts a fetch request, returning all pending hashes to the queue. +func (q *queue) Cancel61(request *fetchRequest) { + q.cancel(request, nil, q.blockPendPool) +} + +// CancelBlocks aborts a body fetch request, returning all pending hashes to the +// task queue. +func (q *queue) CancelBlocks(request *fetchRequest) { + q.cancel(request, q.blockTaskQueue, q.blockPendPool) +} - return request, process, nil +// CancelReceipts aborts a body fetch request, returning all pending hashes to +// the task queue. +func (q *queue) CancelReceipts(request *fetchRequest) { + q.cancel(request, q.receiptTaskQueue, q.receiptPendPool) } -// Cancel aborts a fetch request, returning all pending hashes to the queue. -func (q *queue) Cancel(request *fetchRequest) { +// Cancel aborts a fetch request, returning all pending hashes to the task queue. +func (q *queue) cancel(request *fetchRequest, taskQueue *prque.Prque, pendPool map[string]*fetchRequest) { q.lock.Lock() defer q.lock.Unlock() @@ -395,20 +482,62 @@ func (q *queue) Cancel(request *fetchRequest) { q.hashQueue.Push(hash, float32(index)) } for _, header := range request.Headers { - q.headerQueue.Push(header, -float32(header.Number.Uint64())) + taskQueue.Push(header, -float32(header.Number.Uint64())) } - delete(q.pendPool, request.Peer.id) + delete(pendPool, request.Peer.id) } -// Expire checks for in flight requests that exceeded a timeout allowance, +// Revoke cancels all pending requests belonging to a given peer. This method is +// meant to be called during a peer drop to quickly reassign owned data fetches +// to remaining nodes. +func (q *queue) Revoke(peerId string) { + q.lock.Lock() + defer q.lock.Unlock() + + if request, ok := q.blockPendPool[peerId]; ok { + for hash, index := range request.Hashes { + q.hashQueue.Push(hash, float32(index)) + } + for _, header := range request.Headers { + q.blockTaskQueue.Push(header, -float32(header.Number.Uint64())) + } + delete(q.blockPendPool, peerId) + } + if request, ok := q.receiptPendPool[peerId]; ok { + for _, header := range request.Headers { + q.receiptTaskQueue.Push(header, -float32(header.Number.Uint64())) + } + delete(q.receiptPendPool, peerId) + } +} + +// Expire61 checks for in flight requests that exceeded a timeout allowance, // canceling them and returning the responsible peers for penalization. -func (q *queue) Expire(timeout time.Duration) []string { +func (q *queue) Expire61(timeout time.Duration) []string { + return q.expire(timeout, q.blockPendPool, nil) +} + +// ExpireBlocks checks for in flight block body requests that exceeded a timeout +// allowance, canceling them and returning the responsible peers for penalization. +func (q *queue) ExpireBlocks(timeout time.Duration) []string { + return q.expire(timeout, q.blockPendPool, q.blockTaskQueue) +} + +// ExpireReceipts checks for in flight receipt requests that exceeded a timeout +// allowance, canceling them and returning the responsible peers for penalization. +func (q *queue) ExpireReceipts(timeout time.Duration) []string { + return q.expire(timeout, q.receiptPendPool, q.receiptTaskQueue) +} + +// expire is the generic check that move expired tasks from a pending pool back +// into a task pool, returning all entities caught with expired tasks. +func (q *queue) expire(timeout time.Duration, pendPool map[string]*fetchRequest, taskQueue *prque.Prque) []string { q.lock.Lock() defer q.lock.Unlock() // Iterate over the expired requests and return each to the queue peers := []string{} - for id, request := range q.pendPool { + for id, request := range pendPool { if time.Since(request.Time) > timeout { // Update the metrics with the timeout if len(request.Hashes) > 0 { @@ -421,14 +550,14 @@ func (q *queue) Expire(timeout time.Duration) []string { q.hashQueue.Push(hash, float32(index)) } for _, header := range request.Headers { - q.headerQueue.Push(header, -float32(header.Number.Uint64())) + taskQueue.Push(header, -float32(header.Number.Uint64())) } peers = append(peers, id) } } // Remove the expired requests from the pending pool for _, id := range peers { - delete(q.pendPool, id) + delete(pendPool, id) } return peers } @@ -439,12 +568,12 @@ func (q *queue) Deliver61(id string, blocks []*types.Block) (err error) { defer q.lock.Unlock() // Short circuit if the blocks were never requested - request := q.pendPool[id] + request := q.blockPendPool[id] if request == nil { return errNoFetchesPending } blockReqTimer.UpdateSince(request.Time) - delete(q.pendPool, id) + delete(q.blockPendPool, id) // If no blocks were retrieved, mark them as unavailable for the origin peer if len(blocks) == 0 { @@ -461,10 +590,19 @@ func (q *queue) Deliver61(id string, blocks []*types.Block) (err error) { errs = append(errs, fmt.Errorf("non-requested block %x", hash)) continue } - // Queue the block up for processing - if err := q.enqueue(id, block); err != nil { - return err + // Reconstruct the next result if contents match up + index := int(block.Number().Int64() - int64(q.resultOffset)) + if index >= len(q.resultCache) || index < 0 { + errs = []error{errInvalidChain} + break + } + q.resultCache[index] = &fetchResult{ + Header: block.Header(), + Transactions: block.Transactions(), + Uncles: block.Uncles(), } + q.blockDonePool[block.Hash()] = struct{}{} + delete(request.Hashes, hash) delete(q.hashPool, hash) } @@ -473,60 +611,94 @@ func (q *queue) Deliver61(id string, blocks []*types.Block) (err error) { q.hashQueue.Push(hash, float32(index)) } // If none of the blocks were good, it's a stale delivery - if len(errs) != 0 { - if len(errs) == len(blocks) { - return errStaleDelivery - } + switch { + case len(errs) == 0: + return nil + + case len(errs) == 1 && (errs[0] == errInvalidChain || errs[0] == errInvalidBlock): + return errs[0] + + case len(errs) == len(request.Headers): + return errStaleDelivery + + default: return fmt.Errorf("multiple failures: %v", errs) } - return nil } -// Deliver injects a block body retrieval response into the download queue. -func (q *queue) Deliver(id string, txLists [][]*types.Transaction, uncleLists [][]*types.Header) error { +// DeliverBlocks injects a block (body) retrieval response into the results queue. +func (q *queue) DeliverBlocks(id string, txLists [][]*types.Transaction, uncleLists [][]*types.Header) error { + reconstruct := func(header *types.Header, index int, result *fetchResult) error { + if types.DeriveSha(types.Transactions(txLists[index])) != header.TxHash || types.CalcUncleHash(uncleLists[index]) != header.UncleHash { + return errInvalidBody + } + result.Transactions = txLists[index] + result.Uncles = uncleLists[index] + return nil + } + return q.deliver(id, q.blockTaskPool, q.blockTaskQueue, q.blockPendPool, q.blockDonePool, bodyReqTimer, len(txLists), reconstruct) +} + +// DeliverReceipts injects a receipt retrieval response into the results queue. +func (q *queue) DeliverReceipts(id string, receiptList [][]*types.Receipt) error { + reconstruct := func(header *types.Header, index int, result *fetchResult) error { + if types.DeriveSha(types.Receipts(receiptList[index])) != header.ReceiptHash { + return errInvalidReceipt + } + result.Receipts = receiptList[index] + return nil + } + return q.deliver(id, q.receiptTaskPool, q.receiptTaskQueue, q.receiptPendPool, q.receiptDonePool, receiptReqTimer, len(receiptList), reconstruct) +} + +// deliver injects a data retrieval response into the results queue. +func (q *queue) deliver(id string, taskPool map[common.Hash]*types.Header, taskQueue *prque.Prque, pendPool map[string]*fetchRequest, + donePool map[common.Hash]struct{}, reqTimer metrics.Timer, results int, reconstruct func(header *types.Header, index int, result *fetchResult) error) error { q.lock.Lock() defer q.lock.Unlock() - // Short circuit if the block bodies were never requested - request := q.pendPool[id] + // Short circuit if the data was never requested + request := pendPool[id] if request == nil { return errNoFetchesPending } - bodyReqTimer.UpdateSince(request.Time) - delete(q.pendPool, id) + reqTimer.UpdateSince(request.Time) + delete(pendPool, id) - // If no block bodies were retrieved, mark them as unavailable for the origin peer - if len(txLists) == 0 || len(uncleLists) == 0 { + // If no data items were retrieved, mark them as unavailable for the origin peer + if results == 0 { for hash, _ := range request.Headers { request.Peer.ignored.Add(hash) } } - // Assemble each of the block bodies with their headers and queue for processing + // Assemble each of the results with their headers and retrieved data parts errs := make([]error, 0) for i, header := range request.Headers { - // Short circuit block assembly if no more bodies are found - if i >= len(txLists) || i >= len(uncleLists) { + // Short circuit assembly if no more fetch results are found + if i >= results { break } - // Reconstruct the next block if contents match up - if types.DeriveSha(types.Transactions(txLists[i])) != header.TxHash || types.CalcUncleHash(uncleLists[i]) != header.UncleHash { - errs = []error{errInvalidBody} + // Reconstruct the next result if contents match up + index := int(header.Number.Int64() - int64(q.resultOffset)) + if index >= len(q.resultCache) || index < 0 || q.resultCache[index] == nil { + errs = []error{errInvalidChain} break } - block := types.NewBlockWithHeader(header).WithBody(txLists[i], uncleLists[i]) - - // Queue the block up for processing - if err := q.enqueue(id, block); err != nil { + if err := reconstruct(header, i, q.resultCache[index]); err != nil { errs = []error{err} break } + donePool[header.Hash()] = struct{}{} + q.resultCache[index].Pending-- + + // Clean up a successful fetch request.Headers[i] = nil - delete(q.headerPool, header.Hash()) + delete(taskPool, header.Hash()) } // Return all failed or missing fetches to the queue for _, header := range request.Headers { if header != nil { - q.headerQueue.Push(header, -float32(header.Number.Uint64())) + taskQueue.Push(header, -float32(header.Number.Uint64())) } } // If none of the blocks were good, it's a stale delivery @@ -534,11 +706,8 @@ func (q *queue) Deliver(id string, txLists [][]*types.Transaction, uncleLists [] case len(errs) == 0: return nil - case len(errs) == 1 && errs[0] == errInvalidBody: - return errInvalidBody - - case len(errs) == 1 && errs[0] == errInvalidChain: - return errInvalidChain + case len(errs) == 1 && (errs[0] == errInvalidChain || errs[0] == errInvalidBody || errs[0] == errInvalidReceipt): + return errs[0] case len(errs) == len(request.Headers): return errStaleDelivery @@ -548,29 +717,14 @@ func (q *queue) Deliver(id string, txLists [][]*types.Transaction, uncleLists [] } } -// enqueue inserts a new block into the final delivery queue, waiting for pickup -// by the processor. -func (q *queue) enqueue(origin string, block *types.Block) error { - // If a requested block falls out of the range, the hash chain is invalid - index := int(int64(block.NumberU64()) - int64(q.blockOffset)) - if index >= len(q.blockCache) || index < 0 { - return errInvalidChain - } - // Otherwise merge the block and mark the hash done - q.blockCache[index] = &Block{ - RawBlock: block, - OriginPeer: origin, - } - q.blockPool[block.Header().Hash()] = block.NumberU64() - return nil -} - -// Prepare configures the block cache offset to allow accepting inbound blocks. -func (q *queue) Prepare(offset uint64) { +// Prepare configures the result cache to allow accepting and caching inbound +// fetch results. +func (q *queue) Prepare(offset uint64, parts int) { q.lock.Lock() defer q.lock.Unlock() - if q.blockOffset < offset { - q.blockOffset = offset + if q.resultOffset < offset { + q.resultOffset = offset } + q.resultParts = parts } diff --git a/eth/handler.go b/eth/handler.go index 021be1024..daa285730 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -120,15 +120,25 @@ func NewProtocolManager(mode Mode, networkId int, mux *event.TypeMux, txpool txP return nil, errIncompatibleConfig } // Construct the different synchronisation mechanisms - manager.downloader = downloader.New(manager.eventMux, manager.blockchain.HasBlock, manager.blockchain.GetBlock, manager.blockchain.CurrentBlock, manager.blockchain.GetTd, manager.blockchain.InsertChain, manager.removePeer) + var syncMode downloader.SyncMode + switch mode { + case ArchiveMode: + syncMode = downloader.FullSync + case FullMode: + syncMode = downloader.FastSync + case LightMode: + syncMode = downloader.LightSync + } + manager.downloader = downloader.New(syncMode, manager.eventMux, blockchain.HasHeader, blockchain.HasBlock, blockchain.GetHeader, blockchain.GetBlock, + blockchain.CurrentHeader, blockchain.CurrentBlock, blockchain.GetTd, blockchain.InsertHeaderChain, blockchain.InsertChain, nil, manager.removePeer) validator := func(block *types.Block, parent *types.Block) error { return core.ValidateHeader(pow, block.Header(), parent.Header(), true, false) } heighter := func() uint64 { - return manager.blockchain.CurrentBlock().NumberU64() + return blockchain.CurrentBlock().NumberU64() } - manager.fetcher = fetcher.New(manager.blockchain.GetBlock, validator, manager.BroadcastBlock, heighter, manager.blockchain.InsertChain, manager.removePeer) + manager.fetcher = fetcher.New(blockchain.GetBlock, validator, manager.BroadcastBlock, heighter, blockchain.InsertChain, manager.removePeer) return manager, nil } @@ -210,7 +220,7 @@ func (pm *ProtocolManager) handle(p *peer) error { // Register the peer in the downloader. If the downloader considers it banned, we disconnect if err := pm.downloader.RegisterPeer(p.id, p.version, p.Head(), p.RequestHashes, p.RequestHashesFromNumber, p.RequestBlocks, - p.RequestHeadersByHash, p.RequestHeadersByNumber, p.RequestBodies); err != nil { + p.RequestHeadersByHash, p.RequestHeadersByNumber, p.RequestBodies, p.RequestReceipts); err != nil { return err } // Propagate existing transactions. new transactions appearing @@ -514,22 +524,31 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { var ( hash common.Hash bytes int - receipts []*types.Receipt + receipts []rlp.RawValue ) - for bytes < softResponseLimit && len(receipts) < downloader.MaxReceiptsFetch { - // Retrieve the hash of the next transaction receipt + for bytes < softResponseLimit && len(receipts) < downloader.MaxReceiptFetch { + // Retrieve the hash of the next block if err := msgStream.Decode(&hash); err == rlp.EOL { break } else if err != nil { return errResp(ErrDecode, "msg %v: %v", msg, err) } - // Retrieve the requested receipt, stopping if enough was found - if receipt := core.GetReceipt(pm.chaindb, hash); receipt != nil { - receipts = append(receipts, receipt) - bytes += len(receipt.RlpEncode()) + // Retrieve the requested block's receipts, skipping if unknown to us + results := core.GetBlockReceipts(pm.chaindb, hash) + if results == nil { + if header := pm.blockchain.GetHeader(hash); header == nil || header.ReceiptHash != types.EmptyRootHash { + continue + } + } + // If known, encode and queue for response packet + if encoded, err := rlp.EncodeToBytes(results); err != nil { + glog.V(logger.Error).Infof("failed to encode receipt: %v", err) + } else { + receipts = append(receipts, encoded) + bytes += len(encoded) } } - return p.SendReceipts(receipts) + return p.SendReceiptsRLP(receipts) case msg.Code == NewBlockHashesMsg: // Retrieve and deseralize the remote new block hashes notification diff --git a/eth/handler_test.go b/eth/handler_test.go index 8ab5c1aad..5ddfc4a8f 100644 --- a/eth/handler_test.go +++ b/eth/handler_test.go @@ -535,15 +535,12 @@ func testGetReceipt(t *testing.T, protocol int) { defer peer.close() // Collect the hashes to request, and the response to expect - hashes := []common.Hash{} + hashes, receipts := []common.Hash{}, []types.Receipts{} for i := uint64(0); i <= pm.blockchain.CurrentBlock().NumberU64(); i++ { - for _, tx := range pm.blockchain.GetBlockByNumber(i).Transactions() { - hashes = append(hashes, tx.Hash()) - } - } - receipts := make([]*types.Receipt, len(hashes)) - for i, hash := range hashes { - receipts[i] = core.GetReceipt(pm.chaindb, hash) + block := pm.blockchain.GetBlockByNumber(i) + + hashes = append(hashes, block.Hash()) + receipts = append(receipts, core.GetBlockReceipts(pm.chaindb, block.Hash())) } // Send the hash request and verify the response p2p.Send(peer.app, 0x0f, hashes) diff --git a/eth/peer.go b/eth/peer.go index 603b49b88..e24be97f1 100644 --- a/eth/peer.go +++ b/eth/peer.go @@ -197,9 +197,9 @@ func (p *peer) SendNodeData(data [][]byte) error { return p2p.Send(p.rw, NodeDataMsg, data) } -// SendReceipts sends a batch of transaction receipts, corresponding to the ones -// requested. -func (p *peer) SendReceipts(receipts []*types.Receipt) error { +// SendReceiptsRLP sends a batch of transaction receipts, corresponding to the +// ones requested from an already RLP encoded format. +func (p *peer) SendReceiptsRLP(receipts []rlp.RawValue) error { return p2p.Send(p.rw, ReceiptsMsg, receipts) } -- cgit v1.2.3 From b99fe27f8b4d37fe3838d52b682e99c85098ee59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 29 Sep 2015 14:24:28 +0300 Subject: core: fix block canonical mark / content write race --- core/blockchain.go | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 48c935eac..6b42ea97e 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -601,7 +601,7 @@ func (self *BlockChain) writeHeader(header *types.Header) error { } // InsertHeaderChain will attempt to insert the given header chain in to the -// local chain, possibly creating a dork. If an error is returned, it will +// local chain, possibly creating a fork. If an error is returned, it will // return the index number of the failing header as well an error describing // what went wrong. // @@ -686,37 +686,31 @@ func (self *BlockChain) WriteBlock(block *types.Block) (status writeStatus, err } td := new(big.Int).Add(block.Difficulty(), ptd) - self.mu.RLock() - cblock := self.currentBlock - self.mu.RUnlock() + // Make sure no inconsistent state is leaked during insertion + self.mu.Lock() + defer self.mu.Unlock() - // Compare the TD of the last known block in the canonical chain to make sure it's greater. - // At this point it's possible that a different chain (fork) becomes the new canonical chain. + // If the total difficulty is higher than our known, add it to the canonical chain if td.Cmp(self.GetTd(self.currentBlock.Hash())) > 0 { - // chain fork - if block.ParentHash() != cblock.Hash() { - // during split we merge two different chains and create the new canonical chain - err := self.reorg(cblock, block) - if err != nil { + // Reorganize the chain if the parent is not the head block + if block.ParentHash() != self.currentBlock.Hash() { + if err := self.reorg(self.currentBlock, block); err != nil { return NonStatTy, err } } - status = CanonStatTy - - self.mu.Lock() + // Insert the block as the new head of the chain self.insert(block) - self.mu.Unlock() + status = CanonStatTy } else { status = SideStatTy } - + // Irrelevant of the canonical status, write the block itself to the database if err := WriteTd(self.chainDb, block.Hash(), td); err != nil { glog.Fatalf("failed to write block total difficulty: %v", err) } if err := WriteBlock(self.chainDb, block); err != nil { glog.Fatalf("filed to write block contents: %v", err) } - // Delete from future blocks self.futureBlocks.Remove(block.Hash()) return @@ -860,9 +854,6 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) { // to be part of the new canonical chain and accumulates potential missing transactions and post an // event about them func (self *BlockChain) reorg(oldBlock, newBlock *types.Block) error { - self.mu.Lock() - defer self.mu.Unlock() - var ( newChain types.Blocks commonBlock *types.Block -- cgit v1.2.3 From 42c8afd44006b170c20159abaadc31cc7545bec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 29 Sep 2015 19:36:16 +0300 Subject: core: differentiate receipt concensus and storage decoding --- core/block_processor.go | 4 +- core/block_processor_test.go | 4 +- core/chain_makers.go | 2 +- core/transaction_util.go | 10 ++-- core/types/bloom9.go | 2 +- core/types/receipt.go | 122 ++++++++++++++++++++++++++----------------- core/vm/log.go | 37 +++++++------ eth/filters/filter.go | 2 +- rpc/api/parsing.go | 4 +- 9 files changed, 110 insertions(+), 77 deletions(-) diff --git a/core/block_processor.go b/core/block_processor.go index 5dadd2a27..ba6350805 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -111,7 +111,7 @@ func (self *BlockProcessor) ApplyTransaction(gp GasPool, statedb *state.StateDB, } logs := statedb.GetLogs(tx.Hash()) - receipt.SetLogs(logs) + receipt.Logs = logs receipt.Bloom = types.CreateBloom(types.Receipts{receipt}) glog.V(logger.Debug).Infoln(receipt) @@ -364,7 +364,7 @@ func (sm *BlockProcessor) GetLogs(block *types.Block) (logs vm.Logs, err error) receipts := GetBlockReceipts(sm.chainDb, block.Hash()) // coalesce logs for _, receipt := range receipts { - logs = append(logs, receipt.Logs()...) + logs = append(logs, receipt.Logs...) } return logs, nil } diff --git a/core/block_processor_test.go b/core/block_processor_test.go index e0e5607b9..c2c85ebfa 100644 --- a/core/block_processor_test.go +++ b/core/block_processor_test.go @@ -70,7 +70,7 @@ func TestPutReceipt(t *testing.T) { hash[0] = 2 receipt := new(types.Receipt) - receipt.SetLogs(vm.Logs{&vm.Log{ + receipt.Logs = vm.Logs{&vm.Log{ Address: addr, Topics: []common.Hash{hash}, Data: []byte("hi"), @@ -79,7 +79,7 @@ func TestPutReceipt(t *testing.T) { TxIndex: 0, BlockHash: hash, Index: 0, - }}) + }} PutReceipts(db, types.Receipts{receipt}) receipt = GetReceipt(db, common.Hash{}) diff --git a/core/chain_makers.go b/core/chain_makers.go index eb451c00d..be6ba04e4 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -99,7 +99,7 @@ func (b *BlockGen) AddTx(tx *types.Transaction) { b.header.GasUsed.Add(b.header.GasUsed, gas) receipt := types.NewReceipt(root.Bytes(), b.header.GasUsed) logs := b.statedb.GetLogs(tx.Hash()) - receipt.SetLogs(logs) + receipt.Logs = logs receipt.Bloom = types.CreateBloom(types.Receipts{receipt}) b.txs = append(b.txs, tx) b.receipts = append(b.receipts, receipt) diff --git a/core/transaction_util.go b/core/transaction_util.go index 9a82ec4dc..dbda4cfe7 100644 --- a/core/transaction_util.go +++ b/core/transaction_util.go @@ -140,12 +140,16 @@ func GetBlockReceipts(db ethdb.Database, hash common.Hash) types.Receipts { if len(data) == 0 { return nil } - receipts := new(types.Receipts) - if err := rlp.DecodeBytes(data, receipts); err != nil { + rs := []*types.ReceiptForStorage{} + if err := rlp.DecodeBytes(data, &rs); err != nil { glog.V(logger.Error).Infof("invalid receipt array RLP for hash %x: %v", hash, err) return nil } - return *receipts + receipts := make(types.Receipts, len(rs)) + for i, receipt := range rs { + receipts[i] = (*types.Receipt)(receipt) + } + return receipts } // PutBlockReceipts stores the block's transactions associated receipts diff --git a/core/types/bloom9.go b/core/types/bloom9.go index 97db20ee9..cd90fd971 100644 --- a/core/types/bloom9.go +++ b/core/types/bloom9.go @@ -72,7 +72,7 @@ func (b Bloom) TestBytes(test []byte) bool { func CreateBloom(receipts Receipts) Bloom { bin := new(big.Int) for _, receipt := range receipts { - bin.Or(bin, LogsBloom(receipt.logs)) + bin.Or(bin, LogsBloom(receipt.Logs)) } return BytesToBloom(bin.Bytes()) diff --git a/core/types/receipt.go b/core/types/receipt.go index bcb4bd8a5..d85fe16cf 100644 --- a/core/types/receipt.go +++ b/core/types/receipt.go @@ -17,7 +17,6 @@ package types import ( - "bytes" "fmt" "io" "math/big" @@ -27,89 +26,116 @@ import ( "github.com/ethereum/go-ethereum/rlp" ) +// Receipt represents the results of a transaction. type Receipt struct { + // Consensus fields PostState []byte CumulativeGasUsed *big.Int Bloom Bloom - TxHash common.Hash - ContractAddress common.Address - logs vm.Logs - GasUsed *big.Int + Logs vm.Logs + + // Implementation fields + TxHash common.Hash + ContractAddress common.Address + GasUsed *big.Int } +// NewReceipt creates a barebone transaction receipt, copying the init fields. func NewReceipt(root []byte, cumalativeGasUsed *big.Int) *Receipt { return &Receipt{PostState: common.CopyBytes(root), CumulativeGasUsed: new(big.Int).Set(cumalativeGasUsed)} } -func (self *Receipt) SetLogs(logs vm.Logs) { - self.logs = logs -} - -func (self *Receipt) Logs() vm.Logs { - return self.logs -} - -func (self *Receipt) EncodeRLP(w io.Writer) error { - return rlp.Encode(w, []interface{}{self.PostState, self.CumulativeGasUsed, self.Bloom, self.logs}) +// EncodeRLP implements rlp.Encoder, and flattens the consensus fields of a receipt +// into an RLP stream. +func (r *Receipt) EncodeRLP(w io.Writer) error { + return rlp.Encode(w, []interface{}{r.PostState, r.CumulativeGasUsed, r.Bloom, r.Logs}) } -func (self *Receipt) DecodeRLP(s *rlp.Stream) error { - var r struct { +// DecodeRLP implements rlp.Decoder, and loads the consensus fields of a receipt +// from an RLP stream. +func (r *Receipt) DecodeRLP(s *rlp.Stream) error { + var receipt struct { PostState []byte CumulativeGasUsed *big.Int Bloom Bloom - TxHash common.Hash - ContractAddress common.Address Logs vm.Logs - GasUsed *big.Int } - if err := s.Decode(&r); err != nil { + if err := s.Decode(&receipt); err != nil { return err } - self.PostState, self.CumulativeGasUsed, self.Bloom, self.TxHash, self.ContractAddress, self.logs, self.GasUsed = r.PostState, r.CumulativeGasUsed, r.Bloom, r.TxHash, r.ContractAddress, r.Logs, r.GasUsed - + r.PostState, r.CumulativeGasUsed, r.Bloom, r.Logs = receipt.PostState, receipt.CumulativeGasUsed, receipt.Bloom, receipt.Logs return nil } -type ReceiptForStorage Receipt - -func (self *ReceiptForStorage) EncodeRLP(w io.Writer) error { - storageLogs := make([]*vm.LogForStorage, len(self.logs)) - for i, log := range self.logs { - storageLogs[i] = (*vm.LogForStorage)(log) - } - return rlp.Encode(w, []interface{}{self.PostState, self.CumulativeGasUsed, self.Bloom, self.TxHash, self.ContractAddress, storageLogs, self.GasUsed}) -} - -func (self *Receipt) RlpEncode() []byte { - bytes, err := rlp.EncodeToBytes(self) +// RlpEncode implements common.RlpEncode required for SHA derivation. +func (r *Receipt) RlpEncode() []byte { + bytes, err := rlp.EncodeToBytes(r) if err != nil { - fmt.Println("TMP -- RECEIPT ENCODE ERROR", err) + panic(err) } return bytes } -func (self *Receipt) Cmp(other *Receipt) bool { - if bytes.Compare(self.PostState, other.PostState) != 0 { - return false - } +// String implements the Stringer interface. +func (r *Receipt) String() string { + return fmt.Sprintf("receipt{med=%x cgas=%v bloom=%x logs=%v}", r.PostState, r.CumulativeGasUsed, r.Bloom, r.Logs) +} - return true +// ReceiptForStorage is a wrapper around a Receipt that flattens and parses the +// entire content of a receipt, opposed to only the consensus fields originally. +type ReceiptForStorage Receipt + +// EncodeRLP implements rlp.Encoder, and flattens all content fields of a receipt +// into an RLP stream. +func (r *ReceiptForStorage) EncodeRLP(w io.Writer) error { + logs := make([]*vm.LogForStorage, len(r.Logs)) + for i, log := range r.Logs { + logs[i] = (*vm.LogForStorage)(log) + } + return rlp.Encode(w, []interface{}{r.PostState, r.CumulativeGasUsed, r.Bloom, r.TxHash, r.ContractAddress, logs, r.GasUsed}) } -func (self *Receipt) String() string { - return fmt.Sprintf("receipt{med=%x cgas=%v bloom=%x logs=%v}", self.PostState, self.CumulativeGasUsed, self.Bloom, self.logs) +// DecodeRLP implements rlp.Decoder, and loads the consensus fields of a receipt +// from an RLP stream. +func (r *ReceiptForStorage) DecodeRLP(s *rlp.Stream) error { + var receipt struct { + PostState []byte + CumulativeGasUsed *big.Int + Bloom Bloom + TxHash common.Hash + ContractAddress common.Address + Logs []*vm.LogForStorage + GasUsed *big.Int + } + if err := s.Decode(&receipt); err != nil { + return err + } + // Assign the consensus fields + r.PostState, r.CumulativeGasUsed, r.Bloom = receipt.PostState, receipt.CumulativeGasUsed, receipt.Bloom + r.Logs = make(vm.Logs, len(receipt.Logs)) + for i, log := range receipt.Logs { + r.Logs[i] = (*vm.Log)(log) + } + // Assign the implementation fields + r.TxHash, r.ContractAddress, r.GasUsed = receipt.TxHash, receipt.ContractAddress, receipt.GasUsed + + return nil } +// Receipts is a wrapper around a Receipt array to implement types.DerivableList. type Receipts []*Receipt -func (self Receipts) RlpEncode() []byte { - bytes, err := rlp.EncodeToBytes(self) +// RlpEncode implements common.RlpEncode required for SHA derivation. +func (r Receipts) RlpEncode() []byte { + bytes, err := rlp.EncodeToBytes(r) if err != nil { - fmt.Println("TMP -- RECEIPTS ENCODE ERROR", err) + panic(err) } return bytes } -func (self Receipts) Len() int { return len(self) } -func (self Receipts) GetRlp(i int) []byte { return common.Rlp(self[i]) } +// Len returns the number of receipts in this list. +func (r Receipts) Len() int { return len(r) } + +// GetRlp returns the RLP encoding of one receipt from the list. +func (r Receipts) GetRlp(i int) []byte { return common.Rlp(r[i]) } diff --git a/core/vm/log.go b/core/vm/log.go index 354f0ad35..822476f85 100644 --- a/core/vm/log.go +++ b/core/vm/log.go @@ -40,27 +40,30 @@ func NewLog(address common.Address, topics []common.Hash, data []byte, number ui return &Log{Address: address, Topics: topics, Data: data, Number: number} } -func (self *Log) EncodeRLP(w io.Writer) error { - return rlp.Encode(w, []interface{}{self.Address, self.Topics, self.Data}) +func (l *Log) EncodeRLP(w io.Writer) error { + return rlp.Encode(w, []interface{}{l.Address, l.Topics, l.Data}) } -func (self *Log) String() string { - return fmt.Sprintf(`log: %x %x %x %x %d %x %d`, self.Address, self.Topics, self.Data, self.TxHash, self.TxIndex, self.BlockHash, self.Index) +func (l *Log) DecodeRLP(s *rlp.Stream) error { + var log struct { + Address common.Address + Topics []common.Hash + Data []byte + } + if err := s.Decode(&log); err != nil { + return err + } + l.Address, l.Topics, l.Data = log.Address, log.Topics, log.Data + return nil +} + +func (l *Log) String() string { + return fmt.Sprintf(`log: %x %x %x %x %d %x %d`, l.Address, l.Topics, l.Data, l.TxHash, l.TxIndex, l.BlockHash, l.Index) } type Logs []*Log +// LogForStorage is a wrapper around a Log that flattens and parses the entire +// content of a log, opposed to only the consensus fields originally (by hiding +// the rlp interface methods). type LogForStorage Log - -func (self *LogForStorage) EncodeRLP(w io.Writer) error { - return rlp.Encode(w, []interface{}{ - self.Address, - self.Topics, - self.Data, - self.Number, - self.TxHash, - self.TxIndex, - self.BlockHash, - self.Index, - }) -} diff --git a/eth/filters/filter.go b/eth/filters/filter.go index 2e81ea177..ff192cdf6 100644 --- a/eth/filters/filter.go +++ b/eth/filters/filter.go @@ -138,7 +138,7 @@ func (self *Filter) getLogs(start, end uint64) (logs vm.Logs) { unfiltered vm.Logs ) for _, receipt := range receipts { - unfiltered = append(unfiltered, receipt.Logs()...) + unfiltered = append(unfiltered, receipt.Logs...) } logs = append(logs, self.FilterLogs(unfiltered)...) } diff --git a/rpc/api/parsing.go b/rpc/api/parsing.go index cdfaa0ed1..7667616ff 100644 --- a/rpc/api/parsing.go +++ b/rpc/api/parsing.go @@ -453,8 +453,8 @@ func NewReceiptRes(rec *types.Receipt) *ReceiptRes { v.ContractAddress = newHexData(rec.ContractAddress) } - logs := make([]interface{}, len(rec.Logs())) - for i, log := range rec.Logs() { + logs := make([]interface{}, len(rec.Logs)) + for i, log := range rec.Logs { logs[i] = NewLogRes(log) } v.Logs = &logs -- cgit v1.2.3 From 832b37c8221e330896c36eb419d92af6b1fdc9dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 30 Sep 2015 19:23:31 +0300 Subject: core, eth: receipt chain reconstruction --- core/bench_test.go | 2 +- core/block_processor_test.go | 16 +-- core/blockchain.go | 210 ++++++++++++++++++++++++++++------- core/blockchain_test.go | 162 ++++++++++++++++++++++++++- core/chain_makers.go | 16 +-- core/chain_makers_test.go | 2 +- core/chain_pow_test.go | 6 +- core/chain_util.go | 24 +++- core/chain_util_test.go | 25 ++++- core/genesis.go | 2 +- core/transaction_util.go | 5 +- core/types/block.go | 5 - core/types/receipt.go | 4 +- core/vm/log.go | 14 ++- eth/downloader/downloader.go | 55 ++++++---- eth/downloader/downloader_test.go | 225 ++++++++++++++++++++++---------------- eth/fetcher/fetcher_test.go | 2 +- eth/handler.go | 60 ++++++---- eth/helper_test.go | 2 +- eth/protocol.go | 2 +- miner/worker.go | 2 +- rpc/api/eth_args.go | 2 +- 22 files changed, 613 insertions(+), 230 deletions(-) diff --git a/core/bench_test.go b/core/bench_test.go index 27f3e3158..b5eb51803 100644 --- a/core/bench_test.go +++ b/core/bench_test.go @@ -163,7 +163,7 @@ func benchInsertChain(b *testing.B, disk bool, gen func(int, *BlockGen)) { // Generate a chain of b.N blocks using the supplied block // generator function. genesis := WriteGenesisBlockForTesting(db, GenesisAccount{benchRootAddr, benchRootFunds}) - chain := GenerateChain(genesis, db, b.N, gen) + chain, _ := GenerateChain(genesis, db, b.N, gen) // Time the insertion of the new chain. // State and blocks are stored in the same DB. diff --git a/core/block_processor_test.go b/core/block_processor_test.go index c2c85ebfa..3050456b4 100644 --- a/core/block_processor_test.go +++ b/core/block_processor_test.go @@ -71,14 +71,14 @@ func TestPutReceipt(t *testing.T) { receipt := new(types.Receipt) receipt.Logs = vm.Logs{&vm.Log{ - Address: addr, - Topics: []common.Hash{hash}, - Data: []byte("hi"), - Number: 42, - TxHash: hash, - TxIndex: 0, - BlockHash: hash, - Index: 0, + Address: addr, + Topics: []common.Hash{hash}, + Data: []byte("hi"), + BlockNumber: 42, + TxHash: hash, + TxIndex: 0, + BlockHash: hash, + Index: 0, }} PutReceipts(db, types.Receipts{receipt}) diff --git a/core/blockchain.go b/core/blockchain.go index 6b42ea97e..b68e7d3ae 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -29,6 +29,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" @@ -67,9 +68,10 @@ type BlockChain struct { chainmu sync.RWMutex tsmu sync.RWMutex - checkpoint int // checkpoint counts towards the new checkpoint - currentHeader *types.Header // Current head of the header chain (may be above the block chain!) - currentBlock *types.Block // Current head of the block chain + checkpoint int // checkpoint counts towards the new checkpoint + currentHeader *types.Header // Current head of the header chain (may be above the block chain!) + currentBlock *types.Block // Current head of the block chain + currentFastBlock *types.Block // Current head of the fast-sync chain (may be above the block chain!) headerCache *lru.Cache // Cache for the most recent block headers bodyCache *lru.Cache // Cache for the most recent block bodies @@ -160,12 +162,21 @@ func (self *BlockChain) loadLastState() error { self.currentHeader = header } } + // Restore the last known head fast block + self.currentFastBlock = self.currentBlock + if head := GetHeadFastBlockHash(self.chainDb); head != (common.Hash{}) { + if block := self.GetBlock(head); block != nil { + self.currentFastBlock = block + } + } // Issue a status log and return headerTd := self.GetTd(self.currentHeader.Hash()) blockTd := self.GetTd(self.currentBlock.Hash()) + fastTd := self.GetTd(self.currentFastBlock.Hash()) - glog.V(logger.Info).Infof("Last header: #%d [%x…] TD=%v", self.currentHeader.Number, self.currentHeader.Hash(), headerTd) - glog.V(logger.Info).Infof("Last block: #%d [%x…] TD=%v", self.currentBlock.Number(), self.currentBlock.Hash(), blockTd) + glog.V(logger.Info).Infof("Last header: #%d [%x…] TD=%v", self.currentHeader.Number, self.currentHeader.Hash().Bytes()[:4], headerTd) + glog.V(logger.Info).Infof("Fast block: #%d [%x…] TD=%v", self.currentFastBlock.Number(), self.currentFastBlock.Hash().Bytes()[:4], fastTd) + glog.V(logger.Info).Infof("Last block: #%d [%x…] TD=%v", self.currentBlock.Number(), self.currentBlock.Hash().Bytes()[:4], blockTd) return nil } @@ -178,23 +189,48 @@ func (bc *BlockChain) SetHead(head uint64) { bc.mu.Lock() defer bc.mu.Unlock() - // Delete everything from the current header head (is above block head) - for i := bc.currentHeader.Number.Uint64(); i > head; i-- { - if hash := GetCanonicalHash(bc.chainDb, i); hash != (common.Hash{}) { - DeleteCanonicalHash(bc.chainDb, i) - DeleteHeader(bc.chainDb, hash) - DeleteBody(bc.chainDb, hash) - DeleteTd(bc.chainDb, hash) + // Figure out the highest known canonical assignment + height := uint64(0) + if bc.currentHeader != nil { + if hh := bc.currentHeader.Number.Uint64(); hh > height { + height = hh } } - bc.currentHeader = GetHeader(bc.chainDb, GetCanonicalHash(bc.chainDb, head)) - - // Rewind the block chain until a whole block is found - for bc.GetBlockByNumber(head) == nil { - head-- + if bc.currentBlock != nil { + if bh := bc.currentBlock.NumberU64(); bh > height { + height = bh + } } - bc.currentBlock = bc.GetBlockByNumber(head) + if bc.currentFastBlock != nil { + if fbh := bc.currentFastBlock.NumberU64(); fbh > height { + height = fbh + } + } + // Gather all the hashes that need deletion + drop := make(map[common.Hash]struct{}) + for bc.currentHeader != nil && bc.currentHeader.Number.Uint64() > head { + drop[bc.currentHeader.Hash()] = struct{}{} + bc.currentHeader = bc.GetHeader(bc.currentHeader.ParentHash) + } + for bc.currentBlock != nil && bc.currentBlock.NumberU64() > head { + drop[bc.currentBlock.Hash()] = struct{}{} + bc.currentBlock = bc.GetBlock(bc.currentBlock.ParentHash()) + } + for bc.currentFastBlock != nil && bc.currentFastBlock.NumberU64() > head { + drop[bc.currentFastBlock.Hash()] = struct{}{} + bc.currentFastBlock = bc.GetBlock(bc.currentFastBlock.ParentHash()) + } + // Roll back the canonical chain numbering + for i := height; i > head; i-- { + DeleteCanonicalHash(bc.chainDb, i) + } + // Delete everything found by the above rewind + for hash, _ := range drop { + DeleteHeader(bc.chainDb, hash) + DeleteBody(bc.chainDb, hash) + DeleteTd(bc.chainDb, hash) + } // Clear out any stale content from the caches bc.headerCache.Purge() bc.bodyCache.Purge() @@ -203,6 +239,9 @@ func (bc *BlockChain) SetHead(head uint64) { bc.futureBlocks.Purge() // Update all computed fields to the new head + if bc.currentBlock == nil { + bc.currentBlock = bc.genesisBlock + } bc.insert(bc.currentBlock) bc.loadLastState() } @@ -222,8 +261,7 @@ func (self *BlockChain) LastBlockHash() common.Hash { } // CurrentHeader retrieves the current head header of the canonical chain. The -// header is retrieved from the chain manager's internal cache, involving no -// database operations. +// header is retrieved from the chain manager's internal cache. func (self *BlockChain) CurrentHeader() *types.Header { self.mu.RLock() defer self.mu.RUnlock() @@ -232,8 +270,7 @@ func (self *BlockChain) CurrentHeader() *types.Header { } // CurrentBlock retrieves the current head block of the canonical chain. The -// block is retrieved from the chain manager's internal cache, involving no -// database operations. +// block is retrieved from the chain manager's internal cache. func (self *BlockChain) CurrentBlock() *types.Block { self.mu.RLock() defer self.mu.RUnlock() @@ -241,6 +278,15 @@ func (self *BlockChain) CurrentBlock() *types.Block { return self.currentBlock } +// CurrentFastBlock retrieves the current fast-sync head block of the canonical +// chain. The block is retrieved from the chain manager's internal cache. +func (self *BlockChain) CurrentFastBlock() *types.Block { + self.mu.RLock() + defer self.mu.RUnlock() + + return self.currentFastBlock +} + func (self *BlockChain) Status() (td *big.Int, currentBlock common.Hash, genesisBlock common.Hash) { self.mu.RLock() defer self.mu.RUnlock() @@ -264,22 +310,12 @@ func (bc *BlockChain) Reset() { // ResetWithGenesisBlock purges the entire blockchain, restoring it to the // specified genesis state. func (bc *BlockChain) ResetWithGenesisBlock(genesis *types.Block) { + // Dump the entire block chain and purge the caches + bc.SetHead(0) + bc.mu.Lock() defer bc.mu.Unlock() - // Dump the entire block chain and purge the caches - for block := bc.currentBlock; block != nil; block = bc.GetBlock(block.ParentHash()) { - DeleteBlock(bc.chainDb, block.Hash()) - } - for header := bc.currentHeader; header != nil; header = bc.GetHeader(header.ParentHash) { - DeleteBlock(bc.chainDb, header.Hash()) - } - bc.headerCache.Purge() - bc.bodyCache.Purge() - bc.bodyRLPCache.Purge() - bc.blockCache.Purge() - bc.futureBlocks.Purge() - // Prepare the genesis block and reinitialize the chain if err := WriteTd(bc.chainDb, genesis.Hash(), genesis.Difficulty()); err != nil { glog.Fatalf("failed to write genesis block TD: %v", err) @@ -291,6 +327,7 @@ func (bc *BlockChain) ResetWithGenesisBlock(genesis *types.Block) { bc.insert(bc.genesisBlock) bc.currentBlock = bc.genesisBlock bc.currentHeader = bc.genesisBlock.Header() + bc.currentFastBlock = bc.genesisBlock } // Export writes the active chain to the given writer. @@ -328,8 +365,8 @@ func (self *BlockChain) ExportN(w io.Writer, first uint64, last uint64) error { // insert injects a new head block into the current block chain. This method // assumes that the block is indeed a true head. It will also reset the head -// header to this very same block to prevent the headers from diverging on a -// different header chain. +// header and the head fast sync block to this very same block to prevent them +// from diverging on a different header chain. // // Note, this function assumes that the `mu` mutex is held! func (bc *BlockChain) insert(block *types.Block) { @@ -343,9 +380,13 @@ func (bc *BlockChain) insert(block *types.Block) { if err := WriteHeadHeaderHash(bc.chainDb, block.Hash()); err != nil { glog.Fatalf("failed to insert head header hash: %v", err) } + if err := WriteHeadFastBlockHash(bc.chainDb, block.Hash()); err != nil { + glog.Fatalf("failed to insert head fast block hash: %v", err) + } // Update the internal state with the head block bc.currentBlock = block bc.currentHeader = block.Header() + bc.currentFastBlock = block } // Accessors @@ -634,7 +675,7 @@ func (self *BlockChain) InsertHeaderChain(chain []*types.Header, verify bool) (i for i, header := range chain { // Short circuit insertion if shutting down if atomic.LoadInt32(&self.procInterrupt) == 1 { - glog.V(logger.Debug).Infoln("Premature abort during header chain processing") + glog.V(logger.Debug).Infoln("premature abort during header chain processing") break } hash := header.Hash() @@ -653,7 +694,7 @@ func (self *BlockChain) InsertHeaderChain(chain []*types.Header, verify bool) (i } } if BadHashes[hash] { - glog.V(logger.Error).Infof("Bad header %d [%x…], known bad hash", header.Number, hash) + glog.V(logger.Error).Infof("bad header %d [%x…], known bad hash", header.Number, hash) return i, BadHashError(hash) } // Write the header to the chain and get the status @@ -674,6 +715,95 @@ func (self *BlockChain) InsertHeaderChain(chain []*types.Header, verify bool) (i return 0, nil } +// InsertReceiptChain attempts to complete an already existing header chain with +// transaction and receipt data. +func (self *BlockChain) InsertReceiptChain(blockChain types.Blocks, receiptChain []types.Receipts) (int, error) { + self.wg.Add(1) + defer self.wg.Done() + + // Make sure only one thread manipulates the chain at once + self.chainmu.Lock() + defer self.chainmu.Unlock() + + // Collect some import statistics to report on + stats := struct{ processed, ignored int }{} + start := time.Now() + + // Iterate over the blocks and receipts, inserting any new ones + for i := 0; i < len(blockChain) && i < len(receiptChain); i++ { + block, receipts := blockChain[i], receiptChain[i] + + // Short circuit insertion if shutting down + if atomic.LoadInt32(&self.procInterrupt) == 1 { + glog.V(logger.Debug).Infoln("premature abort during receipt chain processing") + break + } + // Short circuit if the owner header is unknown + if !self.HasHeader(block.Hash()) { + glog.V(logger.Debug).Infof("containing header #%d [%x…] unknown", block.Number(), block.Hash().Bytes()[:4]) + return i, fmt.Errorf("containing header #%d [%x…] unknown", block.Number(), block.Hash().Bytes()[:4]) + } + // Skip if the entire data is already known + if self.HasBlock(block.Hash()) { + stats.ignored++ + continue + } + // Compute all the non-consensus fields of the receipts + transactions, logIndex := block.Transactions(), uint(0) + for j := 0; j < len(receipts); j++ { + // The transaction hash can be retrieved from the transaction itself + receipts[j].TxHash = transactions[j].Hash() + + // The contract address can be derived from the transaction itself + if MessageCreatesContract(transactions[j]) { + from, _ := transactions[j].From() + receipts[j].ContractAddress = crypto.CreateAddress(from, transactions[j].Nonce()) + } + // The used gas can be calculated based on previous receipts + if j == 0 { + receipts[j].GasUsed = new(big.Int).Set(receipts[j].CumulativeGasUsed) + } else { + receipts[j].GasUsed = new(big.Int).Sub(receipts[j].CumulativeGasUsed, receipts[j-1].CumulativeGasUsed) + } + // The derived log fields can simply be set from the block and transaction + for k := 0; k < len(receipts[j].Logs); k++ { + receipts[j].Logs[k].BlockNumber = block.NumberU64() + receipts[j].Logs[k].BlockHash = block.Hash() + receipts[j].Logs[k].TxHash = receipts[j].TxHash + receipts[j].Logs[k].TxIndex = uint(j) + receipts[j].Logs[k].Index = logIndex + logIndex++ + } + } + // Write all the data out into the database + if err := WriteBody(self.chainDb, block.Hash(), &types.Body{block.Transactions(), block.Uncles()}); err != nil { + glog.Fatalf("failed to write block body: %v", err) + return i, err + } + if err := PutBlockReceipts(self.chainDb, block.Hash(), receipts); err != nil { + glog.Fatalf("failed to write block receipts: %v", err) + return i, err + } + // Update the head fast sync block if better + self.mu.Lock() + if self.GetTd(self.currentFastBlock.Hash()).Cmp(self.GetTd(block.Hash())) < 0 { + if err := WriteHeadFastBlockHash(self.chainDb, block.Hash()); err != nil { + glog.Fatalf("failed to update head fast block hash: %v", err) + } + self.currentFastBlock = block + } + self.mu.Unlock() + + stats.processed++ + } + // Report some public statistics so the user has a clue what's going on + first, last := blockChain[0], blockChain[len(blockChain)-1] + glog.V(logger.Info).Infof("imported %d receipt(s) (%d ignored) in %v. #%d [%x… / %x…]", stats.processed, stats.ignored, + time.Since(start), last.Number(), first.Hash().Bytes()[:4], last.Hash().Bytes()[:4]) + + return 0, nil +} + // WriteBlock writes the block to the chain. func (self *BlockChain) WriteBlock(block *types.Block) (status writeStatus, err error) { self.wg.Add(1) @@ -799,7 +929,7 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) { return i, err } - if err := PutBlockReceipts(self.chainDb, block, receipts); err != nil { + if err := PutBlockReceipts(self.chainDb, block.Hash(), receipts); err != nil { glog.V(logger.Warn).Infoln("error writing block receipts:", err) } diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 4d0f13ef1..93c2128bc 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -430,9 +430,12 @@ func makeBlockChainWithDiff(genesis *types.Block, d []int, seed byte) []*types.B var chain []*types.Block for i, difficulty := range d { header := &types.Header{ - Coinbase: common.Address{seed}, - Number: big.NewInt(int64(i + 1)), - Difficulty: big.NewInt(int64(difficulty)), + Coinbase: common.Address{seed}, + Number: big.NewInt(int64(i + 1)), + Difficulty: big.NewInt(int64(difficulty)), + UncleHash: types.EmptyUncleHash, + TxHash: types.EmptyRootHash, + ReceiptHash: types.EmptyRootHash, } if i == 0 { header.ParentHash = genesis.Hash() @@ -668,6 +671,155 @@ func testInsertNonceError(t *testing.T, full bool) { } } +// Tests that fast importing a block chain produces the same chain data as the +// classical full block processing. +func TestFastVsFullChains(t *testing.T) { + // Configure and generate a sample block chain + var ( + gendb, _ = ethdb.NewMemDatabase() + key, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") + address = crypto.PubkeyToAddress(key.PublicKey) + funds = big.NewInt(1000000000) + genesis = GenesisBlockForTesting(gendb, address, funds) + ) + blocks, receipts := GenerateChain(genesis, gendb, 1024, func(i int, block *BlockGen) { + block.SetCoinbase(common.Address{0x00}) + + // If the block number is multiple of 3, send a few bonus transactions to the miner + if i%3 == 2 { + for j := 0; j < i%4+1; j++ { + tx, err := types.NewTransaction(block.TxNonce(address), common.Address{0x00}, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(key) + if err != nil { + panic(err) + } + block.AddTx(tx) + } + } + // If the block number is a multiple of 5, add a few bonus uncles to the block + if i%5 == 5 { + block.AddUncle(&types.Header{ParentHash: block.PrevBlock(i - 1).Hash(), Number: big.NewInt(int64(i - 1))}) + } + }) + // Import the chain as an archive node for the comparison baseline + archiveDb, _ := ethdb.NewMemDatabase() + WriteGenesisBlockForTesting(archiveDb, GenesisAccount{address, funds}) + + archive, _ := NewBlockChain(archiveDb, FakePow{}, new(event.TypeMux)) + archive.SetProcessor(NewBlockProcessor(archiveDb, FakePow{}, archive, new(event.TypeMux))) + + if n, err := archive.InsertChain(blocks); err != nil { + t.Fatalf("failed to process block %d: %v", n, err) + } + // Fast import the chain as a non-archive node to test + fastDb, _ := ethdb.NewMemDatabase() + WriteGenesisBlockForTesting(fastDb, GenesisAccount{address, funds}) + fast, _ := NewBlockChain(fastDb, FakePow{}, new(event.TypeMux)) + + headers := make([]*types.Header, len(blocks)) + for i, block := range blocks { + headers[i] = block.Header() + } + if n, err := fast.InsertHeaderChain(headers, true); err != nil { + t.Fatalf("failed to insert header %d: %v", n, err) + } + if n, err := fast.InsertReceiptChain(blocks, receipts); err != nil { + t.Fatalf("failed to insert receipt %d: %v", n, err) + } + // Iterate over all chain data components, and cross reference + for i := 0; i < len(blocks); i++ { + num, hash := blocks[i].NumberU64(), blocks[i].Hash() + + if ftd, atd := fast.GetTd(hash), archive.GetTd(hash); ftd.Cmp(atd) != 0 { + t.Errorf("block #%d [%x]: td mismatch: have %v, want %v", num, hash, ftd, atd) + } + if fheader, aheader := fast.GetHeader(hash), archive.GetHeader(hash); fheader.Hash() != aheader.Hash() { + t.Errorf("block #%d [%x]: header mismatch: have %v, want %v", num, hash, fheader, aheader) + } + if fblock, ablock := fast.GetBlock(hash), archive.GetBlock(hash); fblock.Hash() != ablock.Hash() { + t.Errorf("block #%d [%x]: block mismatch: have %v, want %v", num, hash, fblock, ablock) + } else if types.DeriveSha(fblock.Transactions()) != types.DeriveSha(ablock.Transactions()) { + t.Errorf("block #%d [%x]: transactions mismatch: have %v, want %v", num, hash, fblock.Transactions(), ablock.Transactions()) + } else if types.CalcUncleHash(fblock.Uncles()) != types.CalcUncleHash(ablock.Uncles()) { + t.Errorf("block #%d [%x]: uncles mismatch: have %v, want %v", num, hash, fblock.Uncles(), ablock.Uncles()) + } + if freceipts, areceipts := GetBlockReceipts(fastDb, hash), GetBlockReceipts(archiveDb, hash); types.DeriveSha(freceipts) != types.DeriveSha(areceipts) { + t.Errorf("block #%d [%x]: receipts mismatch: have %v, want %v", num, hash, freceipts, areceipts) + } + } + // Check that the canonical chains are the same between the databases + for i := 0; i < len(blocks)+1; i++ { + if fhash, ahash := GetCanonicalHash(fastDb, uint64(i)), GetCanonicalHash(archiveDb, uint64(i)); fhash != ahash { + t.Errorf("block #%d: canonical hash mismatch: have %v, want %v", i, fhash, ahash) + } + } +} + +// Tests that various import methods move the chain head pointers to the correct +// positions. +func TestLightVsFastVsFullChainHeads(t *testing.T) { + // Configure and generate a sample block chain + var ( + gendb, _ = ethdb.NewMemDatabase() + key, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") + address = crypto.PubkeyToAddress(key.PublicKey) + funds = big.NewInt(1000000000) + genesis = GenesisBlockForTesting(gendb, address, funds) + ) + height := uint64(1024) + blocks, receipts := GenerateChain(genesis, gendb, int(height), nil) + + // Create a small assertion method to check the three heads + assert := func(t *testing.T, kind string, chain *BlockChain, header uint64, fast uint64, block uint64) { + if num := chain.CurrentBlock().NumberU64(); num != block { + t.Errorf("%s head block mismatch: have #%v, want #%v", kind, num, block) + } + if num := chain.CurrentFastBlock().NumberU64(); num != fast { + t.Errorf("%s head fast-block mismatch: have #%v, want #%v", kind, num, fast) + } + if num := chain.CurrentHeader().Number.Uint64(); num != header { + t.Errorf("%s head header mismatch: have #%v, want #%v", kind, num, header) + } + } + // Import the chain as an archive node and ensure all pointers are updated + archiveDb, _ := ethdb.NewMemDatabase() + WriteGenesisBlockForTesting(archiveDb, GenesisAccount{address, funds}) + + archive, _ := NewBlockChain(archiveDb, FakePow{}, new(event.TypeMux)) + archive.SetProcessor(NewBlockProcessor(archiveDb, FakePow{}, archive, new(event.TypeMux))) + + if n, err := archive.InsertChain(blocks); err != nil { + t.Fatalf("failed to process block %d: %v", n, err) + } + assert(t, "archive", archive, height, height, height) + + // Import the chain as a non-archive node and ensure all pointers are updated + fastDb, _ := ethdb.NewMemDatabase() + WriteGenesisBlockForTesting(fastDb, GenesisAccount{address, funds}) + fast, _ := NewBlockChain(fastDb, FakePow{}, new(event.TypeMux)) + + headers := make([]*types.Header, len(blocks)) + for i, block := range blocks { + headers[i] = block.Header() + } + if n, err := fast.InsertHeaderChain(headers, true); err != nil { + t.Fatalf("failed to insert header %d: %v", n, err) + } + if n, err := fast.InsertReceiptChain(blocks, receipts); err != nil { + t.Fatalf("failed to insert receipt %d: %v", n, err) + } + assert(t, "fast", fast, height, height, 0) + + // Import the chain as a light node and ensure all pointers are updated + lightDb, _ := ethdb.NewMemDatabase() + WriteGenesisBlockForTesting(lightDb, GenesisAccount{address, funds}) + light, _ := NewBlockChain(lightDb, FakePow{}, new(event.TypeMux)) + + if n, err := light.InsertHeaderChain(headers, true); err != nil { + t.Fatalf("failed to insert header %d: %v", n, err) + } + assert(t, "light", light, height, 0, 0) +} + // Tests that chain reorganizations handle transaction removals and reinsertions. func TestChainTxReorgs(t *testing.T) { params.MinGasLimit = big.NewInt(125000) // Minimum the gas limit may ever be. @@ -704,7 +856,7 @@ func TestChainTxReorgs(t *testing.T) { // - futureAdd: transaction added after the reorg has already finished var pastAdd, freshAdd, futureAdd *types.Transaction - chain := GenerateChain(genesis, db, 3, func(i int, gen *BlockGen) { + chain, _ := GenerateChain(genesis, db, 3, func(i int, gen *BlockGen) { switch i { case 0: pastDrop, _ = types.NewTransaction(gen.TxNonce(addr2), addr2, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(key2) @@ -730,7 +882,7 @@ func TestChainTxReorgs(t *testing.T) { } // overwrite the old chain - chain = GenerateChain(genesis, db, 5, func(i int, gen *BlockGen) { + chain, _ = GenerateChain(genesis, db, 5, func(i int, gen *BlockGen) { switch i { case 0: pastAdd, _ = types.NewTransaction(gen.TxNonce(addr3), addr3, big.NewInt(1000), params.TxGas, nil, nil).SignECDSA(key3) diff --git a/core/chain_makers.go b/core/chain_makers.go index be6ba04e4..31b2627af 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -164,13 +164,13 @@ func (b *BlockGen) OffsetTime(seconds int64) { // Blocks created by GenerateChain do not contain valid proof of work // values. Inserting them into BlockChain requires use of FakePow or // a similar non-validating proof of work implementation. -func GenerateChain(parent *types.Block, db ethdb.Database, n int, gen func(int, *BlockGen)) []*types.Block { +func GenerateChain(parent *types.Block, db ethdb.Database, n int, gen func(int, *BlockGen)) ([]*types.Block, []types.Receipts) { statedb, err := state.New(parent.Root(), db) if err != nil { panic(err) } - blocks := make(types.Blocks, n) - genblock := func(i int, h *types.Header) *types.Block { + blocks, receipts := make(types.Blocks, n), make([]types.Receipts, n) + genblock := func(i int, h *types.Header) (*types.Block, types.Receipts) { b := &BlockGen{parent: parent, i: i, chain: blocks, header: h, statedb: statedb} if gen != nil { gen(i, b) @@ -181,15 +181,16 @@ func GenerateChain(parent *types.Block, db ethdb.Database, n int, gen func(int, panic(fmt.Sprintf("state write error: %v", err)) } h.Root = root - return types.NewBlock(h, b.txs, b.uncles, b.receipts) + return types.NewBlock(h, b.txs, b.uncles, b.receipts), b.receipts } for i := 0; i < n; i++ { header := makeHeader(parent, statedb) - block := genblock(i, header) + block, receipt := genblock(i, header) blocks[i] = block + receipts[i] = receipt parent = block } - return blocks + return blocks, receipts } func makeHeader(parent *types.Block, state *state.StateDB) *types.Header { @@ -254,7 +255,8 @@ func makeHeaderChain(parent *types.Header, n int, db ethdb.Database, seed int) [ // makeBlockChain creates a deterministic chain of blocks rooted at parent. func makeBlockChain(parent *types.Block, n int, db ethdb.Database, seed int) []*types.Block { - return GenerateChain(parent, db, n, func(i int, b *BlockGen) { + blocks, _ := GenerateChain(parent, db, n, func(i int, b *BlockGen) { b.SetCoinbase(common.Address{0: byte(seed), 19: byte(i)}) }) + return blocks } diff --git a/core/chain_makers_test.go b/core/chain_makers_test.go index 63825c261..7f47cf288 100644 --- a/core/chain_makers_test.go +++ b/core/chain_makers_test.go @@ -47,7 +47,7 @@ func ExampleGenerateChain() { // This call generates a chain of 5 blocks. The function runs for // each block and adds different features to gen based on the // block index. - chain := GenerateChain(genesis, db, 5, func(i int, gen *BlockGen) { + chain, _ := GenerateChain(genesis, db, 5, func(i int, gen *BlockGen) { switch i { case 0: // In block 1, addr1 sends addr2 some ether. diff --git a/core/chain_pow_test.go b/core/chain_pow_test.go index 5aa8ed8a0..d2b0bd144 100644 --- a/core/chain_pow_test.go +++ b/core/chain_pow_test.go @@ -60,7 +60,7 @@ func TestPowVerification(t *testing.T) { var ( testdb, _ = ethdb.NewMemDatabase() genesis = GenesisBlockForTesting(testdb, common.Address{}, new(big.Int)) - blocks = GenerateChain(genesis, testdb, 8, nil) + blocks, _ = GenerateChain(genesis, testdb, 8, nil) ) headers := make([]*types.Header, len(blocks)) for i, block := range blocks { @@ -115,7 +115,7 @@ func testPowConcurrentVerification(t *testing.T, threads int) { var ( testdb, _ = ethdb.NewMemDatabase() genesis = GenesisBlockForTesting(testdb, common.Address{}, new(big.Int)) - blocks = GenerateChain(genesis, testdb, 8, nil) + blocks, _ = GenerateChain(genesis, testdb, 8, nil) ) headers := make([]*types.Header, len(blocks)) for i, block := range blocks { @@ -186,7 +186,7 @@ func testPowConcurrentAbortion(t *testing.T, threads int) { var ( testdb, _ = ethdb.NewMemDatabase() genesis = GenesisBlockForTesting(testdb, common.Address{}, new(big.Int)) - blocks = GenerateChain(genesis, testdb, 1024, nil) + blocks, _ = GenerateChain(genesis, testdb, 1024, nil) ) headers := make([]*types.Header, len(blocks)) for i, block := range blocks { diff --git a/core/chain_util.go b/core/chain_util.go index 42b6a5be2..907e6668c 100644 --- a/core/chain_util.go +++ b/core/chain_util.go @@ -34,6 +34,7 @@ import ( var ( headHeaderKey = []byte("LastHeader") headBlockKey = []byte("LastBlock") + headFastKey = []byte("LastFast") blockPrefix = []byte("block-") blockNumPrefix = []byte("block-num-") @@ -129,7 +130,7 @@ func GetCanonicalHash(db ethdb.Database, number uint64) common.Hash { // header. The difference between this and GetHeadBlockHash is that whereas the // last block hash is only updated upon a full block import, the last header // hash is updated already at header import, allowing head tracking for the -// fast synchronization mechanism. +// light synchronization mechanism. func GetHeadHeaderHash(db ethdb.Database) common.Hash { data, _ := db.Get(headHeaderKey) if len(data) == 0 { @@ -147,6 +148,18 @@ func GetHeadBlockHash(db ethdb.Database) common.Hash { return common.BytesToHash(data) } +// GetHeadFastBlockHash retrieves the hash of the current canonical head block during +// fast synchronization. The difference between this and GetHeadBlockHash is that +// whereas the last block hash is only updated upon a full block import, the last +// fast hash is updated when importing pre-processed blocks. +func GetHeadFastBlockHash(db ethdb.Database) common.Hash { + data, _ := db.Get(headFastKey) + if len(data) == 0 { + return common.Hash{} + } + return common.BytesToHash(data) +} + // GetHeaderRLP retrieves a block header in its raw RLP database encoding, or nil // if the header's not found. func GetHeaderRLP(db ethdb.Database, hash common.Hash) rlp.RawValue { @@ -249,6 +262,15 @@ func WriteHeadBlockHash(db ethdb.Database, hash common.Hash) error { return nil } +// WriteHeadFastBlockHash stores the fast head block's hash. +func WriteHeadFastBlockHash(db ethdb.Database, hash common.Hash) error { + if err := db.Put(headFastKey, hash.Bytes()); err != nil { + glog.Fatalf("failed to store last fast block's hash into database: %v", err) + return err + } + return nil +} + // WriteHeader serializes a block header into the database. func WriteHeader(db ethdb.Database, header *types.Header) error { data, err := rlp.EncodeToBytes(header) diff --git a/core/chain_util_test.go b/core/chain_util_test.go index 62b73a064..bc5aa9776 100644 --- a/core/chain_util_test.go +++ b/core/chain_util_test.go @@ -163,7 +163,12 @@ func TestBlockStorage(t *testing.T) { db, _ := ethdb.NewMemDatabase() // Create a test block to move around the database and make sure it's really new - block := types.NewBlockWithHeader(&types.Header{Extra: []byte("test block")}) + block := types.NewBlockWithHeader(&types.Header{ + Extra: []byte("test block"), + UncleHash: types.EmptyUncleHash, + TxHash: types.EmptyRootHash, + ReceiptHash: types.EmptyRootHash, + }) if entry := GetBlock(db, block.Hash()); entry != nil { t.Fatalf("Non existent block returned: %v", entry) } @@ -208,8 +213,12 @@ func TestBlockStorage(t *testing.T) { // Tests that partial block contents don't get reassembled into full blocks. func TestPartialBlockStorage(t *testing.T) { db, _ := ethdb.NewMemDatabase() - block := types.NewBlockWithHeader(&types.Header{Extra: []byte("test block")}) - + block := types.NewBlockWithHeader(&types.Header{ + Extra: []byte("test block"), + UncleHash: types.EmptyUncleHash, + TxHash: types.EmptyRootHash, + ReceiptHash: types.EmptyRootHash, + }) // Store a header and check that it's not recognized as a block if err := WriteHeader(db, block.Header()); err != nil { t.Fatalf("Failed to write header into database: %v", err) @@ -298,6 +307,7 @@ func TestHeadStorage(t *testing.T) { blockHead := types.NewBlockWithHeader(&types.Header{Extra: []byte("test block header")}) blockFull := types.NewBlockWithHeader(&types.Header{Extra: []byte("test block full")}) + blockFast := types.NewBlockWithHeader(&types.Header{Extra: []byte("test block fast")}) // Check that no head entries are in a pristine database if entry := GetHeadHeaderHash(db); entry != (common.Hash{}) { @@ -306,6 +316,9 @@ func TestHeadStorage(t *testing.T) { if entry := GetHeadBlockHash(db); entry != (common.Hash{}) { t.Fatalf("Non head block entry returned: %v", entry) } + if entry := GetHeadFastBlockHash(db); entry != (common.Hash{}) { + t.Fatalf("Non fast head block entry returned: %v", entry) + } // Assign separate entries for the head header and block if err := WriteHeadHeaderHash(db, blockHead.Hash()); err != nil { t.Fatalf("Failed to write head header hash: %v", err) @@ -313,6 +326,9 @@ func TestHeadStorage(t *testing.T) { if err := WriteHeadBlockHash(db, blockFull.Hash()); err != nil { t.Fatalf("Failed to write head block hash: %v", err) } + if err := WriteHeadFastBlockHash(db, blockFast.Hash()); err != nil { + t.Fatalf("Failed to write fast head block hash: %v", err) + } // Check that both heads are present, and different (i.e. two heads maintained) if entry := GetHeadHeaderHash(db); entry != blockHead.Hash() { t.Fatalf("Head header hash mismatch: have %v, want %v", entry, blockHead.Hash()) @@ -320,6 +336,9 @@ func TestHeadStorage(t *testing.T) { if entry := GetHeadBlockHash(db); entry != blockFull.Hash() { t.Fatalf("Head block hash mismatch: have %v, want %v", entry, blockFull.Hash()) } + if entry := GetHeadFastBlockHash(db); entry != blockFast.Hash() { + t.Fatalf("Fast head block hash mismatch: have %v, want %v", entry, blockFast.Hash()) + } } func TestMipmapBloom(t *testing.T) { diff --git a/core/genesis.go b/core/genesis.go index 16c1598c2..dac5de92f 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -103,7 +103,7 @@ func WriteGenesisBlock(chainDb ethdb.Database, reader io.Reader) (*types.Block, if err := WriteBlock(chainDb, block); err != nil { return nil, err } - if err := PutBlockReceipts(chainDb, block, nil); err != nil { + if err := PutBlockReceipts(chainDb, block.Hash(), nil); err != nil { return nil, err } if err := WriteCanonicalHash(chainDb, block.Hash(), block.NumberU64()); err != nil { diff --git a/core/transaction_util.go b/core/transaction_util.go index dbda4cfe7..1a3681341 100644 --- a/core/transaction_util.go +++ b/core/transaction_util.go @@ -155,7 +155,7 @@ func GetBlockReceipts(db ethdb.Database, hash common.Hash) types.Receipts { // PutBlockReceipts stores the block's transactions associated receipts // and stores them by block hash in a single slice. This is required for // forks and chain reorgs -func PutBlockReceipts(db ethdb.Database, block *types.Block, receipts types.Receipts) error { +func PutBlockReceipts(db ethdb.Database, hash common.Hash, receipts types.Receipts) error { rs := make([]*types.ReceiptForStorage, len(receipts)) for i, receipt := range receipts { rs[i] = (*types.ReceiptForStorage)(receipt) @@ -164,12 +164,9 @@ func PutBlockReceipts(db ethdb.Database, block *types.Block, receipts types.Rece if err != nil { return err } - - hash := block.Hash() err = db.Put(append(blockReceiptsPre, hash[:]...), bytes) if err != nil { return err } - return nil } diff --git a/core/types/block.go b/core/types/block.go index c4377ffa1..1d1cfa515 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -128,7 +128,6 @@ type Block struct { header *Header uncles []*Header transactions Transactions - receipts Receipts // caches hash atomic.Value @@ -200,8 +199,6 @@ func NewBlock(header *Header, txs []*Transaction, uncles []*Header, receipts []* } else { b.header.ReceiptHash = DeriveSha(Receipts(receipts)) b.header.Bloom = CreateBloom(receipts) - b.receipts = make([]*Receipt, len(receipts)) - copy(b.receipts, receipts) } if len(uncles) == 0 { @@ -299,7 +296,6 @@ func (b *StorageBlock) DecodeRLP(s *rlp.Stream) error { // TODO: copies func (b *Block) Uncles() []*Header { return b.uncles } func (b *Block) Transactions() Transactions { return b.transactions } -func (b *Block) Receipts() Receipts { return b.receipts } func (b *Block) Transaction(hash common.Hash) *Transaction { for _, transaction := range b.transactions { @@ -364,7 +360,6 @@ func (b *Block) WithMiningResult(nonce uint64, mixDigest common.Hash) *Block { return &Block{ header: &cpy, transactions: b.transactions, - receipts: b.receipts, uncles: b.uncles, } } diff --git a/core/types/receipt.go b/core/types/receipt.go index d85fe16cf..aea5b3e91 100644 --- a/core/types/receipt.go +++ b/core/types/receipt.go @@ -41,8 +41,8 @@ type Receipt struct { } // NewReceipt creates a barebone transaction receipt, copying the init fields. -func NewReceipt(root []byte, cumalativeGasUsed *big.Int) *Receipt { - return &Receipt{PostState: common.CopyBytes(root), CumulativeGasUsed: new(big.Int).Set(cumalativeGasUsed)} +func NewReceipt(root []byte, cumulativeGasUsed *big.Int) *Receipt { + return &Receipt{PostState: common.CopyBytes(root), CumulativeGasUsed: new(big.Int).Set(cumulativeGasUsed)} } // EncodeRLP implements rlp.Encoder, and flattens the consensus fields of a receipt diff --git a/core/vm/log.go b/core/vm/log.go index 822476f85..526221e43 100644 --- a/core/vm/log.go +++ b/core/vm/log.go @@ -25,19 +25,21 @@ import ( ) type Log struct { + // Consensus fields Address common.Address Topics []common.Hash Data []byte - Number uint64 - TxHash common.Hash - TxIndex uint - BlockHash common.Hash - Index uint + // Derived fields (don't reorder!) + BlockNumber uint64 + TxHash common.Hash + TxIndex uint + BlockHash common.Hash + Index uint } func NewLog(address common.Address, topics []common.Hash, data []byte, number uint64) *Log { - return &Log{Address: address, Topics: topics, Data: data, Number: number} + return &Log{Address: address, Topics: topics, Data: data, BlockNumber: number} } func (l *Log) EncodeRLP(w io.Writer) error { diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 7ae7aa221..24ba3da17 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -102,6 +102,9 @@ type headHeaderRetrievalFn func() *types.Header // headBlockRetrievalFn is a callback type for retrieving the head block from the local chain. type headBlockRetrievalFn func() *types.Block +// headFastBlockRetrievalFn is a callback type for retrieving the head fast block from the local chain. +type headFastBlockRetrievalFn func() *types.Block + // tdRetrievalFn is a callback type for retrieving the total difficulty of a local block. type tdRetrievalFn func(common.Hash) *big.Int @@ -188,17 +191,18 @@ type Downloader struct { syncStatsLock sync.RWMutex // Lock protecting the sync stats fields // Callbacks - hasHeader headerCheckFn // Checks if a header is present in the chain - hasBlock blockCheckFn // Checks if a block is present in the chain - getHeader headerRetrievalFn // Retrieves a header from the chain - getBlock blockRetrievalFn // Retrieves a block from the chain - headHeader headHeaderRetrievalFn // Retrieves the head header from the chain - headBlock headBlockRetrievalFn // Retrieves the head block from the chain - getTd tdRetrievalFn // Retrieves the TD of a block from the chain - insertHeaders headerChainInsertFn // Injects a batch of headers into the chain - insertBlocks blockChainInsertFn // Injects a batch of blocks into the chain - insertReceipts receiptChainInsertFn // Injects a batch of blocks and their receipts into the chain - dropPeer peerDropFn // Drops a peer for misbehaving + hasHeader headerCheckFn // Checks if a header is present in the chain + hasBlock blockCheckFn // Checks if a block is present in the chain + getHeader headerRetrievalFn // Retrieves a header from the chain + getBlock blockRetrievalFn // Retrieves a block from the chain + headHeader headHeaderRetrievalFn // Retrieves the head header from the chain + headBlock headBlockRetrievalFn // Retrieves the head block from the chain + headFastBlock headFastBlockRetrievalFn // Retrieves the head fast-sync block from the chain + getTd tdRetrievalFn // Retrieves the TD of a block from the chain + insertHeaders headerChainInsertFn // Injects a batch of headers into the chain + insertBlocks blockChainInsertFn // Injects a batch of blocks into the chain + insertReceipts receiptChainInsertFn // Injects a batch of blocks and their receipts into the chain + dropPeer peerDropFn // Drops a peer for misbehaving // Status synchroniseMock func(id string, hash common.Hash) error // Replacement for synchronise during testing @@ -229,8 +233,8 @@ type Downloader struct { // New creates a new downloader to fetch hashes and blocks from remote peers. func New(mode SyncMode, mux *event.TypeMux, hasHeader headerCheckFn, hasBlock blockCheckFn, getHeader headerRetrievalFn, getBlock blockRetrievalFn, - headHeader headHeaderRetrievalFn, headBlock headBlockRetrievalFn, getTd tdRetrievalFn, insertHeaders headerChainInsertFn, insertBlocks blockChainInsertFn, - insertReceipts receiptChainInsertFn, dropPeer peerDropFn) *Downloader { + headHeader headHeaderRetrievalFn, headBlock headBlockRetrievalFn, headFastBlock headFastBlockRetrievalFn, getTd tdRetrievalFn, + insertHeaders headerChainInsertFn, insertBlocks blockChainInsertFn, insertReceipts receiptChainInsertFn, dropPeer peerDropFn) *Downloader { return &Downloader{ mode: mode, @@ -243,6 +247,7 @@ func New(mode SyncMode, mux *event.TypeMux, hasHeader headerCheckFn, hasBlock bl getBlock: getBlock, headHeader: headHeader, headBlock: headBlock, + headFastBlock: headFastBlock, getTd: getTd, insertHeaders: insertHeaders, insertBlocks: insertBlocks, @@ -393,7 +398,9 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e }() glog.V(logger.Debug).Infof("Synchronising with the network using: %s [eth/%d]", p.id, p.version) - defer glog.V(logger.Debug).Infof("Synchronisation terminated") + defer func(start time.Time) { + glog.V(logger.Debug).Infof("Synchronisation terminated after %v", time.Since(start)) + }(time.Now()) switch { case p.version == 61: @@ -989,6 +996,8 @@ func (d *Downloader) findAncestor(p *peer) (uint64, error) { head := d.headHeader().Number.Uint64() if d.mode == FullSync { head = d.headBlock().NumberU64() + } else if d.mode == FastSync { + head = d.headFastBlock().NumberU64() } from := int64(head) - int64(MaxHeaderFetch) + 1 if from < 0 { @@ -1020,7 +1029,7 @@ func (d *Downloader) findAncestor(p *peer) (uint64, error) { // Check if a common ancestor was found finished = true for i := len(headers) - 1; i >= 0; i-- { - if (d.mode == FullSync && d.hasBlock(headers[i].Hash())) || (d.mode != FullSync && d.hasHeader(headers[i].Hash())) { + if (d.mode != LightSync && d.hasBlock(headers[i].Hash())) || (d.mode == LightSync && d.hasHeader(headers[i].Hash())) { number, hash = headers[i].Number.Uint64(), headers[i].Hash() break } @@ -1182,17 +1191,18 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error { // Otherwise insert all the new headers, aborting in case of junk glog.V(logger.Detail).Infof("%v: schedule %d headers from #%d", p, len(headerPack.headers), from) + if d.mode == FastSync || d.mode == LightSync { + if n, err := d.insertHeaders(headerPack.headers, false); err != nil { + glog.V(logger.Debug).Infof("%v: invalid header #%d [%x…]: %v", p, headerPack.headers[n].Number, headerPack.headers[n].Hash().Bytes()[:4], err) + return errInvalidChain + } + } if d.mode == FullSync || d.mode == FastSync { inserts := d.queue.Schedule(headerPack.headers, from, d.mode == FastSync) if len(inserts) != len(headerPack.headers) { glog.V(logger.Debug).Infof("%v: stale headers", p) return errBadPeer } - } else { - if n, err := d.insertHeaders(headerPack.headers, true); err != nil { - glog.V(logger.Debug).Infof("%v: invalid header #%d [%x…]: %v", p, headerPack.headers[n].Number, headerPack.headers[n].Hash().Bytes()[:4], err) - return errInvalidChain - } } // Notify the content fetchers of new headers, but stop if queue is full cont := d.queue.PendingBlocks() < maxQueuedHeaders || d.queue.PendingReceipts() < maxQueuedHeaders @@ -1394,6 +1404,7 @@ func (d *Downloader) fetchParts(from uint64, errCancel error, deliveryCh chan da for _, pid := range expire() { if peer := d.peers.Peer(pid); peer != nil { peer.Demote() + setIdle(peer) glog.V(logger.Detail).Infof("%s: %s delivery timeout", peer, strings.ToLower(kind)) } } @@ -1497,7 +1508,7 @@ func (d *Downloader) process() { // Actually import the blocks if glog.V(logger.Debug) { first, last := results[0].Header, results[len(results)-1].Header - glog.V(logger.Debug).Infof("Inserting chain with %d items (#%d [%x…] - #%d [%x…])", len(results), first.Number, first.Hash().Bytes()[:4], last.Number, last.Hash().Bytes()[:4]) + glog.Infof("Inserting chain with %d items (#%d [%x…] - #%d [%x…])", len(results), first.Number, first.Hash().Bytes()[:4], last.Number, last.Hash().Bytes()[:4]) } for len(results) != 0 { // Check for any termination requests @@ -1536,7 +1547,7 @@ func (d *Downloader) process() { index, err = d.insertHeaders(headers, true) } if err != nil { - glog.V(logger.Debug).Infof("Result #%d [%x…] processing failed: %v", results[index].Header.Number, results[index].Header.Hash(), err) + glog.V(logger.Debug).Infof("Result #%d [%x…] processing failed: %v", results[index].Header.Number, results[index].Header.Hash().Bytes()[:4], err) d.cancel() return } diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index 18bdb56dd..68c4ca26e 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -45,9 +45,9 @@ var ( // the returned hash chain is ordered head->parent. In addition, every 3rd block // contains a transaction and every 5th an uncle to allow testing correct block // reassembly. -func makeChain(n int, seed byte, parent *types.Block) ([]common.Hash, map[common.Hash]*types.Header, map[common.Hash]*types.Block) { +func makeChain(n int, seed byte, parent *types.Block, parentReceipts types.Receipts) ([]common.Hash, map[common.Hash]*types.Header, map[common.Hash]*types.Block, map[common.Hash]types.Receipts) { // Generate the block chain - blocks := core.GenerateChain(parent, testdb, n, func(i int, block *core.BlockGen) { + blocks, receipts := core.GenerateChain(parent, testdb, n, func(i int, block *core.BlockGen) { block.SetCoinbase(common.Address{seed}) // If the block number is multiple of 3, send a bonus transaction to the miner @@ -73,25 +73,29 @@ func makeChain(n int, seed byte, parent *types.Block) ([]common.Hash, map[common blockm := make(map[common.Hash]*types.Block, n+1) blockm[parent.Hash()] = parent + receiptm := make(map[common.Hash]types.Receipts, n+1) + receiptm[parent.Hash()] = parentReceipts + for i, b := range blocks { hashes[len(hashes)-i-2] = b.Hash() headerm[b.Hash()] = b.Header() blockm[b.Hash()] = b + receiptm[b.Hash()] = receipts[i] } - return hashes, headerm, blockm + return hashes, headerm, blockm, receiptm } // makeChainFork creates two chains of length n, such that h1[:f] and // h2[:f] are different but have a common suffix of length n-f. -func makeChainFork(n, f int, parent *types.Block) ([]common.Hash, []common.Hash, map[common.Hash]*types.Header, map[common.Hash]*types.Header, map[common.Hash]*types.Block, map[common.Hash]*types.Block) { +func makeChainFork(n, f int, parent *types.Block, parentReceipts types.Receipts) ([]common.Hash, []common.Hash, map[common.Hash]*types.Header, map[common.Hash]*types.Header, map[common.Hash]*types.Block, map[common.Hash]*types.Block, map[common.Hash]types.Receipts, map[common.Hash]types.Receipts) { // Create the common suffix - hashes, headers, blocks := makeChain(n-f, 0, parent) + hashes, headers, blocks, receipts := makeChain(n-f, 0, parent, parentReceipts) // Create the forks - hashes1, headers1, blocks1 := makeChain(f, 1, blocks[hashes[0]]) + hashes1, headers1, blocks1, receipts1 := makeChain(f, 1, blocks[hashes[0]], receipts[hashes[0]]) hashes1 = append(hashes1, hashes[1:]...) - hashes2, headers2, blocks2 := makeChain(f, 2, blocks[hashes[0]]) + hashes2, headers2, blocks2, receipts2 := makeChain(f, 2, blocks[hashes[0]], receipts[hashes[0]]) hashes2 = append(hashes2, hashes[1:]...) for hash, header := range headers { @@ -102,22 +106,28 @@ func makeChainFork(n, f int, parent *types.Block) ([]common.Hash, []common.Hash, blocks1[hash] = block blocks2[hash] = block } - return hashes1, hashes2, headers1, headers2, blocks1, blocks2 + for hash, receipt := range receipts { + receipts1[hash] = receipt + receipts2[hash] = receipt + } + return hashes1, hashes2, headers1, headers2, blocks1, blocks2, receipts1, receipts2 } // downloadTester is a test simulator for mocking out local block chain. type downloadTester struct { downloader *Downloader - ownHashes []common.Hash // Hash chain belonging to the tester - ownHeaders map[common.Hash]*types.Header // Headers belonging to the tester - ownBlocks map[common.Hash]*types.Block // Blocks belonging to the tester - ownReceipts map[common.Hash]types.Receipts // Receipts belonging to the tester - ownChainTd map[common.Hash]*big.Int // Total difficulties of the blocks in the local chain - peerHashes map[string][]common.Hash // Hash chain belonging to different test peers - peerHeaders map[string]map[common.Hash]*types.Header // Headers belonging to different test peers - peerBlocks map[string]map[common.Hash]*types.Block // Blocks belonging to different test peers - peerChainTds map[string]map[common.Hash]*big.Int // Total difficulties of the blocks in the peer chains + ownHashes []common.Hash // Hash chain belonging to the tester + ownHeaders map[common.Hash]*types.Header // Headers belonging to the tester + ownBlocks map[common.Hash]*types.Block // Blocks belonging to the tester + ownReceipts map[common.Hash]types.Receipts // Receipts belonging to the tester + ownChainTd map[common.Hash]*big.Int // Total difficulties of the blocks in the local chain + + peerHashes map[string][]common.Hash // Hash chain belonging to different test peers + peerHeaders map[string]map[common.Hash]*types.Header // Headers belonging to different test peers + peerBlocks map[string]map[common.Hash]*types.Block // Blocks belonging to different test peers + peerReceipts map[string]map[common.Hash]types.Receipts // Receipts belonging to different test peers + peerChainTds map[string]map[common.Hash]*big.Int // Total difficulties of the blocks in the peer chains lock sync.RWMutex } @@ -128,15 +138,16 @@ func newTester(mode SyncMode) *downloadTester { ownHashes: []common.Hash{genesis.Hash()}, ownHeaders: map[common.Hash]*types.Header{genesis.Hash(): genesis.Header()}, ownBlocks: map[common.Hash]*types.Block{genesis.Hash(): genesis}, - ownReceipts: map[common.Hash]types.Receipts{genesis.Hash(): genesis.Receipts()}, + ownReceipts: map[common.Hash]types.Receipts{genesis.Hash(): nil}, ownChainTd: map[common.Hash]*big.Int{genesis.Hash(): genesis.Difficulty()}, peerHashes: make(map[string][]common.Hash), peerHeaders: make(map[string]map[common.Hash]*types.Header), peerBlocks: make(map[string]map[common.Hash]*types.Block), + peerReceipts: make(map[string]map[common.Hash]types.Receipts), peerChainTds: make(map[string]map[common.Hash]*big.Int), } tester.downloader = New(mode, new(event.TypeMux), tester.hasHeader, tester.hasBlock, tester.getHeader, tester.getBlock, - tester.headHeader, tester.headBlock, tester.getTd, tester.insertHeaders, tester.insertBlocks, tester.insertConfirmedBlocks, tester.dropPeer) + tester.headHeader, tester.headBlock, tester.headFastBlock, tester.getTd, tester.insertHeaders, tester.insertBlocks, tester.insertReceipts, tester.dropPeer) return tester } @@ -197,7 +208,12 @@ func (dl *downloadTester) headHeader() *types.Header { dl.lock.RLock() defer dl.lock.RUnlock() - return dl.getHeader(dl.ownHashes[len(dl.ownHashes)-1]) + for i := len(dl.ownHashes) - 1; i >= 0; i-- { + if header := dl.getHeader(dl.ownHashes[i]); header != nil { + return header + } + } + return nil } // headBlock retrieves the current head block from the canonical chain. @@ -213,6 +229,21 @@ func (dl *downloadTester) headBlock() *types.Block { return nil } +// headFastBlock retrieves the current head fast-sync block from the canonical chain. +func (dl *downloadTester) headFastBlock() *types.Block { + dl.lock.RLock() + defer dl.lock.RUnlock() + + for i := len(dl.ownHashes) - 1; i >= 0; i-- { + if block := dl.getBlock(dl.ownHashes[i]); block != nil { + if _, ok := dl.ownReceipts[block.Hash()]; ok { + return block + } + } + } + return nil +} + // getTd retrieves the block's total difficulty from the canonical chain. func (dl *downloadTester) getTd(hash common.Hash) *big.Int { dl.lock.RLock() @@ -227,6 +258,9 @@ func (dl *downloadTester) insertHeaders(headers []*types.Header, verify bool) (i defer dl.lock.Unlock() for i, header := range headers { + if _, ok := dl.ownHeaders[header.Hash()]; ok { + continue + } if _, ok := dl.ownHeaders[header.ParentHash]; !ok { return i, errors.New("unknown parent") } @@ -254,33 +288,33 @@ func (dl *downloadTester) insertBlocks(blocks types.Blocks) (int, error) { return len(blocks), nil } -// insertBlocks injects a new batch of blocks into the simulated chain. -func (dl *downloadTester) insertConfirmedBlocks(blocks types.Blocks, receipts []types.Receipts) (int, error) { +// insertReceipts injects a new batch of blocks into the simulated chain. +func (dl *downloadTester) insertReceipts(blocks types.Blocks, receipts []types.Receipts) (int, error) { dl.lock.Lock() defer dl.lock.Unlock() for i := 0; i < len(blocks) && i < len(receipts); i++ { + if _, ok := dl.ownHeaders[blocks[i].Hash()]; !ok { + return i, errors.New("unknown owner") + } if _, ok := dl.ownBlocks[blocks[i].ParentHash()]; !ok { return i, errors.New("unknown parent") } - dl.ownHashes = append(dl.ownHashes, blocks[i].Hash()) - dl.ownHeaders[blocks[i].Hash()] = blocks[i].Header() dl.ownBlocks[blocks[i].Hash()] = blocks[i] - dl.ownReceipts[blocks[i].Hash()] = blocks[i].Receipts() - dl.ownChainTd[blocks[i].Hash()] = dl.ownChainTd[blocks[i].ParentHash()] + dl.ownReceipts[blocks[i].Hash()] = receipts[i] } return len(blocks), nil } // newPeer registers a new block download source into the downloader. -func (dl *downloadTester) newPeer(id string, version int, hashes []common.Hash, headers map[common.Hash]*types.Header, blocks map[common.Hash]*types.Block) error { - return dl.newSlowPeer(id, version, hashes, headers, blocks, 0) +func (dl *downloadTester) newPeer(id string, version int, hashes []common.Hash, headers map[common.Hash]*types.Header, blocks map[common.Hash]*types.Block, receipts map[common.Hash]types.Receipts) error { + return dl.newSlowPeer(id, version, hashes, headers, blocks, receipts, 0) } // newSlowPeer registers a new block download source into the downloader, with a // specific delay time on processing the network packets sent to it, simulating // potentially slow network IO. -func (dl *downloadTester) newSlowPeer(id string, version int, hashes []common.Hash, headers map[common.Hash]*types.Header, blocks map[common.Hash]*types.Block, delay time.Duration) error { +func (dl *downloadTester) newSlowPeer(id string, version int, hashes []common.Hash, headers map[common.Hash]*types.Header, blocks map[common.Hash]*types.Block, receipts map[common.Hash]types.Receipts, delay time.Duration) error { dl.lock.Lock() defer dl.lock.Unlock() @@ -302,6 +336,7 @@ func (dl *downloadTester) newSlowPeer(id string, version int, hashes []common.Ha dl.peerHeaders[id] = make(map[common.Hash]*types.Header) dl.peerBlocks[id] = make(map[common.Hash]*types.Block) + dl.peerReceipts[id] = make(map[common.Hash]types.Receipts) dl.peerChainTds[id] = make(map[common.Hash]*big.Int) for _, hash := range hashes { @@ -317,6 +352,9 @@ func (dl *downloadTester) newSlowPeer(id string, version int, hashes []common.Ha dl.peerChainTds[id][hash] = new(big.Int).Add(block.Difficulty(), dl.peerChainTds[id][block.ParentHash()]) } } + if receipt, ok := receipts[hash]; ok { + dl.peerReceipts[id][hash] = receipt + } } } return err @@ -501,15 +539,15 @@ func (dl *downloadTester) peerGetReceiptsFn(id string, delay time.Duration) func dl.lock.RLock() defer dl.lock.RUnlock() - blocks := dl.peerBlocks[id] + receipts := dl.peerReceipts[id] - receipts := make([][]*types.Receipt, 0, len(hashes)) + results := make([][]*types.Receipt, 0, len(hashes)) for _, hash := range hashes { - if block, ok := blocks[hash]; ok { - receipts = append(receipts, block.Receipts()) + if receipt, ok := receipts[hash]; ok { + results = append(results, receipt) } } - go dl.downloader.DeliverReceipts(id, receipts) + go dl.downloader.DeliverReceipts(id, results) return nil } @@ -551,10 +589,10 @@ func TestCanonicalSynchronisation64Light(t *testing.T) { testCanonicalSynchronis func testCanonicalSynchronisation(t *testing.T, protocol int, mode SyncMode) { // Create a small enough block chain to download targetBlocks := blockCacheLimit - 15 - hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) tester := newTester(mode) - tester.newPeer("peer", protocol, hashes, headers, blocks) + tester.newPeer("peer", protocol, hashes, headers, blocks, receipts) // Synchronise with the peer and make sure all relevant data was retrieved if err := tester.sync("peer", nil); err != nil { @@ -575,10 +613,10 @@ func TestThrottling64Fast(t *testing.T) { testThrottling(t, 64, FastSync) } func testThrottling(t *testing.T, protocol int, mode SyncMode) { // Create a long block chain to download and the tester targetBlocks := 8 * blockCacheLimit - hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) tester := newTester(mode) - tester.newPeer("peer", protocol, hashes, headers, blocks) + tester.newPeer("peer", protocol, hashes, headers, blocks, receipts) // Wrap the importer to allow stepping blocked, proceed := uint32(0), make(chan struct{}) @@ -650,11 +688,11 @@ func TestForkedSynchronisation64Light(t *testing.T) { testForkedSynchronisation( func testForkedSynchronisation(t *testing.T, protocol int, mode SyncMode) { // Create a long enough forked chain common, fork := MaxHashFetch, 2*MaxHashFetch - hashesA, hashesB, headersA, headersB, blocksA, blocksB := makeChainFork(common+fork, fork, genesis) + hashesA, hashesB, headersA, headersB, blocksA, blocksB, receiptsA, receiptsB := makeChainFork(common+fork, fork, genesis, nil) tester := newTester(mode) - tester.newPeer("fork A", protocol, hashesA, headersA, blocksA) - tester.newPeer("fork B", protocol, hashesB, headersB, blocksB) + tester.newPeer("fork A", protocol, hashesA, headersA, blocksA, receiptsA) + tester.newPeer("fork B", protocol, hashesB, headersB, blocksB, receiptsB) // Synchronise with the peer and make sure all blocks were retrieved if err := tester.sync("fork A", nil); err != nil { @@ -731,10 +769,10 @@ func testCancel(t *testing.T, protocol int, mode SyncMode) { if targetBlocks >= MaxHeaderFetch { targetBlocks = MaxHeaderFetch - 15 } - hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) tester := newTester(mode) - tester.newPeer("peer", protocol, hashes, headers, blocks) + tester.newPeer("peer", protocol, hashes, headers, blocks, receipts) // Make sure canceling works with a pristine downloader tester.downloader.cancel() @@ -764,12 +802,12 @@ func testMultiSynchronisation(t *testing.T, protocol int, mode SyncMode) { // Create various peers with various parts of the chain targetPeers := 8 targetBlocks := targetPeers*blockCacheLimit - 15 - hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) tester := newTester(mode) for i := 0; i < targetPeers; i++ { id := fmt.Sprintf("peer #%d", i) - tester.newPeer(id, protocol, hashes[i*blockCacheLimit:], headers, blocks) + tester.newPeer(id, protocol, hashes[i*blockCacheLimit:], headers, blocks, receipts) } // Synchronise with the middle peer and make sure half of the blocks were retrieved id := fmt.Sprintf("peer #%d", targetPeers/2) @@ -798,22 +836,21 @@ func TestMultiProtoSynchronisation64Light(t *testing.T) { testMultiProtoSync(t, func testMultiProtoSync(t *testing.T, protocol int, mode SyncMode) { // Create a small enough block chain to download targetBlocks := blockCacheLimit - 15 - hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) // Create peers of every type tester := newTester(mode) - tester.newPeer("peer 61", 61, hashes, headers, blocks) - tester.newPeer("peer 62", 62, hashes, headers, blocks) - tester.newPeer("peer 63", 63, hashes, headers, blocks) - tester.newPeer("peer 64", 64, hashes, headers, blocks) + tester.newPeer("peer 61", 61, hashes, headers, blocks, receipts) + tester.newPeer("peer 62", 62, hashes, headers, blocks, receipts) + tester.newPeer("peer 63", 63, hashes, headers, blocks, receipts) + tester.newPeer("peer 64", 64, hashes, headers, blocks, receipts) // Synchronise with the requestd peer and make sure all blocks were retrieved if err := tester.sync(fmt.Sprintf("peer %d", protocol), nil); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } - if imported := len(tester.ownBlocks); imported != targetBlocks+1 { - t.Fatalf("synchronised block mismatch: have %v, want %v", imported, targetBlocks+1) - } + assertOwnChain(t, tester, targetBlocks+1) + // Check that no peers have been dropped off for _, version := range []int{61, 62, 63, 64} { peer := fmt.Sprintf("peer %d", version) @@ -835,18 +872,18 @@ func TestEmptyShortCircuit64Light(t *testing.T) { testEmptyShortCircuit(t, 64, L func testEmptyShortCircuit(t *testing.T, protocol int, mode SyncMode) { // Create a small enough block chain to download targetBlocks := blockCacheLimit - 15 - hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) tester := newTester(mode) - tester.newPeer("peer", protocol, hashes, headers, blocks) + tester.newPeer("peer", protocol, hashes, headers, blocks, receipts) // Instrument the downloader to signal body requests - bodies, receipts := int32(0), int32(0) + bodiesHave, receiptsHave := int32(0), int32(0) tester.downloader.bodyFetchHook = func(headers []*types.Header) { - atomic.AddInt32(&bodies, int32(len(headers))) + atomic.AddInt32(&bodiesHave, int32(len(headers))) } tester.downloader.receiptFetchHook = func(headers []*types.Header) { - atomic.AddInt32(&receipts, int32(len(headers))) + atomic.AddInt32(&receiptsHave, int32(len(headers))) } // Synchronise with the peer and make sure all blocks were retrieved if err := tester.sync("peer", nil); err != nil { @@ -860,15 +897,17 @@ func testEmptyShortCircuit(t *testing.T, protocol int, mode SyncMode) { if mode != LightSync && block != genesis && (len(block.Transactions()) > 0 || len(block.Uncles()) > 0) { bodiesNeeded++ } - if mode == FastSync && block != genesis && len(block.Receipts()) > 0 { + } + for _, receipt := range receipts { + if mode == FastSync && len(receipt) > 0 { receiptsNeeded++ } } - if int(bodies) != bodiesNeeded { - t.Errorf("body retrieval count mismatch: have %v, want %v", bodies, bodiesNeeded) + if int(bodiesHave) != bodiesNeeded { + t.Errorf("body retrieval count mismatch: have %v, want %v", bodiesHave, bodiesNeeded) } - if int(receipts) != receiptsNeeded { - t.Errorf("receipt retrieval count mismatch: have %v, want %v", receipts, receiptsNeeded) + if int(receiptsHave) != receiptsNeeded { + t.Errorf("receipt retrieval count mismatch: have %v, want %v", receiptsHave, receiptsNeeded) } } @@ -884,21 +923,20 @@ func TestMissingHeaderAttack64Light(t *testing.T) { testMissingHeaderAttack(t, 6 func testMissingHeaderAttack(t *testing.T, protocol int, mode SyncMode) { // Create a small enough block chain to download targetBlocks := blockCacheLimit - 15 - hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) tester := newTester(mode) // Attempt a full sync with an attacker feeding gapped headers - tester.newPeer("attack", protocol, hashes, headers, blocks) + tester.newPeer("attack", protocol, hashes, headers, blocks, receipts) missing := targetBlocks / 2 delete(tester.peerHeaders["attack"], hashes[missing]) - delete(tester.peerBlocks["attack"], hashes[missing]) if err := tester.sync("attack", nil); err == nil { t.Fatalf("succeeded attacker synchronisation") } // Synchronise with the valid peer and make sure sync succeeds - tester.newPeer("valid", protocol, hashes, headers, blocks) + tester.newPeer("valid", protocol, hashes, headers, blocks, receipts) if err := tester.sync("valid", nil); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } @@ -917,20 +955,21 @@ func TestShiftedHeaderAttack64Light(t *testing.T) { testShiftedHeaderAttack(t, 6 func testShiftedHeaderAttack(t *testing.T, protocol int, mode SyncMode) { // Create a small enough block chain to download targetBlocks := blockCacheLimit - 15 - hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) tester := newTester(mode) // Attempt a full sync with an attacker feeding shifted headers - tester.newPeer("attack", protocol, hashes, headers, blocks) + tester.newPeer("attack", protocol, hashes, headers, blocks, receipts) delete(tester.peerHeaders["attack"], hashes[len(hashes)-2]) delete(tester.peerBlocks["attack"], hashes[len(hashes)-2]) + delete(tester.peerReceipts["attack"], hashes[len(hashes)-2]) if err := tester.sync("attack", nil); err == nil { t.Fatalf("succeeded attacker synchronisation") } // Synchronise with the valid peer and make sure sync succeeds - tester.newPeer("valid", protocol, hashes, headers, blocks) + tester.newPeer("valid", protocol, hashes, headers, blocks, receipts) if err := tester.sync("valid", nil); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } @@ -949,24 +988,24 @@ func TestInvalidContentAttack64Light(t *testing.T) { testInvalidContentAttack(t, func testInvalidContentAttack(t *testing.T, protocol int, mode SyncMode) { // Create two peers, one feeding invalid block bodies targetBlocks := 4*blockCacheLimit - 15 - hashes, headers, validBlocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, validBlocks, validReceipts := makeChain(targetBlocks, 0, genesis, nil) invalidBlocks := make(map[common.Hash]*types.Block) for hash, block := range validBlocks { invalidBlocks[hash] = types.NewBlockWithHeader(block.Header()) } - invalidReceipts := make(map[common.Hash]*types.Block) - for hash, block := range validBlocks { - invalidReceipts[hash] = types.NewBlockWithHeader(block.Header()).WithBody(block.Transactions(), block.Uncles()) + invalidReceipts := make(map[common.Hash]types.Receipts) + for hash, _ := range validReceipts { + invalidReceipts[hash] = types.Receipts{&types.Receipt{}} } tester := newTester(mode) - tester.newPeer("valid", protocol, hashes, headers, validBlocks) + tester.newPeer("valid", protocol, hashes, headers, validBlocks, validReceipts) if mode != LightSync { - tester.newPeer("body attack", protocol, hashes, headers, invalidBlocks) + tester.newPeer("body attack", protocol, hashes, headers, invalidBlocks, validReceipts) } if mode == FastSync { - tester.newPeer("receipt attack", protocol, hashes, headers, invalidReceipts) + tester.newPeer("receipt attack", protocol, hashes, headers, validBlocks, invalidReceipts) } // Synchronise with the valid peer (will pull contents from the attacker too) if err := tester.sync("valid", nil); err != nil { @@ -995,9 +1034,9 @@ func TestHighTDStarvationAttack64Light(t *testing.T) { testHighTDStarvationAttac func testHighTDStarvationAttack(t *testing.T, protocol int, mode SyncMode) { tester := newTester(mode) - hashes, headers, blocks := makeChain(0, 0, genesis) + hashes, headers, blocks, receipts := makeChain(0, 0, genesis, nil) - tester.newPeer("attack", protocol, []common.Hash{hashes[0]}, headers, blocks) + tester.newPeer("attack", protocol, []common.Hash{hashes[0]}, headers, blocks, receipts) if err := tester.sync("attack", big.NewInt(1000000)); err != errStallingPeer { t.Fatalf("synchronisation error mismatch: have %v, want %v", err, errStallingPeer) } @@ -1040,7 +1079,7 @@ func testBlockHeaderAttackerDropping(t *testing.T, protocol int) { for i, tt := range tests { // Register a new peer and ensure it's presence id := fmt.Sprintf("test %d", i) - if err := tester.newPeer(id, protocol, []common.Hash{genesis.Hash()}, nil, nil); err != nil { + if err := tester.newPeer(id, protocol, []common.Hash{genesis.Hash()}, nil, nil, nil); err != nil { t.Fatalf("test %d: failed to register new peer: %v", i, err) } if _, ok := tester.peerHashes[id]; !ok { @@ -1069,7 +1108,7 @@ func TestSyncBoundaries64Light(t *testing.T) { testSyncBoundaries(t, 64, LightSy func testSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { // Create a small enough block chain to download targetBlocks := blockCacheLimit - 15 - hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) // Set a sync init hook to catch boundary changes starting := make(chan struct{}) @@ -1085,7 +1124,7 @@ func testSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { t.Fatalf("Pristine boundary mismatch: have %v/%v, want %v/%v", origin, latest, 0, 0) } // Synchronise half the blocks and check initial boundaries - tester.newPeer("peer-half", protocol, hashes[targetBlocks/2:], headers, blocks) + tester.newPeer("peer-half", protocol, hashes[targetBlocks/2:], headers, blocks, receipts) pending := new(sync.WaitGroup) pending.Add(1) @@ -1103,7 +1142,7 @@ func testSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { pending.Wait() // Synchronise all the blocks and check continuation boundaries - tester.newPeer("peer-full", protocol, hashes, headers, blocks) + tester.newPeer("peer-full", protocol, hashes, headers, blocks, receipts) pending.Add(1) go func() { @@ -1134,7 +1173,7 @@ func TestForkedSyncBoundaries64Light(t *testing.T) { testForkedSyncBoundaries(t, func testForkedSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { // Create a forked chain to simulate origin revertal common, fork := MaxHashFetch, 2*MaxHashFetch - hashesA, hashesB, headersA, headersB, blocksA, blocksB := makeChainFork(common+fork, fork, genesis) + hashesA, hashesB, headersA, headersB, blocksA, blocksB, receiptsA, receiptsB := makeChainFork(common+fork, fork, genesis, nil) // Set a sync init hook to catch boundary changes starting := make(chan struct{}) @@ -1150,7 +1189,7 @@ func testForkedSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { t.Fatalf("Pristine boundary mismatch: have %v/%v, want %v/%v", origin, latest, 0, 0) } // Synchronise with one of the forks and check boundaries - tester.newPeer("fork A", protocol, hashesA, headersA, blocksA) + tester.newPeer("fork A", protocol, hashesA, headersA, blocksA, receiptsA) pending := new(sync.WaitGroup) pending.Add(1) @@ -1171,7 +1210,7 @@ func testForkedSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { tester.downloader.syncStatsOrigin = tester.downloader.syncStatsHeight // Synchronise with the second fork and check boundary resets - tester.newPeer("fork B", protocol, hashesB, headersB, blocksB) + tester.newPeer("fork B", protocol, hashesB, headersB, blocksB, receiptsB) pending.Add(1) go func() { @@ -1202,7 +1241,7 @@ func TestFailedSyncBoundaries64Light(t *testing.T) { testFailedSyncBoundaries(t, func testFailedSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { // Create a small enough block chain to download targetBlocks := blockCacheLimit - 15 - hashes, headers, blocks := makeChain(targetBlocks, 0, genesis) + hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) // Set a sync init hook to catch boundary changes starting := make(chan struct{}) @@ -1218,10 +1257,11 @@ func testFailedSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { t.Fatalf("Pristine boundary mismatch: have %v/%v, want %v/%v", origin, latest, 0, 0) } // Attempt a full sync with a faulty peer - tester.newPeer("faulty", protocol, hashes, headers, blocks) + tester.newPeer("faulty", protocol, hashes, headers, blocks, receipts) missing := targetBlocks / 2 delete(tester.peerHeaders["faulty"], hashes[missing]) delete(tester.peerBlocks["faulty"], hashes[missing]) + delete(tester.peerReceipts["faulty"], hashes[missing]) pending := new(sync.WaitGroup) pending.Add(1) @@ -1240,7 +1280,7 @@ func testFailedSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { pending.Wait() // Synchronise with a good peer and check that the boundary origin remind the same after a failure - tester.newPeer("valid", protocol, hashes, headers, blocks) + tester.newPeer("valid", protocol, hashes, headers, blocks, receipts) pending.Add(1) go func() { @@ -1270,7 +1310,7 @@ func TestFakedSyncBoundaries64Light(t *testing.T) { testFakedSyncBoundaries(t, 6 func testFakedSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { // Create a small block chain targetBlocks := blockCacheLimit - 15 - hashes, headers, blocks := makeChain(targetBlocks+3, 0, genesis) + hashes, headers, blocks, receipts := makeChain(targetBlocks+3, 0, genesis, nil) // Set a sync init hook to catch boundary changes starting := make(chan struct{}) @@ -1286,10 +1326,11 @@ func testFakedSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { t.Fatalf("Pristine boundary mismatch: have %v/%v, want %v/%v", origin, latest, 0, 0) } // Create and sync with an attacker that promises a higher chain than available - tester.newPeer("attack", protocol, hashes, headers, blocks) + tester.newPeer("attack", protocol, hashes, headers, blocks, receipts) for i := 1; i < 3; i++ { delete(tester.peerHeaders["attack"], hashes[i]) delete(tester.peerBlocks["attack"], hashes[i]) + delete(tester.peerReceipts["attack"], hashes[i]) } pending := new(sync.WaitGroup) @@ -1309,7 +1350,7 @@ func testFakedSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { pending.Wait() // Synchronise with a good peer and check that the boundary height has been reduced to the true value - tester.newPeer("valid", protocol, hashes[3:], headers, blocks) + tester.newPeer("valid", protocol, hashes[3:], headers, blocks, receipts) pending.Add(1) go func() { diff --git a/eth/fetcher/fetcher_test.go b/eth/fetcher/fetcher_test.go index 707d8d758..170a80aba 100644 --- a/eth/fetcher/fetcher_test.go +++ b/eth/fetcher/fetcher_test.go @@ -45,7 +45,7 @@ var ( // contains a transaction and every 5th an uncle to allow testing correct block // reassembly. func makeChain(n int, seed byte, parent *types.Block) ([]common.Hash, map[common.Hash]*types.Block) { - blocks := core.GenerateChain(parent, testdb, n, func(i int, block *core.BlockGen) { + blocks, _ := core.GenerateChain(parent, testdb, n, func(i int, block *core.BlockGen) { block.SetCoinbase(common.Address{seed}) // If the block number is multiple of 3, send a bonus transaction to the miner diff --git a/eth/handler.go b/eth/handler.go index daa285730..1117cb1b7 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -129,8 +129,9 @@ func NewProtocolManager(mode Mode, networkId int, mux *event.TypeMux, txpool txP case LightMode: syncMode = downloader.LightSync } - manager.downloader = downloader.New(syncMode, manager.eventMux, blockchain.HasHeader, blockchain.HasBlock, blockchain.GetHeader, blockchain.GetBlock, - blockchain.CurrentHeader, blockchain.CurrentBlock, blockchain.GetTd, blockchain.InsertHeaderChain, blockchain.InsertChain, nil, manager.removePeer) + manager.downloader = downloader.New(syncMode, manager.eventMux, blockchain.HasHeader, blockchain.HasBlock, blockchain.GetHeader, + blockchain.GetBlock, blockchain.CurrentHeader, blockchain.CurrentBlock, blockchain.CurrentFastBlock, blockchain.GetTd, + blockchain.InsertHeaderChain, blockchain.InsertChain, blockchain.InsertReceiptChain, manager.removePeer) validator := func(block *types.Block, parent *types.Block) error { return core.ValidateHeader(pow, block.Header(), parent.Header(), true, false) @@ -438,28 +439,6 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { } } - case p.version >= eth62 && msg.Code == BlockBodiesMsg: - // A batch of block bodies arrived to one of our previous requests - var request blockBodiesData - if err := msg.Decode(&request); err != nil { - return errResp(ErrDecode, "msg %v: %v", msg, err) - } - // Deliver them all to the downloader for queuing - trasactions := make([][]*types.Transaction, len(request)) - uncles := make([][]*types.Header, len(request)) - - for i, body := range request { - trasactions[i] = body.Transactions - uncles[i] = body.Uncles - } - // Filter out any explicitly requested bodies, deliver the rest to the downloader - if trasactions, uncles := pm.fetcher.FilterBodies(trasactions, uncles, time.Now()); len(trasactions) > 0 || len(uncles) > 0 { - err := pm.downloader.DeliverBodies(p.id, trasactions, uncles) - if err != nil { - glog.V(logger.Debug).Infoln(err) - } - } - case p.version >= eth62 && msg.Code == GetBlockBodiesMsg: // Decode the retrieval message msgStream := rlp.NewStream(msg.Payload, uint64(msg.Size)) @@ -487,6 +466,28 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { } return p.SendBlockBodiesRLP(bodies) + case p.version >= eth62 && msg.Code == BlockBodiesMsg: + // A batch of block bodies arrived to one of our previous requests + var request blockBodiesData + if err := msg.Decode(&request); err != nil { + return errResp(ErrDecode, "msg %v: %v", msg, err) + } + // Deliver them all to the downloader for queuing + trasactions := make([][]*types.Transaction, len(request)) + uncles := make([][]*types.Header, len(request)) + + for i, body := range request { + trasactions[i] = body.Transactions + uncles[i] = body.Uncles + } + // Filter out any explicitly requested bodies, deliver the rest to the downloader + if trasactions, uncles := pm.fetcher.FilterBodies(trasactions, uncles, time.Now()); len(trasactions) > 0 || len(uncles) > 0 { + err := pm.downloader.DeliverBodies(p.id, trasactions, uncles) + if err != nil { + glog.V(logger.Debug).Infoln(err) + } + } + case p.version >= eth63 && msg.Code == GetNodeDataMsg: // Decode the retrieval message msgStream := rlp.NewStream(msg.Payload, uint64(msg.Size)) @@ -550,6 +551,17 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { } return p.SendReceiptsRLP(receipts) + case p.version >= eth63 && msg.Code == ReceiptsMsg: + // A batch of receipts arrived to one of our previous requests + var receipts [][]*types.Receipt + if err := msg.Decode(&receipts); err != nil { + return errResp(ErrDecode, "msg %v: %v", msg, err) + } + // Deliver all to the downloader + if err := pm.downloader.DeliverReceipts(p.id, receipts); err != nil { + glog.V(logger.Debug).Infof("failed to deliver receipts: %v", err) + } + case msg.Code == NewBlockHashesMsg: // Retrieve and deseralize the remote new block hashes notification type announce struct { diff --git a/eth/helper_test.go b/eth/helper_test.go index bd65b49f8..ede0e3f15 100644 --- a/eth/helper_test.go +++ b/eth/helper_test.go @@ -38,7 +38,7 @@ func newTestProtocolManager(mode Mode, blocks int, generator func(int, *core.Blo blockproc = core.NewBlockProcessor(db, pow, blockchain, evmux) ) blockchain.SetProcessor(blockproc) - chain := core.GenerateChain(genesis, db, blocks, generator) + chain, _ := core.GenerateChain(genesis, db, blocks, generator) if _, err := blockchain.InsertChain(chain); err != nil { panic(err) } diff --git a/eth/protocol.go b/eth/protocol.go index 0d2b5128d..f2b98a8b1 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -55,7 +55,7 @@ var minimumProtocolVersion = map[Mode]uint{ var ProtocolVersions = []uint{eth64, eth63, eth62, eth61} // Number of implemented message corresponding to different protocol versions. -var ProtocolLengths = []uint64{15, 12, 8, 9} +var ProtocolLengths = []uint64{19, 17, 8, 9} const ( NetworkId = 1 diff --git a/miner/worker.go b/miner/worker.go index 5bce32f21..efe99a2f9 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -313,7 +313,7 @@ func (self *worker) wait() { self.mux.Post(core.ChainHeadEvent{block}) self.mux.Post(logs) } - if err := core.PutBlockReceipts(self.chainDb, block, receipts); err != nil { + if err := core.PutBlockReceipts(self.chainDb, block.Hash(), receipts); err != nil { glog.V(logger.Warn).Infoln("error writing block receipts:", err) } }(block, work.state.Logs(), work.receipts) diff --git a/rpc/api/eth_args.go b/rpc/api/eth_args.go index 66c190a51..6aca6a663 100644 --- a/rpc/api/eth_args.go +++ b/rpc/api/eth_args.go @@ -838,7 +838,7 @@ func NewLogRes(log *vm.Log) LogRes { } l.Address = newHexData(log.Address) l.Data = newHexData(log.Data) - l.BlockNumber = newHexNum(log.Number) + l.BlockNumber = newHexNum(log.BlockNumber) l.LogIndex = newHexNum(log.Index) l.TransactionHash = newHexData(log.TxHash) l.TransactionIndex = newHexNum(log.TxIndex) -- cgit v1.2.3 From ab27bee25a845be90bd60e774ff68d2ea1501772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 5 Oct 2015 19:37:56 +0300 Subject: core, eth, trie: direct state trie synchronization --- core/blockchain.go | 25 +- core/state/sync.go | 98 +++++++ core/state/sync_test.go | 238 ++++++++++++++++ eth/downloader/downloader.go | 568 ++++++++++++++++---------------------- eth/downloader/downloader_test.go | 123 ++++++--- eth/downloader/metrics.go | 5 + eth/downloader/peer.go | 107 +++++-- eth/downloader/queue.go | 271 ++++++++++++++---- eth/downloader/types.go | 137 +++++++++ eth/handler.go | 25 +- eth/peer.go | 2 +- trie/sync.go | 233 ++++++++++++++++ trie/sync_test.go | 257 +++++++++++++++++ 13 files changed, 1626 insertions(+), 463 deletions(-) create mode 100644 core/state/sync.go create mode 100644 core/state/sync_test.go create mode 100644 eth/downloader/types.go create mode 100644 trie/sync.go create mode 100644 trie/sync_test.go diff --git a/core/blockchain.go b/core/blockchain.go index b68e7d3ae..6c8a24751 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -37,6 +37,7 @@ import ( "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/pow" "github.com/ethereum/go-ethereum/rlp" + "github.com/ethereum/go-ethereum/trie" "github.com/hashicorp/golang-lru" ) @@ -246,6 +247,26 @@ func (bc *BlockChain) SetHead(head uint64) { bc.loadLastState() } +// FastSyncCommitHead sets the current head block to the one defined by the hash +// irrelevant what the chain contents were prior. +func (self *BlockChain) FastSyncCommitHead(hash common.Hash) error { + // Make sure that both the block as well at it's state trie exists + block := self.GetBlock(hash) + if block == nil { + return fmt.Errorf("non existent block [%x…]", hash[:4]) + } + if _, err := trie.NewSecure(block.Root(), self.chainDb); err != nil { + return err + } + // If all checks out, manually set the head block + self.mu.Lock() + self.currentBlock = block + self.mu.Unlock() + + glog.V(logger.Info).Infof("committed block #%d [%x…] as new head", block.Number(), hash[:4]) + return nil +} + func (self *BlockChain) GasLimit() *big.Int { self.mu.RLock() defer self.mu.RUnlock() @@ -721,10 +742,6 @@ func (self *BlockChain) InsertReceiptChain(blockChain types.Blocks, receiptChain self.wg.Add(1) defer self.wg.Done() - // Make sure only one thread manipulates the chain at once - self.chainmu.Lock() - defer self.chainmu.Unlock() - // Collect some import statistics to report on stats := struct{ processed, ignored int }{} start := time.Now() diff --git a/core/state/sync.go b/core/state/sync.go new file mode 100644 index 000000000..e9bebe8ee --- /dev/null +++ b/core/state/sync.go @@ -0,0 +1,98 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package state + +import ( + "bytes" + "math/big" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto/sha3" + "github.com/ethereum/go-ethereum/ethdb" + "github.com/ethereum/go-ethereum/rlp" + "github.com/ethereum/go-ethereum/trie" +) + +type StateSync struct { + db ethdb.Database + sync *trie.TrieSync + codeReqs map[common.Hash]struct{} // requested but not yet written to database + codeReqList []common.Hash // requested since last Missing +} + +var sha3_nil = common.BytesToHash(sha3.NewKeccak256().Sum(nil)) + +func NewStateSync(root common.Hash, db ethdb.Database) *StateSync { + ss := &StateSync{ + db: db, + codeReqs: make(map[common.Hash]struct{}), + } + ss.codeReqs[sha3_nil] = struct{}{} // never request the nil hash + ss.sync = trie.NewTrieSync(root, db, ss.leafFound) + return ss +} + +func (self *StateSync) leafFound(leaf []byte, parent common.Hash) error { + var obj struct { + Nonce uint64 + Balance *big.Int + Root common.Hash + CodeHash []byte + } + if err := rlp.Decode(bytes.NewReader(leaf), &obj); err != nil { + return err + } + self.sync.AddSubTrie(obj.Root, 64, parent, nil) + + codehash := common.BytesToHash(obj.CodeHash) + if _, ok := self.codeReqs[codehash]; !ok { + code, _ := self.db.Get(obj.CodeHash) + if code == nil { + self.codeReqs[codehash] = struct{}{} + self.codeReqList = append(self.codeReqList, codehash) + } + } + return nil +} + +func (self *StateSync) Missing(max int) []common.Hash { + cr := len(self.codeReqList) + gh := 0 + if max != 0 { + if cr > max { + cr = max + } + gh = max - cr + } + list := append(self.sync.Missing(gh), self.codeReqList[:cr]...) + self.codeReqList = self.codeReqList[cr:] + return list +} + +func (self *StateSync) Process(list []trie.SyncResult) error { + for i := 0; i < len(list); i++ { + if _, ok := self.codeReqs[list[i].Hash]; ok { // code data, not a node + self.db.Put(list[i].Hash[:], list[i].Data) + delete(self.codeReqs, list[i].Hash) + list[i] = list[len(list)-1] + list = list[:len(list)-1] + i-- + } + } + _, err := self.sync.Process(list) + return err +} diff --git a/core/state/sync_test.go b/core/state/sync_test.go new file mode 100644 index 000000000..f6afe8bd8 --- /dev/null +++ b/core/state/sync_test.go @@ -0,0 +1,238 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package state + +import ( + "bytes" + "math/big" + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/ethdb" + "github.com/ethereum/go-ethereum/trie" +) + +// testAccount is the data associated with an account used by the state tests. +type testAccount struct { + address common.Address + balance *big.Int + nonce uint64 + code []byte +} + +// makeTestState create a sample test state to test node-wise reconstruction. +func makeTestState() (ethdb.Database, common.Hash, []*testAccount) { + // Create an empty state + db, _ := ethdb.NewMemDatabase() + state := New(common.Hash{}, db) + + // Fill it with some arbitrary data + accounts := []*testAccount{} + for i := byte(0); i < 255; i++ { + obj := state.GetOrNewStateObject(common.BytesToAddress([]byte{i})) + acc := &testAccount{address: common.BytesToAddress([]byte{i})} + + obj.AddBalance(big.NewInt(int64(11 * i))) + acc.balance = big.NewInt(int64(11 * i)) + + obj.SetNonce(uint64(42 * i)) + acc.nonce = uint64(42 * i) + + if i%3 == 0 { + obj.SetCode([]byte{i, i, i, i, i}) + acc.code = []byte{i, i, i, i, i} + } + state.UpdateStateObject(obj) + accounts = append(accounts, acc) + } + root, _ := state.Commit() + + // Return the generated state + return db, root, accounts +} + +// checkStateAccounts cross references a reconstructed state with an expected +// account array. +func checkStateAccounts(t *testing.T, db ethdb.Database, root common.Hash, accounts []*testAccount) { + state := New(root, db) + for i, acc := range accounts { + + if balance := state.GetBalance(acc.address); balance.Cmp(acc.balance) != 0 { + t.Errorf("account %d: balance mismatch: have %v, want %v", i, balance, acc.balance) + } + if nonce := state.GetNonce(acc.address); nonce != acc.nonce { + t.Errorf("account %d: nonce mismatch: have %v, want %v", i, nonce, acc.nonce) + } + if code := state.GetCode(acc.address); bytes.Compare(code, acc.code) != 0 { + t.Errorf("account %d: code mismatch: have %x, want %x", i, code, acc.code) + } + } +} + +// Tests that an empty state is not scheduled for syncing. +func TestEmptyStateSync(t *testing.T) { + empty := common.HexToHash("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") + db, _ := ethdb.NewMemDatabase() + if req := NewStateSync(empty, db).Missing(1); len(req) != 0 { + t.Errorf("content requested for empty state: %v", req) + } +} + +// Tests that given a root hash, a state can sync iteratively on a single thread, +// requesting retrieval tasks and returning all of them in one go. +func TestIterativeStateSyncIndividual(t *testing.T) { testIterativeStateSync(t, 1) } +func TestIterativeStateSyncBatched(t *testing.T) { testIterativeStateSync(t, 100) } + +func testIterativeStateSync(t *testing.T, batch int) { + // Create a random state to copy + srcDb, srcRoot, srcAccounts := makeTestState() + + // Create a destination state and sync with the scheduler + dstDb, _ := ethdb.NewMemDatabase() + sched := NewStateSync(srcRoot, dstDb) + + queue := append([]common.Hash{}, sched.Missing(batch)...) + for len(queue) > 0 { + results := make([]trie.SyncResult, len(queue)) + for i, hash := range queue { + data, err := srcDb.Get(hash.Bytes()) + if err != nil { + t.Fatalf("failed to retrieve node data for %x: %v", hash, err) + } + results[i] = trie.SyncResult{hash, data} + } + if err := sched.Process(results); err != nil { + t.Fatalf("failed to process results: %v", err) + } + queue = append(queue[:0], sched.Missing(batch)...) + } + // Cross check that the two states are in sync + checkStateAccounts(t, dstDb, srcRoot, srcAccounts) +} + +// Tests that the trie scheduler can correctly reconstruct the state even if only +// partial results are returned, and the others sent only later. +func TestIterativeDelayedStateSync(t *testing.T) { + // Create a random state to copy + srcDb, srcRoot, srcAccounts := makeTestState() + + // Create a destination state and sync with the scheduler + dstDb, _ := ethdb.NewMemDatabase() + sched := NewStateSync(srcRoot, dstDb) + + queue := append([]common.Hash{}, sched.Missing(0)...) + for len(queue) > 0 { + // Sync only half of the scheduled nodes + results := make([]trie.SyncResult, len(queue)/2+1) + for i, hash := range queue[:len(results)] { + data, err := srcDb.Get(hash.Bytes()) + if err != nil { + t.Fatalf("failed to retrieve node data for %x: %v", hash, err) + } + results[i] = trie.SyncResult{hash, data} + } + if err := sched.Process(results); err != nil { + t.Fatalf("failed to process results: %v", err) + } + queue = append(queue[len(results):], sched.Missing(0)...) + } + // Cross check that the two states are in sync + checkStateAccounts(t, dstDb, srcRoot, srcAccounts) +} + +// Tests that given a root hash, a trie can sync iteratively on a single thread, +// requesting retrieval tasks and returning all of them in one go, however in a +// random order. +func TestIterativeRandomStateSyncIndividual(t *testing.T) { testIterativeRandomStateSync(t, 1) } +func TestIterativeRandomStateSyncBatched(t *testing.T) { testIterativeRandomStateSync(t, 100) } + +func testIterativeRandomStateSync(t *testing.T, batch int) { + // Create a random state to copy + srcDb, srcRoot, srcAccounts := makeTestState() + + // Create a destination state and sync with the scheduler + dstDb, _ := ethdb.NewMemDatabase() + sched := NewStateSync(srcRoot, dstDb) + + queue := make(map[common.Hash]struct{}) + for _, hash := range sched.Missing(batch) { + queue[hash] = struct{}{} + } + for len(queue) > 0 { + // Fetch all the queued nodes in a random order + results := make([]trie.SyncResult, 0, len(queue)) + for hash, _ := range queue { + data, err := srcDb.Get(hash.Bytes()) + if err != nil { + t.Fatalf("failed to retrieve node data for %x: %v", hash, err) + } + results = append(results, trie.SyncResult{hash, data}) + } + // Feed the retrieved results back and queue new tasks + if err := sched.Process(results); err != nil { + t.Fatalf("failed to process results: %v", err) + } + queue = make(map[common.Hash]struct{}) + for _, hash := range sched.Missing(batch) { + queue[hash] = struct{}{} + } + } + // Cross check that the two states are in sync + checkStateAccounts(t, dstDb, srcRoot, srcAccounts) +} + +// Tests that the trie scheduler can correctly reconstruct the state even if only +// partial results are returned (Even those randomly), others sent only later. +func TestIterativeRandomDelayedStateSync(t *testing.T) { + // Create a random state to copy + srcDb, srcRoot, srcAccounts := makeTestState() + + // Create a destination state and sync with the scheduler + dstDb, _ := ethdb.NewMemDatabase() + sched := NewStateSync(srcRoot, dstDb) + + queue := make(map[common.Hash]struct{}) + for _, hash := range sched.Missing(0) { + queue[hash] = struct{}{} + } + for len(queue) > 0 { + // Sync only half of the scheduled nodes, even those in random order + results := make([]trie.SyncResult, 0, len(queue)/2+1) + for hash, _ := range queue { + delete(queue, hash) + + data, err := srcDb.Get(hash.Bytes()) + if err != nil { + t.Fatalf("failed to retrieve node data for %x: %v", hash, err) + } + results = append(results, trie.SyncResult{hash, data}) + + if len(results) >= cap(results) { + break + } + } + // Feed the retrieved results back and queue new tasks + if err := sched.Process(results); err != nil { + t.Fatalf("failed to process results: %v", err) + } + for _, hash := range sched.Missing(0) { + queue[hash] = struct{}{} + } + } + // Cross check that the two states are in sync + checkStateAccounts(t, dstDb, srcRoot, srcAccounts) +} diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 24ba3da17..96177ae8a 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -19,7 +19,6 @@ package downloader import ( "errors" - "fmt" "math" "math/big" "strings" @@ -29,9 +28,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" + "github.com/rcrowley/go-metrics" ) var ( @@ -39,8 +40,8 @@ var ( MaxBlockFetch = 128 // Amount of blocks to be fetched per retrieval request MaxHeaderFetch = 192 // Amount of block headers to be fetched per retrieval request MaxBodyFetch = 128 // Amount of block bodies to be fetched per retrieval request - MaxStateFetch = 384 // Amount of node state values to allow fetching per request MaxReceiptFetch = 256 // Amount of transaction receipts to allow fetching per request + MaxStateFetch = 384 // Amount of node state values to allow fetching per request hashTTL = 5 * time.Second // [eth/61] Time it takes for a hash request to time out blockSoftTTL = 3 * time.Second // [eth/61] Request completion threshold for increasing or decreasing a peer's bandwidth @@ -49,10 +50,13 @@ var ( bodySoftTTL = 3 * time.Second // [eth/62] Request completion threshold for increasing or decreasing a peer's bandwidth bodyHardTTL = 3 * bodySoftTTL // [eth/62] Maximum time allowance before a block body request is considered expired receiptSoftTTL = 3 * time.Second // [eth/63] Request completion threshold for increasing or decreasing a peer's bandwidth - receiptHardTTL = 3 * receiptSoftTTL // [eth/63] Maximum time allowance before a block body request is considered expired + receiptHardTTL = 3 * receiptSoftTTL // [eth/63] Maximum time allowance before a receipt request is considered expired + stateSoftTTL = 2 * time.Second // [eth/63] Request completion threshold for increasing or decreasing a peer's bandwidth + stateHardTTL = 3 * stateSoftTTL // [eth/63] Maximum time allowance before a node data request is considered expired maxQueuedHashes = 256 * 1024 // [eth/61] Maximum number of hashes to queue for import (DOS protection) maxQueuedHeaders = 256 * 1024 // [eth/62] Maximum number of headers to queue for import (DOS protection) + maxQueuedStates = 256 * 1024 // [eth/63] Maximum number of state requests to queue (DOS protection) maxResultsProcess = 256 // Number of download results to import at once into the chain headerCheckFrequency = 64 // Verification frequency of the downloaded headers during fast sync @@ -84,98 +88,6 @@ var ( errNoSyncActive = errors.New("no sync active") ) -// headerCheckFn is a callback type for verifying a header's presence in the local chain. -type headerCheckFn func(common.Hash) bool - -// blockCheckFn is a callback type for verifying a block's presence in the local chain. -type blockCheckFn func(common.Hash) bool - -// headerRetrievalFn is a callback type for retrieving a header from the local chain. -type headerRetrievalFn func(common.Hash) *types.Header - -// blockRetrievalFn is a callback type for retrieving a block from the local chain. -type blockRetrievalFn func(common.Hash) *types.Block - -// headHeaderRetrievalFn is a callback type for retrieving the head header from the local chain. -type headHeaderRetrievalFn func() *types.Header - -// headBlockRetrievalFn is a callback type for retrieving the head block from the local chain. -type headBlockRetrievalFn func() *types.Block - -// headFastBlockRetrievalFn is a callback type for retrieving the head fast block from the local chain. -type headFastBlockRetrievalFn func() *types.Block - -// tdRetrievalFn is a callback type for retrieving the total difficulty of a local block. -type tdRetrievalFn func(common.Hash) *big.Int - -// headerChainInsertFn is a callback type to insert a batch of headers into the local chain. -type headerChainInsertFn func([]*types.Header, bool) (int, error) - -// blockChainInsertFn is a callback type to insert a batch of blocks into the local chain. -type blockChainInsertFn func(types.Blocks) (int, error) - -// receiptChainInsertFn is a callback type to insert a batch of receipts into the local chain. -type receiptChainInsertFn func(types.Blocks, []types.Receipts) (int, error) - -// peerDropFn is a callback type for dropping a peer detected as malicious. -type peerDropFn func(id string) - -// dataPack is a data message returned by a peer for some query. -type dataPack interface { - PeerId() string - Empty() bool - Stats() string -} - -// hashPack is a batch of block hashes returned by a peer (eth/61). -type hashPack struct { - peerId string - hashes []common.Hash -} - -// blockPack is a batch of blocks returned by a peer (eth/61). -type blockPack struct { - peerId string - blocks []*types.Block -} - -// headerPack is a batch of block headers returned by a peer. -type headerPack struct { - peerId string - headers []*types.Header -} - -// bodyPack is a batch of block bodies returned by a peer. -type bodyPack struct { - peerId string - transactions [][]*types.Transaction - uncles [][]*types.Header -} - -// PeerId retrieves the origin peer who sent this block body packet. -func (p *bodyPack) PeerId() string { return p.peerId } - -// Empty returns whether the no block bodies were delivered. -func (p *bodyPack) Empty() bool { return len(p.transactions) == 0 || len(p.uncles) == 0 } - -// Stats creates a textual stats report for logging purposes. -func (p *bodyPack) Stats() string { return fmt.Sprintf("%d:%d", len(p.transactions), len(p.uncles)) } - -// receiptPack is a batch of receipts returned by a peer. -type receiptPack struct { - peerId string - receipts [][]*types.Receipt -} - -// PeerId retrieves the origin peer who sent this receipt packet. -func (p *receiptPack) PeerId() string { return p.peerId } - -// Empty returns whether the no receipts were delivered. -func (p *receiptPack) Empty() bool { return len(p.receipts) == 0 } - -// Stats creates a textual stats report for logging purposes. -func (p *receiptPack) Stats() string { return fmt.Sprintf("%d", len(p.receipts)) } - type Downloader struct { mode SyncMode // Synchronisation mode defining the strategies used mux *event.TypeMux // Event multiplexer to announce sync operation events @@ -186,23 +98,26 @@ type Downloader struct { interrupt int32 // Atomic boolean to signal termination // Statistics - syncStatsOrigin uint64 // Origin block number where syncing started at - syncStatsHeight uint64 // Highest block number known when syncing started - syncStatsLock sync.RWMutex // Lock protecting the sync stats fields + syncStatsChainOrigin uint64 // Origin block number where syncing started at + syncStatsChainHeight uint64 // Highest block number known when syncing started + syncStatsStateTotal uint64 // Total number of node state entries known so far + syncStatsStateDone uint64 // Number of state trie entries already pulled + syncStatsLock sync.RWMutex // Lock protecting the sync stats fields // Callbacks - hasHeader headerCheckFn // Checks if a header is present in the chain - hasBlock blockCheckFn // Checks if a block is present in the chain - getHeader headerRetrievalFn // Retrieves a header from the chain - getBlock blockRetrievalFn // Retrieves a block from the chain - headHeader headHeaderRetrievalFn // Retrieves the head header from the chain - headBlock headBlockRetrievalFn // Retrieves the head block from the chain - headFastBlock headFastBlockRetrievalFn // Retrieves the head fast-sync block from the chain - getTd tdRetrievalFn // Retrieves the TD of a block from the chain - insertHeaders headerChainInsertFn // Injects a batch of headers into the chain - insertBlocks blockChainInsertFn // Injects a batch of blocks into the chain - insertReceipts receiptChainInsertFn // Injects a batch of blocks and their receipts into the chain - dropPeer peerDropFn // Drops a peer for misbehaving + hasHeader headerCheckFn // Checks if a header is present in the chain + hasBlock blockCheckFn // Checks if a block is present in the chain + getHeader headerRetrievalFn // Retrieves a header from the chain + getBlock blockRetrievalFn // Retrieves a block from the chain + headHeader headHeaderRetrievalFn // Retrieves the head header from the chain + headBlock headBlockRetrievalFn // Retrieves the head block from the chain + headFastBlock headFastBlockRetrievalFn // Retrieves the head fast-sync block from the chain + commitHeadBlock headBlockCommitterFn // Commits a manually assembled block as the chain head + getTd tdRetrievalFn // Retrieves the TD of a block from the chain + insertHeaders headerChainInsertFn // Injects a batch of headers into the chain + insertBlocks blockChainInsertFn // Injects a batch of blocks into the chain + insertReceipts receiptChainInsertFn // Injects a batch of blocks and their receipts into the chain + dropPeer peerDropFn // Drops a peer for misbehaving // Status synchroniseMock func(id string, hash common.Hash) error // Replacement for synchronise during testing @@ -212,14 +127,16 @@ type Downloader struct { // Channels newPeerCh chan *peer - hashCh chan hashPack // [eth/61] Channel receiving inbound hashes - blockCh chan blockPack // [eth/61] Channel receiving inbound blocks - headerCh chan headerPack // [eth/62] Channel receiving inbound block headers - bodyCh chan dataPack // [eth/62] Channel receiving inbound block bodies - receiptCh chan dataPack // [eth/63] Channel receiving inbound receipts - blockWakeCh chan bool // [eth/61] Channel to signal the block fetcher of new tasks - bodyWakeCh chan bool // [eth/62] Channel to signal the block body fetcher of new tasks - receiptWakeCh chan bool // [eth/63] Channel to signal the receipt fetcher of new tasks + hashCh chan dataPack // [eth/61] Channel receiving inbound hashes + blockCh chan dataPack // [eth/61] Channel receiving inbound blocks + headerCh chan dataPack // [eth/62] Channel receiving inbound block headers + bodyCh chan dataPack // [eth/62] Channel receiving inbound block bodies + receiptCh chan dataPack // [eth/63] Channel receiving inbound receipts + stateCh chan dataPack // [eth/63] Channel receiving inbound node state data + blockWakeCh chan bool // [eth/61] Channel to signal the block fetcher of new tasks + bodyWakeCh chan bool // [eth/62] Channel to signal the block body fetcher of new tasks + receiptWakeCh chan bool // [eth/63] Channel to signal the receipt fetcher of new tasks + stateWakeCh chan bool // [eth/63] Channel to signal the state fetcher of new tasks cancelCh chan struct{} // Channel to cancel mid-flight syncs cancelLock sync.RWMutex // Lock to protect the cancel channel in delivers @@ -232,36 +149,40 @@ type Downloader struct { } // New creates a new downloader to fetch hashes and blocks from remote peers. -func New(mode SyncMode, mux *event.TypeMux, hasHeader headerCheckFn, hasBlock blockCheckFn, getHeader headerRetrievalFn, getBlock blockRetrievalFn, - headHeader headHeaderRetrievalFn, headBlock headBlockRetrievalFn, headFastBlock headFastBlockRetrievalFn, getTd tdRetrievalFn, - insertHeaders headerChainInsertFn, insertBlocks blockChainInsertFn, insertReceipts receiptChainInsertFn, dropPeer peerDropFn) *Downloader { +func New(mode SyncMode, stateDb ethdb.Database, mux *event.TypeMux, hasHeader headerCheckFn, hasBlock blockCheckFn, getHeader headerRetrievalFn, + getBlock blockRetrievalFn, headHeader headHeaderRetrievalFn, headBlock headBlockRetrievalFn, headFastBlock headFastBlockRetrievalFn, + commitHeadBlock headBlockCommitterFn, getTd tdRetrievalFn, insertHeaders headerChainInsertFn, insertBlocks blockChainInsertFn, + insertReceipts receiptChainInsertFn, dropPeer peerDropFn) *Downloader { return &Downloader{ - mode: mode, - mux: mux, - queue: newQueue(), - peers: newPeerSet(), - hasHeader: hasHeader, - hasBlock: hasBlock, - getHeader: getHeader, - getBlock: getBlock, - headHeader: headHeader, - headBlock: headBlock, - headFastBlock: headFastBlock, - getTd: getTd, - insertHeaders: insertHeaders, - insertBlocks: insertBlocks, - insertReceipts: insertReceipts, - dropPeer: dropPeer, - newPeerCh: make(chan *peer, 1), - hashCh: make(chan hashPack, 1), - blockCh: make(chan blockPack, 1), - headerCh: make(chan headerPack, 1), - bodyCh: make(chan dataPack, 1), - receiptCh: make(chan dataPack, 1), - blockWakeCh: make(chan bool, 1), - bodyWakeCh: make(chan bool, 1), - receiptWakeCh: make(chan bool, 1), + mode: mode, + mux: mux, + queue: newQueue(stateDb), + peers: newPeerSet(), + hasHeader: hasHeader, + hasBlock: hasBlock, + getHeader: getHeader, + getBlock: getBlock, + headHeader: headHeader, + headBlock: headBlock, + headFastBlock: headFastBlock, + commitHeadBlock: commitHeadBlock, + getTd: getTd, + insertHeaders: insertHeaders, + insertBlocks: insertBlocks, + insertReceipts: insertReceipts, + dropPeer: dropPeer, + newPeerCh: make(chan *peer, 1), + hashCh: make(chan dataPack, 1), + blockCh: make(chan dataPack, 1), + headerCh: make(chan dataPack, 1), + bodyCh: make(chan dataPack, 1), + receiptCh: make(chan dataPack, 1), + stateCh: make(chan dataPack, 1), + blockWakeCh: make(chan bool, 1), + bodyWakeCh: make(chan bool, 1), + receiptWakeCh: make(chan bool, 1), + stateWakeCh: make(chan bool, 1), } } @@ -272,7 +193,7 @@ func (d *Downloader) Boundaries() (uint64, uint64) { d.syncStatsLock.RLock() defer d.syncStatsLock.RUnlock() - return d.syncStatsOrigin, d.syncStatsHeight + return d.syncStatsChainOrigin, d.syncStatsChainHeight } // Synchronising returns whether the downloader is currently retrieving blocks. @@ -284,10 +205,11 @@ func (d *Downloader) Synchronising() bool { // used for fetching hashes and blocks from. func (d *Downloader) RegisterPeer(id string, version int, head common.Hash, getRelHashes relativeHashFetcherFn, getAbsHashes absoluteHashFetcherFn, getBlocks blockFetcherFn, // eth/61 callbacks, remove when upgrading - getRelHeaders relativeHeaderFetcherFn, getAbsHeaders absoluteHeaderFetcherFn, getBlockBodies blockBodyFetcherFn, getReceipts receiptFetcherFn) error { + getRelHeaders relativeHeaderFetcherFn, getAbsHeaders absoluteHeaderFetcherFn, getBlockBodies blockBodyFetcherFn, + getReceipts receiptFetcherFn, getNodeData stateFetcherFn) error { glog.V(logger.Detail).Infoln("Registering peer", id) - if err := d.peers.Register(newPeer(id, version, head, getRelHashes, getAbsHashes, getBlocks, getRelHeaders, getAbsHeaders, getBlockBodies, getReceipts)); err != nil { + if err := d.peers.Register(newPeer(id, version, head, getRelHashes, getAbsHashes, getBlocks, getRelHeaders, getAbsHeaders, getBlockBodies, getReceipts, getNodeData)); err != nil { glog.V(logger.Error).Infoln("Register failed:", err) return err } @@ -357,12 +279,18 @@ func (d *Downloader) synchronise(id string, hash common.Hash, td *big.Int) error d.queue.Reset() d.peers.Reset() - for _, ch := range []chan bool{d.blockWakeCh, d.bodyWakeCh, d.receiptWakeCh} { + for _, ch := range []chan bool{d.blockWakeCh, d.bodyWakeCh, d.receiptWakeCh, d.stateWakeCh} { select { case <-ch: default: } } + // Reset and ephemeral sync statistics + d.syncStatsLock.Lock() + d.syncStatsStateTotal = 0 + d.syncStatsStateDone = 0 + d.syncStatsLock.Unlock() + // Create cancel channel for aborting mid-flight d.cancelLock.Lock() d.cancelCh = make(chan struct{}) @@ -414,17 +342,17 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e return err } d.syncStatsLock.Lock() - if d.syncStatsHeight <= origin || d.syncStatsOrigin > origin { - d.syncStatsOrigin = origin + if d.syncStatsChainHeight <= origin || d.syncStatsChainOrigin > origin { + d.syncStatsChainOrigin = origin } - d.syncStatsHeight = latest + d.syncStatsChainHeight = latest d.syncStatsLock.Unlock() // Initiate the sync using a concurrent hash and block retrieval algorithm if d.syncInitHook != nil { d.syncInitHook(origin, latest) } - d.queue.Prepare(origin+1, 1) + d.queue.Prepare(origin+1, d.mode, 0) errc := make(chan error, 2) go func() { errc <- d.fetchHashes61(p, td, origin+1) }() @@ -449,26 +377,27 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e return err } d.syncStatsLock.Lock() - if d.syncStatsHeight <= origin || d.syncStatsOrigin > origin { - d.syncStatsOrigin = origin + if d.syncStatsChainHeight <= origin || d.syncStatsChainOrigin > origin { + d.syncStatsChainOrigin = origin } - d.syncStatsHeight = latest + d.syncStatsChainHeight = latest d.syncStatsLock.Unlock() // Initiate the sync using a concurrent header and content retrieval algorithm - parts := 1 - if d.mode == FastSync { - parts = 2 // receipts are fetched too + pivot := uint64(0) + if latest > uint64(minFullBlocks) { + pivot = latest - uint64(minFullBlocks) } - d.queue.Prepare(origin+1, parts) + d.queue.Prepare(origin+1, d.mode, pivot) if d.syncInitHook != nil { d.syncInitHook(origin, latest) } - errc := make(chan error, 3) + errc := make(chan error, 4) go func() { errc <- d.fetchHeaders(p, td, origin+1) }() // Headers are always retrieved + go func() { errc <- d.fetchBodies(origin + 1) }() // Bodies are retrieved during normal and fast sync go func() { errc <- d.fetchReceipts(origin + 1) }() // Receipts are retrieved during fast sync - go func() { errc <- d.fetchBodies(origin + 1) }() // Bodies are retrieved during normal sync + go func() { errc <- d.fetchNodeData() }() // Node state data is retrieved during fast sync // If any fetcher fails, cancel the others var fail error @@ -538,14 +467,14 @@ func (d *Downloader) fetchHeight61(p *peer) (uint64, error) { case <-d.hashCh: // Out of bounds hashes received, ignore them - case blockPack := <-d.blockCh: + case packet := <-d.blockCh: // Discard anything not from the origin peer - if blockPack.peerId != p.id { - glog.V(logger.Debug).Infof("Received blocks from incorrect peer(%s)", blockPack.peerId) + if packet.PeerId() != p.id { + glog.V(logger.Debug).Infof("Received blocks from incorrect peer(%s)", packet.PeerId()) break } // Make sure the peer actually gave something valid - blocks := blockPack.blocks + blocks := packet.(*blockPack).blocks if len(blocks) != 1 { glog.V(logger.Debug).Infof("%v: invalid number of head blocks: %d != 1", p, len(blocks)) return 0, errBadPeer @@ -584,14 +513,14 @@ func (d *Downloader) findAncestor61(p *peer) (uint64, error) { case <-d.cancelCh: return 0, errCancelHashFetch - case hashPack := <-d.hashCh: + case packet := <-d.hashCh: // Discard anything not from the origin peer - if hashPack.peerId != p.id { - glog.V(logger.Debug).Infof("Received hashes from incorrect peer(%s)", hashPack.peerId) + if packet.PeerId() != p.id { + glog.V(logger.Debug).Infof("Received hashes from incorrect peer(%s)", packet.PeerId()) break } // Make sure the peer actually gave something valid - hashes := hashPack.hashes + hashes := packet.(*hashPack).hashes if len(hashes) == 0 { glog.V(logger.Debug).Infof("%v: empty head hash set", p) return 0, errEmptyHashSet @@ -639,14 +568,14 @@ func (d *Downloader) findAncestor61(p *peer) (uint64, error) { case <-d.cancelCh: return 0, errCancelHashFetch - case hashPack := <-d.hashCh: + case packet := <-d.hashCh: // Discard anything not from the origin peer - if hashPack.peerId != p.id { - glog.V(logger.Debug).Infof("Received hashes from incorrect peer(%s)", hashPack.peerId) + if packet.PeerId() != p.id { + glog.V(logger.Debug).Infof("Received hashes from incorrect peer(%s)", packet.PeerId()) break } // Make sure the peer actually gave something valid - hashes := hashPack.hashes + hashes := packet.(*hashPack).hashes if len(hashes) != 1 { glog.V(logger.Debug).Infof("%v: invalid search hash set (%d)", p, len(hashes)) return 0, errBadPeer @@ -716,17 +645,17 @@ func (d *Downloader) fetchHashes61(p *peer, td *big.Int, from uint64) error { case <-d.bodyCh: // Out of bounds eth/62 block bodies received, ignore them - case hashPack := <-d.hashCh: + case packet := <-d.hashCh: // Make sure the active peer is giving us the hashes - if hashPack.peerId != p.id { - glog.V(logger.Debug).Infof("Received hashes from incorrect peer(%s)", hashPack.peerId) + if packet.PeerId() != p.id { + glog.V(logger.Debug).Infof("Received hashes from incorrect peer(%s)", packet.PeerId()) break } hashReqTimer.UpdateSince(request) timeout.Stop() // If no more hashes are inbound, notify the block fetcher and return - if len(hashPack.hashes) == 0 { + if packet.Items() == 0 { glog.V(logger.Debug).Infof("%v: no available hashes", p) select { @@ -751,12 +680,13 @@ func (d *Downloader) fetchHashes61(p *peer, td *big.Int, from uint64) error { return nil } gotHashes = true + hashes := packet.(*hashPack).hashes // Otherwise insert all the new hashes, aborting in case of junk - glog.V(logger.Detail).Infof("%v: scheduling %d hashes from #%d", p, len(hashPack.hashes), from) + glog.V(logger.Detail).Infof("%v: scheduling %d hashes from #%d", p, len(hashes), from) - inserts := d.queue.Schedule61(hashPack.hashes, true) - if len(inserts) != len(hashPack.hashes) { + inserts := d.queue.Schedule61(hashes, true) + if len(inserts) != len(hashes) { glog.V(logger.Debug).Infof("%v: stale hashes", p) return errBadPeer } @@ -776,7 +706,7 @@ func (d *Downloader) fetchHashes61(p *peer, td *big.Int, from uint64) error { return nil } // Queue not yet full, fetch the next batch - from += uint64(len(hashPack.hashes)) + from += uint64(len(hashes)) getHashes(from) case <-timeout.C: @@ -813,16 +743,17 @@ func (d *Downloader) fetchBlocks61(from uint64) error { case <-d.bodyCh: // Out of bounds eth/62 block bodies received, ignore them - case blockPack := <-d.blockCh: + case packet := <-d.blockCh: // If the peer was previously banned and failed to deliver it's pack // in a reasonable time frame, ignore it's message. - if peer := d.peers.Peer(blockPack.peerId); peer != nil { + if peer := d.peers.Peer(packet.PeerId()); peer != nil { // Deliver the received chunk of blocks, and demote in case of errors - err := d.queue.Deliver61(blockPack.peerId, blockPack.blocks) + blocks := packet.(*blockPack).blocks + err := d.queue.DeliverBlocks(peer.id, blocks) switch err { case nil: // If no blocks were delivered, demote the peer (need the delivery above) - if len(blockPack.blocks) == 0 { + if len(blocks) == 0 { peer.Demote() peer.SetBlocksIdle() glog.V(logger.Detail).Infof("%s: no blocks delivered", peer) @@ -831,7 +762,7 @@ func (d *Downloader) fetchBlocks61(from uint64) error { // All was successful, promote the peer and potentially start processing peer.Promote() peer.SetBlocksIdle() - glog.V(logger.Detail).Infof("%s: delivered %d blocks", peer, len(blockPack.blocks)) + glog.V(logger.Detail).Infof("%s: delivered %d blocks", peer, len(blocks)) go d.process() case errInvalidChain: @@ -891,7 +822,7 @@ func (d *Downloader) fetchBlocks61(from uint64) error { return errNoPeers } // Check for block request timeouts and demote the responsible peers - for _, pid := range d.queue.Expire61(blockHardTTL) { + for _, pid := range d.queue.ExpireBlocks(blockHardTTL) { if peer := d.peers.Peer(pid); peer != nil { peer.Demote() glog.V(logger.Detail).Infof("%s: block delivery timeout", peer) @@ -907,7 +838,7 @@ func (d *Downloader) fetchBlocks61(from uint64) error { } // Send a download request to all idle peers, until throttled throttled := false - idles, total := d.peers.BlockIdlePeers(61) + idles, total := d.peers.BlockIdlePeers() for _, peer := range idles { // Short circuit if throttling activated @@ -918,7 +849,7 @@ func (d *Downloader) fetchBlocks61(from uint64) error { // Reserve a chunk of hashes for a peer. A nil can mean either that // no more hashes are available, or that the peer is known not to // have them. - request := d.queue.Reserve61(peer, peer.BlockCapacity()) + request := d.queue.ReserveBlocks(peer, peer.BlockCapacity()) if request == nil { continue } @@ -928,7 +859,7 @@ func (d *Downloader) fetchBlocks61(from uint64) error { // Fetch the chunk and make sure any errors return the hashes to the queue if err := peer.Fetch61(request); err != nil { glog.V(logger.Error).Infof("%v: fetch failed, rescheduling", peer) - d.queue.Cancel61(request) + d.queue.CancelBlocks(request) } } // Make sure that we have peers available for fetching. If all peers have been tried @@ -954,14 +885,14 @@ func (d *Downloader) fetchHeight(p *peer) (uint64, error) { case <-d.cancelCh: return 0, errCancelBlockFetch - case headerPack := <-d.headerCh: + case packet := <-d.headerCh: // Discard anything not from the origin peer - if headerPack.peerId != p.id { - glog.V(logger.Debug).Infof("Received headers from incorrect peer(%s)", headerPack.peerId) + if packet.PeerId() != p.id { + glog.V(logger.Debug).Infof("Received headers from incorrect peer(%s)", packet.PeerId()) break } // Make sure the peer actually gave something valid - headers := headerPack.headers + headers := packet.(*headerPack).headers if len(headers) != 1 { glog.V(logger.Debug).Infof("%v: invalid number of head headers: %d != 1", p, len(headers)) return 0, errBadPeer @@ -1014,14 +945,14 @@ func (d *Downloader) findAncestor(p *peer) (uint64, error) { case <-d.cancelCh: return 0, errCancelHashFetch - case headerPack := <-d.headerCh: + case packet := <-d.headerCh: // Discard anything not from the origin peer - if headerPack.peerId != p.id { - glog.V(logger.Debug).Infof("Received headers from incorrect peer(%s)", headerPack.peerId) + if packet.PeerId() != p.id { + glog.V(logger.Debug).Infof("Received headers from incorrect peer(%s)", packet.PeerId()) break } // Make sure the peer actually gave something valid - headers := headerPack.headers + headers := packet.(*headerPack).headers if len(headers) == 0 { glog.V(logger.Debug).Infof("%v: empty head header set", p) return 0, errEmptyHeaderSet @@ -1069,14 +1000,14 @@ func (d *Downloader) findAncestor(p *peer) (uint64, error) { case <-d.cancelCh: return 0, errCancelHashFetch - case headerPack := <-d.headerCh: + case packer := <-d.headerCh: // Discard anything not from the origin peer - if headerPack.peerId != p.id { - glog.V(logger.Debug).Infof("Received headers from incorrect peer(%s)", headerPack.peerId) + if packer.PeerId() != p.id { + glog.V(logger.Debug).Infof("Received headers from incorrect peer(%s)", packer.PeerId()) break } // Make sure the peer actually gave something valid - headers := headerPack.headers + headers := packer.(*headerPack).headers if len(headers) != 1 { glog.V(logger.Debug).Infof("%v: invalid search header set (%d)", p, len(headers)) return 0, errBadPeer @@ -1150,20 +1081,20 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error { case <-d.blockCh: // Out of bounds eth/61 blocks received, ignore them - case headerPack := <-d.headerCh: + case packet := <-d.headerCh: // Make sure the active peer is giving us the headers - if headerPack.peerId != p.id { - glog.V(logger.Debug).Infof("Received headers from incorrect peer (%s)", headerPack.peerId) + if packet.PeerId() != p.id { + glog.V(logger.Debug).Infof("Received headers from incorrect peer (%s)", packet.PeerId()) break } headerReqTimer.UpdateSince(request) timeout.Stop() // If no more headers are inbound, notify the content fetchers and return - if len(headerPack.headers) == 0 { + if packet.Items() == 0 { glog.V(logger.Debug).Infof("%v: no available headers", p) - for _, ch := range []chan bool{d.bodyWakeCh, d.receiptWakeCh} { + for _, ch := range []chan bool{d.bodyWakeCh, d.receiptWakeCh, d.stateWakeCh} { select { case ch <- false: case <-d.cancelCh: @@ -1187,26 +1118,27 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error { return nil } gotHeaders = true + headers := packet.(*headerPack).headers // Otherwise insert all the new headers, aborting in case of junk - glog.V(logger.Detail).Infof("%v: schedule %d headers from #%d", p, len(headerPack.headers), from) + glog.V(logger.Detail).Infof("%v: schedule %d headers from #%d", p, len(headers), from) if d.mode == FastSync || d.mode == LightSync { - if n, err := d.insertHeaders(headerPack.headers, false); err != nil { - glog.V(logger.Debug).Infof("%v: invalid header #%d [%x…]: %v", p, headerPack.headers[n].Number, headerPack.headers[n].Hash().Bytes()[:4], err) + if n, err := d.insertHeaders(headers, false); err != nil { + glog.V(logger.Debug).Infof("%v: invalid header #%d [%x…]: %v", p, headers[n].Number, headers[n].Hash().Bytes()[:4], err) return errInvalidChain } } if d.mode == FullSync || d.mode == FastSync { - inserts := d.queue.Schedule(headerPack.headers, from, d.mode == FastSync) - if len(inserts) != len(headerPack.headers) { + inserts := d.queue.Schedule(headers, from) + if len(inserts) != len(headers) { glog.V(logger.Debug).Infof("%v: stale headers", p) return errBadPeer } } // Notify the content fetchers of new headers, but stop if queue is full cont := d.queue.PendingBlocks() < maxQueuedHeaders || d.queue.PendingReceipts() < maxQueuedHeaders - for _, ch := range []chan bool{d.bodyWakeCh, d.receiptWakeCh} { + for _, ch := range []chan bool{d.bodyWakeCh, d.receiptWakeCh, d.stateWakeCh} { if cont { // We still have headers to fetch, send continuation wake signal (potential) select { @@ -1223,7 +1155,7 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error { } } // Queue not yet full, fetch the next batch - from += uint64(len(headerPack.headers)) + from += uint64(len(headers)) getHeaders(from) case <-timeout.C: @@ -1233,7 +1165,7 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error { d.dropPeer(p.id) // Finish the sync gracefully instead of dumping the gathered data though - for _, ch := range []chan bool{d.bodyWakeCh, d.receiptWakeCh} { + for _, ch := range []chan bool{d.bodyWakeCh, d.receiptWakeCh, d.stateWakeCh} { select { case ch <- false: case <-d.cancelCh: @@ -1251,19 +1183,19 @@ func (d *Downloader) fetchBodies(from uint64) error { glog.V(logger.Debug).Infof("Downloading block bodies from #%d", from) var ( - deliver = func(packet interface{}) error { + deliver = func(packet dataPack) error { pack := packet.(*bodyPack) - return d.queue.DeliverBlocks(pack.peerId, pack.transactions, pack.uncles) + return d.queue.DeliverBodies(pack.peerId, pack.transactions, pack.uncles) } - expire = func() []string { return d.queue.ExpireBlocks(bodyHardTTL) } + expire = func() []string { return d.queue.ExpireBodies(bodyHardTTL) } fetch = func(p *peer, req *fetchRequest) error { return p.FetchBodies(req) } capacity = func(p *peer) int { return p.BlockCapacity() } - getIdles = func() ([]*peer, int) { return d.peers.BlockIdlePeers(62) } + getIdles = func() ([]*peer, int) { return d.peers.BodyIdlePeers() } setIdle = func(p *peer) { p.SetBlocksIdle() } ) - err := d.fetchParts(from, errCancelBodyFetch, d.bodyCh, deliver, d.bodyWakeCh, expire, - d.queue.PendingBlocks, d.queue.ThrottleBlocks, d.queue.ReserveBlocks, d.bodyFetchHook, - fetch, d.queue.CancelBlocks, capacity, getIdles, setIdle, "Body") + err := d.fetchParts(errCancelBodyFetch, d.bodyCh, deliver, d.bodyWakeCh, expire, + d.queue.PendingBlocks, d.queue.ThrottleBlocks, d.queue.ReserveBodies, d.bodyFetchHook, + fetch, d.queue.CancelBodies, capacity, getIdles, setIdle, "Body") glog.V(logger.Debug).Infof("Block body download terminated: %v", err) return err @@ -1276,7 +1208,7 @@ func (d *Downloader) fetchReceipts(from uint64) error { glog.V(logger.Debug).Infof("Downloading receipts from #%d", from) var ( - deliver = func(packet interface{}) error { + deliver = func(packet dataPack) error { pack := packet.(*receiptPack) return d.queue.DeliverReceipts(pack.peerId, pack.receipts) } @@ -1285,7 +1217,7 @@ func (d *Downloader) fetchReceipts(from uint64) error { capacity = func(p *peer) int { return p.ReceiptCapacity() } setIdle = func(p *peer) { p.SetReceiptsIdle() } ) - err := d.fetchParts(from, errCancelReceiptFetch, d.receiptCh, deliver, d.receiptWakeCh, expire, + err := d.fetchParts(errCancelReceiptFetch, d.receiptCh, deliver, d.receiptWakeCh, expire, d.queue.PendingReceipts, d.queue.ThrottleReceipts, d.queue.ReserveReceipts, d.receiptFetchHook, fetch, d.queue.CancelReceipts, capacity, d.peers.ReceiptIdlePeers, setIdle, "Receipt") @@ -1293,10 +1225,46 @@ func (d *Downloader) fetchReceipts(from uint64) error { return err } +// fetchNodeData iteratively downloads the scheduled state trie nodes, taking any +// available peers, reserving a chunk of nodes for each, waiting for delivery and +// also periodically checking for timeouts. +func (d *Downloader) fetchNodeData() error { + glog.V(logger.Debug).Infof("Downloading node state data") + + var ( + deliver = func(packet dataPack) error { + start := time.Now() + done, found, err := d.queue.DeliverNodeData(packet.PeerId(), packet.(*statePack).states) + + d.syncStatsLock.Lock() + totalDone, totalKnown := d.syncStatsStateDone+uint64(done), d.syncStatsStateTotal+uint64(found) + d.syncStatsStateDone, d.syncStatsStateTotal = totalDone, totalKnown + d.syncStatsLock.Unlock() + + glog.V(logger.Info).Infof("imported %d [%d / %d] state entries in %v.", done, totalDone, totalKnown, time.Since(start)) + return err + } + expire = func() []string { return d.queue.ExpireNodeData(stateHardTTL) } + throttle = func() bool { return false } + reserve = func(p *peer, count int) (*fetchRequest, bool, error) { + return d.queue.ReserveNodeData(p, count), false, nil + } + fetch = func(p *peer, req *fetchRequest) error { return p.FetchNodeData(req) } + capacity = func(p *peer) int { return p.NodeDataCapacity() } + setIdle = func(p *peer) { p.SetNodeDataIdle() } + ) + err := d.fetchParts(errCancelReceiptFetch, d.stateCh, deliver, d.stateWakeCh, expire, + d.queue.PendingNodeData, throttle, reserve, nil, fetch, d.queue.CancelNodeData, + capacity, d.peers.ReceiptIdlePeers, setIdle, "State") + + glog.V(logger.Debug).Infof("Node state data download terminated: %v", err) + return err +} + // fetchParts iteratively downloads scheduled block parts, taking any available // peers, reserving a chunk of fetch requests for each, waiting for delivery and // also periodically checking for timeouts. -func (d *Downloader) fetchParts(from uint64, errCancel error, deliveryCh chan dataPack, deliver func(packet interface{}) error, wakeCh chan bool, +func (d *Downloader) fetchParts(errCancel error, deliveryCh chan dataPack, deliver func(packet dataPack) error, wakeCh chan bool, expire func() []string, pending func() int, throttle func() bool, reserve func(*peer, int) (*fetchRequest, bool, error), fetchHook func([]*types.Header), fetch func(*peer, *fetchRequest) error, cancel func(*fetchRequest), capacity func(*peer) int, idle func() ([]*peer, int), setIdle func(*peer), kind string) error { @@ -1327,7 +1295,7 @@ func (d *Downloader) fetchParts(from uint64, errCancel error, deliveryCh chan da switch err := deliver(packet); err { case nil: // If no blocks were delivered, demote the peer (need the delivery above to clean internal queue!) - if packet.Empty() { + if packet.Items() == 0 { peer.Demote() setIdle(peer) glog.V(logger.Detail).Infof("%s: no %s delivered", peer, strings.ToLower(kind)) @@ -1441,7 +1409,11 @@ func (d *Downloader) fetchParts(from uint64, errCancel error, deliveryCh chan da continue } if glog.V(logger.Detail) { - glog.Infof("%s: requesting %d %s(s), first at #%d", peer, len(request.Headers), strings.ToLower(kind), request.Headers[0].Number) + if len(request.Headers) > 0 { + glog.Infof("%s: requesting %d %s(s), first at #%d", peer, len(request.Headers), strings.ToLower(kind), request.Headers[0].Number) + } else { + glog.Infof("%s: requesting %d %s(s)", peer, len(request.Hashes), strings.ToLower(kind)) + } } // Fetch the chunk and make sure any errors return the hashes to the queue if fetchHook != nil { @@ -1528,7 +1500,9 @@ func (d *Downloader) process() { blocks = append(blocks, types.NewBlockWithHeader(result.Header).WithBody(result.Transactions, result.Uncles)) case d.mode == FastSync: blocks = append(blocks, types.NewBlockWithHeader(result.Header).WithBody(result.Transactions, result.Uncles)) - receipts = append(receipts, result.Receipts) + if result.Header.Number.Uint64() <= d.queue.fastSyncPivot { + receipts = append(receipts, result.Receipts) + } case d.mode == LightSync: headers = append(headers, result.Header) } @@ -1539,12 +1513,16 @@ func (d *Downloader) process() { index int ) switch { - case d.mode == FullSync: - index, err = d.insertBlocks(blocks) - case d.mode == FastSync: - index, err = d.insertReceipts(blocks, receipts) - case d.mode == LightSync: + case len(headers) > 0: index, err = d.insertHeaders(headers, true) + + case len(receipts) > 0: + index, err = d.insertReceipts(blocks, receipts) + if err == nil && blocks[len(blocks)-1].NumberU64() == d.queue.fastSyncPivot { + err = d.commitHeadBlock(blocks[len(blocks)-1].Hash()) + } + default: + index, err = d.insertBlocks(blocks) } if err != nil { glog.V(logger.Debug).Infof("Result #%d [%x…] processing failed: %v", results[index].Header.Number, results[index].Header.Hash().Bytes()[:4], err) @@ -1557,125 +1535,47 @@ func (d *Downloader) process() { } } -// DeliverHashes61 injects a new batch of hashes received from a remote node into +// DeliverHashes injects a new batch of hashes received from a remote node into // the download schedule. This is usually invoked through the BlockHashesMsg by // the protocol handler. -func (d *Downloader) DeliverHashes61(id string, hashes []common.Hash) (err error) { - // Update the delivery metrics for both good and failed deliveries - hashInMeter.Mark(int64(len(hashes))) - defer func() { - if err != nil { - hashDropMeter.Mark(int64(len(hashes))) - } - }() - // Make sure the downloader is active - if atomic.LoadInt32(&d.synchronising) == 0 { - return errNoSyncActive - } - // Deliver or abort if the sync is canceled while queuing - d.cancelLock.RLock() - cancel := d.cancelCh - d.cancelLock.RUnlock() - - select { - case d.hashCh <- hashPack{id, hashes}: - return nil - - case <-cancel: - return errNoSyncActive - } +func (d *Downloader) DeliverHashes(id string, hashes []common.Hash) (err error) { + return d.deliver(id, d.hashCh, &hashPack{id, hashes}, hashInMeter, hashDropMeter) } -// DeliverBlocks61 injects a new batch of blocks received from a remote node. +// DeliverBlocks injects a new batch of blocks received from a remote node. // This is usually invoked through the BlocksMsg by the protocol handler. -func (d *Downloader) DeliverBlocks61(id string, blocks []*types.Block) (err error) { - // Update the delivery metrics for both good and failed deliveries - blockInMeter.Mark(int64(len(blocks))) - defer func() { - if err != nil { - blockDropMeter.Mark(int64(len(blocks))) - } - }() - // Make sure the downloader is active - if atomic.LoadInt32(&d.synchronising) == 0 { - return errNoSyncActive - } - // Deliver or abort if the sync is canceled while queuing - d.cancelLock.RLock() - cancel := d.cancelCh - d.cancelLock.RUnlock() - - select { - case d.blockCh <- blockPack{id, blocks}: - return nil - - case <-cancel: - return errNoSyncActive - } +func (d *Downloader) DeliverBlocks(id string, blocks []*types.Block) (err error) { + return d.deliver(id, d.blockCh, &blockPack{id, blocks}, blockInMeter, blockDropMeter) } // DeliverHeaders injects a new batch of blck headers received from a remote // node into the download schedule. func (d *Downloader) DeliverHeaders(id string, headers []*types.Header) (err error) { - // Update the delivery metrics for both good and failed deliveries - headerInMeter.Mark(int64(len(headers))) - defer func() { - if err != nil { - headerDropMeter.Mark(int64(len(headers))) - } - }() - // Make sure the downloader is active - if atomic.LoadInt32(&d.synchronising) == 0 { - return errNoSyncActive - } - // Deliver or abort if the sync is canceled while queuing - d.cancelLock.RLock() - cancel := d.cancelCh - d.cancelLock.RUnlock() - - select { - case d.headerCh <- headerPack{id, headers}: - return nil - - case <-cancel: - return errNoSyncActive - } + return d.deliver(id, d.headerCh, &headerPack{id, headers}, headerInMeter, headerDropMeter) } // DeliverBodies injects a new batch of block bodies received from a remote node. func (d *Downloader) DeliverBodies(id string, transactions [][]*types.Transaction, uncles [][]*types.Header) (err error) { - // Update the delivery metrics for both good and failed deliveries - bodyInMeter.Mark(int64(len(transactions))) - defer func() { - if err != nil { - bodyDropMeter.Mark(int64(len(transactions))) - } - }() - // Make sure the downloader is active - if atomic.LoadInt32(&d.synchronising) == 0 { - return errNoSyncActive - } - // Deliver or abort if the sync is canceled while queuing - d.cancelLock.RLock() - cancel := d.cancelCh - d.cancelLock.RUnlock() - - select { - case d.bodyCh <- &bodyPack{id, transactions, uncles}: - return nil - - case <-cancel: - return errNoSyncActive - } + return d.deliver(id, d.bodyCh, &bodyPack{id, transactions, uncles}, bodyInMeter, bodyDropMeter) } // DeliverReceipts injects a new batch of receipts received from a remote node. func (d *Downloader) DeliverReceipts(id string, receipts [][]*types.Receipt) (err error) { + return d.deliver(id, d.receiptCh, &receiptPack{id, receipts}, receiptInMeter, receiptDropMeter) +} + +// DeliverNodeData injects a new batch of node state data received from a remote node. +func (d *Downloader) DeliverNodeData(id string, data [][]byte) (err error) { + return d.deliver(id, d.stateCh, &statePack{id, data}, stateInMeter, stateDropMeter) +} + +// deliver injects a new batch of data received from a remote node. +func (d *Downloader) deliver(id string, destCh chan dataPack, packet dataPack, inMeter, dropMeter metrics.Meter) (err error) { // Update the delivery metrics for both good and failed deliveries - receiptInMeter.Mark(int64(len(receipts))) + inMeter.Mark(int64(packet.Items())) defer func() { if err != nil { - receiptDropMeter.Mark(int64(len(receipts))) + dropMeter.Mark(int64(packet.Items())) } }() // Make sure the downloader is active @@ -1688,7 +1588,7 @@ func (d *Downloader) DeliverReceipts(id string, receipts [][]*types.Receipt) (er d.cancelLock.RUnlock() select { - case d.receiptCh <- &receiptPack{id, receipts}: + case destCh <- packet: return nil case <-cancel: diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index 68c4ca26e..8944ae4b0 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -27,11 +27,13 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/params" + "github.com/ethereum/go-ethereum/trie" ) var ( @@ -115,6 +117,7 @@ func makeChainFork(n, f int, parent *types.Block, parentReceipts types.Receipts) // downloadTester is a test simulator for mocking out local block chain. type downloadTester struct { + stateDb ethdb.Database downloader *Downloader ownHashes []common.Hash // Hash chain belonging to the tester @@ -146,8 +149,10 @@ func newTester(mode SyncMode) *downloadTester { peerReceipts: make(map[string]map[common.Hash]types.Receipts), peerChainTds: make(map[string]map[common.Hash]*big.Int), } - tester.downloader = New(mode, new(event.TypeMux), tester.hasHeader, tester.hasBlock, tester.getHeader, tester.getBlock, - tester.headHeader, tester.headBlock, tester.headFastBlock, tester.getTd, tester.insertHeaders, tester.insertBlocks, tester.insertReceipts, tester.dropPeer) + tester.stateDb, _ = ethdb.NewMemDatabase() + tester.downloader = New(mode, tester.stateDb, new(event.TypeMux), tester.hasHeader, tester.hasBlock, tester.getHeader, + tester.getBlock, tester.headHeader, tester.headBlock, tester.headFastBlock, tester.commitHeadBlock, tester.getTd, + tester.insertHeaders, tester.insertBlocks, tester.insertReceipts, tester.dropPeer) return tester } @@ -213,7 +218,7 @@ func (dl *downloadTester) headHeader() *types.Header { return header } } - return nil + return genesis.Header() } // headBlock retrieves the current head block from the canonical chain. @@ -223,10 +228,12 @@ func (dl *downloadTester) headBlock() *types.Block { for i := len(dl.ownHashes) - 1; i >= 0; i-- { if block := dl.getBlock(dl.ownHashes[i]); block != nil { - return block + if _, err := dl.stateDb.Get(block.Root().Bytes()); err == nil { + return block + } } } - return nil + return genesis } // headFastBlock retrieves the current head fast-sync block from the canonical chain. @@ -236,12 +243,20 @@ func (dl *downloadTester) headFastBlock() *types.Block { for i := len(dl.ownHashes) - 1; i >= 0; i-- { if block := dl.getBlock(dl.ownHashes[i]); block != nil { - if _, ok := dl.ownReceipts[block.Hash()]; ok { - return block - } + return block } } - return nil + return genesis +} + +// commitHeadBlock manually sets the head block to a given hash. +func (dl *downloadTester) commitHeadBlock(hash common.Hash) error { + // For now only check that the state trie is correct + if block := dl.getBlock(hash); block != nil { + _, err := trie.NewSecure(block.Root(), dl.stateDb) + return err + } + return fmt.Errorf("non existent block: %x", hash[:4]) } // getTd retrieves the block's total difficulty from the canonical chain. @@ -283,6 +298,7 @@ func (dl *downloadTester) insertBlocks(blocks types.Blocks) (int, error) { dl.ownHashes = append(dl.ownHashes, block.Hash()) dl.ownHeaders[block.Hash()] = block.Header() dl.ownBlocks[block.Hash()] = block + dl.stateDb.Put(block.Root().Bytes(), []byte{}) dl.ownChainTd[block.Hash()] = dl.ownChainTd[block.ParentHash()] } return len(blocks), nil @@ -321,13 +337,13 @@ func (dl *downloadTester) newSlowPeer(id string, version int, hashes []common.Ha var err error switch version { case 61: - err = dl.downloader.RegisterPeer(id, version, hashes[0], dl.peerGetRelHashesFn(id, delay), dl.peerGetAbsHashesFn(id, delay), dl.peerGetBlocksFn(id, delay), nil, nil, nil, nil) + err = dl.downloader.RegisterPeer(id, version, hashes[0], dl.peerGetRelHashesFn(id, delay), dl.peerGetAbsHashesFn(id, delay), dl.peerGetBlocksFn(id, delay), nil, nil, nil, nil, nil) case 62: - err = dl.downloader.RegisterPeer(id, version, hashes[0], nil, nil, nil, dl.peerGetRelHeadersFn(id, delay), dl.peerGetAbsHeadersFn(id, delay), dl.peerGetBodiesFn(id, delay), nil) + err = dl.downloader.RegisterPeer(id, version, hashes[0], nil, nil, nil, dl.peerGetRelHeadersFn(id, delay), dl.peerGetAbsHeadersFn(id, delay), dl.peerGetBodiesFn(id, delay), nil, nil) case 63: - err = dl.downloader.RegisterPeer(id, version, hashes[0], nil, nil, nil, dl.peerGetRelHeadersFn(id, delay), dl.peerGetAbsHeadersFn(id, delay), dl.peerGetBodiesFn(id, delay), dl.peerGetReceiptsFn(id, delay)) + err = dl.downloader.RegisterPeer(id, version, hashes[0], nil, nil, nil, dl.peerGetRelHeadersFn(id, delay), dl.peerGetAbsHeadersFn(id, delay), dl.peerGetBodiesFn(id, delay), dl.peerGetReceiptsFn(id, delay), dl.peerGetNodeDataFn(id, delay)) case 64: - err = dl.downloader.RegisterPeer(id, version, hashes[0], nil, nil, nil, dl.peerGetRelHeadersFn(id, delay), dl.peerGetAbsHeadersFn(id, delay), dl.peerGetBodiesFn(id, delay), dl.peerGetReceiptsFn(id, delay)) + err = dl.downloader.RegisterPeer(id, version, hashes[0], nil, nil, nil, dl.peerGetRelHeadersFn(id, delay), dl.peerGetAbsHeadersFn(id, delay), dl.peerGetBodiesFn(id, delay), dl.peerGetReceiptsFn(id, delay), dl.peerGetNodeDataFn(id, delay)) } if err == nil { // Assign the owned hashes, headers and blocks to the peer (deep copy) @@ -399,7 +415,7 @@ func (dl *downloadTester) peerGetRelHashesFn(id string, delay time.Duration) fun // Delay delivery a bit to allow attacks to unfold go func() { time.Sleep(time.Millisecond) - dl.downloader.DeliverHashes61(id, result) + dl.downloader.DeliverHashes(id, result) }() return nil } @@ -424,7 +440,7 @@ func (dl *downloadTester) peerGetAbsHashesFn(id string, delay time.Duration) fun // Delay delivery a bit to allow attacks to unfold go func() { time.Sleep(time.Millisecond) - dl.downloader.DeliverHashes61(id, result) + dl.downloader.DeliverHashes(id, result) }() return nil } @@ -447,7 +463,7 @@ func (dl *downloadTester) peerGetBlocksFn(id string, delay time.Duration) func([ result = append(result, block) } } - go dl.downloader.DeliverBlocks61(id, result) + go dl.downloader.DeliverBlocks(id, result) return nil } @@ -553,17 +569,54 @@ func (dl *downloadTester) peerGetReceiptsFn(id string, delay time.Duration) func } } +// peerGetNodeDataFn constructs a getNodeData method associated with a particular +// peer in the download tester. The returned function can be used to retrieve +// batches of node state data from the particularly requested peer. +func (dl *downloadTester) peerGetNodeDataFn(id string, delay time.Duration) func([]common.Hash) error { + return func(hashes []common.Hash) error { + time.Sleep(delay) + + dl.lock.RLock() + defer dl.lock.RUnlock() + + results := make([][]byte, 0, len(hashes)) + for _, hash := range hashes { + if data, err := testdb.Get(hash.Bytes()); err == nil { + results = append(results, data) + } + } + go dl.downloader.DeliverNodeData(id, results) + + return nil + } +} + // assertOwnChain checks if the local chain contains the correct number of items // of the various chain components. func assertOwnChain(t *testing.T, tester *downloadTester, length int) { - headers, blocks, receipts := length, length, length + assertOwnForkedChain(t, tester, 1, []int{length}) +} + +// assertOwnForkedChain checks if the local forked chain contains the correct +// number of items of the various chain components. +func assertOwnForkedChain(t *testing.T, tester *downloadTester, common int, lengths []int) { + // Initialize the counters for the first fork + headers, blocks, receipts := lengths[0], lengths[0], lengths[0]-minFullBlocks + if receipts < 0 { + receipts = 1 + } + // Update the counters for each subsequent fork + for _, length := range lengths[1:] { + headers += length - common + blocks += length - common + receipts += length - common - minFullBlocks + } switch tester.downloader.mode { case FullSync: receipts = 1 case LightSync: blocks, receipts = 1, 1 } - if hs := len(tester.ownHeaders); hs != headers { t.Fatalf("synchronised headers mismatch: have %v, want %v", hs, headers) } @@ -573,6 +626,14 @@ func assertOwnChain(t *testing.T, tester *downloadTester, length int) { if rs := len(tester.ownReceipts); rs != receipts { t.Fatalf("synchronised receipts mismatch: have %v, want %v", rs, receipts) } + // Verify the state trie too for fast syncs + if tester.downloader.mode == FastSync { + if index := lengths[len(lengths)-1] - minFullBlocks - 1; index > 0 { + if statedb := state.New(tester.ownHeaders[tester.ownHashes[index]].Root, tester.stateDb); statedb == nil { + t.Fatalf("state reconstruction failed") + } + } + } } // Tests that simple synchronization against a canonical chain works correctly. @@ -647,7 +708,9 @@ func testThrottling(t *testing.T, protocol int, mode SyncMode) { cached = len(tester.downloader.queue.blockDonePool) if mode == FastSync { if receipts := len(tester.downloader.queue.receiptDonePool); receipts < cached { - cached = receipts + if tester.downloader.queue.resultCache[receipts].Header.Number.Uint64() < tester.downloader.queue.fastSyncPivot { + cached = receipts + } } } tester.downloader.queue.lock.RUnlock() @@ -704,7 +767,7 @@ func testForkedSynchronisation(t *testing.T, protocol int, mode SyncMode) { if err := tester.sync("fork B", nil); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } - assertOwnChain(t, tester, common+2*fork+1) + assertOwnForkedChain(t, tester, common+1, []int{common + fork + 1, common + fork + 1}) } // Tests that an inactive downloader will not accept incoming hashes and blocks. @@ -712,10 +775,10 @@ func TestInactiveDownloader61(t *testing.T) { tester := newTester(FullSync) // Check that neither hashes nor blocks are accepted - if err := tester.downloader.DeliverHashes61("bad peer", []common.Hash{}); err != errNoSyncActive { + if err := tester.downloader.DeliverHashes("bad peer", []common.Hash{}); err != errNoSyncActive { t.Errorf("error mismatch: have %v, want %v", err, errNoSyncActive) } - if err := tester.downloader.DeliverBlocks61("bad peer", []*types.Block{}); err != errNoSyncActive { + if err := tester.downloader.DeliverBlocks("bad peer", []*types.Block{}); err != errNoSyncActive { t.Errorf("error mismatch: have %v, want %v", err, errNoSyncActive) } } @@ -809,14 +872,6 @@ func testMultiSynchronisation(t *testing.T, protocol int, mode SyncMode) { id := fmt.Sprintf("peer #%d", i) tester.newPeer(id, protocol, hashes[i*blockCacheLimit:], headers, blocks, receipts) } - // Synchronise with the middle peer and make sure half of the blocks were retrieved - id := fmt.Sprintf("peer #%d", targetPeers/2) - if err := tester.sync(id, nil); err != nil { - t.Fatalf("failed to synchronise blocks: %v", err) - } - assertOwnChain(t, tester, len(tester.peerHashes[id])) - - // Synchronise with the best peer and make sure everything is retrieved if err := tester.sync("peer #0", nil); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } @@ -870,8 +925,8 @@ func TestEmptyShortCircuit64Fast(t *testing.T) { testEmptyShortCircuit(t, 64, F func TestEmptyShortCircuit64Light(t *testing.T) { testEmptyShortCircuit(t, 64, LightSync) } func testEmptyShortCircuit(t *testing.T, protocol int, mode SyncMode) { - // Create a small enough block chain to download - targetBlocks := blockCacheLimit - 15 + // Create a block chain to download + targetBlocks := 2*blockCacheLimit - 15 hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) tester := newTester(mode) @@ -898,8 +953,8 @@ func testEmptyShortCircuit(t *testing.T, protocol int, mode SyncMode) { bodiesNeeded++ } } - for _, receipt := range receipts { - if mode == FastSync && len(receipt) > 0 { + for hash, receipt := range receipts { + if mode == FastSync && len(receipt) > 0 && headers[hash].Number.Uint64() <= uint64(targetBlocks-minFullBlocks) { receiptsNeeded++ } } diff --git a/eth/downloader/metrics.go b/eth/downloader/metrics.go index 92acb6ba8..d6fcfa25c 100644 --- a/eth/downloader/metrics.go +++ b/eth/downloader/metrics.go @@ -47,4 +47,9 @@ var ( receiptReqTimer = metrics.NewTimer("eth/downloader/receipts/req") receiptDropMeter = metrics.NewMeter("eth/downloader/receipts/drop") receiptTimeoutMeter = metrics.NewMeter("eth/downloader/receipts/timeout") + + stateInMeter = metrics.NewMeter("eth/downloader/states/in") + stateReqTimer = metrics.NewTimer("eth/downloader/states/req") + stateDropMeter = metrics.NewMeter("eth/downloader/states/drop") + stateTimeoutMeter = metrics.NewMeter("eth/downloader/states/timeout") ) diff --git a/eth/downloader/peer.go b/eth/downloader/peer.go index 5fc0db587..5011d5d46 100644 --- a/eth/downloader/peer.go +++ b/eth/downloader/peer.go @@ -41,6 +41,7 @@ type relativeHeaderFetcherFn func(common.Hash, int, int, bool) error type absoluteHeaderFetcherFn func(uint64, int, int, bool) error type blockBodyFetcherFn func([]common.Hash) error type receiptFetcherFn func([]common.Hash) error +type stateFetcherFn func([]common.Hash) error var ( errAlreadyFetching = errors.New("already fetching blocks from peer") @@ -55,12 +56,16 @@ type peer struct { blockIdle int32 // Current block activity state of the peer (idle = 0, active = 1) receiptIdle int32 // Current receipt activity state of the peer (idle = 0, active = 1) + stateIdle int32 // Current node data activity state of the peer (idle = 0, active = 1) rep int32 // Simple peer reputation - blockCapacity int32 // Number of blocks (bodies) allowed to fetch per request - receiptCapacity int32 // Number of receipts allowed to fetch per request - blockStarted time.Time // Time instance when the last block (body)fetch was started - receiptStarted time.Time // Time instance when the last receipt fetch was started + blockCapacity int32 // Number of blocks (bodies) allowed to fetch per request + receiptCapacity int32 // Number of receipts allowed to fetch per request + stateCapacity int32 // Number of node data pieces allowed to fetch per request + + blockStarted time.Time // Time instance when the last block (body)fetch was started + receiptStarted time.Time // Time instance when the last receipt fetch was started + stateStarted time.Time // Time instance when the last node data fetch was started ignored *set.Set // Set of hashes not to request (didn't have previously) @@ -73,6 +78,7 @@ type peer struct { getBlockBodies blockBodyFetcherFn // [eth/62] Method to retrieve a batch of block bodies getReceipts receiptFetcherFn // [eth/63] Method to retrieve a batch of block transaction receipts + getNodeData stateFetcherFn // [eth/63] Method to retrieve a batch of state trie data version int // Eth protocol version number to switch strategies } @@ -82,12 +88,13 @@ type peer struct { func newPeer(id string, version int, head common.Hash, getRelHashes relativeHashFetcherFn, getAbsHashes absoluteHashFetcherFn, getBlocks blockFetcherFn, // eth/61 callbacks, remove when upgrading getRelHeaders relativeHeaderFetcherFn, getAbsHeaders absoluteHeaderFetcherFn, getBlockBodies blockBodyFetcherFn, - getReceipts receiptFetcherFn) *peer { + getReceipts receiptFetcherFn, getNodeData stateFetcherFn) *peer { return &peer{ id: id, head: head, blockCapacity: 1, receiptCapacity: 1, + stateCapacity: 1, ignored: set.New(), getRelHashes: getRelHashes, @@ -99,6 +106,7 @@ func newPeer(id string, version int, head common.Hash, getBlockBodies: getBlockBodies, getReceipts: getReceipts, + getNodeData: getNodeData, version: version, } @@ -110,6 +118,7 @@ func (p *peer) Reset() { atomic.StoreInt32(&p.receiptIdle, 0) atomic.StoreInt32(&p.blockCapacity, 1) atomic.StoreInt32(&p.receiptCapacity, 1) + atomic.StoreInt32(&p.stateCapacity, 1) p.ignored.Clear() } @@ -167,6 +176,24 @@ func (p *peer) FetchReceipts(request *fetchRequest) error { return nil } +// FetchNodeData sends a node state data retrieval request to the remote peer. +func (p *peer) FetchNodeData(request *fetchRequest) error { + // Short circuit if the peer is already fetching + if !atomic.CompareAndSwapInt32(&p.stateIdle, 0, 1) { + return errAlreadyFetching + } + p.stateStarted = time.Now() + + // Convert the hash set to a retrievable slice + hashes := make([]common.Hash, 0, len(request.Hashes)) + for hash, _ := range request.Hashes { + hashes = append(hashes, hash) + } + go p.getNodeData(hashes) + + return nil +} + // SetBlocksIdle sets the peer to idle, allowing it to execute new retrieval requests. // Its block retrieval allowance will also be updated either up- or downwards, // depending on whether the previous fetch completed in time or not. @@ -188,6 +215,13 @@ func (p *peer) SetReceiptsIdle() { p.setIdle(p.receiptStarted, receiptSoftTTL, receiptHardTTL, MaxReceiptFetch, &p.receiptCapacity, &p.receiptIdle) } +// SetNodeDataIdle sets the peer to idle, allowing it to execute new retrieval +// requests. Its node data retrieval allowance will also be updated either up- or +// downwards, depending on whether the previous fetch completed in time or not. +func (p *peer) SetNodeDataIdle() { + p.setIdle(p.stateStarted, stateSoftTTL, stateSoftTTL, MaxStateFetch, &p.stateCapacity, &p.stateIdle) +} + // setIdle sets the peer to idle, allowing it to execute new retrieval requests. // Its data retrieval allowance will also be updated either up- or downwards, // depending on whether the previous fetch completed in time or not. @@ -230,6 +264,12 @@ func (p *peer) ReceiptCapacity() int { return int(atomic.LoadInt32(&p.receiptCapacity)) } +// NodeDataCapacity retrieves the peers block download allowance based on its +// previously discovered bandwidth capacity. +func (p *peer) NodeDataCapacity() int { + return int(atomic.LoadInt32(&p.stateCapacity)) +} + // Promote increases the peer's reputation. func (p *peer) Promote() { atomic.AddInt32(&p.rep, 1) @@ -340,39 +380,50 @@ func (ps *peerSet) AllPeers() []*peer { // BlockIdlePeers retrieves a flat list of all the currently idle peers within the // active peer set, ordered by their reputation. -func (ps *peerSet) BlockIdlePeers(version int) ([]*peer, int) { - ps.lock.RLock() - defer ps.lock.RUnlock() - - idle, total := make([]*peer, 0, len(ps.peers)), 0 - for _, p := range ps.peers { - if (version == 61 && p.version == 61) || (version >= 62 && p.version >= 62) { - if atomic.LoadInt32(&p.blockIdle) == 0 { - idle = append(idle, p) - } - total++ - } +func (ps *peerSet) BlockIdlePeers() ([]*peer, int) { + idle := func(p *peer) bool { + return atomic.LoadInt32(&p.blockIdle) == 0 } - for i := 0; i < len(idle); i++ { - for j := i + 1; j < len(idle); j++ { - if atomic.LoadInt32(&idle[i].rep) < atomic.LoadInt32(&idle[j].rep) { - idle[i], idle[j] = idle[j], idle[i] - } - } + return ps.idlePeers(61, 61, idle) +} + +// BodyIdlePeers retrieves a flat list of all the currently body-idle peers within +// the active peer set, ordered by their reputation. +func (ps *peerSet) BodyIdlePeers() ([]*peer, int) { + idle := func(p *peer) bool { + return atomic.LoadInt32(&p.blockIdle) == 0 } - return idle, total + return ps.idlePeers(62, 64, idle) } -// ReceiptIdlePeers retrieves a flat list of all the currently idle peers within the -// active peer set, ordered by their reputation. +// ReceiptIdlePeers retrieves a flat list of all the currently receipt-idle peers +// within the active peer set, ordered by their reputation. func (ps *peerSet) ReceiptIdlePeers() ([]*peer, int) { + idle := func(p *peer) bool { + return atomic.LoadInt32(&p.receiptIdle) == 0 + } + return ps.idlePeers(63, 64, idle) +} + +// NodeDataIdlePeers retrieves a flat list of all the currently node-data-idle +// peers within the active peer set, ordered by their reputation. +func (ps *peerSet) NodeDataIdlePeers() ([]*peer, int) { + idle := func(p *peer) bool { + return atomic.LoadInt32(&p.stateIdle) == 0 + } + return ps.idlePeers(63, 64, idle) +} + +// idlePeers retrieves a flat list of all currently idle peers satisfying the +// protocol version constraints, using the provided function to check idleness. +func (ps *peerSet) idlePeers(minProtocol, maxProtocol int, idleCheck func(*peer) bool) ([]*peer, int) { ps.lock.RLock() defer ps.lock.RUnlock() idle, total := make([]*peer, 0, len(ps.peers)), 0 for _, p := range ps.peers { - if p.version >= 63 { - if atomic.LoadInt32(&p.receiptIdle) == 0 { + if p.version >= minProtocol && p.version <= maxProtocol { + if idleCheck(p) { idle = append(idle, p) } total++ diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go index c53ad939e..942ed0d63 100644 --- a/eth/downloader/queue.go +++ b/eth/downloader/queue.go @@ -26,9 +26,13 @@ import ( "time" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" + "github.com/ethereum/go-ethereum/trie" "github.com/rcrowley/go-metrics" "gopkg.in/karalabe/cookiejar.v2/collections/prque" ) @@ -39,13 +43,14 @@ var ( var ( errNoFetchesPending = errors.New("no fetches pending") + errStateSyncPending = errors.New("state trie sync already scheduled") errStaleDelivery = errors.New("stale delivery") ) // fetchRequest is a currently running data retrieval operation. type fetchRequest struct { Peer *peer // Peer to which the request was sent - Hashes map[common.Hash]int // [eth/61] Requested block with their insertion index (priority) + Hashes map[common.Hash]int // [eth/61] Requested hashes with their insertion index (priority) Headers []*types.Header // [eth/62] Requested headers, sorted by request order Time time.Time // Time when the request was made } @@ -64,6 +69,9 @@ type fetchResult struct { // queue represents hashes that are either need fetching or are being fetched type queue struct { + mode SyncMode // Synchronisation mode to decide on the block parts to schedule for fetching + fastSyncPivot uint64 // Block number where the fast sync pivots into archive synchronisation mode + hashPool map[common.Hash]int // [eth/61] Pending hashes, mapping to their insertion index (priority) hashQueue *prque.Prque // [eth/61] Priority queue of the block hashes to fetch hashCounter int // [eth/61] Counter indexing the added hashes to ensure retrieval order @@ -80,15 +88,22 @@ type queue struct { receiptPendPool map[string]*fetchRequest // [eth/63] Currently pending receipt retrieval operations receiptDonePool map[common.Hash]struct{} // [eth/63] Set of the completed receipt fetches + stateTaskIndex int // [eth/63] Counter indexing the added hashes to ensure prioritized retrieval order + stateTaskPool map[common.Hash]int // [eth/63] Pending node data retrieval tasks, mapping to their priority + stateTaskQueue *prque.Prque // [eth/63] Priority queue of the hashes to fetch the node data for + statePendPool map[string]*fetchRequest // [eth/63] Currently pending node data retrieval operations + + stateDatabase ethdb.Database // [eth/63] Trie database to populate during state reassembly + stateScheduler *state.StateSync // [eth/63] State trie synchronisation scheduler and integrator + resultCache []*fetchResult // Downloaded but not yet delivered fetch results resultOffset uint64 // Offset of the first cached fetch result in the block-chain - resultParts int // Number of fetch components required to complete an item lock sync.RWMutex } // newQueue creates a new download queue for scheduling block retrieval. -func newQueue() *queue { +func newQueue(stateDb ethdb.Database) *queue { return &queue{ hashPool: make(map[common.Hash]int), hashQueue: prque.New(), @@ -100,6 +115,10 @@ func newQueue() *queue { receiptTaskQueue: prque.New(), receiptPendPool: make(map[string]*fetchRequest), receiptDonePool: make(map[common.Hash]struct{}), + stateTaskPool: make(map[common.Hash]int), + stateTaskQueue: prque.New(), + statePendPool: make(map[string]*fetchRequest), + stateDatabase: stateDb, resultCache: make([]*fetchResult, blockCacheLimit), } } @@ -109,6 +128,9 @@ func (q *queue) Reset() { q.lock.Lock() defer q.lock.Unlock() + q.mode = FullSync + q.fastSyncPivot = 0 + q.hashPool = make(map[common.Hash]int) q.hashQueue.Reset() q.hashCounter = 0 @@ -125,9 +147,14 @@ func (q *queue) Reset() { q.receiptPendPool = make(map[string]*fetchRequest) q.receiptDonePool = make(map[common.Hash]struct{}) + q.stateTaskIndex = 0 + q.stateTaskPool = make(map[common.Hash]int) + q.stateTaskQueue.Reset() + q.statePendPool = make(map[string]*fetchRequest) + q.stateScheduler = nil + q.resultCache = make([]*fetchResult, blockCacheLimit) q.resultOffset = 0 - q.resultParts = 0 } // PendingBlocks retrieves the number of block (body) requests pending for retrieval. @@ -146,12 +173,20 @@ func (q *queue) PendingReceipts() int { return q.receiptTaskQueue.Size() } +// PendingNodeData retrieves the number of node data entries pending for retrieval. +func (q *queue) PendingNodeData() int { + q.lock.RLock() + defer q.lock.RUnlock() + + return q.stateTaskQueue.Size() +} + // InFlight retrieves the number of fetch requests currently in flight. func (q *queue) InFlight() int { q.lock.RLock() defer q.lock.RUnlock() - return len(q.blockPendPool) + len(q.receiptPendPool) + return len(q.blockPendPool) + len(q.receiptPendPool) + len(q.statePendPool) } // Idle returns if the queue is fully idle or has some data still inside. This @@ -160,8 +195,8 @@ func (q *queue) Idle() bool { q.lock.RLock() defer q.lock.RUnlock() - queued := q.hashQueue.Size() + q.blockTaskQueue.Size() + q.receiptTaskQueue.Size() - pending := len(q.blockPendPool) + len(q.receiptPendPool) + queued := q.hashQueue.Size() + q.blockTaskQueue.Size() + q.receiptTaskQueue.Size() + q.stateTaskQueue.Size() + pending := len(q.blockPendPool) + len(q.receiptPendPool) + len(q.statePendPool) cached := len(q.blockDonePool) + len(q.receiptDonePool) return (queued + pending + cached) == 0 @@ -227,7 +262,7 @@ func (q *queue) Schedule61(hashes []common.Hash, fifo bool) []common.Hash { // Schedule adds a set of headers for the download queue for scheduling, returning // the new headers encountered. -func (q *queue) Schedule(headers []*types.Header, from uint64, receipts bool) []*types.Header { +func (q *queue) Schedule(headers []*types.Header, from uint64) []*types.Header { q.lock.Lock() defer q.lock.Unlock() @@ -256,10 +291,21 @@ func (q *queue) Schedule(headers []*types.Header, from uint64, receipts bool) [] // Queue the header for content retrieval q.blockTaskPool[hash] = header q.blockTaskQueue.Push(header, -float32(header.Number.Uint64())) - if receipts { + + if q.mode == FastSync && header.Number.Uint64() <= q.fastSyncPivot { + // Fast phase of the fast sync, retrieve receipts too q.receiptTaskPool[hash] = header q.receiptTaskQueue.Push(header, -float32(header.Number.Uint64())) } + if q.mode == FastSync && header.Number.Uint64() == q.fastSyncPivot { + // Pivoting point of the fast sync, retrieve the state tries + q.stateScheduler = state.NewStateSync(header.Root, q.stateDatabase) + for _, hash := range q.stateScheduler.Missing(0) { + q.stateTaskPool[hash] = q.stateTaskIndex + q.stateTaskQueue.Push(hash, -float32(q.stateTaskIndex)) + q.stateTaskIndex++ + } + } inserts = append(inserts, header) q.headerHead = hash from++ @@ -279,6 +325,9 @@ func (q *queue) GetHeadResult() *fetchResult { if q.resultCache[0].Pending > 0 { return nil } + if q.mode == FastSync && q.resultCache[0].Header.Number.Uint64() == q.fastSyncPivot && len(q.stateTaskPool) > 0 { + return nil + } return q.resultCache[0] } @@ -291,9 +340,18 @@ func (q *queue) TakeResults() []*fetchResult { // Accumulate all available results results := []*fetchResult{} for _, result := range q.resultCache { + // Stop if no more results are ready if result == nil || result.Pending > 0 { break } + // The fast sync pivot block may only be processed after state fetch completes + if q.mode == FastSync && result.Header.Number.Uint64() == q.fastSyncPivot && len(q.stateTaskPool) > 0 { + break + } + // If we've just inserted the fast sync pivot, stop as the following batch needs different insertion + if q.mode == FastSync && result.Header.Number.Uint64() == q.fastSyncPivot+1 && len(results) > 0 { + break + } results = append(results, result) hash := result.Header.Hash() @@ -312,31 +370,45 @@ func (q *queue) TakeResults() []*fetchResult { return results } -// Reserve61 reserves a set of hashes for the given peer, skipping any previously -// failed download. -func (q *queue) Reserve61(p *peer, count int) *fetchRequest { +// ReserveBlocks reserves a set of block hashes for the given peer, skipping any +// previously failed download. +func (q *queue) ReserveBlocks(p *peer, count int) *fetchRequest { + return q.reserveHashes(p, count, q.hashQueue, q.blockPendPool, len(q.resultCache)-len(q.blockDonePool)) +} + +// ReserveNodeData reserves a set of node data hashes for the given peer, skipping +// any previously failed download. +func (q *queue) ReserveNodeData(p *peer, count int) *fetchRequest { + return q.reserveHashes(p, count, q.stateTaskQueue, q.statePendPool, 0) +} + +// reserveHashes reserves a set of hashes for the given peer, skipping previously +// failed ones. +func (q *queue) reserveHashes(p *peer, count int, taskQueue *prque.Prque, pendPool map[string]*fetchRequest, maxPending int) *fetchRequest { q.lock.Lock() defer q.lock.Unlock() // Short circuit if the pool has been depleted, or if the peer's already // downloading something (sanity check not to corrupt state) - if q.hashQueue.Empty() { + if taskQueue.Empty() { return nil } - if _, ok := q.blockPendPool[p.id]; ok { + if _, ok := pendPool[p.id]; ok { return nil } // Calculate an upper limit on the hashes we might fetch (i.e. throttling) - space := len(q.resultCache) - len(q.blockDonePool) - for _, request := range q.blockPendPool { - space -= len(request.Hashes) + allowance := maxPending + if allowance > 0 { + for _, request := range pendPool { + allowance -= len(request.Hashes) + } } // Retrieve a batch of hashes, skipping previously failed ones send := make(map[common.Hash]int) skip := make(map[common.Hash]int) - for proc := 0; proc < space && len(send) < count && !q.hashQueue.Empty(); proc++ { - hash, priority := q.hashQueue.Pop() + for proc := 0; (allowance == 0 || proc < allowance) && len(send) < count && !taskQueue.Empty(); proc++ { + hash, priority := taskQueue.Pop() if p.ignored.Has(hash) { skip[hash.(common.Hash)] = int(priority) } else { @@ -345,7 +417,7 @@ func (q *queue) Reserve61(p *peer, count int) *fetchRequest { } // Merge all the skipped hashes back for hash, index := range skip { - q.hashQueue.Push(hash, float32(index)) + taskQueue.Push(hash, float32(index)) } // Assemble and return the block download request if len(send) == 0 { @@ -356,19 +428,19 @@ func (q *queue) Reserve61(p *peer, count int) *fetchRequest { Hashes: send, Time: time.Now(), } - q.blockPendPool[p.id] = request + pendPool[p.id] = request return request } -// ReserveBlocks reserves a set of body fetches for the given peer, skipping any +// ReserveBodies reserves a set of body fetches for the given peer, skipping any // previously failed downloads. Beside the next batch of needed fetches, it also // returns a flag whether empty blocks were queued requiring processing. -func (q *queue) ReserveBlocks(p *peer, count int) (*fetchRequest, bool, error) { +func (q *queue) ReserveBodies(p *peer, count int) (*fetchRequest, bool, error) { noop := func(header *types.Header) bool { return header.TxHash == types.EmptyRootHash && header.UncleHash == types.EmptyUncleHash } - return q.reserveFetch(p, count, q.blockTaskPool, q.blockTaskQueue, q.blockPendPool, q.blockDonePool, noop) + return q.reserveHeaders(p, count, q.blockTaskPool, q.blockTaskQueue, q.blockPendPool, q.blockDonePool, noop) } // ReserveReceipts reserves a set of receipt fetches for the given peer, skipping @@ -378,13 +450,13 @@ func (q *queue) ReserveReceipts(p *peer, count int) (*fetchRequest, bool, error) noop := func(header *types.Header) bool { return header.ReceiptHash == types.EmptyRootHash } - return q.reserveFetch(p, count, q.receiptTaskPool, q.receiptTaskQueue, q.receiptPendPool, q.receiptDonePool, noop) + return q.reserveHeaders(p, count, q.receiptTaskPool, q.receiptTaskQueue, q.receiptPendPool, q.receiptDonePool, noop) } -// reserveFetch reserves a set of data download operations for a given peer, +// reserveHeaders reserves a set of data download operations for a given peer, // skipping any previously failed ones. This method is a generic version used // by the individual special reservation functions. -func (q *queue) reserveFetch(p *peer, count int, taskPool map[common.Hash]*types.Header, taskQueue *prque.Prque, +func (q *queue) reserveHeaders(p *peer, count int, taskPool map[common.Hash]*types.Header, taskQueue *prque.Prque, pendPool map[string]*fetchRequest, donePool map[common.Hash]struct{}, noop func(*types.Header) bool) (*fetchRequest, bool, error) { q.lock.Lock() defer q.lock.Unlock() @@ -416,8 +488,12 @@ func (q *queue) reserveFetch(p *peer, count int, taskPool map[common.Hash]*types return nil, false, errInvalidChain } if q.resultCache[index] == nil { + components := 1 + if q.mode == FastSync && header.Number.Uint64() <= q.fastSyncPivot { + components = 2 + } q.resultCache[index] = &fetchResult{ - Pending: q.resultParts, + Pending: components, Header: header, } } @@ -456,30 +532,36 @@ func (q *queue) reserveFetch(p *peer, count int, taskPool map[common.Hash]*types return request, progress, nil } -// Cancel61 aborts a fetch request, returning all pending hashes to the queue. -func (q *queue) Cancel61(request *fetchRequest) { - q.cancel(request, nil, q.blockPendPool) +// CancelBlocks aborts a fetch request, returning all pending hashes to the queue. +func (q *queue) CancelBlocks(request *fetchRequest) { + q.cancel(request, q.hashQueue, q.blockPendPool) } -// CancelBlocks aborts a body fetch request, returning all pending hashes to the +// CancelBodies aborts a body fetch request, returning all pending headers to the // task queue. -func (q *queue) CancelBlocks(request *fetchRequest) { +func (q *queue) CancelBodies(request *fetchRequest) { q.cancel(request, q.blockTaskQueue, q.blockPendPool) } -// CancelReceipts aborts a body fetch request, returning all pending hashes to +// CancelReceipts aborts a body fetch request, returning all pending headers to // the task queue. func (q *queue) CancelReceipts(request *fetchRequest) { q.cancel(request, q.receiptTaskQueue, q.receiptPendPool) } +// CancelNodeData aborts a node state data fetch request, returning all pending +// hashes to the task queue. +func (q *queue) CancelNodeData(request *fetchRequest) { + q.cancel(request, q.stateTaskQueue, q.statePendPool) +} + // Cancel aborts a fetch request, returning all pending hashes to the task queue. func (q *queue) cancel(request *fetchRequest, taskQueue *prque.Prque, pendPool map[string]*fetchRequest) { q.lock.Lock() defer q.lock.Unlock() for hash, index := range request.Hashes { - q.hashQueue.Push(hash, float32(index)) + taskQueue.Push(hash, float32(index)) } for _, header := range request.Headers { taskQueue.Push(header, -float32(header.Number.Uint64())) @@ -509,29 +591,41 @@ func (q *queue) Revoke(peerId string) { } delete(q.receiptPendPool, peerId) } + if request, ok := q.statePendPool[peerId]; ok { + for hash, index := range request.Hashes { + q.stateTaskQueue.Push(hash, float32(index)) + } + delete(q.statePendPool, peerId) + } } -// Expire61 checks for in flight requests that exceeded a timeout allowance, +// ExpireBlocks checks for in flight requests that exceeded a timeout allowance, // canceling them and returning the responsible peers for penalization. -func (q *queue) Expire61(timeout time.Duration) []string { - return q.expire(timeout, q.blockPendPool, nil) +func (q *queue) ExpireBlocks(timeout time.Duration) []string { + return q.expire(timeout, q.blockPendPool, q.hashQueue, blockTimeoutMeter) } -// ExpireBlocks checks for in flight block body requests that exceeded a timeout +// ExpireBodies checks for in flight block body requests that exceeded a timeout // allowance, canceling them and returning the responsible peers for penalization. -func (q *queue) ExpireBlocks(timeout time.Duration) []string { - return q.expire(timeout, q.blockPendPool, q.blockTaskQueue) +func (q *queue) ExpireBodies(timeout time.Duration) []string { + return q.expire(timeout, q.blockPendPool, q.blockTaskQueue, bodyTimeoutMeter) } // ExpireReceipts checks for in flight receipt requests that exceeded a timeout // allowance, canceling them and returning the responsible peers for penalization. func (q *queue) ExpireReceipts(timeout time.Duration) []string { - return q.expire(timeout, q.receiptPendPool, q.receiptTaskQueue) + return q.expire(timeout, q.receiptPendPool, q.receiptTaskQueue, receiptTimeoutMeter) +} + +// ExpireNodeData checks for in flight node data requests that exceeded a timeout +// allowance, canceling them and returning the responsible peers for penalization. +func (q *queue) ExpireNodeData(timeout time.Duration) []string { + return q.expire(timeout, q.statePendPool, q.stateTaskQueue, stateTimeoutMeter) } // expire is the generic check that move expired tasks from a pending pool back // into a task pool, returning all entities caught with expired tasks. -func (q *queue) expire(timeout time.Duration, pendPool map[string]*fetchRequest, taskQueue *prque.Prque) []string { +func (q *queue) expire(timeout time.Duration, pendPool map[string]*fetchRequest, taskQueue *prque.Prque, timeoutMeter metrics.Meter) []string { q.lock.Lock() defer q.lock.Unlock() @@ -540,14 +634,11 @@ func (q *queue) expire(timeout time.Duration, pendPool map[string]*fetchRequest, for id, request := range pendPool { if time.Since(request.Time) > timeout { // Update the metrics with the timeout - if len(request.Hashes) > 0 { - blockTimeoutMeter.Mark(1) - } else { - bodyTimeoutMeter.Mark(1) - } + timeoutMeter.Mark(1) + // Return any non satisfied requests to the pool for hash, index := range request.Hashes { - q.hashQueue.Push(hash, float32(index)) + taskQueue.Push(hash, float32(index)) } for _, header := range request.Headers { taskQueue.Push(header, -float32(header.Number.Uint64())) @@ -562,8 +653,8 @@ func (q *queue) expire(timeout time.Duration, pendPool map[string]*fetchRequest, return peers } -// Deliver61 injects a block retrieval response into the download queue. -func (q *queue) Deliver61(id string, blocks []*types.Block) (err error) { +// DeliverBlocks injects a block retrieval response into the download queue. +func (q *queue) DeliverBlocks(id string, blocks []*types.Block) error { q.lock.Lock() defer q.lock.Unlock() @@ -626,8 +717,8 @@ func (q *queue) Deliver61(id string, blocks []*types.Block) (err error) { } } -// DeliverBlocks injects a block (body) retrieval response into the results queue. -func (q *queue) DeliverBlocks(id string, txLists [][]*types.Transaction, uncleLists [][]*types.Header) error { +// DeliverBodies injects a block body retrieval response into the results queue. +func (q *queue) DeliverBodies(id string, txLists [][]*types.Transaction, uncleLists [][]*types.Header) error { reconstruct := func(header *types.Header, index int, result *fetchResult) error { if types.DeriveSha(types.Transactions(txLists[index])) != header.TxHash || types.CalcUncleHash(uncleLists[index]) != header.UncleHash { return errInvalidBody @@ -717,14 +808,84 @@ func (q *queue) deliver(id string, taskPool map[common.Hash]*types.Header, taskQ } } +// DeliverNodeData injects a node state data retrieval response into the queue. +func (q *queue) DeliverNodeData(id string, data [][]byte) (int, int, error) { + q.lock.Lock() + defer q.lock.Unlock() + + // Short circuit if the data was never requested + request := q.statePendPool[id] + if request == nil { + return 0, 0, errNoFetchesPending + } + stateReqTimer.UpdateSince(request.Time) + delete(q.statePendPool, id) + + // If no data was retrieved, mark them as unavailable for the origin peer + if len(data) == 0 { + for hash, _ := range request.Hashes { + request.Peer.ignored.Add(hash) + } + } + // Iterate over the downloaded data and verify each of them + errs := make([]error, 0) + processed := 0 + for _, blob := range data { + // Skip any blocks that were not requested + hash := common.BytesToHash(crypto.Sha3(blob)) + if _, ok := request.Hashes[hash]; !ok { + errs = append(errs, fmt.Errorf("non-requested state data %x", hash)) + continue + } + // Inject the next state trie item into the database + if err := q.stateScheduler.Process([]trie.SyncResult{{hash, blob}}); err != nil { + errs = []error{err} + break + } + processed++ + + delete(request.Hashes, hash) + delete(q.stateTaskPool, hash) + } + // Return all failed or missing fetches to the queue + for hash, index := range request.Hashes { + q.stateTaskQueue.Push(hash, float32(index)) + } + // Also enqueue any newly required state trie nodes + discovered := 0 + if len(q.stateTaskPool) < maxQueuedStates { + for _, hash := range q.stateScheduler.Missing(4 * MaxStateFetch) { + q.stateTaskPool[hash] = q.stateTaskIndex + q.stateTaskQueue.Push(hash, -float32(q.stateTaskIndex)) + q.stateTaskIndex++ + discovered++ + } + } + // If none of the data items were good, it's a stale delivery + switch { + case len(errs) == 0: + return processed, discovered, nil + + case len(errs) == len(request.Hashes): + return processed, discovered, errStaleDelivery + + default: + return processed, discovered, fmt.Errorf("multiple failures: %v", errs) + } +} + // Prepare configures the result cache to allow accepting and caching inbound // fetch results. -func (q *queue) Prepare(offset uint64, parts int) { +func (q *queue) Prepare(offset uint64, mode SyncMode, pivot uint64) { q.lock.Lock() defer q.lock.Unlock() if q.resultOffset < offset { q.resultOffset = offset } - q.resultParts = parts + q.fastSyncPivot = 0 + if mode == FastSync { + q.fastSyncPivot = pivot + } + q.mode = mode } diff --git a/eth/downloader/types.go b/eth/downloader/types.go new file mode 100644 index 000000000..221ef38f6 --- /dev/null +++ b/eth/downloader/types.go @@ -0,0 +1,137 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package downloader + +import ( + "fmt" + "math/big" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" +) + +// headerCheckFn is a callback type for verifying a header's presence in the local chain. +type headerCheckFn func(common.Hash) bool + +// blockCheckFn is a callback type for verifying a block's presence in the local chain. +type blockCheckFn func(common.Hash) bool + +// headerRetrievalFn is a callback type for retrieving a header from the local chain. +type headerRetrievalFn func(common.Hash) *types.Header + +// blockRetrievalFn is a callback type for retrieving a block from the local chain. +type blockRetrievalFn func(common.Hash) *types.Block + +// headHeaderRetrievalFn is a callback type for retrieving the head header from the local chain. +type headHeaderRetrievalFn func() *types.Header + +// headBlockRetrievalFn is a callback type for retrieving the head block from the local chain. +type headBlockRetrievalFn func() *types.Block + +// headFastBlockRetrievalFn is a callback type for retrieving the head fast block from the local chain. +type headFastBlockRetrievalFn func() *types.Block + +// headBlockCommitterFn is a callback for directly committing the head block to a certain entity. +type headBlockCommitterFn func(common.Hash) error + +// tdRetrievalFn is a callback type for retrieving the total difficulty of a local block. +type tdRetrievalFn func(common.Hash) *big.Int + +// headerChainInsertFn is a callback type to insert a batch of headers into the local chain. +type headerChainInsertFn func([]*types.Header, bool) (int, error) + +// blockChainInsertFn is a callback type to insert a batch of blocks into the local chain. +type blockChainInsertFn func(types.Blocks) (int, error) + +// receiptChainInsertFn is a callback type to insert a batch of receipts into the local chain. +type receiptChainInsertFn func(types.Blocks, []types.Receipts) (int, error) + +// peerDropFn is a callback type for dropping a peer detected as malicious. +type peerDropFn func(id string) + +// dataPack is a data message returned by a peer for some query. +type dataPack interface { + PeerId() string + Items() int + Stats() string +} + +// hashPack is a batch of block hashes returned by a peer (eth/61). +type hashPack struct { + peerId string + hashes []common.Hash +} + +func (p *hashPack) PeerId() string { return p.peerId } +func (p *hashPack) Items() int { return len(p.hashes) } +func (p *hashPack) Stats() string { return fmt.Sprintf("%d", len(p.hashes)) } + +// blockPack is a batch of blocks returned by a peer (eth/61). +type blockPack struct { + peerId string + blocks []*types.Block +} + +func (p *blockPack) PeerId() string { return p.peerId } +func (p *blockPack) Items() int { return len(p.blocks) } +func (p *blockPack) Stats() string { return fmt.Sprintf("%d", len(p.blocks)) } + +// headerPack is a batch of block headers returned by a peer. +type headerPack struct { + peerId string + headers []*types.Header +} + +func (p *headerPack) PeerId() string { return p.peerId } +func (p *headerPack) Items() int { return len(p.headers) } +func (p *headerPack) Stats() string { return fmt.Sprintf("%d", len(p.headers)) } + +// bodyPack is a batch of block bodies returned by a peer. +type bodyPack struct { + peerId string + transactions [][]*types.Transaction + uncles [][]*types.Header +} + +func (p *bodyPack) PeerId() string { return p.peerId } +func (p *bodyPack) Items() int { + if len(p.transactions) <= len(p.uncles) { + return len(p.transactions) + } + return len(p.uncles) +} +func (p *bodyPack) Stats() string { return fmt.Sprintf("%d:%d", len(p.transactions), len(p.uncles)) } + +// receiptPack is a batch of receipts returned by a peer. +type receiptPack struct { + peerId string + receipts [][]*types.Receipt +} + +func (p *receiptPack) PeerId() string { return p.peerId } +func (p *receiptPack) Items() int { return len(p.receipts) } +func (p *receiptPack) Stats() string { return fmt.Sprintf("%d", len(p.receipts)) } + +// statePack is a batch of states returned by a peer. +type statePack struct { + peerId string + states [][]byte +} + +func (p *statePack) PeerId() string { return p.peerId } +func (p *statePack) Items() int { return len(p.states) } +func (p *statePack) Stats() string { return fmt.Sprintf("%d", len(p.states)) } diff --git a/eth/handler.go b/eth/handler.go index 1117cb1b7..b0916d50b 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -129,9 +129,9 @@ func NewProtocolManager(mode Mode, networkId int, mux *event.TypeMux, txpool txP case LightMode: syncMode = downloader.LightSync } - manager.downloader = downloader.New(syncMode, manager.eventMux, blockchain.HasHeader, blockchain.HasBlock, blockchain.GetHeader, - blockchain.GetBlock, blockchain.CurrentHeader, blockchain.CurrentBlock, blockchain.CurrentFastBlock, blockchain.GetTd, - blockchain.InsertHeaderChain, blockchain.InsertChain, blockchain.InsertReceiptChain, manager.removePeer) + manager.downloader = downloader.New(syncMode, chaindb, manager.eventMux, blockchain.HasHeader, blockchain.HasBlock, blockchain.GetHeader, + blockchain.GetBlock, blockchain.CurrentHeader, blockchain.CurrentBlock, blockchain.CurrentFastBlock, blockchain.FastSyncCommitHead, + blockchain.GetTd, blockchain.InsertHeaderChain, blockchain.InsertChain, blockchain.InsertReceiptChain, manager.removePeer) validator := func(block *types.Block, parent *types.Block) error { return core.ValidateHeader(pow, block.Header(), parent.Header(), true, false) @@ -220,8 +220,8 @@ func (pm *ProtocolManager) handle(p *peer) error { // Register the peer in the downloader. If the downloader considers it banned, we disconnect if err := pm.downloader.RegisterPeer(p.id, p.version, p.Head(), - p.RequestHashes, p.RequestHashesFromNumber, p.RequestBlocks, - p.RequestHeadersByHash, p.RequestHeadersByNumber, p.RequestBodies, p.RequestReceipts); err != nil { + p.RequestHashes, p.RequestHashesFromNumber, p.RequestBlocks, p.RequestHeadersByHash, + p.RequestHeadersByNumber, p.RequestBodies, p.RequestReceipts, p.RequestNodeData); err != nil { return err } // Propagate existing transactions. new transactions appearing @@ -307,7 +307,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { break } // Deliver them all to the downloader for queuing - err := pm.downloader.DeliverHashes61(p.id, hashes) + err := pm.downloader.DeliverHashes(p.id, hashes) if err != nil { glog.V(logger.Debug).Infoln(err) } @@ -353,7 +353,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { } // Filter out any explicitly requested blocks, deliver the rest to the downloader if blocks := pm.fetcher.FilterBlocks(blocks); len(blocks) > 0 { - pm.downloader.DeliverBlocks61(p.id, blocks) + pm.downloader.DeliverBlocks(p.id, blocks) } // Block header query, collect the requested headers and reply @@ -515,6 +515,17 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { } return p.SendNodeData(data) + case p.version >= eth63 && msg.Code == NodeDataMsg: + // A batch of node state data arrived to one of our previous requests + var data [][]byte + if err := msg.Decode(&data); err != nil { + return errResp(ErrDecode, "msg %v: %v", msg, err) + } + // Deliver all to the downloader + if err := pm.downloader.DeliverNodeData(p.id, data); err != nil { + glog.V(logger.Debug).Infof("failed to deliver node state data: %v", err) + } + case p.version >= eth63 && msg.Code == GetReceiptsMsg: // Decode the retrieval message msgStream := rlp.NewStream(msg.Payload, uint64(msg.Size)) diff --git a/eth/peer.go b/eth/peer.go index e24be97f1..68ce903a6 100644 --- a/eth/peer.go +++ b/eth/peer.go @@ -191,7 +191,7 @@ func (p *peer) SendBlockBodiesRLP(bodies []rlp.RawValue) error { return p2p.Send(p.rw, BlockBodiesMsg, bodies) } -// SendNodeData sends a batch of arbitrary internal data, corresponding to the +// SendNodeDataRLP sends a batch of arbitrary internal data, corresponding to the // hashes requested. func (p *peer) SendNodeData(data [][]byte) error { return p2p.Send(p.rw, NodeDataMsg, data) diff --git a/trie/sync.go b/trie/sync.go new file mode 100644 index 000000000..65cfd6ed8 --- /dev/null +++ b/trie/sync.go @@ -0,0 +1,233 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package trie + +import ( + "fmt" + + "github.com/ethereum/go-ethereum/common" + "gopkg.in/karalabe/cookiejar.v2/collections/prque" +) + +// request represents a scheduled or already in-flight state retrieval request. +type request struct { + hash common.Hash // Hash of the node data content to retrieve + data []byte // Data content of the node, cached until all subtrees complete + object *node // Target node to populate with retrieved data (hashnode originally) + + parents []*request // Parent state nodes referencing this entry (notify all upon completion) + depth int // Depth level within the trie the node is located to prioritize DFS + deps int // Number of dependencies before allowed to commit this node + + callback TrieSyncLeafCallback // Callback to invoke if a leaf node it reached on this branch +} + +// SyncResult is a simple list to return missing nodes along with their request +// hashes. +type SyncResult struct { + Hash common.Hash // Hash of the originally unknown trie node + Data []byte // Data content of the retrieved node +} + +// TrieSyncLeafCallback is a callback type invoked when a trie sync reaches a +// leaf node. It's used by state syncing to check if the leaf node requires some +// further data syncing. +type TrieSyncLeafCallback func(leaf []byte, parent common.Hash) error + +// TrieSync is the main state trie synchronisation scheduler, which provides yet +// unknown trie hashes to retrieve, accepts node data associated with said hashes +// and reconstructs the trie steb by step until all is done. +type TrieSync struct { + database Database // State database for storing all the assembled node data + requests map[common.Hash]*request // Pending requests pertaining to a key hash + queue *prque.Prque // Priority queue with the pending requests +} + +// NewTrieSync creates a new trie data download scheduler. +func NewTrieSync(root common.Hash, database Database, callback TrieSyncLeafCallback) *TrieSync { + ts := &TrieSync{ + database: database, + requests: make(map[common.Hash]*request), + queue: prque.New(), + } + ts.AddSubTrie(root, 0, common.Hash{}, callback) + return ts +} + +// AddSubTrie registers a new trie to the sync code, rooted at the designated parent. +func (s *TrieSync) AddSubTrie(root common.Hash, depth int, parent common.Hash, callback TrieSyncLeafCallback) { + // Short circuit if the trie is empty + if root == emptyRoot { + return + } + // Assemble the new sub-trie sync request + node := node(hashNode(root.Bytes())) + req := &request{ + object: &node, + hash: root, + depth: depth, + callback: callback, + } + // If this sub-trie has a designated parent, link them together + if parent != (common.Hash{}) { + ancestor := s.requests[parent] + if ancestor == nil { + panic(fmt.Sprintf("sub-trie ancestor not found: %x", parent)) + } + ancestor.deps++ + req.parents = append(req.parents, ancestor) + } + s.schedule(req) +} + +// Missing retrieves the known missing nodes from the trie for retrieval. +func (s *TrieSync) Missing(max int) []common.Hash { + requests := []common.Hash{} + for !s.queue.Empty() && (max == 0 || len(requests) < max) { + requests = append(requests, s.queue.PopItem().(common.Hash)) + } + return requests +} + +// Process injects a batch of retrieved trie nodes data. +func (s *TrieSync) Process(results []SyncResult) (int, error) { + for i, item := range results { + // If the item was not requested, bail out + request := s.requests[item.Hash] + if request == nil { + return i, fmt.Errorf("not requested: %x", item.Hash) + } + // Decode the node data content and update the request + node, err := decodeNode(item.Data) + if err != nil { + return i, err + } + *request.object = node + request.data = item.Data + + // Create and schedule a request for all the children nodes + requests, err := s.children(request) + if err != nil { + return i, err + } + if len(requests) == 0 && request.deps == 0 { + s.commit(request) + continue + } + request.deps += len(requests) + for _, child := range requests { + s.schedule(child) + } + } + return 0, nil +} + +// schedule inserts a new state retrieval request into the fetch queue. If there +// is already a pending request for this node, the new request will be discarded +// and only a parent reference added to the old one. +func (s *TrieSync) schedule(req *request) { + // If we're already requesting this node, add a new reference and stop + if old, ok := s.requests[req.hash]; ok { + old.parents = append(old.parents, req.parents...) + return + } + // Schedule the request for future retrieval + s.queue.Push(req.hash, float32(req.depth)) + s.requests[req.hash] = req +} + +// children retrieves all the missing children of a state trie entry for future +// retrieval scheduling. +func (s *TrieSync) children(req *request) ([]*request, error) { + // Gather all the children of the node, irrelevant whether known or not + type child struct { + node *node + depth int + } + children := []child{} + + switch node := (*req.object).(type) { + case shortNode: + children = []child{{ + node: &node.Val, + depth: req.depth + len(node.Key), + }} + case fullNode: + for i := 0; i < 17; i++ { + if node[i] != nil { + children = append(children, child{ + node: &node[i], + depth: req.depth + 1, + }) + } + } + default: + panic(fmt.Sprintf("unknown node: %+v", node)) + } + // Iterate over the children, and request all unknown ones + requests := make([]*request, 0, len(children)) + for _, child := range children { + // Notify any external watcher of a new key/value node + if req.callback != nil { + if node, ok := (*child.node).(valueNode); ok { + if err := req.callback(node, req.hash); err != nil { + return nil, err + } + } + } + // If the child references another node, resolve or schedule + if node, ok := (*child.node).(hashNode); ok { + // Try to resolve the node from the local database + blob, _ := s.database.Get(node) + if local, err := decodeNode(blob); local != nil && err == nil { + *child.node = local + continue + } + // Locally unknown node, schedule for retrieval + requests = append(requests, &request{ + object: child.node, + hash: common.BytesToHash(node), + parents: []*request{req}, + depth: child.depth, + callback: req.callback, + }) + } + } + return requests, nil +} + +// commit finalizes a retrieval request and stores it into the database. If any +// of the referencing parent requests complete due to this commit, they are also +// committed themselves. +func (s *TrieSync) commit(req *request) error { + // Write the node content to disk + if err := s.database.Put(req.hash[:], req.data); err != nil { + return err + } + delete(s.requests, req.hash) + + // Check all parents for completion + for _, parent := range req.parents { + parent.deps-- + if parent.deps == 0 { + if err := s.commit(parent); err != nil { + return err + } + } + } + return nil +} diff --git a/trie/sync_test.go b/trie/sync_test.go new file mode 100644 index 000000000..9c036a3a9 --- /dev/null +++ b/trie/sync_test.go @@ -0,0 +1,257 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package trie + +import ( + "bytes" + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/ethdb" +) + +// makeTestTrie create a sample test trie to test node-wise reconstruction. +func makeTestTrie() (ethdb.Database, *Trie, map[string][]byte) { + // Create an empty trie + db, _ := ethdb.NewMemDatabase() + trie, _ := New(common.Hash{}, db) + + // Fill it with some arbitrary data + content := make(map[string][]byte) + for i := byte(0); i < 255; i++ { + key, val := common.LeftPadBytes([]byte{1, i}, 32), []byte{i} + content[string(key)] = val + trie.Update(key, val) + + key, val = common.LeftPadBytes([]byte{2, i}, 32), []byte{i} + content[string(key)] = val + trie.Update(key, val) + } + trie.Commit() + + // Return the generated trie + return db, trie, content +} + +// checkTrieContents cross references a reconstructed trie with an expected data +// content map. +func checkTrieContents(t *testing.T, db Database, root []byte, content map[string][]byte) { + trie, err := New(common.BytesToHash(root), db) + if err != nil { + t.Fatalf("failed to create trie at %x: %v", root, err) + } + for key, val := range content { + if have := trie.Get([]byte(key)); bytes.Compare(have, val) != 0 { + t.Errorf("entry %x: content mismatch: have %x, want %x", key, have, val) + } + } +} + +// Tests that an empty trie is not scheduled for syncing. +func TestEmptyTrieSync(t *testing.T) { + emptyA, _ := New(common.Hash{}, nil) + emptyB, _ := New(emptyRoot, nil) + + for i, trie := range []*Trie{emptyA, emptyB} { + db, _ := ethdb.NewMemDatabase() + if req := NewTrieSync(common.BytesToHash(trie.Root()), db, nil).Missing(1); len(req) != 0 { + t.Errorf("test %d: content requested for empty trie: %v", i, req) + } + } +} + +// Tests that given a root hash, a trie can sync iteratively on a single thread, +// requesting retrieval tasks and returning all of them in one go. +func TestIterativeTrieSyncIndividual(t *testing.T) { testIterativeTrieSync(t, 1) } +func TestIterativeTrieSyncBatched(t *testing.T) { testIterativeTrieSync(t, 100) } + +func testIterativeTrieSync(t *testing.T, batch int) { + // Create a random trie to copy + srcDb, srcTrie, srcData := makeTestTrie() + + // Create a destination trie and sync with the scheduler + dstDb, _ := ethdb.NewMemDatabase() + sched := NewTrieSync(common.BytesToHash(srcTrie.Root()), dstDb, nil) + + queue := append([]common.Hash{}, sched.Missing(batch)...) + for len(queue) > 0 { + results := make([]SyncResult, len(queue)) + for i, hash := range queue { + data, err := srcDb.Get(hash.Bytes()) + if err != nil { + t.Fatalf("failed to retrieve node data for %x: %v", hash, err) + } + results[i] = SyncResult{hash, data} + } + if index, err := sched.Process(results); err != nil { + t.Fatalf("failed to process result #%d: %v", index, err) + } + queue = append(queue[:0], sched.Missing(batch)...) + } + // Cross check that the two tries re in sync + checkTrieContents(t, dstDb, srcTrie.Root(), srcData) +} + +// Tests that the trie scheduler can correctly reconstruct the state even if only +// partial results are returned, and the others sent only later. +func TestIterativeDelayedTrieSync(t *testing.T) { + // Create a random trie to copy + srcDb, srcTrie, srcData := makeTestTrie() + + // Create a destination trie and sync with the scheduler + dstDb, _ := ethdb.NewMemDatabase() + sched := NewTrieSync(common.BytesToHash(srcTrie.Root()), dstDb, nil) + + queue := append([]common.Hash{}, sched.Missing(10000)...) + for len(queue) > 0 { + // Sync only half of the scheduled nodes + results := make([]SyncResult, len(queue)/2+1) + for i, hash := range queue[:len(results)] { + data, err := srcDb.Get(hash.Bytes()) + if err != nil { + t.Fatalf("failed to retrieve node data for %x: %v", hash, err) + } + results[i] = SyncResult{hash, data} + } + if index, err := sched.Process(results); err != nil { + t.Fatalf("failed to process result #%d: %v", index, err) + } + queue = append(queue[len(results):], sched.Missing(10000)...) + } + // Cross check that the two tries re in sync + checkTrieContents(t, dstDb, srcTrie.Root(), srcData) +} + +// Tests that given a root hash, a trie can sync iteratively on a single thread, +// requesting retrieval tasks and returning all of them in one go, however in a +// random order. +func TestIterativeRandomTrieSyncIndividual(t *testing.T) { testIterativeRandomTrieSync(t, 1) } +func TestIterativeRandomTrieSyncBatched(t *testing.T) { testIterativeRandomTrieSync(t, 100) } + +func testIterativeRandomTrieSync(t *testing.T, batch int) { + // Create a random trie to copy + srcDb, srcTrie, srcData := makeTestTrie() + + // Create a destination trie and sync with the scheduler + dstDb, _ := ethdb.NewMemDatabase() + sched := NewTrieSync(common.BytesToHash(srcTrie.Root()), dstDb, nil) + + queue := make(map[common.Hash]struct{}) + for _, hash := range sched.Missing(batch) { + queue[hash] = struct{}{} + } + for len(queue) > 0 { + // Fetch all the queued nodes in a random order + results := make([]SyncResult, 0, len(queue)) + for hash, _ := range queue { + data, err := srcDb.Get(hash.Bytes()) + if err != nil { + t.Fatalf("failed to retrieve node data for %x: %v", hash, err) + } + results = append(results, SyncResult{hash, data}) + } + // Feed the retrieved results back and queue new tasks + if index, err := sched.Process(results); err != nil { + t.Fatalf("failed to process result #%d: %v", index, err) + } + queue = make(map[common.Hash]struct{}) + for _, hash := range sched.Missing(batch) { + queue[hash] = struct{}{} + } + } + // Cross check that the two tries re in sync + checkTrieContents(t, dstDb, srcTrie.Root(), srcData) +} + +// Tests that the trie scheduler can correctly reconstruct the state even if only +// partial results are returned (Even those randomly), others sent only later. +func TestIterativeRandomDelayedTrieSync(t *testing.T) { + // Create a random trie to copy + srcDb, srcTrie, srcData := makeTestTrie() + + // Create a destination trie and sync with the scheduler + dstDb, _ := ethdb.NewMemDatabase() + sched := NewTrieSync(common.BytesToHash(srcTrie.Root()), dstDb, nil) + + queue := make(map[common.Hash]struct{}) + for _, hash := range sched.Missing(10000) { + queue[hash] = struct{}{} + } + for len(queue) > 0 { + // Sync only half of the scheduled nodes, even those in random order + results := make([]SyncResult, 0, len(queue)/2+1) + for hash, _ := range queue { + data, err := srcDb.Get(hash.Bytes()) + if err != nil { + t.Fatalf("failed to retrieve node data for %x: %v", hash, err) + } + results = append(results, SyncResult{hash, data}) + + if len(results) >= cap(results) { + break + } + } + // Feed the retrieved results back and queue new tasks + if index, err := sched.Process(results); err != nil { + t.Fatalf("failed to process result #%d: %v", index, err) + } + for _, result := range results { + delete(queue, result.Hash) + } + for _, hash := range sched.Missing(10000) { + queue[hash] = struct{}{} + } + } + // Cross check that the two tries re in sync + checkTrieContents(t, dstDb, srcTrie.Root(), srcData) +} + +// Tests that a trie sync will not request nodes multiple times, even if they +// have such references. +func TestDuplicateAvoidanceTrieSync(t *testing.T) { + // Create a random trie to copy + srcDb, srcTrie, srcData := makeTestTrie() + + // Create a destination trie and sync with the scheduler + dstDb, _ := ethdb.NewMemDatabase() + sched := NewTrieSync(common.BytesToHash(srcTrie.Root()), dstDb, nil) + + queue := append([]common.Hash{}, sched.Missing(0)...) + requested := make(map[common.Hash]struct{}) + + for len(queue) > 0 { + results := make([]SyncResult, len(queue)) + for i, hash := range queue { + data, err := srcDb.Get(hash.Bytes()) + if err != nil { + t.Fatalf("failed to retrieve node data for %x: %v", hash, err) + } + if _, ok := requested[hash]; ok { + t.Errorf("hash %x already requested once", hash) + } + requested[hash] = struct{}{} + + results[i] = SyncResult{hash, data} + } + if index, err := sched.Process(results); err != nil { + t.Fatalf("failed to process result #%d: %v", index, err) + } + queue = append(queue[:0], sched.Missing(0)...) + } + // Cross check that the two tries re in sync + checkTrieContents(t, dstDb, srcTrie.Root(), srcData) +} -- cgit v1.2.3 From b97e34a8e4d06b315cc495819ba6612f89dec54f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 7 Oct 2015 12:14:30 +0300 Subject: eth/downloader: concurrent receipt and state processing --- core/block_processor.go | 11 +- core/blockchain.go | 266 ++++++++++++++++++++++++++------------ core/blockchain_test.go | 29 +++-- core/chain_makers.go | 2 +- core/error.go | 2 +- core/state/sync.go | 93 +++++-------- core/state/sync_test.go | 16 +-- core/types/common.go | 2 + eth/downloader/downloader.go | 64 +++++---- eth/downloader/downloader_test.go | 4 +- eth/downloader/queue.go | 160 ++++++++++++++++------- eth/downloader/types.go | 2 +- ethdb/memory_database.go | 51 ++++++-- trie/sync.go | 68 ++++++++-- trie/trie.go | 5 + 15 files changed, 516 insertions(+), 259 deletions(-) diff --git a/core/block_processor.go b/core/block_processor.go index ba6350805..60f0258c4 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -383,6 +383,15 @@ func (sm *BlockProcessor) ValidateHeader(header *types.Header, checkPow, uncle b } } +// ValidateHeaderWithParent verifies the validity of a header, relying on the database and +// POW behind the block processor. +func (sm *BlockProcessor) ValidateHeaderWithParent(header, parent *types.Header, checkPow, uncle bool) error { + if sm.bc.HasHeader(header.Hash()) { + return nil + } + return ValidateHeader(sm.Pow, header, parent, checkPow, uncle) +} + // See YP section 4.3.4. "Block Header Validity" // Validates a header. Returns an error if the header is invalid. func ValidateHeader(pow pow.PoW, header *types.Header, parent *types.Header, checkPow, uncle bool) error { @@ -425,7 +434,7 @@ func ValidateHeader(pow pow.PoW, header *types.Header, parent *types.Header, che if checkPow { // Verify the nonce of the header. Return an error if it's not valid if !pow.Verify(types.NewBlockWithHeader(header)) { - return ValidationError("Header's nonce is invalid (= %x)", header.Nonce) + return &BlockNonceErr{Hash: header.Hash(), Number: header.Number, Nonce: header.Nonce.Uint64()} } } return nil diff --git a/core/blockchain.go b/core/blockchain.go index 6c8a24751..3e7dfa9ee 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -22,6 +22,8 @@ import ( "fmt" "io" "math/big" + "math/rand" + "runtime" "sync" "sync/atomic" "time" @@ -671,7 +673,7 @@ func (self *BlockChain) writeHeader(header *types.Header) error { // should be done or not. The reason behind the optional check is because some // of the header retrieval mechanisms already need to verfy nonces, as well as // because nonces can be verified sparsely, not needing to check each. -func (self *BlockChain) InsertHeaderChain(chain []*types.Header, verify bool) (int, error) { +func (self *BlockChain) InsertHeaderChain(chain []*types.Header, checkFreq int) (int, error) { self.wg.Add(1) defer self.wg.Done() @@ -683,16 +685,85 @@ func (self *BlockChain) InsertHeaderChain(chain []*types.Header, verify bool) (i stats := struct{ processed, ignored int }{} start := time.Now() - // Start the parallel nonce verifier, with a fake nonce if not requested - verifier := self.pow - if !verify { - verifier = FakePow{} + // Generate the list of headers that should be POW verified + verify := make([]bool, len(chain)) + for i := 0; i < len(verify)/checkFreq; i++ { + index := i*checkFreq + rand.Intn(checkFreq) + if index >= len(verify) { + index = len(verify) - 1 + } + verify[index] = true } - nonceAbort, nonceResults := verifyNoncesFromHeaders(verifier, chain) - defer close(nonceAbort) + verify[len(verify)-1] = true // Last should always be verified to avoid junk + + // Create the header verification task queue and worker functions + tasks := make(chan int, len(chain)) + for i := 0; i < len(chain); i++ { + tasks <- i + } + close(tasks) - // Iterate over the headers, inserting any new ones - complete := make([]bool, len(chain)) + errs, failed := make([]error, len(tasks)), int32(0) + process := func(worker int) { + for index := range tasks { + header, hash := chain[index], chain[index].Hash() + + // Short circuit insertion if shutting down or processing failed + if atomic.LoadInt32(&self.procInterrupt) == 1 { + return + } + if atomic.LoadInt32(&failed) > 0 { + return + } + // Short circuit if the header is bad or already known + if BadHashes[hash] { + errs[index] = BadHashError(hash) + atomic.AddInt32(&failed, 1) + return + } + if self.HasHeader(hash) { + continue + } + // Verify that the header honors the chain parameters + checkPow := verify[index] + + var err error + if index == 0 { + err = self.processor.ValidateHeader(header, checkPow, false) + } else { + err = self.processor.ValidateHeaderWithParent(header, chain[index-1], checkPow, false) + } + if err != nil { + errs[index] = err + atomic.AddInt32(&failed, 1) + return + } + } + } + // Start as many worker threads as goroutines allowed + pending := new(sync.WaitGroup) + for i := 0; i < runtime.GOMAXPROCS(0); i++ { + pending.Add(1) + go func(id int) { + defer pending.Done() + process(id) + }(i) + } + pending.Wait() + + // If anything failed, report + if atomic.LoadInt32(&self.procInterrupt) == 1 { + glog.V(logger.Debug).Infoln("premature abort during receipt chain processing") + return 0, nil + } + if failed > 0 { + for i, err := range errs { + if err != nil { + return i, err + } + } + } + // All headers passed verification, import them into the database for i, header := range chain { // Short circuit insertion if shutting down if atomic.LoadInt32(&self.procInterrupt) == 1 { @@ -701,24 +772,7 @@ func (self *BlockChain) InsertHeaderChain(chain []*types.Header, verify bool) (i } hash := header.Hash() - // Accumulate verification results until the next header is verified - for !complete[i] { - if res := <-nonceResults; res.valid { - complete[res.index] = true - } else { - header := chain[res.index] - return res.index, &BlockNonceErr{ - Hash: header.Hash(), - Number: new(big.Int).Set(header.Number), - Nonce: header.Nonce.Uint64(), - } - } - } - if BadHashes[hash] { - glog.V(logger.Error).Infof("bad header %d [%x…], known bad hash", header.Number, hash) - return i, BadHashError(hash) - } - // Write the header to the chain and get the status + // If the header's already known, skip it, otherwise store if self.HasHeader(hash) { stats.ignored++ continue @@ -743,76 +797,116 @@ func (self *BlockChain) InsertReceiptChain(blockChain types.Blocks, receiptChain defer self.wg.Done() // Collect some import statistics to report on - stats := struct{ processed, ignored int }{} + stats := struct{ processed, ignored int32 }{} start := time.Now() - // Iterate over the blocks and receipts, inserting any new ones + // Create the block importing task queue and worker functions + tasks := make(chan int, len(blockChain)) for i := 0; i < len(blockChain) && i < len(receiptChain); i++ { - block, receipts := blockChain[i], receiptChain[i] + tasks <- i + } + close(tasks) - // Short circuit insertion if shutting down - if atomic.LoadInt32(&self.procInterrupt) == 1 { - glog.V(logger.Debug).Infoln("premature abort during receipt chain processing") - break - } - // Short circuit if the owner header is unknown - if !self.HasHeader(block.Hash()) { - glog.V(logger.Debug).Infof("containing header #%d [%x…] unknown", block.Number(), block.Hash().Bytes()[:4]) - return i, fmt.Errorf("containing header #%d [%x…] unknown", block.Number(), block.Hash().Bytes()[:4]) - } - // Skip if the entire data is already known - if self.HasBlock(block.Hash()) { - stats.ignored++ - continue - } - // Compute all the non-consensus fields of the receipts - transactions, logIndex := block.Transactions(), uint(0) - for j := 0; j < len(receipts); j++ { - // The transaction hash can be retrieved from the transaction itself - receipts[j].TxHash = transactions[j].Hash() - - // The contract address can be derived from the transaction itself - if MessageCreatesContract(transactions[j]) { - from, _ := transactions[j].From() - receipts[j].ContractAddress = crypto.CreateAddress(from, transactions[j].Nonce()) + errs, failed := make([]error, len(tasks)), int32(0) + process := func(worker int) { + for index := range tasks { + block, receipts := blockChain[index], receiptChain[index] + + // Short circuit insertion if shutting down or processing failed + if atomic.LoadInt32(&self.procInterrupt) == 1 { + return } - // The used gas can be calculated based on previous receipts - if j == 0 { - receipts[j].GasUsed = new(big.Int).Set(receipts[j].CumulativeGasUsed) - } else { - receipts[j].GasUsed = new(big.Int).Sub(receipts[j].CumulativeGasUsed, receipts[j-1].CumulativeGasUsed) + if atomic.LoadInt32(&failed) > 0 { + return } - // The derived log fields can simply be set from the block and transaction - for k := 0; k < len(receipts[j].Logs); k++ { - receipts[j].Logs[k].BlockNumber = block.NumberU64() - receipts[j].Logs[k].BlockHash = block.Hash() - receipts[j].Logs[k].TxHash = receipts[j].TxHash - receipts[j].Logs[k].TxIndex = uint(j) - receipts[j].Logs[k].Index = logIndex - logIndex++ + // Short circuit if the owner header is unknown + if !self.HasHeader(block.Hash()) { + errs[index] = fmt.Errorf("containing header #%d [%x…] unknown", block.Number(), block.Hash().Bytes()[:4]) + atomic.AddInt32(&failed, 1) + return } + // Skip if the entire data is already known + if self.HasBlock(block.Hash()) { + atomic.AddInt32(&stats.ignored, 1) + continue + } + // Compute all the non-consensus fields of the receipts + transactions, logIndex := block.Transactions(), uint(0) + for j := 0; j < len(receipts); j++ { + // The transaction hash can be retrieved from the transaction itself + receipts[j].TxHash = transactions[j].Hash() + + // The contract address can be derived from the transaction itself + if MessageCreatesContract(transactions[j]) { + from, _ := transactions[j].From() + receipts[j].ContractAddress = crypto.CreateAddress(from, transactions[j].Nonce()) + } + // The used gas can be calculated based on previous receipts + if j == 0 { + receipts[j].GasUsed = new(big.Int).Set(receipts[j].CumulativeGasUsed) + } else { + receipts[j].GasUsed = new(big.Int).Sub(receipts[j].CumulativeGasUsed, receipts[j-1].CumulativeGasUsed) + } + // The derived log fields can simply be set from the block and transaction + for k := 0; k < len(receipts[j].Logs); k++ { + receipts[j].Logs[k].BlockNumber = block.NumberU64() + receipts[j].Logs[k].BlockHash = block.Hash() + receipts[j].Logs[k].TxHash = receipts[j].TxHash + receipts[j].Logs[k].TxIndex = uint(j) + receipts[j].Logs[k].Index = logIndex + logIndex++ + } + } + // Write all the data out into the database + if err := WriteBody(self.chainDb, block.Hash(), &types.Body{block.Transactions(), block.Uncles()}); err != nil { + errs[index] = fmt.Errorf("failed to write block body: %v", err) + atomic.AddInt32(&failed, 1) + glog.Fatal(errs[index]) + return + } + if err := PutBlockReceipts(self.chainDb, block.Hash(), receipts); err != nil { + errs[index] = fmt.Errorf("failed to write block receipts: %v", err) + atomic.AddInt32(&failed, 1) + glog.Fatal(errs[index]) + return + } + atomic.AddInt32(&stats.processed, 1) } - // Write all the data out into the database - if err := WriteBody(self.chainDb, block.Hash(), &types.Body{block.Transactions(), block.Uncles()}); err != nil { - glog.Fatalf("failed to write block body: %v", err) - return i, err - } - if err := PutBlockReceipts(self.chainDb, block.Hash(), receipts); err != nil { - glog.Fatalf("failed to write block receipts: %v", err) - return i, err - } - // Update the head fast sync block if better - self.mu.Lock() - if self.GetTd(self.currentFastBlock.Hash()).Cmp(self.GetTd(block.Hash())) < 0 { - if err := WriteHeadFastBlockHash(self.chainDb, block.Hash()); err != nil { - glog.Fatalf("failed to update head fast block hash: %v", err) + } + // Start as many worker threads as goroutines allowed + pending := new(sync.WaitGroup) + for i := 0; i < runtime.GOMAXPROCS(0); i++ { + pending.Add(1) + go func(id int) { + defer pending.Done() + process(id) + }(i) + } + pending.Wait() + + // If anything failed, report + if atomic.LoadInt32(&self.procInterrupt) == 1 { + glog.V(logger.Debug).Infoln("premature abort during receipt chain processing") + return 0, nil + } + if failed > 0 { + for i, err := range errs { + if err != nil { + return i, err } - self.currentFastBlock = block } - self.mu.Unlock() - - stats.processed++ } + // Update the head fast sync block if better + self.mu.Lock() + head := blockChain[len(errs)-1] + if self.GetTd(self.currentFastBlock.Hash()).Cmp(self.GetTd(head.Hash())) < 0 { + if err := WriteHeadFastBlockHash(self.chainDb, head.Hash()); err != nil { + glog.Fatalf("failed to update head fast block hash: %v", err) + } + self.currentFastBlock = head + } + self.mu.Unlock() + // Report some public statistics so the user has a clue what's going on first, last := blockChain[0], blockChain[len(blockChain)-1] glog.V(logger.Info).Infof("imported %d receipt(s) (%d ignored) in %v. #%d [%x… / %x…]", stats.processed, stats.ignored, diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 93c2128bc..a614aaa2f 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -94,7 +94,7 @@ func testFork(t *testing.T, processor *BlockProcessor, i, n int, full bool, comp } } else { headerChainB = makeHeaderChain(processor2.bc.CurrentHeader(), n, db, forkSeed) - if _, err := processor2.bc.InsertHeaderChain(headerChainB, true); err != nil { + if _, err := processor2.bc.InsertHeaderChain(headerChainB, 1); err != nil { t.Fatalf("failed to insert forking chain: %v", err) } } @@ -415,7 +415,9 @@ func TestChainMultipleInsertions(t *testing.T) { type bproc struct{} -func (bproc) Process(*types.Block) (vm.Logs, types.Receipts, error) { return nil, nil, nil } +func (bproc) Process(*types.Block) (vm.Logs, types.Receipts, error) { return nil, nil, nil } +func (bproc) ValidateHeader(*types.Header, bool, bool) error { return nil } +func (bproc) ValidateHeaderWithParent(*types.Header, *types.Header, bool, bool) error { return nil } func makeHeaderChainWithDiff(genesis *types.Block, d []int, seed byte) []*types.Header { blocks := makeBlockChainWithDiff(genesis, d, seed) @@ -492,8 +494,8 @@ func testReorg(t *testing.T, first, second []int, td int64, full bool) { bc.InsertChain(makeBlockChainWithDiff(genesis, first, 11)) bc.InsertChain(makeBlockChainWithDiff(genesis, second, 22)) } else { - bc.InsertHeaderChain(makeHeaderChainWithDiff(genesis, first, 11), false) - bc.InsertHeaderChain(makeHeaderChainWithDiff(genesis, second, 22), false) + bc.InsertHeaderChain(makeHeaderChainWithDiff(genesis, first, 11), 1) + bc.InsertHeaderChain(makeHeaderChainWithDiff(genesis, second, 22), 1) } // Check that the chain is valid number and link wise if full { @@ -543,7 +545,7 @@ func testBadHashes(t *testing.T, full bool) { } else { headers := makeHeaderChainWithDiff(genesis, []int{1, 2, 4}, 10) BadHashes[headers[2].Hash()] = true - _, err = bc.InsertHeaderChain(headers, true) + _, err = bc.InsertHeaderChain(headers, 1) } if !IsBadHashError(err) { t.Errorf("error mismatch: want: BadHashError, have: %v", err) @@ -575,7 +577,7 @@ func testReorgBadHashes(t *testing.T, full bool) { BadHashes[blocks[3].Header().Hash()] = true defer func() { delete(BadHashes, blocks[3].Header().Hash()) }() } else { - if _, err := bc.InsertHeaderChain(headers, true); err != nil { + if _, err := bc.InsertHeaderChain(headers, 1); err != nil { t.Fatalf("failed to import headers: %v", err) } if bc.CurrentHeader().Hash() != headers[3].Hash() { @@ -631,6 +633,8 @@ func testInsertNonceError(t *testing.T, full bool) { failHash = blocks[failAt].Hash() processor.bc.pow = failPow{failNum} + processor.Pow = failPow{failNum} + failRes, err = processor.bc.InsertChain(blocks) } else { headers := makeHeaderChain(processor.bc.CurrentHeader(), i, db, 0) @@ -640,7 +644,9 @@ func testInsertNonceError(t *testing.T, full bool) { failHash = headers[failAt].Hash() processor.bc.pow = failPow{failNum} - failRes, err = processor.bc.InsertHeaderChain(headers, true) + processor.Pow = failPow{failNum} + + failRes, err = processor.bc.InsertHeaderChain(headers, 1) } // Check that the returned error indicates the nonce failure. if failRes != failAt { @@ -714,12 +720,13 @@ func TestFastVsFullChains(t *testing.T) { fastDb, _ := ethdb.NewMemDatabase() WriteGenesisBlockForTesting(fastDb, GenesisAccount{address, funds}) fast, _ := NewBlockChain(fastDb, FakePow{}, new(event.TypeMux)) + fast.SetProcessor(NewBlockProcessor(fastDb, FakePow{}, fast, new(event.TypeMux))) headers := make([]*types.Header, len(blocks)) for i, block := range blocks { headers[i] = block.Header() } - if n, err := fast.InsertHeaderChain(headers, true); err != nil { + if n, err := fast.InsertHeaderChain(headers, 1); err != nil { t.Fatalf("failed to insert header %d: %v", n, err) } if n, err := fast.InsertReceiptChain(blocks, receipts); err != nil { @@ -796,12 +803,13 @@ func TestLightVsFastVsFullChainHeads(t *testing.T) { fastDb, _ := ethdb.NewMemDatabase() WriteGenesisBlockForTesting(fastDb, GenesisAccount{address, funds}) fast, _ := NewBlockChain(fastDb, FakePow{}, new(event.TypeMux)) + fast.SetProcessor(NewBlockProcessor(fastDb, FakePow{}, fast, new(event.TypeMux))) headers := make([]*types.Header, len(blocks)) for i, block := range blocks { headers[i] = block.Header() } - if n, err := fast.InsertHeaderChain(headers, true); err != nil { + if n, err := fast.InsertHeaderChain(headers, 1); err != nil { t.Fatalf("failed to insert header %d: %v", n, err) } if n, err := fast.InsertReceiptChain(blocks, receipts); err != nil { @@ -813,8 +821,9 @@ func TestLightVsFastVsFullChainHeads(t *testing.T) { lightDb, _ := ethdb.NewMemDatabase() WriteGenesisBlockForTesting(lightDb, GenesisAccount{address, funds}) light, _ := NewBlockChain(lightDb, FakePow{}, new(event.TypeMux)) + light.SetProcessor(NewBlockProcessor(lightDb, FakePow{}, light, new(event.TypeMux))) - if n, err := light.InsertHeaderChain(headers, true); err != nil { + if n, err := light.InsertHeaderChain(headers, 1); err != nil { t.Fatalf("failed to insert header %d: %v", n, err) } assert(t, "light", light, height, 0, 0) diff --git a/core/chain_makers.go b/core/chain_makers.go index 31b2627af..1d41b4091 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -239,7 +239,7 @@ func newCanonical(n int, full bool) (ethdb.Database, *BlockProcessor, error) { } // Header-only chain requested headers := makeHeaderChain(genesis.Header(), n, db, canonicalSeed) - _, err := blockchain.InsertHeaderChain(headers, true) + _, err := blockchain.InsertHeaderChain(headers, 1) return db, processor, err } diff --git a/core/error.go b/core/error.go index 5e32124a7..af42cd19c 100644 --- a/core/error.go +++ b/core/error.go @@ -111,7 +111,7 @@ type BlockNonceErr struct { } func (err *BlockNonceErr) Error() string { - return fmt.Sprintf("block %d (%v) nonce is invalid (got %d)", err.Number, err.Hash, err.Nonce) + return fmt.Sprintf("nonce for #%d [%x…] is invalid (got %d)", err.Number, err.Hash, err.Nonce) } // IsBlockNonceErr returns true for invalid block nonce errors. diff --git a/core/state/sync.go b/core/state/sync.go index e9bebe8ee..5a388886c 100644 --- a/core/state/sync.go +++ b/core/state/sync.go @@ -21,78 +21,51 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto/sha3" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/trie" ) -type StateSync struct { - db ethdb.Database - sync *trie.TrieSync - codeReqs map[common.Hash]struct{} // requested but not yet written to database - codeReqList []common.Hash // requested since last Missing -} +// StateSync is the main state synchronisation scheduler, which provides yet the +// unknown state hashes to retrieve, accepts node data associated with said hashes +// and reconstructs the state database step by step until all is done. +type StateSync trie.TrieSync -var sha3_nil = common.BytesToHash(sha3.NewKeccak256().Sum(nil)) +// NewStateSync create a new state trie download scheduler. +func NewStateSync(root common.Hash, database ethdb.Database) *StateSync { + // Pre-declare the result syncer t + var syncer *trie.TrieSync -func NewStateSync(root common.Hash, db ethdb.Database) *StateSync { - ss := &StateSync{ - db: db, - codeReqs: make(map[common.Hash]struct{}), - } - ss.codeReqs[sha3_nil] = struct{}{} // never request the nil hash - ss.sync = trie.NewTrieSync(root, db, ss.leafFound) - return ss -} + callback := func(leaf []byte, parent common.Hash) error { + var obj struct { + Nonce uint64 + Balance *big.Int + Root common.Hash + CodeHash []byte + } + if err := rlp.Decode(bytes.NewReader(leaf), &obj); err != nil { + return err + } + syncer.AddSubTrie(obj.Root, 64, parent, nil) + syncer.AddRawEntry(common.BytesToHash(obj.CodeHash), 64, parent) -func (self *StateSync) leafFound(leaf []byte, parent common.Hash) error { - var obj struct { - Nonce uint64 - Balance *big.Int - Root common.Hash - CodeHash []byte - } - if err := rlp.Decode(bytes.NewReader(leaf), &obj); err != nil { - return err + return nil } - self.sync.AddSubTrie(obj.Root, 64, parent, nil) + syncer = trie.NewTrieSync(root, database, callback) + return (*StateSync)(syncer) +} - codehash := common.BytesToHash(obj.CodeHash) - if _, ok := self.codeReqs[codehash]; !ok { - code, _ := self.db.Get(obj.CodeHash) - if code == nil { - self.codeReqs[codehash] = struct{}{} - self.codeReqList = append(self.codeReqList, codehash) - } - } - return nil +// Missing retrieves the known missing nodes from the state trie for retrieval. +func (s *StateSync) Missing(max int) []common.Hash { + return (*trie.TrieSync)(s).Missing(max) } -func (self *StateSync) Missing(max int) []common.Hash { - cr := len(self.codeReqList) - gh := 0 - if max != 0 { - if cr > max { - cr = max - } - gh = max - cr - } - list := append(self.sync.Missing(gh), self.codeReqList[:cr]...) - self.codeReqList = self.codeReqList[cr:] - return list +// Process injects a batch of retrieved trie nodes data. +func (s *StateSync) Process(list []trie.SyncResult) (int, error) { + return (*trie.TrieSync)(s).Process(list) } -func (self *StateSync) Process(list []trie.SyncResult) error { - for i := 0; i < len(list); i++ { - if _, ok := self.codeReqs[list[i].Hash]; ok { // code data, not a node - self.db.Put(list[i].Hash[:], list[i].Data) - delete(self.codeReqs, list[i].Hash) - list[i] = list[len(list)-1] - list = list[:len(list)-1] - i-- - } - } - _, err := self.sync.Process(list) - return err +// Pending returns the number of state entries currently pending for download. +func (s *StateSync) Pending() int { + return (*trie.TrieSync)(s).Pending() } diff --git a/core/state/sync_test.go b/core/state/sync_test.go index f6afe8bd8..f0376d484 100644 --- a/core/state/sync_test.go +++ b/core/state/sync_test.go @@ -115,8 +115,8 @@ func testIterativeStateSync(t *testing.T, batch int) { } results[i] = trie.SyncResult{hash, data} } - if err := sched.Process(results); err != nil { - t.Fatalf("failed to process results: %v", err) + if index, err := sched.Process(results); err != nil { + t.Fatalf("failed to process result #%d: %v", index, err) } queue = append(queue[:0], sched.Missing(batch)...) } @@ -145,8 +145,8 @@ func TestIterativeDelayedStateSync(t *testing.T) { } results[i] = trie.SyncResult{hash, data} } - if err := sched.Process(results); err != nil { - t.Fatalf("failed to process results: %v", err) + if index, err := sched.Process(results); err != nil { + t.Fatalf("failed to process result #%d: %v", index, err) } queue = append(queue[len(results):], sched.Missing(0)...) } @@ -183,8 +183,8 @@ func testIterativeRandomStateSync(t *testing.T, batch int) { results = append(results, trie.SyncResult{hash, data}) } // Feed the retrieved results back and queue new tasks - if err := sched.Process(results); err != nil { - t.Fatalf("failed to process results: %v", err) + if index, err := sched.Process(results); err != nil { + t.Fatalf("failed to process result #%d: %v", index, err) } queue = make(map[common.Hash]struct{}) for _, hash := range sched.Missing(batch) { @@ -226,8 +226,8 @@ func TestIterativeRandomDelayedStateSync(t *testing.T) { } } // Feed the retrieved results back and queue new tasks - if err := sched.Process(results); err != nil { - t.Fatalf("failed to process results: %v", err) + if index, err := sched.Process(results); err != nil { + t.Fatalf("failed to process result #%d: %v", index, err) } for _, hash := range sched.Missing(0) { queue[hash] = struct{}{} diff --git a/core/types/common.go b/core/types/common.go index 29019a1b4..fe682f98a 100644 --- a/core/types/common.go +++ b/core/types/common.go @@ -20,4 +20,6 @@ import "github.com/ethereum/go-ethereum/core/vm" type BlockProcessor interface { Process(*Block) (vm.Logs, Receipts, error) + ValidateHeader(*Header, bool, bool) error + ValidateHeaderWithParent(*Header, *Header, bool, bool) error } diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 96177ae8a..e19b70dfd 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -830,7 +830,7 @@ func (d *Downloader) fetchBlocks61(from uint64) error { } // If there's nothing more to fetch, wait or terminate if d.queue.PendingBlocks() == 0 { - if d.queue.InFlight() == 0 && finished { + if !d.queue.InFlightBlocks() && finished { glog.V(logger.Debug).Infof("Block fetching completed") return nil } @@ -864,7 +864,7 @@ func (d *Downloader) fetchBlocks61(from uint64) error { } // Make sure that we have peers available for fetching. If all peers have been tried // and all failed throw an error - if !throttled && d.queue.InFlight() == 0 && len(idles) == total { + if !throttled && !d.queue.InFlightBlocks() && len(idles) == total { return errPeersUnavailable } } @@ -1124,7 +1124,7 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error { glog.V(logger.Detail).Infof("%v: schedule %d headers from #%d", p, len(headers), from) if d.mode == FastSync || d.mode == LightSync { - if n, err := d.insertHeaders(headers, false); err != nil { + if n, err := d.insertHeaders(headers, headerCheckFrequency); err != nil { glog.V(logger.Debug).Infof("%v: invalid header #%d [%x…]: %v", p, headers[n].Number, headers[n].Hash().Bytes()[:4], err) return errInvalidChain } @@ -1194,8 +1194,8 @@ func (d *Downloader) fetchBodies(from uint64) error { setIdle = func(p *peer) { p.SetBlocksIdle() } ) err := d.fetchParts(errCancelBodyFetch, d.bodyCh, deliver, d.bodyWakeCh, expire, - d.queue.PendingBlocks, d.queue.ThrottleBlocks, d.queue.ReserveBodies, d.bodyFetchHook, - fetch, d.queue.CancelBodies, capacity, getIdles, setIdle, "Body") + d.queue.PendingBlocks, d.queue.InFlightBlocks, d.queue.ThrottleBlocks, d.queue.ReserveBodies, + d.bodyFetchHook, fetch, d.queue.CancelBodies, capacity, getIdles, setIdle, "Body") glog.V(logger.Debug).Infof("Block body download terminated: %v", err) return err @@ -1218,8 +1218,8 @@ func (d *Downloader) fetchReceipts(from uint64) error { setIdle = func(p *peer) { p.SetReceiptsIdle() } ) err := d.fetchParts(errCancelReceiptFetch, d.receiptCh, deliver, d.receiptWakeCh, expire, - d.queue.PendingReceipts, d.queue.ThrottleReceipts, d.queue.ReserveReceipts, d.receiptFetchHook, - fetch, d.queue.CancelReceipts, capacity, d.peers.ReceiptIdlePeers, setIdle, "Receipt") + d.queue.PendingReceipts, d.queue.InFlightReceipts, d.queue.ThrottleReceipts, d.queue.ReserveReceipts, + d.receiptFetchHook, fetch, d.queue.CancelReceipts, capacity, d.peers.ReceiptIdlePeers, setIdle, "Receipt") glog.V(logger.Debug).Infof("Receipt download terminated: %v", err) return err @@ -1234,15 +1234,29 @@ func (d *Downloader) fetchNodeData() error { var ( deliver = func(packet dataPack) error { start := time.Now() - done, found, err := d.queue.DeliverNodeData(packet.PeerId(), packet.(*statePack).states) - - d.syncStatsLock.Lock() - totalDone, totalKnown := d.syncStatsStateDone+uint64(done), d.syncStatsStateTotal+uint64(found) - d.syncStatsStateDone, d.syncStatsStateTotal = totalDone, totalKnown - d.syncStatsLock.Unlock() + return d.queue.DeliverNodeData(packet.PeerId(), packet.(*statePack).states, func(err error, delivered int) { + if err != nil { + // If the node data processing failed, the root hash is very wrong, abort + glog.V(logger.Error).Infof("peer %d: state processing failed: %v", packet.PeerId(), err) + d.cancel() + return + } + // Processing succeeded, notify state fetcher and processor of continuation + if d.queue.PendingNodeData() == 0 { + go d.process() + } else { + select { + case d.stateWakeCh <- true: + default: + } + } + // Log a message to the user and return + d.syncStatsLock.Lock() + defer d.syncStatsLock.Unlock() - glog.V(logger.Info).Infof("imported %d [%d / %d] state entries in %v.", done, totalDone, totalKnown, time.Since(start)) - return err + d.syncStatsStateDone += uint64(delivered) + glog.V(logger.Info).Infof("imported %d state entries in %v: processed %d in total", delivered, time.Since(start), d.syncStatsStateDone) + }) } expire = func() []string { return d.queue.ExpireNodeData(stateHardTTL) } throttle = func() bool { return false } @@ -1254,8 +1268,8 @@ func (d *Downloader) fetchNodeData() error { setIdle = func(p *peer) { p.SetNodeDataIdle() } ) err := d.fetchParts(errCancelReceiptFetch, d.stateCh, deliver, d.stateWakeCh, expire, - d.queue.PendingNodeData, throttle, reserve, nil, fetch, d.queue.CancelNodeData, - capacity, d.peers.ReceiptIdlePeers, setIdle, "State") + d.queue.PendingNodeData, d.queue.InFlightNodeData, throttle, reserve, nil, fetch, + d.queue.CancelNodeData, capacity, d.peers.ReceiptIdlePeers, setIdle, "State") glog.V(logger.Debug).Infof("Node state data download terminated: %v", err) return err @@ -1265,8 +1279,9 @@ func (d *Downloader) fetchNodeData() error { // peers, reserving a chunk of fetch requests for each, waiting for delivery and // also periodically checking for timeouts. func (d *Downloader) fetchParts(errCancel error, deliveryCh chan dataPack, deliver func(packet dataPack) error, wakeCh chan bool, - expire func() []string, pending func() int, throttle func() bool, reserve func(*peer, int) (*fetchRequest, bool, error), fetchHook func([]*types.Header), - fetch func(*peer, *fetchRequest) error, cancel func(*fetchRequest), capacity func(*peer) int, idle func() ([]*peer, int), setIdle func(*peer), kind string) error { + expire func() []string, pending func() int, inFlight func() bool, throttle func() bool, reserve func(*peer, int) (*fetchRequest, bool, error), + fetchHook func([]*types.Header), fetch func(*peer, *fetchRequest) error, cancel func(*fetchRequest), capacity func(*peer) int, + idle func() ([]*peer, int), setIdle func(*peer), kind string) error { // Create a ticker to detect expired retreival tasks ticker := time.NewTicker(100 * time.Millisecond) @@ -1378,14 +1393,14 @@ func (d *Downloader) fetchParts(errCancel error, deliveryCh chan dataPack, deliv } // If there's nothing more to fetch, wait or terminate if pending() == 0 { - if d.queue.InFlight() == 0 && finished { + if !inFlight() && finished { glog.V(logger.Debug).Infof("%s fetching completed", kind) return nil } break } // Send a download request to all idle peers, until throttled - progressed, throttled := false, false + progressed, throttled, running := false, false, inFlight() idles, total := idle() for _, peer := range idles { @@ -1423,10 +1438,11 @@ func (d *Downloader) fetchParts(errCancel error, deliveryCh chan dataPack, deliv glog.V(logger.Error).Infof("%v: %s fetch failed, rescheduling", peer, strings.ToLower(kind)) cancel(request) } + running = true } // Make sure that we have peers available for fetching. If all peers have been tried // and all failed throw an error - if !progressed && !throttled && d.queue.InFlight() == 0 && len(idles) == total { + if !progressed && !throttled && !running && len(idles) == total && pending() > 0 { return errPeersUnavailable } } @@ -1514,12 +1530,12 @@ func (d *Downloader) process() { ) switch { case len(headers) > 0: - index, err = d.insertHeaders(headers, true) + index, err = d.insertHeaders(headers, headerCheckFrequency) case len(receipts) > 0: index, err = d.insertReceipts(blocks, receipts) if err == nil && blocks[len(blocks)-1].NumberU64() == d.queue.fastSyncPivot { - err = d.commitHeadBlock(blocks[len(blocks)-1].Hash()) + index, err = len(blocks)-1, d.commitHeadBlock(blocks[len(blocks)-1].Hash()) } default: index, err = d.insertBlocks(blocks) diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index 8944ae4b0..0e60371b3 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -268,7 +268,7 @@ func (dl *downloadTester) getTd(hash common.Hash) *big.Int { } // insertHeaders injects a new batch of headers into the simulated chain. -func (dl *downloadTester) insertHeaders(headers []*types.Header, verify bool) (int, error) { +func (dl *downloadTester) insertHeaders(headers []*types.Header, checkFreq int) (int, error) { dl.lock.Lock() defer dl.lock.Unlock() @@ -1262,7 +1262,7 @@ func testForkedSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { pending.Wait() // Simulate a successful sync above the fork - tester.downloader.syncStatsOrigin = tester.downloader.syncStatsHeight + tester.downloader.syncStatsChainOrigin = tester.downloader.syncStatsChainHeight // Synchronise with the second fork and check boundary resets tester.newPeer("fork B", protocol, hashesB, headersB, blocksB, receiptsB) diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go index 942ed0d63..bb8d892cd 100644 --- a/eth/downloader/queue.go +++ b/eth/downloader/queue.go @@ -23,6 +23,7 @@ import ( "errors" "fmt" "sync" + "sync/atomic" "time" "github.com/ethereum/go-ethereum/common" @@ -93,8 +94,10 @@ type queue struct { stateTaskQueue *prque.Prque // [eth/63] Priority queue of the hashes to fetch the node data for statePendPool map[string]*fetchRequest // [eth/63] Currently pending node data retrieval operations - stateDatabase ethdb.Database // [eth/63] Trie database to populate during state reassembly - stateScheduler *state.StateSync // [eth/63] State trie synchronisation scheduler and integrator + stateDatabase ethdb.Database // [eth/63] Trie database to populate during state reassembly + stateScheduler *state.StateSync // [eth/63] State trie synchronisation scheduler and integrator + stateProcessors int32 // [eth/63] Number of currently running state processors + stateSchedLock sync.RWMutex // [eth/63] Lock serializing access to the state scheduler resultCache []*fetchResult // Downloaded but not yet delivered fetch results resultOffset uint64 // Offset of the first cached fetch result in the block-chain @@ -175,18 +178,40 @@ func (q *queue) PendingReceipts() int { // PendingNodeData retrieves the number of node data entries pending for retrieval. func (q *queue) PendingNodeData() int { + q.stateSchedLock.RLock() + defer q.stateSchedLock.RUnlock() + + if q.stateScheduler != nil { + return q.stateScheduler.Pending() + } + return 0 +} + +// InFlightBlocks retrieves whether there are block fetch requests currently in +// flight. +func (q *queue) InFlightBlocks() bool { q.lock.RLock() defer q.lock.RUnlock() - return q.stateTaskQueue.Size() + return len(q.blockPendPool) > 0 } -// InFlight retrieves the number of fetch requests currently in flight. -func (q *queue) InFlight() int { +// InFlightReceipts retrieves whether there are receipt fetch requests currently +// in flight. +func (q *queue) InFlightReceipts() bool { q.lock.RLock() defer q.lock.RUnlock() - return len(q.blockPendPool) + len(q.receiptPendPool) + len(q.statePendPool) + return len(q.receiptPendPool) > 0 +} + +// InFlightNodeData retrieves whether there are node data entry fetch requests +// currently in flight. +func (q *queue) InFlightNodeData() bool { + q.lock.RLock() + defer q.lock.RUnlock() + + return len(q.statePendPool)+int(atomic.LoadInt32(&q.stateProcessors)) > 0 } // Idle returns if the queue is fully idle or has some data still inside. This @@ -199,6 +224,12 @@ func (q *queue) Idle() bool { pending := len(q.blockPendPool) + len(q.receiptPendPool) + len(q.statePendPool) cached := len(q.blockDonePool) + len(q.receiptDonePool) + q.stateSchedLock.RLock() + if q.stateScheduler != nil { + queued += q.stateScheduler.Pending() + } + q.stateSchedLock.RUnlock() + return (queued + pending + cached) == 0 } @@ -299,12 +330,9 @@ func (q *queue) Schedule(headers []*types.Header, from uint64) []*types.Header { } if q.mode == FastSync && header.Number.Uint64() == q.fastSyncPivot { // Pivoting point of the fast sync, retrieve the state tries + q.stateSchedLock.Lock() q.stateScheduler = state.NewStateSync(header.Root, q.stateDatabase) - for _, hash := range q.stateScheduler.Missing(0) { - q.stateTaskPool[hash] = q.stateTaskIndex - q.stateTaskQueue.Push(hash, -float32(q.stateTaskIndex)) - q.stateTaskIndex++ - } + q.stateSchedLock.Unlock() } inserts = append(inserts, header) q.headerHead = hash @@ -325,8 +353,13 @@ func (q *queue) GetHeadResult() *fetchResult { if q.resultCache[0].Pending > 0 { return nil } - if q.mode == FastSync && q.resultCache[0].Header.Number.Uint64() == q.fastSyncPivot && len(q.stateTaskPool) > 0 { - return nil + if q.mode == FastSync && q.resultCache[0].Header.Number.Uint64() == q.fastSyncPivot { + if len(q.stateTaskPool) > 0 { + return nil + } + if q.PendingNodeData() > 0 { + return nil + } } return q.resultCache[0] } @@ -345,8 +378,13 @@ func (q *queue) TakeResults() []*fetchResult { break } // The fast sync pivot block may only be processed after state fetch completes - if q.mode == FastSync && result.Header.Number.Uint64() == q.fastSyncPivot && len(q.stateTaskPool) > 0 { - break + if q.mode == FastSync && result.Header.Number.Uint64() == q.fastSyncPivot { + if len(q.stateTaskPool) > 0 { + break + } + if q.PendingNodeData() > 0 { + break + } } // If we've just inserted the fast sync pivot, stop as the following batch needs different insertion if q.mode == FastSync && result.Header.Number.Uint64() == q.fastSyncPivot+1 && len(results) > 0 { @@ -373,26 +411,34 @@ func (q *queue) TakeResults() []*fetchResult { // ReserveBlocks reserves a set of block hashes for the given peer, skipping any // previously failed download. func (q *queue) ReserveBlocks(p *peer, count int) *fetchRequest { - return q.reserveHashes(p, count, q.hashQueue, q.blockPendPool, len(q.resultCache)-len(q.blockDonePool)) + return q.reserveHashes(p, count, q.hashQueue, nil, q.blockPendPool, len(q.resultCache)-len(q.blockDonePool)) } // ReserveNodeData reserves a set of node data hashes for the given peer, skipping // any previously failed download. func (q *queue) ReserveNodeData(p *peer, count int) *fetchRequest { - return q.reserveHashes(p, count, q.stateTaskQueue, q.statePendPool, 0) + // Create a task generator to fetch status-fetch tasks if all schedules ones are done + generator := func(max int) { + q.stateSchedLock.Lock() + defer q.stateSchedLock.Unlock() + + for _, hash := range q.stateScheduler.Missing(max) { + q.stateTaskPool[hash] = q.stateTaskIndex + q.stateTaskQueue.Push(hash, -float32(q.stateTaskIndex)) + q.stateTaskIndex++ + } + } + return q.reserveHashes(p, count, q.stateTaskQueue, generator, q.statePendPool, count) } // reserveHashes reserves a set of hashes for the given peer, skipping previously // failed ones. -func (q *queue) reserveHashes(p *peer, count int, taskQueue *prque.Prque, pendPool map[string]*fetchRequest, maxPending int) *fetchRequest { +func (q *queue) reserveHashes(p *peer, count int, taskQueue *prque.Prque, taskGen func(int), pendPool map[string]*fetchRequest, maxPending int) *fetchRequest { q.lock.Lock() defer q.lock.Unlock() - // Short circuit if the pool has been depleted, or if the peer's already - // downloading something (sanity check not to corrupt state) - if taskQueue.Empty() { - return nil - } + // Short circuit if the peer's already downloading something (sanity check not + // to corrupt state) if _, ok := pendPool[p.id]; ok { return nil } @@ -403,6 +449,13 @@ func (q *queue) reserveHashes(p *peer, count int, taskQueue *prque.Prque, pendPo allowance -= len(request.Hashes) } } + // If there's a task generator, ask it to fill our task queue + if taskGen != nil && taskQueue.Size() < allowance { + taskGen(allowance - taskQueue.Size()) + } + if taskQueue.Empty() { + return nil + } // Retrieve a batch of hashes, skipping previously failed ones send := make(map[common.Hash]int) skip := make(map[common.Hash]int) @@ -809,14 +862,14 @@ func (q *queue) deliver(id string, taskPool map[common.Hash]*types.Header, taskQ } // DeliverNodeData injects a node state data retrieval response into the queue. -func (q *queue) DeliverNodeData(id string, data [][]byte) (int, int, error) { +func (q *queue) DeliverNodeData(id string, data [][]byte, callback func(error, int)) error { q.lock.Lock() defer q.lock.Unlock() // Short circuit if the data was never requested request := q.statePendPool[id] if request == nil { - return 0, 0, errNoFetchesPending + return errNoFetchesPending } stateReqTimer.UpdateSince(request.Time) delete(q.statePendPool, id) @@ -829,7 +882,7 @@ func (q *queue) DeliverNodeData(id string, data [][]byte) (int, int, error) { } // Iterate over the downloaded data and verify each of them errs := make([]error, 0) - processed := 0 + process := []trie.SyncResult{} for _, blob := range data { // Skip any blocks that were not requested hash := common.BytesToHash(crypto.Sha3(blob)) @@ -837,41 +890,58 @@ func (q *queue) DeliverNodeData(id string, data [][]byte) (int, int, error) { errs = append(errs, fmt.Errorf("non-requested state data %x", hash)) continue } - // Inject the next state trie item into the database - if err := q.stateScheduler.Process([]trie.SyncResult{{hash, blob}}); err != nil { - errs = []error{err} - break - } - processed++ + // Inject the next state trie item into the processing queue + process = append(process, trie.SyncResult{hash, blob}) delete(request.Hashes, hash) delete(q.stateTaskPool, hash) } + // Start the asynchronous node state data injection + atomic.AddInt32(&q.stateProcessors, 1) + go func() { + defer atomic.AddInt32(&q.stateProcessors, -1) + q.deliverNodeData(process, callback) + }() // Return all failed or missing fetches to the queue for hash, index := range request.Hashes { q.stateTaskQueue.Push(hash, float32(index)) } - // Also enqueue any newly required state trie nodes - discovered := 0 - if len(q.stateTaskPool) < maxQueuedStates { - for _, hash := range q.stateScheduler.Missing(4 * MaxStateFetch) { - q.stateTaskPool[hash] = q.stateTaskIndex - q.stateTaskQueue.Push(hash, -float32(q.stateTaskIndex)) - q.stateTaskIndex++ - discovered++ - } - } // If none of the data items were good, it's a stale delivery switch { case len(errs) == 0: - return processed, discovered, nil + return nil case len(errs) == len(request.Hashes): - return processed, discovered, errStaleDelivery + return errStaleDelivery default: - return processed, discovered, fmt.Errorf("multiple failures: %v", errs) + return fmt.Errorf("multiple failures: %v", errs) + } +} + +// deliverNodeData is the asynchronous node data processor that injects a batch +// of sync results into the state scheduler. +func (q *queue) deliverNodeData(results []trie.SyncResult, callback func(error, int)) { + // Process results one by one to permit task fetches in between + for i, result := range results { + q.stateSchedLock.Lock() + + if q.stateScheduler == nil { + // Syncing aborted since this async delivery started, bail out + q.stateSchedLock.Unlock() + callback(errNoFetchesPending, i) + return + } + if _, err := q.stateScheduler.Process([]trie.SyncResult{result}); err != nil { + // Processing a state result failed, bail out + q.stateSchedLock.Unlock() + callback(err, i) + return + } + // Item processing succeeded, release the lock (temporarily) + q.stateSchedLock.Unlock() } + callback(nil, len(results)) } // Prepare configures the result cache to allow accepting and caching inbound diff --git a/eth/downloader/types.go b/eth/downloader/types.go index 221ef38f6..60d9a2b12 100644 --- a/eth/downloader/types.go +++ b/eth/downloader/types.go @@ -52,7 +52,7 @@ type headBlockCommitterFn func(common.Hash) error type tdRetrievalFn func(common.Hash) *big.Int // headerChainInsertFn is a callback type to insert a batch of headers into the local chain. -type headerChainInsertFn func([]*types.Header, bool) (int, error) +type headerChainInsertFn func([]*types.Header, int) (int, error) // blockChainInsertFn is a callback type to insert a batch of blocks into the local chain. type blockChainInsertFn func(types.Blocks) (int, error) diff --git a/ethdb/memory_database.go b/ethdb/memory_database.go index 81911f23f..330834fa4 100644 --- a/ethdb/memory_database.go +++ b/ethdb/memory_database.go @@ -18,6 +18,7 @@ package ethdb import ( "fmt" + "sync" "github.com/ethereum/go-ethereum/common" ) @@ -26,29 +27,42 @@ import ( * This is a test memory database. Do not use for any production it does not get persisted */ type MemDatabase struct { - db map[string][]byte + db map[string][]byte + lock sync.RWMutex } func NewMemDatabase() (*MemDatabase, error) { - db := &MemDatabase{db: make(map[string][]byte)} - - return db, nil + return &MemDatabase{ + db: make(map[string][]byte), + }, nil } func (db *MemDatabase) Put(key []byte, value []byte) error { + db.lock.Lock() + defer db.lock.Unlock() + db.db[string(key)] = common.CopyBytes(value) return nil } func (db *MemDatabase) Set(key []byte, value []byte) { + db.lock.Lock() + defer db.lock.Unlock() + db.Put(key, value) } func (db *MemDatabase) Get(key []byte) ([]byte, error) { + db.lock.RLock() + defer db.lock.RUnlock() + return db.db[string(key)], nil } func (db *MemDatabase) Keys() [][]byte { + db.lock.RLock() + defer db.lock.RUnlock() + keys := [][]byte{} for key, _ := range db.db { keys = append(keys, []byte(key)) @@ -65,12 +79,17 @@ func (db *MemDatabase) GetKeys() []*common.Key { */ func (db *MemDatabase) Delete(key []byte) error { - delete(db.db, string(key)) + db.lock.Lock() + defer db.lock.Unlock() + delete(db.db, string(key)) return nil } func (db *MemDatabase) Print() { + db.lock.RLock() + defer db.lock.RUnlock() + for key, val := range db.db { fmt.Printf("%x(%d): ", key, len(key)) node := common.NewValueFromBytes(val) @@ -83,11 +102,9 @@ func (db *MemDatabase) Close() { func (db *MemDatabase) LastKnownTD() []byte { data, _ := db.Get([]byte("LastKnownTotalDifficulty")) - if len(data) == 0 || data == nil { data = []byte{0x0} } - return data } @@ -100,16 +117,26 @@ type kv struct{ k, v []byte } type memBatch struct { db *MemDatabase writes []kv + lock sync.RWMutex } -func (w *memBatch) Put(key, value []byte) error { - w.writes = append(w.writes, kv{key, common.CopyBytes(value)}) +func (b *memBatch) Put(key, value []byte) error { + b.lock.Lock() + defer b.lock.Unlock() + + b.writes = append(b.writes, kv{key, common.CopyBytes(value)}) return nil } -func (w *memBatch) Write() error { - for _, kv := range w.writes { - w.db.db[string(kv.k)] = kv.v +func (b *memBatch) Write() error { + b.lock.RLock() + defer b.lock.RUnlock() + + b.db.lock.RLock() + defer b.db.lock.RUnlock() + + for _, kv := range b.writes { + b.db.db[string(kv.k)] = kv.v } return nil } diff --git a/trie/sync.go b/trie/sync.go index 65cfd6ed8..bb112fb62 100644 --- a/trie/sync.go +++ b/trie/sync.go @@ -20,6 +20,7 @@ import ( "fmt" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/ethdb" "gopkg.in/karalabe/cookiejar.v2/collections/prque" ) @@ -50,15 +51,15 @@ type TrieSyncLeafCallback func(leaf []byte, parent common.Hash) error // TrieSync is the main state trie synchronisation scheduler, which provides yet // unknown trie hashes to retrieve, accepts node data associated with said hashes -// and reconstructs the trie steb by step until all is done. +// and reconstructs the trie step by step until all is done. type TrieSync struct { - database Database // State database for storing all the assembled node data + database ethdb.Database // State database for storing all the assembled node data requests map[common.Hash]*request // Pending requests pertaining to a key hash queue *prque.Prque // Priority queue with the pending requests } // NewTrieSync creates a new trie data download scheduler. -func NewTrieSync(root common.Hash, database Database, callback TrieSyncLeafCallback) *TrieSync { +func NewTrieSync(root common.Hash, database ethdb.Database, callback TrieSyncLeafCallback) *TrieSync { ts := &TrieSync{ database: database, requests: make(map[common.Hash]*request), @@ -70,10 +71,14 @@ func NewTrieSync(root common.Hash, database Database, callback TrieSyncLeafCallb // AddSubTrie registers a new trie to the sync code, rooted at the designated parent. func (s *TrieSync) AddSubTrie(root common.Hash, depth int, parent common.Hash, callback TrieSyncLeafCallback) { - // Short circuit if the trie is empty + // Short circuit if the trie is empty or already known if root == emptyRoot { return } + blob, _ := s.database.Get(root.Bytes()) + if local, err := decodeNode(blob); local != nil && err == nil { + return + } // Assemble the new sub-trie sync request node := node(hashNode(root.Bytes())) req := &request{ @@ -94,6 +99,35 @@ func (s *TrieSync) AddSubTrie(root common.Hash, depth int, parent common.Hash, c s.schedule(req) } +// AddRawEntry schedules the direct retrieval of a state entry that should not be +// interpreted as a trie node, but rather accepted and stored into the database +// as is. This method's goal is to support misc state metadata retrievals (e.g. +// contract code). +func (s *TrieSync) AddRawEntry(hash common.Hash, depth int, parent common.Hash) { + // Short circuit if the entry is empty or already known + if hash == emptyState { + return + } + if blob, _ := s.database.Get(hash.Bytes()); blob != nil { + return + } + // Assemble the new sub-trie sync request + req := &request{ + hash: hash, + depth: depth, + } + // If this sub-trie has a designated parent, link them together + if parent != (common.Hash{}) { + ancestor := s.requests[parent] + if ancestor == nil { + panic(fmt.Sprintf("raw-entry ancestor not found: %x", parent)) + } + ancestor.deps++ + req.parents = append(req.parents, ancestor) + } + s.schedule(req) +} + // Missing retrieves the known missing nodes from the trie for retrieval. func (s *TrieSync) Missing(max int) []common.Hash { requests := []common.Hash{} @@ -111,6 +145,12 @@ func (s *TrieSync) Process(results []SyncResult) (int, error) { if request == nil { return i, fmt.Errorf("not requested: %x", item.Hash) } + // If the item is a raw entry request, commit directly + if request.object == nil { + request.data = item.Data + s.commit(request, nil) + continue + } // Decode the node data content and update the request node, err := decodeNode(item.Data) if err != nil { @@ -125,7 +165,7 @@ func (s *TrieSync) Process(results []SyncResult) (int, error) { return i, err } if len(requests) == 0 && request.deps == 0 { - s.commit(request) + s.commit(request, nil) continue } request.deps += len(requests) @@ -136,6 +176,11 @@ func (s *TrieSync) Process(results []SyncResult) (int, error) { return 0, nil } +// Pending returns the number of state entries currently pending for download. +func (s *TrieSync) Pending() int { + return len(s.requests) +} + // schedule inserts a new state retrieval request into the fetch queue. If there // is already a pending request for this node, the new request will be discarded // and only a parent reference added to the old one. @@ -213,9 +258,16 @@ func (s *TrieSync) children(req *request) ([]*request, error) { // commit finalizes a retrieval request and stores it into the database. If any // of the referencing parent requests complete due to this commit, they are also // committed themselves. -func (s *TrieSync) commit(req *request) error { +func (s *TrieSync) commit(req *request, batch ethdb.Batch) (err error) { + // Create a new batch if none was specified + if batch == nil { + batch = s.database.NewBatch() + defer func() { + err = batch.Write() + }() + } // Write the node content to disk - if err := s.database.Put(req.hash[:], req.data); err != nil { + if err := batch.Put(req.hash[:], req.data); err != nil { return err } delete(s.requests, req.hash) @@ -224,7 +276,7 @@ func (s *TrieSync) commit(req *request) error { for _, parent := range req.parents { parent.deps-- if parent.deps == 0 { - if err := s.commit(parent); err != nil { + if err := s.commit(parent, batch); err != nil { return err } } diff --git a/trie/trie.go b/trie/trie.go index aa8d39fe2..a3a383fb5 100644 --- a/trie/trie.go +++ b/trie/trie.go @@ -24,6 +24,7 @@ import ( "hash" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto/sha3" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" @@ -35,8 +36,12 @@ const defaultCacheCapacity = 800 var ( // The global cache stores decoded trie nodes by hash as they get loaded. globalCache = newARC(defaultCacheCapacity) + // This is the known root hash of an empty trie. emptyRoot = common.HexToHash("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") + + // This is the known hash of an empty state trie entry. + emptyState = crypto.Sha3Hash(nil) ) var ErrMissingRoot = errors.New("missing root node") -- cgit v1.2.3 From a9d8dfc8e77330412b1f21e25a69b96d59567e36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Fri, 9 Oct 2015 16:21:47 +0300 Subject: core, eth: roll back uncertain headers in failed fast syncs --- core/blockchain.go | 37 ++++++++++++++++++- core/blockchain_test.go | 15 +++++++- eth/downloader/downloader.go | 60 +++++++++++++++++++++++++----- eth/downloader/downloader_test.go | 78 ++++++++++++++++++++++++++++++++++++++- eth/downloader/types.go | 3 ++ eth/handler.go | 2 +- 6 files changed, 180 insertions(+), 15 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 3e7dfa9ee..490552ea0 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -245,7 +245,21 @@ func (bc *BlockChain) SetHead(head uint64) { if bc.currentBlock == nil { bc.currentBlock = bc.genesisBlock } - bc.insert(bc.currentBlock) + if bc.currentHeader == nil { + bc.currentHeader = bc.genesisBlock.Header() + } + if bc.currentFastBlock == nil { + bc.currentFastBlock = bc.genesisBlock + } + if err := WriteHeadBlockHash(bc.chainDb, bc.currentBlock.Hash()); err != nil { + glog.Fatalf("failed to reset head block hash: %v", err) + } + if err := WriteHeadHeaderHash(bc.chainDb, bc.currentHeader.Hash()); err != nil { + glog.Fatalf("failed to reset head header hash: %v", err) + } + if err := WriteHeadFastBlockHash(bc.chainDb, bc.currentFastBlock.Hash()); err != nil { + glog.Fatalf("failed to reset head fast block hash: %v", err) + } bc.loadLastState() } @@ -790,6 +804,27 @@ func (self *BlockChain) InsertHeaderChain(chain []*types.Header, checkFreq int) return 0, nil } +// Rollback is designed to remove a chain of links from the database that aren't +// certain enough to be valid. +func (self *BlockChain) Rollback(chain []common.Hash) { + for i := len(chain) - 1; i >= 0; i-- { + hash := chain[i] + + if self.currentHeader.Hash() == hash { + self.currentHeader = self.GetHeader(self.currentHeader.ParentHash) + WriteHeadHeaderHash(self.chainDb, self.currentHeader.Hash()) + } + if self.currentFastBlock.Hash() == hash { + self.currentFastBlock = self.GetBlock(self.currentFastBlock.ParentHash()) + WriteHeadFastBlockHash(self.chainDb, self.currentFastBlock.Hash()) + } + if self.currentBlock.Hash() == hash { + self.currentBlock = self.GetBlock(self.currentBlock.ParentHash()) + WriteHeadBlockHash(self.chainDb, self.currentBlock.Hash()) + } + } +} + // InsertReceiptChain attempts to complete an already existing header chain with // transaction and receipt data. func (self *BlockChain) InsertReceiptChain(blockChain types.Blocks, receiptChain []types.Receipts) (int, error) { diff --git a/core/blockchain_test.go b/core/blockchain_test.go index a614aaa2f..01667c21e 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -599,8 +599,8 @@ func testReorgBadHashes(t *testing.T, full bool) { t.Errorf("last block gasLimit mismatch: have: %x, want %x", ncm.GasLimit(), blocks[2].Header().GasLimit) } } else { - if ncm.CurrentHeader().Hash() != genesis.Hash() { - t.Errorf("last header hash mismatch: have: %x, want %x", ncm.CurrentHeader().Hash(), genesis.Hash()) + if ncm.CurrentHeader().Hash() != headers[2].Hash() { + t.Errorf("last header hash mismatch: have: %x, want %x", ncm.CurrentHeader().Hash(), headers[2].Hash()) } } } @@ -775,6 +775,11 @@ func TestLightVsFastVsFullChainHeads(t *testing.T) { height := uint64(1024) blocks, receipts := GenerateChain(genesis, gendb, int(height), nil) + // Configure a subchain to roll back + remove := []common.Hash{} + for _, block := range blocks[height/2:] { + remove = append(remove, block.Hash()) + } // Create a small assertion method to check the three heads assert := func(t *testing.T, kind string, chain *BlockChain, header uint64, fast uint64, block uint64) { if num := chain.CurrentBlock().NumberU64(); num != block { @@ -798,6 +803,8 @@ func TestLightVsFastVsFullChainHeads(t *testing.T) { t.Fatalf("failed to process block %d: %v", n, err) } assert(t, "archive", archive, height, height, height) + archive.Rollback(remove) + assert(t, "archive", archive, height/2, height/2, height/2) // Import the chain as a non-archive node and ensure all pointers are updated fastDb, _ := ethdb.NewMemDatabase() @@ -816,6 +823,8 @@ func TestLightVsFastVsFullChainHeads(t *testing.T) { t.Fatalf("failed to insert receipt %d: %v", n, err) } assert(t, "fast", fast, height, height, 0) + fast.Rollback(remove) + assert(t, "fast", fast, height/2, height/2, 0) // Import the chain as a light node and ensure all pointers are updated lightDb, _ := ethdb.NewMemDatabase() @@ -827,6 +836,8 @@ func TestLightVsFastVsFullChainHeads(t *testing.T) { t.Fatalf("failed to insert header %d: %v", n, err) } assert(t, "light", light, height, 0, 0) + light.Rollback(remove) + assert(t, "light", light, height/2, 0, 0) } // Tests that chain reorganizations handle transaction removals and reinsertions. diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index e19b70dfd..0298dfa0b 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -59,8 +59,8 @@ var ( maxQueuedStates = 256 * 1024 // [eth/63] Maximum number of state requests to queue (DOS protection) maxResultsProcess = 256 // Number of download results to import at once into the chain - headerCheckFrequency = 64 // Verification frequency of the downloaded headers during fast sync - minCheckedHeaders = 1024 // Number of headers to verify fully when approaching the chain head + headerCheckFrequency = 100 // Verification frequency of the downloaded headers during fast sync + minCheckedHeaders = 2048 // Number of headers to verify fully when approaching the chain head minFullBlocks = 1024 // Number of blocks to retrieve fully even in fast sync ) @@ -117,6 +117,7 @@ type Downloader struct { insertHeaders headerChainInsertFn // Injects a batch of headers into the chain insertBlocks blockChainInsertFn // Injects a batch of blocks into the chain insertReceipts receiptChainInsertFn // Injects a batch of blocks and their receipts into the chain + rollback chainRollbackFn // Removes a batch of recently added chain links dropPeer peerDropFn // Drops a peer for misbehaving // Status @@ -152,7 +153,7 @@ type Downloader struct { func New(mode SyncMode, stateDb ethdb.Database, mux *event.TypeMux, hasHeader headerCheckFn, hasBlock blockCheckFn, getHeader headerRetrievalFn, getBlock blockRetrievalFn, headHeader headHeaderRetrievalFn, headBlock headBlockRetrievalFn, headFastBlock headFastBlockRetrievalFn, commitHeadBlock headBlockCommitterFn, getTd tdRetrievalFn, insertHeaders headerChainInsertFn, insertBlocks blockChainInsertFn, - insertReceipts receiptChainInsertFn, dropPeer peerDropFn) *Downloader { + insertReceipts receiptChainInsertFn, rollback chainRollbackFn, dropPeer peerDropFn) *Downloader { return &Downloader{ mode: mode, @@ -171,6 +172,7 @@ func New(mode SyncMode, stateDb ethdb.Database, mux *event.TypeMux, hasHeader he insertHeaders: insertHeaders, insertBlocks: insertBlocks, insertReceipts: insertReceipts, + rollback: rollback, dropPeer: dropPeer, newPeerCh: make(chan *peer, 1), hashCh: make(chan dataPack, 1), @@ -383,7 +385,7 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e d.syncStatsChainHeight = latest d.syncStatsLock.Unlock() - // Initiate the sync using a concurrent header and content retrieval algorithm + // Initiate the sync using a concurrent header and content retrieval algorithm pivot := uint64(0) if latest > uint64(minFullBlocks) { pivot = latest - uint64(minFullBlocks) @@ -394,10 +396,10 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e d.syncInitHook(origin, latest) } errc := make(chan error, 4) - go func() { errc <- d.fetchHeaders(p, td, origin+1) }() // Headers are always retrieved - go func() { errc <- d.fetchBodies(origin + 1) }() // Bodies are retrieved during normal and fast sync - go func() { errc <- d.fetchReceipts(origin + 1) }() // Receipts are retrieved during fast sync - go func() { errc <- d.fetchNodeData() }() // Node state data is retrieved during fast sync + go func() { errc <- d.fetchHeaders(p, td, origin+1, latest) }() // Headers are always retrieved + go func() { errc <- d.fetchBodies(origin + 1) }() // Bodies are retrieved during normal and fast sync + go func() { errc <- d.fetchReceipts(origin + 1) }() // Receipts are retrieved during fast sync + go func() { errc <- d.fetchNodeData() }() // Node state data is retrieved during fast sync // If any fetcher fails, cancel the others var fail error @@ -1049,10 +1051,28 @@ func (d *Downloader) findAncestor(p *peer) (uint64, error) { // // The queue parameter can be used to switch between queuing headers for block // body download too, or directly import as pure header chains. -func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error { +func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from, latest uint64) error { glog.V(logger.Debug).Infof("%v: downloading headers from #%d", p, from) defer glog.V(logger.Debug).Infof("%v: header download terminated", p) + // Keep a count of uncertain headers to roll back + rollback := []*types.Header{} + defer func() { + if len(rollback) > 0 { + hashes := make([]common.Hash, len(rollback)) + for i, header := range rollback { + hashes[i] = header.Hash() + } + d.rollback(hashes) + } + }() + // Calculate the pivoting point for switching from fast to slow sync + pivot := uint64(0) + if d.mode == FastSync && latest > uint64(minFullBlocks) { + pivot = latest - uint64(minFullBlocks) + } else if d.mode == LightSync { + pivot = latest + } // Create a timeout timer, and the associated hash fetcher request := time.Now() // time of the last fetch request timeout := time.NewTimer(0) // timer to dump a non-responsive active peer @@ -1124,10 +1144,30 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error { glog.V(logger.Detail).Infof("%v: schedule %d headers from #%d", p, len(headers), from) if d.mode == FastSync || d.mode == LightSync { - if n, err := d.insertHeaders(headers, headerCheckFrequency); err != nil { + // Collect the yet unknown headers to mark them as uncertain + unknown := make([]*types.Header, 0, len(headers)) + for _, header := range headers { + if !d.hasHeader(header.Hash()) { + unknown = append(unknown, header) + } + } + // If we're importing pure headers, verify based on their recentness + frequency := headerCheckFrequency + if headers[len(headers)-1].Number.Uint64()+uint64(minCheckedHeaders) > pivot { + frequency = 1 + } + if n, err := d.insertHeaders(headers, frequency); err != nil { glog.V(logger.Debug).Infof("%v: invalid header #%d [%x…]: %v", p, headers[n].Number, headers[n].Hash().Bytes()[:4], err) return errInvalidChain } + // All verifications passed, store newly found uncertain headers + rollback = append(rollback, unknown...) + if len(rollback) > minCheckedHeaders { + rollback = append(rollback[:0], rollback[len(rollback)-minCheckedHeaders:]...) + } + if headers[len(headers)-1].Number.Uint64() >= pivot { + rollback = rollback[:0] + } } if d.mode == FullSync || d.mode == FastSync { inserts := d.queue.Schedule(headers, from) diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index 0e60371b3..f01650ebd 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -152,7 +152,7 @@ func newTester(mode SyncMode) *downloadTester { tester.stateDb, _ = ethdb.NewMemDatabase() tester.downloader = New(mode, tester.stateDb, new(event.TypeMux), tester.hasHeader, tester.hasBlock, tester.getHeader, tester.getBlock, tester.headHeader, tester.headBlock, tester.headFastBlock, tester.commitHeadBlock, tester.getTd, - tester.insertHeaders, tester.insertBlocks, tester.insertReceipts, tester.dropPeer) + tester.insertHeaders, tester.insertBlocks, tester.insertReceipts, tester.rollback, tester.dropPeer) return tester } @@ -272,6 +272,16 @@ func (dl *downloadTester) insertHeaders(headers []*types.Header, checkFreq int) dl.lock.Lock() defer dl.lock.Unlock() + // Do a quick check, as the blockchain.InsertHeaderChain doesn't insert anthing in case of errors + if _, ok := dl.ownHeaders[headers[0].ParentHash]; !ok { + return 0, errors.New("unknown parent") + } + for i := 1; i < len(headers); i++ { + if headers[i].ParentHash != headers[i-1].Hash() { + return i, errors.New("unknown parent") + } + } + // Do a full insert if pre-checks passed for i, header := range headers { if _, ok := dl.ownHeaders[header.Hash()]; ok { continue @@ -322,6 +332,22 @@ func (dl *downloadTester) insertReceipts(blocks types.Blocks, receipts []types.R return len(blocks), nil } +// rollback removes some recently added elements from the chain. +func (dl *downloadTester) rollback(hashes []common.Hash) { + dl.lock.Lock() + defer dl.lock.Unlock() + + for i := len(hashes) - 1; i >= 0; i-- { + if dl.ownHashes[len(dl.ownHashes)-1] == hashes[i] { + dl.ownHashes = dl.ownHashes[:len(dl.ownHashes)-1] + } + delete(dl.ownChainTd, hashes[i]) + delete(dl.ownHeaders, hashes[i]) + delete(dl.ownReceipts, hashes[i]) + delete(dl.ownBlocks, hashes[i]) + } +} + // newPeer registers a new block download source into the downloader. func (dl *downloadTester) newPeer(id string, version int, hashes []common.Hash, headers map[common.Hash]*types.Header, blocks map[common.Hash]*types.Block, receipts map[common.Hash]types.Receipts) error { return dl.newSlowPeer(id, version, hashes, headers, blocks, receipts, 0) @@ -1031,6 +1057,56 @@ func testShiftedHeaderAttack(t *testing.T, protocol int, mode SyncMode) { assertOwnChain(t, tester, targetBlocks+1) } +// Tests that upon detecting an invalid header, the recent ones are rolled back +func TestInvalidHeaderRollback63Fast(t *testing.T) { testInvalidHeaderRollback(t, 63, FastSync) } +func TestInvalidHeaderRollback64Fast(t *testing.T) { testInvalidHeaderRollback(t, 64, FastSync) } +func TestInvalidHeaderRollback64Light(t *testing.T) { testInvalidHeaderRollback(t, 64, LightSync) } + +func testInvalidHeaderRollback(t *testing.T, protocol int, mode SyncMode) { + // Create a small enough block chain to download + targetBlocks := 3*minCheckedHeaders + minFullBlocks + hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) + + tester := newTester(mode) + + // Attempt to sync with an attacker that feeds junk during the fast sync phase + tester.newPeer("fast-attack", protocol, hashes, headers, blocks, receipts) + missing := minCheckedHeaders + MaxHeaderFetch + 1 + delete(tester.peerHeaders["fast-attack"], hashes[len(hashes)-missing]) + + if err := tester.sync("fast-attack", nil); err == nil { + t.Fatalf("succeeded fast attacker synchronisation") + } + if head := tester.headHeader().Number.Int64(); int(head) > MaxHeaderFetch { + t.Fatalf("rollback head mismatch: have %v, want at most %v", head, MaxHeaderFetch) + } + // Attempt to sync with an attacker that feeds junk during the block import phase + tester.newPeer("block-attack", protocol, hashes, headers, blocks, receipts) + missing = 3*minCheckedHeaders + MaxHeaderFetch + 1 + delete(tester.peerHeaders["block-attack"], hashes[len(hashes)-missing]) + + if err := tester.sync("block-attack", nil); err == nil { + t.Fatalf("succeeded block attacker synchronisation") + } + if mode == FastSync { + // Fast sync should not discard anything below the verified pivot point + if head := tester.headHeader().Number.Int64(); int(head) < 3*minCheckedHeaders { + t.Fatalf("rollback head mismatch: have %v, want at least %v", head, 3*minCheckedHeaders) + } + } else if mode == LightSync { + // Light sync should still discard data as before + if head := tester.headHeader().Number.Int64(); int(head) > 3*minCheckedHeaders { + t.Fatalf("rollback head mismatch: have %v, want at most %v", head, 3*minCheckedHeaders) + } + } + // Synchronise with the valid peer and make sure sync succeeds + tester.newPeer("valid", protocol, hashes, headers, blocks, receipts) + if err := tester.sync("valid", nil); err != nil { + t.Fatalf("failed to synchronise blocks: %v", err) + } + assertOwnChain(t, tester, targetBlocks+1) +} + // Tests that if a peer sends an invalid block piece (body or receipt) for a // requested block, it gets dropped immediately by the downloader. func TestInvalidContentAttack62(t *testing.T) { testInvalidContentAttack(t, 62, FullSync) } diff --git a/eth/downloader/types.go b/eth/downloader/types.go index 60d9a2b12..5937be606 100644 --- a/eth/downloader/types.go +++ b/eth/downloader/types.go @@ -60,6 +60,9 @@ type blockChainInsertFn func(types.Blocks) (int, error) // receiptChainInsertFn is a callback type to insert a batch of receipts into the local chain. type receiptChainInsertFn func(types.Blocks, []types.Receipts) (int, error) +// chainRollbackFn is a callback type to remove a few recently added elements from the local chain. +type chainRollbackFn func([]common.Hash) + // peerDropFn is a callback type for dropping a peer detected as malicious. type peerDropFn func(id string) diff --git a/eth/handler.go b/eth/handler.go index b0916d50b..40a578842 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -131,7 +131,7 @@ func NewProtocolManager(mode Mode, networkId int, mux *event.TypeMux, txpool txP } manager.downloader = downloader.New(syncMode, chaindb, manager.eventMux, blockchain.HasHeader, blockchain.HasBlock, blockchain.GetHeader, blockchain.GetBlock, blockchain.CurrentHeader, blockchain.CurrentBlock, blockchain.CurrentFastBlock, blockchain.FastSyncCommitHead, - blockchain.GetTd, blockchain.InsertHeaderChain, blockchain.InsertChain, blockchain.InsertReceiptChain, manager.removePeer) + blockchain.GetTd, blockchain.InsertHeaderChain, blockchain.InsertChain, blockchain.InsertReceiptChain, blockchain.Rollback, manager.removePeer) validator := func(block *types.Block, parent *types.Block) error { return core.ValidateHeader(pow, block.Header(), parent.Header(), true, false) -- cgit v1.2.3 From aa0538db0b5de2bb2c609d629b65d083649f9171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Fri, 9 Oct 2015 18:36:31 +0300 Subject: eth: clean out light node notions from eth --- cmd/geth/main.go | 4 +--- cmd/utils/flags.go | 39 ++++----------------------------------- eth/backend.go | 4 ++-- eth/downloader/queue.go | 10 ++++++---- eth/handler.go | 17 ++++++----------- eth/handler_test.go | 27 +++++++++++---------------- eth/helper_test.go | 8 ++++---- eth/protocol.go | 27 ++------------------------- eth/protocol_test.go | 9 +++------ 9 files changed, 39 insertions(+), 106 deletions(-) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index ca86fb26f..3e3a3eb03 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -304,8 +304,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso utils.DataDirFlag, utils.BlockchainVersionFlag, utils.OlympicFlag, - utils.EthModeFlag, - utils.EthVersionFlag, + utils.FastSyncFlag, utils.CacheFlag, utils.JSpathFlag, utils.ListenPortFlag, @@ -361,7 +360,6 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso utils.SetupLogger(ctx) utils.SetupNetwork(ctx) utils.SetupVM(ctx) - utils.SetupEth(ctx) if ctx.GlobalBool(utils.PProfEanbledFlag.Name) { utils.StartPProf(ctx) } diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 792fcb41d..060d80b35 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -28,7 +28,6 @@ import ( "path/filepath" "runtime" "strconv" - "strings" "github.com/codegangsta/cli" "github.com/ethereum/ethash" @@ -149,15 +148,9 @@ var ( Name: "olympic", Usage: "Use olympic style protocol", } - EthModeFlag = cli.StringFlag{ - Name: "mode", - Value: "archive", - Usage: "Client mode of operation (archive, full, light)", - } - EthVersionFlag = cli.IntFlag{ - Name: "eth", - Value: 63, - Usage: "Highest eth protocol to advertise (temporary, dev option)", + FastSyncFlag = cli.BoolFlag{ + Name: "fast", + Usage: "Enables fast syncing through state downloads", } // miner settings @@ -431,25 +424,13 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config { if err != nil { glog.V(logger.Error).Infoln("WARNING: No etherbase set and no accounts found as default") } - // Resolve the mode of opeation from the string flag - var clientMode eth.Mode - switch strings.ToLower(ctx.GlobalString(EthModeFlag.Name)) { - case "archive": - clientMode = eth.ArchiveMode - case "full": - clientMode = eth.FullMode - case "light": - clientMode = eth.LightMode - default: - glog.Fatalf("Unknown node type requested: %s", ctx.GlobalString(EthModeFlag.Name)) - } // Assemble the entire eth configuration and return cfg := ð.Config{ Name: common.MakeName(clientID, version), DataDir: MustDataDir(ctx), GenesisNonce: ctx.GlobalInt(GenesisNonceFlag.Name), GenesisFile: ctx.GlobalString(GenesisFileFlag.Name), - Mode: clientMode, + FastSync: ctx.GlobalBool(FastSyncFlag.Name), BlockChainVersion: ctx.GlobalInt(BlockchainVersionFlag.Name), DatabaseCache: ctx.GlobalInt(CacheFlag.Name), SkipBcVersionCheck: false, @@ -550,18 +531,6 @@ func SetupVM(ctx *cli.Context) { vm.SetJITCacheSize(ctx.GlobalInt(VMJitCacheFlag.Name)) } -// SetupEth configures the eth packages global settings -func SetupEth(ctx *cli.Context) { - version := ctx.GlobalInt(EthVersionFlag.Name) - for len(eth.ProtocolVersions) > 0 && eth.ProtocolVersions[0] > uint(version) { - eth.ProtocolVersions = eth.ProtocolVersions[1:] - eth.ProtocolLengths = eth.ProtocolLengths[1:] - } - if len(eth.ProtocolVersions) == 0 { - Fatalf("No valid eth protocols remaining") - } -} - // MakeChain creates a chain manager from set command line flags. func MakeChain(ctx *cli.Context) (chain *core.BlockChain, chainDb ethdb.Database) { datadir := MustDataDir(ctx) diff --git a/eth/backend.go b/eth/backend.go index f4acc76cb..0a3791783 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -88,8 +88,8 @@ type Config struct { GenesisNonce int GenesisFile string GenesisBlock *types.Block // used by block tests + FastSync bool Olympic bool - Mode Mode BlockChainVersion int SkipBcVersionCheck bool // e.g. blockchain export @@ -399,7 +399,7 @@ func New(config *Config) (*Ethereum, error) { eth.blockProcessor = core.NewBlockProcessor(chainDb, eth.pow, eth.blockchain, eth.EventMux()) eth.blockchain.SetProcessor(eth.blockProcessor) - if eth.protocolManager, err = NewProtocolManager(config.Mode, config.NetworkId, eth.eventMux, eth.txPool, eth.pow, eth.blockchain, chainDb); err != nil { + if eth.protocolManager, err = NewProtocolManager(config.FastSync, config.NetworkId, eth.eventMux, eth.txPool, eth.pow, eth.blockchain, chainDb); err != nil { return nil, err } eth.miner = miner.New(eth, eth.EventMux(), eth.pow) diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go index bb8d892cd..17fbb1c7f 100644 --- a/eth/downloader/queue.go +++ b/eth/downloader/queue.go @@ -422,10 +422,12 @@ func (q *queue) ReserveNodeData(p *peer, count int) *fetchRequest { q.stateSchedLock.Lock() defer q.stateSchedLock.Unlock() - for _, hash := range q.stateScheduler.Missing(max) { - q.stateTaskPool[hash] = q.stateTaskIndex - q.stateTaskQueue.Push(hash, -float32(q.stateTaskIndex)) - q.stateTaskIndex++ + if q.stateScheduler != nil { + for _, hash := range q.stateScheduler.Missing(max) { + q.stateTaskPool[hash] = q.stateTaskIndex + q.stateTaskQueue.Push(hash, -float32(q.stateTaskIndex)) + q.stateTaskIndex++ + } } } return q.reserveHashes(p, count, q.stateTaskQueue, generator, q.statePendPool, count) diff --git a/eth/handler.go b/eth/handler.go index 40a578842..725178035 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -55,7 +55,7 @@ type hashFetcherFn func(common.Hash) error type blockFetcherFn func([]common.Hash) error type ProtocolManager struct { - mode Mode + fastSync bool txpool txPool blockchain *core.BlockChain chaindb ethdb.Database @@ -83,10 +83,10 @@ type ProtocolManager struct { // NewProtocolManager returns a new ethereum sub protocol manager. The Ethereum sub protocol manages peers capable // with the ethereum network. -func NewProtocolManager(mode Mode, networkId int, mux *event.TypeMux, txpool txPool, pow pow.PoW, blockchain *core.BlockChain, chaindb ethdb.Database) (*ProtocolManager, error) { +func NewProtocolManager(fastSync bool, networkId int, mux *event.TypeMux, txpool txPool, pow pow.PoW, blockchain *core.BlockChain, chaindb ethdb.Database) (*ProtocolManager, error) { // Create the protocol manager with the base fields manager := &ProtocolManager{ - mode: mode, + fastSync: fastSync, eventMux: mux, txpool: txpool, blockchain: blockchain, @@ -100,7 +100,7 @@ func NewProtocolManager(mode Mode, networkId int, mux *event.TypeMux, txpool txP manager.SubProtocols = make([]p2p.Protocol, 0, len(ProtocolVersions)) for i, version := range ProtocolVersions { // Skip protocol version if incompatible with the mode of operation - if minimumProtocolVersion[mode] > version { + if fastSync && version < eth63 { continue } // Compatible, initialize the sub-protocol @@ -120,14 +120,9 @@ func NewProtocolManager(mode Mode, networkId int, mux *event.TypeMux, txpool txP return nil, errIncompatibleConfig } // Construct the different synchronisation mechanisms - var syncMode downloader.SyncMode - switch mode { - case ArchiveMode: - syncMode = downloader.FullSync - case FullMode: + syncMode := downloader.FullSync + if fastSync { syncMode = downloader.FastSync - case LightMode: - syncMode = downloader.LightSync } manager.downloader = downloader.New(syncMode, chaindb, manager.eventMux, blockchain.HasHeader, blockchain.HasBlock, blockchain.GetHeader, blockchain.GetBlock, blockchain.CurrentHeader, blockchain.CurrentBlock, blockchain.CurrentFastBlock, blockchain.FastSyncCommitHead, diff --git a/eth/handler_test.go b/eth/handler_test.go index 5ddfc4a8f..843b02fd4 100644 --- a/eth/handler_test.go +++ b/eth/handler_test.go @@ -22,12 +22,11 @@ func TestProtocolCompatibility(t *testing.T) { // Define the compatibility chart tests := []struct { version uint - mode Mode + fastSync bool compatible bool }{ - {61, ArchiveMode, true}, {62, ArchiveMode, true}, {63, ArchiveMode, true}, {64, ArchiveMode, true}, - {61, FullMode, false}, {62, FullMode, false}, {63, FullMode, true}, {64, FullMode, true}, - {61, LightMode, false}, {62, LightMode, false}, {63, LightMode, false}, {64, LightMode, true}, + {61, false, true}, {62, false, true}, {63, false, true}, + {61, true, false}, {62, true, false}, {63, true, true}, } // Make sure anything we screw up is restored backup := ProtocolVersions @@ -37,7 +36,7 @@ func TestProtocolCompatibility(t *testing.T) { for i, tt := range tests { ProtocolVersions = []uint{tt.version} - pm, err := newTestProtocolManager(tt.mode, 0, nil, nil) + pm, err := newTestProtocolManager(tt.fastSync, 0, nil, nil) if pm != nil { defer pm.Stop() } @@ -52,7 +51,7 @@ func TestProtocolCompatibility(t *testing.T) { func TestGetBlockHashes61(t *testing.T) { testGetBlockHashes(t, 61) } func testGetBlockHashes(t *testing.T, protocol int) { - pm := newTestProtocolManagerMust(t, ArchiveMode, downloader.MaxHashFetch+15, nil, nil) + pm := newTestProtocolManagerMust(t, false, downloader.MaxHashFetch+15, nil, nil) peer, _ := newTestPeer("peer", protocol, pm, true) defer peer.close() @@ -95,7 +94,7 @@ func testGetBlockHashes(t *testing.T, protocol int) { func TestGetBlockHashesFromNumber61(t *testing.T) { testGetBlockHashesFromNumber(t, 61) } func testGetBlockHashesFromNumber(t *testing.T, protocol int) { - pm := newTestProtocolManagerMust(t, ArchiveMode, downloader.MaxHashFetch+15, nil, nil) + pm := newTestProtocolManagerMust(t, false, downloader.MaxHashFetch+15, nil, nil) peer, _ := newTestPeer("peer", protocol, pm, true) defer peer.close() @@ -135,7 +134,7 @@ func testGetBlockHashesFromNumber(t *testing.T, protocol int) { func TestGetBlocks61(t *testing.T) { testGetBlocks(t, 61) } func testGetBlocks(t *testing.T, protocol int) { - pm := newTestProtocolManagerMust(t, ArchiveMode, downloader.MaxHashFetch+15, nil, nil) + pm := newTestProtocolManagerMust(t, false, downloader.MaxHashFetch+15, nil, nil) peer, _ := newTestPeer("peer", protocol, pm, true) defer peer.close() @@ -204,10 +203,9 @@ func testGetBlocks(t *testing.T, protocol int) { // Tests that block headers can be retrieved from a remote chain based on user queries. func TestGetBlockHeaders62(t *testing.T) { testGetBlockHeaders(t, 62) } func TestGetBlockHeaders63(t *testing.T) { testGetBlockHeaders(t, 63) } -func TestGetBlockHeaders64(t *testing.T) { testGetBlockHeaders(t, 64) } func testGetBlockHeaders(t *testing.T, protocol int) { - pm := newTestProtocolManagerMust(t, ArchiveMode, downloader.MaxHashFetch+15, nil, nil) + pm := newTestProtocolManagerMust(t, false, downloader.MaxHashFetch+15, nil, nil) peer, _ := newTestPeer("peer", protocol, pm, true) defer peer.close() @@ -330,10 +328,9 @@ func testGetBlockHeaders(t *testing.T, protocol int) { // Tests that block contents can be retrieved from a remote chain based on their hashes. func TestGetBlockBodies62(t *testing.T) { testGetBlockBodies(t, 62) } func TestGetBlockBodies63(t *testing.T) { testGetBlockBodies(t, 63) } -func TestGetBlockBodies64(t *testing.T) { testGetBlockBodies(t, 64) } func testGetBlockBodies(t *testing.T, protocol int) { - pm := newTestProtocolManagerMust(t, ArchiveMode, downloader.MaxBlockFetch+15, nil, nil) + pm := newTestProtocolManagerMust(t, false, downloader.MaxBlockFetch+15, nil, nil) peer, _ := newTestPeer("peer", protocol, pm, true) defer peer.close() @@ -402,7 +399,6 @@ func testGetBlockBodies(t *testing.T, protocol int) { // Tests that the node state database can be retrieved based on hashes. func TestGetNodeData63(t *testing.T) { testGetNodeData(t, 63) } -func TestGetNodeData64(t *testing.T) { testGetNodeData(t, 64) } func testGetNodeData(t *testing.T, protocol int) { // Define three accounts to simulate transactions with @@ -440,7 +436,7 @@ func testGetNodeData(t *testing.T, protocol int) { } } // Assemble the test environment - pm := newTestProtocolManagerMust(t, ArchiveMode, 4, generator, nil) + pm := newTestProtocolManagerMust(t, false, 4, generator, nil) peer, _ := newTestPeer("peer", protocol, pm, true) defer peer.close() @@ -492,7 +488,6 @@ func testGetNodeData(t *testing.T, protocol int) { // Tests that the transaction receipts can be retrieved based on hashes. func TestGetReceipt63(t *testing.T) { testGetReceipt(t, 63) } -func TestGetReceipt64(t *testing.T) { testGetReceipt(t, 64) } func testGetReceipt(t *testing.T, protocol int) { // Define three accounts to simulate transactions with @@ -530,7 +525,7 @@ func testGetReceipt(t *testing.T, protocol int) { } } // Assemble the test environment - pm := newTestProtocolManagerMust(t, ArchiveMode, 4, generator, nil) + pm := newTestProtocolManagerMust(t, false, 4, generator, nil) peer, _ := newTestPeer("peer", protocol, pm, true) defer peer.close() diff --git a/eth/helper_test.go b/eth/helper_test.go index ede0e3f15..16907be8b 100644 --- a/eth/helper_test.go +++ b/eth/helper_test.go @@ -28,7 +28,7 @@ var ( // newTestProtocolManager creates a new protocol manager for testing purposes, // with the given number of blocks already known, and potential notification // channels for different events. -func newTestProtocolManager(mode Mode, blocks int, generator func(int, *core.BlockGen), newtx chan<- []*types.Transaction) (*ProtocolManager, error) { +func newTestProtocolManager(fastSync bool, blocks int, generator func(int, *core.BlockGen), newtx chan<- []*types.Transaction) (*ProtocolManager, error) { var ( evmux = new(event.TypeMux) pow = new(core.FakePow) @@ -42,7 +42,7 @@ func newTestProtocolManager(mode Mode, blocks int, generator func(int, *core.Blo if _, err := blockchain.InsertChain(chain); err != nil { panic(err) } - pm, err := NewProtocolManager(mode, NetworkId, evmux, &testTxPool{added: newtx}, pow, blockchain, db) + pm, err := NewProtocolManager(fastSync, NetworkId, evmux, &testTxPool{added: newtx}, pow, blockchain, db) if err != nil { return nil, err } @@ -54,8 +54,8 @@ func newTestProtocolManager(mode Mode, blocks int, generator func(int, *core.Blo // with the given number of blocks already known, and potential notification // channels for different events. In case of an error, the constructor force- // fails the test. -func newTestProtocolManagerMust(t *testing.T, mode Mode, blocks int, generator func(int, *core.BlockGen), newtx chan<- []*types.Transaction) *ProtocolManager { - pm, err := newTestProtocolManager(mode, blocks, generator, newtx) +func newTestProtocolManagerMust(t *testing.T, fastSync bool, blocks int, generator func(int, *core.BlockGen), newtx chan<- []*types.Transaction) *ProtocolManager { + pm, err := newTestProtocolManager(fastSync, blocks, generator, newtx) if err != nil { t.Fatalf("Failed to create protocol manager: %v", err) } diff --git a/eth/protocol.go b/eth/protocol.go index f2b98a8b1..410347ed3 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -26,36 +26,18 @@ import ( "github.com/ethereum/go-ethereum/rlp" ) -// Mode represents the mode of operation of the eth client. -type Mode int - -const ( - ArchiveMode Mode = iota // Maintain the entire blockchain history - FullMode // Maintain only a recent view of the blockchain - LightMode // Don't maintain any history, rather fetch on demand -) - // Constants to match up protocol versions and messages const ( eth61 = 61 eth62 = 62 eth63 = 63 - eth64 = 64 ) -// minimumProtocolVersion is the minimum version of the protocol eth must run to -// support the desired mode of operation. -var minimumProtocolVersion = map[Mode]uint{ - ArchiveMode: eth61, - FullMode: eth63, - LightMode: eth64, -} - // Supported versions of the eth protocol (first is primary). -var ProtocolVersions = []uint{eth64, eth63, eth62, eth61} +var ProtocolVersions = []uint{eth63, eth62, eth61} // Number of implemented message corresponding to different protocol versions. -var ProtocolLengths = []uint64{19, 17, 8, 9} +var ProtocolLengths = []uint64{17, 8, 9} const ( NetworkId = 1 @@ -90,11 +72,6 @@ const ( NodeDataMsg = 0x0e GetReceiptsMsg = 0x0f ReceiptsMsg = 0x10 - - // Protocol messages belonging to eth/64 - GetAcctProofMsg = 0x11 - GetStorageDataProof = 0x12 - Proof = 0x13 ) type errCode int diff --git a/eth/protocol_test.go b/eth/protocol_test.go index bac519ae3..372c7e203 100644 --- a/eth/protocol_test.go +++ b/eth/protocol_test.go @@ -41,10 +41,9 @@ var testAccount = crypto.NewKey(rand.Reader) func TestStatusMsgErrors61(t *testing.T) { testStatusMsgErrors(t, 61) } func TestStatusMsgErrors62(t *testing.T) { testStatusMsgErrors(t, 62) } func TestStatusMsgErrors63(t *testing.T) { testStatusMsgErrors(t, 63) } -func TestStatusMsgErrors64(t *testing.T) { testStatusMsgErrors(t, 64) } func testStatusMsgErrors(t *testing.T, protocol int) { - pm := newTestProtocolManagerMust(t, ArchiveMode, 0, nil, nil) + pm := newTestProtocolManagerMust(t, false, 0, nil, nil) td, currentBlock, genesis := pm.blockchain.Status() defer pm.Stop() @@ -95,11 +94,10 @@ func testStatusMsgErrors(t *testing.T, protocol int) { func TestRecvTransactions61(t *testing.T) { testRecvTransactions(t, 61) } func TestRecvTransactions62(t *testing.T) { testRecvTransactions(t, 62) } func TestRecvTransactions63(t *testing.T) { testRecvTransactions(t, 63) } -func TestRecvTransactions64(t *testing.T) { testRecvTransactions(t, 64) } func testRecvTransactions(t *testing.T, protocol int) { txAdded := make(chan []*types.Transaction) - pm := newTestProtocolManagerMust(t, ArchiveMode, 0, nil, txAdded) + pm := newTestProtocolManagerMust(t, false, 0, nil, txAdded) p, _ := newTestPeer("peer", protocol, pm, true) defer pm.Stop() defer p.close() @@ -124,10 +122,9 @@ func testRecvTransactions(t *testing.T, protocol int) { func TestSendTransactions61(t *testing.T) { testSendTransactions(t, 61) } func TestSendTransactions62(t *testing.T) { testSendTransactions(t, 62) } func TestSendTransactions63(t *testing.T) { testSendTransactions(t, 63) } -func TestSendTransactions64(t *testing.T) { testSendTransactions(t, 64) } func testSendTransactions(t *testing.T, protocol int) { - pm := newTestProtocolManagerMust(t, ArchiveMode, 0, nil, nil) + pm := newTestProtocolManagerMust(t, false, 0, nil, nil) defer pm.Stop() // Fill the pool with big transactions. -- cgit v1.2.3 From 80f26086eeb126cb87000f283cb5ccc3df95dbcc Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Wed, 21 Oct 2015 02:31:46 +0200 Subject: core, tests: get_hash fix Make sure that we're fetching the hash from the current chain and not the canonical chain. --- core/vm/environment.go | 2 +- core/vm_env.go | 6 ++++-- tests/util.go | 12 +++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/vm/environment.go b/core/vm/environment.go index ec739b26c..299d12674 100644 --- a/core/vm/environment.go +++ b/core/vm/environment.go @@ -39,7 +39,7 @@ type Environment interface { // The block number this VM is invoken on BlockNumber() *big.Int // The n'th hash ago from this block number - GetHash(n uint64) common.Hash + GetHash(uint64) common.Hash // The handler's address Coinbase() common.Address // The current time (block time) diff --git a/core/vm_env.go b/core/vm_env.go index 715fde52f..c8b50debc 100644 --- a/core/vm_env.go +++ b/core/vm_env.go @@ -59,8 +59,10 @@ func (self *VMEnv) SetDepth(i int) { self.depth = i } func (self *VMEnv) VmType() vm.Type { return self.typ } func (self *VMEnv) SetVmType(t vm.Type) { self.typ = t } func (self *VMEnv) GetHash(n uint64) common.Hash { - if block := self.chain.GetBlockByNumber(n); block != nil { - return block.Hash() + for block := self.chain.GetBlock(self.header.ParentHash); block != nil; block = self.chain.GetBlock(block.ParentHash()) { + if block.NumberU64() == n { + return block.Hash() + } } return common.Hash{} diff --git a/tests/util.go b/tests/util.go index bbc671169..571161683 100644 --- a/tests/util.go +++ b/tests/util.go @@ -131,8 +131,8 @@ type Env struct { initial bool Gas *big.Int - origin common.Address - //parent common.Hash + origin common.Address + parent common.Hash coinbase common.Address number *big.Int @@ -163,7 +163,7 @@ func NewEnvFromMap(state *state.StateDB, envValues map[string]string, exeValues env := NewEnv(state) env.origin = common.HexToAddress(exeValues["caller"]) - //env.parent = common.Hex2Bytes(envValues["previousHash"]) + env.parent = common.HexToHash(envValues["previousHash"]) env.coinbase = common.HexToAddress(envValues["currentCoinbase"]) env.number = common.Big(envValues["currentNumber"]) env.time = common.Big(envValues["currentTimestamp"]) @@ -174,10 +174,8 @@ func NewEnvFromMap(state *state.StateDB, envValues map[string]string, exeValues return env } -func (self *Env) Origin() common.Address { return self.origin } -func (self *Env) BlockNumber() *big.Int { return self.number } - -//func (self *Env) PrevHash() []byte { return self.parent } +func (self *Env) Origin() common.Address { return self.origin } +func (self *Env) BlockNumber() *big.Int { return self.number } func (self *Env) Coinbase() common.Address { return self.coinbase } func (self *Env) Time() *big.Int { return self.time } func (self *Env) Difficulty() *big.Int { return self.difficulty } -- cgit v1.2.3 From 5b0ee8ec304663898073b7a4c659e1def23716df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 13 Oct 2015 12:04:25 +0300 Subject: core, eth, trie: fix data races and merge/review issues --- core/block_processor.go | 14 +- core/blockchain.go | 71 +++--- core/blockchain_test.go | 2 +- core/chain_util.go | 2 +- core/chain_util_test.go | 28 +-- core/state/sync.go | 3 +- core/state/sync_test.go | 4 +- core/types/receipt.go | 10 +- core/vm/log.go | 2 +- eth/backend.go | 1 - eth/backend_test.go | 10 +- eth/downloader/downloader.go | 191 ++++++++++------ eth/downloader/downloader_test.go | 464 +++++++++++++++++++++----------------- eth/downloader/modes.go | 4 +- eth/downloader/peer.go | 28 ++- eth/downloader/queue.go | 178 ++++++++++----- eth/fetcher/fetcher.go | 26 ++- eth/fetcher/fetcher_test.go | 49 +++- eth/filters/filter_test.go | 33 ++- eth/handler.go | 17 +- eth/handler_test.go | 4 +- eth/metrics.go | 2 +- eth/sync.go | 18 +- eth/sync_test.go | 53 +++++ ethdb/memory_database.go | 10 +- rpc/api/eth.go | 4 +- trie/sync.go | 2 +- 27 files changed, 765 insertions(+), 465 deletions(-) create mode 100644 eth/sync_test.go diff --git a/core/block_processor.go b/core/block_processor.go index 60f0258c4..5172636dd 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -195,14 +195,16 @@ func (sm *BlockProcessor) Process(block *types.Block) (logs vm.Logs, receipts ty defer sm.mutex.Unlock() if sm.bc.HasBlock(block.Hash()) { - return nil, nil, &KnownBlockError{block.Number(), block.Hash()} + if _, err := state.New(block.Root(), sm.chainDb); err == nil { + return nil, nil, &KnownBlockError{block.Number(), block.Hash()} + } } - - if !sm.bc.HasBlock(block.ParentHash()) { - return nil, nil, ParentError(block.ParentHash()) + if parent := sm.bc.GetBlock(block.ParentHash()); parent != nil { + if _, err := state.New(parent.Root(), sm.chainDb); err == nil { + return sm.processWithParent(block, parent) + } } - parent := sm.bc.GetBlock(block.ParentHash()) - return sm.processWithParent(block, parent) + return nil, nil, ParentError(block.ParentHash()) } func (sm *BlockProcessor) processWithParent(block, parent *types.Block) (logs vm.Logs, receipts types.Receipts, err error) { diff --git a/core/blockchain.go b/core/blockchain.go index 490552ea0..f14ff363c 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -18,11 +18,13 @@ package core import ( + crand "crypto/rand" "errors" "fmt" "io" + "math" "math/big" - "math/rand" + mrand "math/rand" "runtime" "sync" "sync/atomic" @@ -89,7 +91,8 @@ type BlockChain struct { procInterrupt int32 // interrupt signaler for block processing wg sync.WaitGroup - pow pow.PoW + pow pow.PoW + rand *mrand.Rand } func NewBlockChain(chainDb ethdb.Database, pow pow.PoW, mux *event.TypeMux) (*BlockChain, error) { @@ -112,6 +115,12 @@ func NewBlockChain(chainDb ethdb.Database, pow pow.PoW, mux *event.TypeMux) (*Bl futureBlocks: futureBlocks, pow: pow, } + // Seed a fast but crypto originating random generator + seed, err := crand.Int(crand.Reader, big.NewInt(math.MaxInt64)) + if err != nil { + return nil, err + } + bc.rand = mrand.New(mrand.NewSource(seed.Int64())) bc.genesisBlock = bc.GetBlockByNumber(0) if bc.genesisBlock == nil { @@ -178,21 +187,21 @@ func (self *BlockChain) loadLastState() error { fastTd := self.GetTd(self.currentFastBlock.Hash()) glog.V(logger.Info).Infof("Last header: #%d [%x…] TD=%v", self.currentHeader.Number, self.currentHeader.Hash().Bytes()[:4], headerTd) - glog.V(logger.Info).Infof("Fast block: #%d [%x…] TD=%v", self.currentFastBlock.Number(), self.currentFastBlock.Hash().Bytes()[:4], fastTd) glog.V(logger.Info).Infof("Last block: #%d [%x…] TD=%v", self.currentBlock.Number(), self.currentBlock.Hash().Bytes()[:4], blockTd) + glog.V(logger.Info).Infof("Fast block: #%d [%x…] TD=%v", self.currentFastBlock.Number(), self.currentFastBlock.Hash().Bytes()[:4], fastTd) return nil } -// SetHead rewind the local chain to a new head entity. In the case of headers, -// everything above the new head will be deleted and the new one set. In the case -// of blocks though, the head may be further rewound if block bodies are missing -// (non-archive nodes after a fast sync). +// SetHead rewinds the local chain to a new head. In the case of headers, everything +// above the new head will be deleted and the new one set. In the case of blocks +// though, the head may be further rewound if block bodies are missing (non-archive +// nodes after a fast sync). func (bc *BlockChain) SetHead(head uint64) { bc.mu.Lock() defer bc.mu.Unlock() - // Figure out the highest known canonical assignment + // Figure out the highest known canonical headers and/or blocks height := uint64(0) if bc.currentHeader != nil { if hh := bc.currentHeader.Number.Uint64(); hh > height { @@ -266,7 +275,7 @@ func (bc *BlockChain) SetHead(head uint64) { // FastSyncCommitHead sets the current head block to the one defined by the hash // irrelevant what the chain contents were prior. func (self *BlockChain) FastSyncCommitHead(hash common.Hash) error { - // Make sure that both the block as well at it's state trie exists + // Make sure that both the block as well at its state trie exists block := self.GetBlock(hash) if block == nil { return fmt.Errorf("non existent block [%x…]", hash[:4]) @@ -298,7 +307,7 @@ func (self *BlockChain) LastBlockHash() common.Hash { } // CurrentHeader retrieves the current head header of the canonical chain. The -// header is retrieved from the chain manager's internal cache. +// header is retrieved from the blockchain's internal cache. func (self *BlockChain) CurrentHeader() *types.Header { self.mu.RLock() defer self.mu.RUnlock() @@ -307,7 +316,7 @@ func (self *BlockChain) CurrentHeader() *types.Header { } // CurrentBlock retrieves the current head block of the canonical chain. The -// block is retrieved from the chain manager's internal cache. +// block is retrieved from the blockchain's internal cache. func (self *BlockChain) CurrentBlock() *types.Block { self.mu.RLock() defer self.mu.RUnlock() @@ -316,7 +325,7 @@ func (self *BlockChain) CurrentBlock() *types.Block { } // CurrentFastBlock retrieves the current fast-sync head block of the canonical -// chain. The block is retrieved from the chain manager's internal cache. +// chain. The block is retrieved from the blockchain's internal cache. func (self *BlockChain) CurrentFastBlock() *types.Block { self.mu.RLock() defer self.mu.RUnlock() @@ -353,7 +362,7 @@ func (bc *BlockChain) ResetWithGenesisBlock(genesis *types.Block) { bc.mu.Lock() defer bc.mu.Unlock() - // Prepare the genesis block and reinitialize the chain + // Prepare the genesis block and reinitialise the chain if err := WriteTd(bc.chainDb, genesis.Hash(), genesis.Difficulty()); err != nil { glog.Fatalf("failed to write genesis block TD: %v", err) } @@ -403,7 +412,7 @@ func (self *BlockChain) ExportN(w io.Writer, first uint64, last uint64) error { // insert injects a new head block into the current block chain. This method // assumes that the block is indeed a true head. It will also reset the head // header and the head fast sync block to this very same block to prevent them -// from diverging on a different header chain. +// from pointing to a possibly old canonical chain (i.e. side chain by now). // // Note, this function assumes that the `mu` mutex is held! func (bc *BlockChain) insert(block *types.Block) { @@ -625,10 +634,10 @@ const ( // writeHeader writes a header into the local chain, given that its parent is // already known. If the total difficulty of the newly inserted header becomes -// greater than the old known TD, the canonical chain is re-routed. +// greater than the current known TD, the canonical chain is re-routed. // // Note: This method is not concurrent-safe with inserting blocks simultaneously -// into the chain, as side effects caused by reorganizations cannot be emulated +// into the chain, as side effects caused by reorganisations cannot be emulated // without the real blocks. Hence, writing headers directly should only be done // in two scenarios: pure-header mode of operation (light clients), or properly // separated header/block phases (non-archive clients). @@ -678,10 +687,9 @@ func (self *BlockChain) writeHeader(header *types.Header) error { return nil } -// InsertHeaderChain will attempt to insert the given header chain in to the -// local chain, possibly creating a fork. If an error is returned, it will -// return the index number of the failing header as well an error describing -// what went wrong. +// InsertHeaderChain attempts to insert the given header chain in to the local +// chain, possibly creating a reorg. If an error is returned, it will return the +// index number of the failing header as well an error describing what went wrong. // // The verify parameter can be used to fine tune whether nonce verification // should be done or not. The reason behind the optional check is because some @@ -702,7 +710,7 @@ func (self *BlockChain) InsertHeaderChain(chain []*types.Header, checkFreq int) // Generate the list of headers that should be POW verified verify := make([]bool, len(chain)) for i := 0; i < len(verify)/checkFreq; i++ { - index := i*checkFreq + rand.Intn(checkFreq) + index := i*checkFreq + self.rand.Intn(checkFreq) if index >= len(verify) { index = len(verify) - 1 } @@ -766,10 +774,6 @@ func (self *BlockChain) InsertHeaderChain(chain []*types.Header, checkFreq int) pending.Wait() // If anything failed, report - if atomic.LoadInt32(&self.procInterrupt) == 1 { - glog.V(logger.Debug).Infoln("premature abort during receipt chain processing") - return 0, nil - } if failed > 0 { for i, err := range errs { if err != nil { @@ -807,6 +811,9 @@ func (self *BlockChain) InsertHeaderChain(chain []*types.Header, checkFreq int) // Rollback is designed to remove a chain of links from the database that aren't // certain enough to be valid. func (self *BlockChain) Rollback(chain []common.Hash) { + self.mu.Lock() + defer self.mu.Unlock() + for i := len(chain) - 1; i >= 0; i-- { hash := chain[i] @@ -905,6 +912,12 @@ func (self *BlockChain) InsertReceiptChain(blockChain types.Blocks, receiptChain glog.Fatal(errs[index]) return } + if err := WriteMipmapBloom(self.chainDb, block.NumberU64(), receipts); err != nil { + errs[index] = fmt.Errorf("failed to write log blooms: %v", err) + atomic.AddInt32(&failed, 1) + glog.Fatal(errs[index]) + return + } atomic.AddInt32(&stats.processed, 1) } } @@ -920,10 +933,6 @@ func (self *BlockChain) InsertReceiptChain(blockChain types.Blocks, receiptChain pending.Wait() // If anything failed, report - if atomic.LoadInt32(&self.procInterrupt) == 1 { - glog.V(logger.Debug).Infoln("premature abort during receipt chain processing") - return 0, nil - } if failed > 0 { for i, err := range errs { if err != nil { @@ -931,6 +940,10 @@ func (self *BlockChain) InsertReceiptChain(blockChain types.Blocks, receiptChain } } } + if atomic.LoadInt32(&self.procInterrupt) == 1 { + glog.V(logger.Debug).Infoln("premature abort during receipt chain processing") + return 0, nil + } // Update the head fast sync block if better self.mu.Lock() head := blockChain[len(errs)-1] diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 01667c21e..8ddc5032b 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -452,7 +452,7 @@ func makeBlockChainWithDiff(genesis *types.Block, d []int, seed byte) []*types.B func chm(genesis *types.Block, db ethdb.Database) *BlockChain { var eventMux event.TypeMux - bc := &BlockChain{chainDb: db, genesisBlock: genesis, eventMux: &eventMux, pow: FakePow{}} + bc := &BlockChain{chainDb: db, genesisBlock: genesis, eventMux: &eventMux, pow: FakePow{}, rand: rand.New(rand.NewSource(0))} bc.headerCache, _ = lru.New(100) bc.bodyCache, _ = lru.New(100) bc.bodyRLPCache, _ = lru.New(100) diff --git a/core/chain_util.go b/core/chain_util.go index 907e6668c..ddff381a1 100644 --- a/core/chain_util.go +++ b/core/chain_util.go @@ -394,7 +394,7 @@ func WriteMipmapBloom(db ethdb.Database, number uint64, receipts types.Receipts) bloomDat, _ := db.Get(key) bloom := types.BytesToBloom(bloomDat) for _, receipt := range receipts { - for _, log := range receipt.Logs() { + for _, log := range receipt.Logs { bloom.Add(log.Address.Big()) } } diff --git a/core/chain_util_test.go b/core/chain_util_test.go index bc5aa9776..0bbcbbe53 100644 --- a/core/chain_util_test.go +++ b/core/chain_util_test.go @@ -345,15 +345,15 @@ func TestMipmapBloom(t *testing.T) { db, _ := ethdb.NewMemDatabase() receipt1 := new(types.Receipt) - receipt1.SetLogs(vm.Logs{ + receipt1.Logs = vm.Logs{ &vm.Log{Address: common.BytesToAddress([]byte("test"))}, &vm.Log{Address: common.BytesToAddress([]byte("address"))}, - }) + } receipt2 := new(types.Receipt) - receipt2.SetLogs(vm.Logs{ + receipt2.Logs = vm.Logs{ &vm.Log{Address: common.BytesToAddress([]byte("test"))}, &vm.Log{Address: common.BytesToAddress([]byte("address1"))}, - }) + } WriteMipmapBloom(db, 1, types.Receipts{receipt1}) WriteMipmapBloom(db, 2, types.Receipts{receipt2}) @@ -368,15 +368,15 @@ func TestMipmapBloom(t *testing.T) { // reset db, _ = ethdb.NewMemDatabase() receipt := new(types.Receipt) - receipt.SetLogs(vm.Logs{ + receipt.Logs = vm.Logs{ &vm.Log{Address: common.BytesToAddress([]byte("test"))}, - }) + } WriteMipmapBloom(db, 999, types.Receipts{receipt1}) receipt = new(types.Receipt) - receipt.SetLogs(vm.Logs{ + receipt.Logs = vm.Logs{ &vm.Log{Address: common.BytesToAddress([]byte("test 1"))}, - }) + } WriteMipmapBloom(db, 1000, types.Receipts{receipt}) bloom := GetMipmapBloom(db, 1000, 1000) @@ -403,22 +403,22 @@ func TestMipmapChain(t *testing.T) { defer db.Close() genesis := WriteGenesisBlockForTesting(db, GenesisAccount{addr, big.NewInt(1000000)}) - chain := GenerateChain(genesis, db, 1010, func(i int, gen *BlockGen) { + chain, receipts := GenerateChain(genesis, db, 1010, func(i int, gen *BlockGen) { var receipts types.Receipts switch i { case 1: receipt := types.NewReceipt(nil, new(big.Int)) - receipt.SetLogs(vm.Logs{ + receipt.Logs = vm.Logs{ &vm.Log{ Address: addr, Topics: []common.Hash{hash1}, }, - }) + } gen.AddUncheckedReceipt(receipt) receipts = types.Receipts{receipt} case 1000: receipt := types.NewReceipt(nil, new(big.Int)) - receipt.SetLogs(vm.Logs{&vm.Log{Address: addr2}}) + receipt.Logs = vm.Logs{&vm.Log{Address: addr2}} gen.AddUncheckedReceipt(receipt) receipts = types.Receipts{receipt} @@ -431,7 +431,7 @@ func TestMipmapChain(t *testing.T) { } WriteMipmapBloom(db, uint64(i+1), receipts) }) - for _, block := range chain { + for i, block := range chain { WriteBlock(db, block) if err := WriteCanonicalHash(db, block.Hash(), block.NumberU64()); err != nil { t.Fatalf("failed to insert block number: %v", err) @@ -439,7 +439,7 @@ func TestMipmapChain(t *testing.T) { if err := WriteHeadBlockHash(db, block.Hash()); err != nil { t.Fatalf("failed to insert block number: %v", err) } - if err := PutBlockReceipts(db, block, block.Receipts()); err != nil { + if err := PutBlockReceipts(db, block.Hash(), receipts[i]); err != nil { t.Fatal("error writing block receipts:", err) } } diff --git a/core/state/sync.go b/core/state/sync.go index 5a388886c..ef2b4b84c 100644 --- a/core/state/sync.go +++ b/core/state/sync.go @@ -26,14 +26,13 @@ import ( "github.com/ethereum/go-ethereum/trie" ) -// StateSync is the main state synchronisation scheduler, which provides yet the +// StateSync is the main state synchronisation scheduler, which provides yet the // unknown state hashes to retrieve, accepts node data associated with said hashes // and reconstructs the state database step by step until all is done. type StateSync trie.TrieSync // NewStateSync create a new state trie download scheduler. func NewStateSync(root common.Hash, database ethdb.Database) *StateSync { - // Pre-declare the result syncer t var syncer *trie.TrieSync callback := func(leaf []byte, parent common.Hash) error { diff --git a/core/state/sync_test.go b/core/state/sync_test.go index f0376d484..0dab372ba 100644 --- a/core/state/sync_test.go +++ b/core/state/sync_test.go @@ -38,7 +38,7 @@ type testAccount struct { func makeTestState() (ethdb.Database, common.Hash, []*testAccount) { // Create an empty state db, _ := ethdb.NewMemDatabase() - state := New(common.Hash{}, db) + state, _ := New(common.Hash{}, db) // Fill it with some arbitrary data accounts := []*testAccount{} @@ -68,7 +68,7 @@ func makeTestState() (ethdb.Database, common.Hash, []*testAccount) { // checkStateAccounts cross references a reconstructed state with an expected // account array. func checkStateAccounts(t *testing.T, db ethdb.Database, root common.Hash, accounts []*testAccount) { - state := New(root, db) + state, _ := New(root, db) for i, acc := range accounts { if balance := state.GetBalance(acc.address); balance.Cmp(acc.balance) != 0 { diff --git a/core/types/receipt.go b/core/types/receipt.go index aea5b3e91..e7d5203a3 100644 --- a/core/types/receipt.go +++ b/core/types/receipt.go @@ -67,7 +67,7 @@ func (r *Receipt) DecodeRLP(s *rlp.Stream) error { return nil } -// RlpEncode implements common.RlpEncode required for SHA derivation. +// RlpEncode implements common.RlpEncode required for SHA3 derivation. func (r *Receipt) RlpEncode() []byte { bytes, err := rlp.EncodeToBytes(r) if err != nil { @@ -82,7 +82,7 @@ func (r *Receipt) String() string { } // ReceiptForStorage is a wrapper around a Receipt that flattens and parses the -// entire content of a receipt, opposed to only the consensus fields originally. +// entire content of a receipt, as opposed to only the consensus fields originally. type ReceiptForStorage Receipt // EncodeRLP implements rlp.Encoder, and flattens all content fields of a receipt @@ -95,8 +95,8 @@ func (r *ReceiptForStorage) EncodeRLP(w io.Writer) error { return rlp.Encode(w, []interface{}{r.PostState, r.CumulativeGasUsed, r.Bloom, r.TxHash, r.ContractAddress, logs, r.GasUsed}) } -// DecodeRLP implements rlp.Decoder, and loads the consensus fields of a receipt -// from an RLP stream. +// DecodeRLP implements rlp.Decoder, and loads both consensus and implementation +// fields of a receipt from an RLP stream. func (r *ReceiptForStorage) DecodeRLP(s *rlp.Stream) error { var receipt struct { PostState []byte @@ -125,7 +125,7 @@ func (r *ReceiptForStorage) DecodeRLP(s *rlp.Stream) error { // Receipts is a wrapper around a Receipt array to implement types.DerivableList. type Receipts []*Receipt -// RlpEncode implements common.RlpEncode required for SHA derivation. +// RlpEncode implements common.RlpEncode required for SHA3 derivation. func (r Receipts) RlpEncode() []byte { bytes, err := rlp.EncodeToBytes(r) if err != nil { diff --git a/core/vm/log.go b/core/vm/log.go index 526221e43..191e3a253 100644 --- a/core/vm/log.go +++ b/core/vm/log.go @@ -66,6 +66,6 @@ func (l *Log) String() string { type Logs []*Log // LogForStorage is a wrapper around a Log that flattens and parses the entire -// content of a log, opposed to only the consensus fields originally (by hiding +// content of a log, as opposed to only the consensus fields originally (by hiding // the rlp interface methods). type LogForStorage Log diff --git a/eth/backend.go b/eth/backend.go index 0a3791783..a4f656ecd 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -391,7 +391,6 @@ func New(config *Config) (*Ethereum, error) { if err == core.ErrNoGenesis { return nil, fmt.Errorf(`Genesis block not found. Please supply a genesis block with the "--genesis /path/to/file" argument`) } - return nil, err } newPool := core.NewTxPool(eth.EventMux(), eth.blockchain.State, eth.blockchain.GasLimit) diff --git a/eth/backend_test.go b/eth/backend_test.go index 220426c17..0379fc843 100644 --- a/eth/backend_test.go +++ b/eth/backend_test.go @@ -16,17 +16,17 @@ func TestMipmapUpgrade(t *testing.T) { addr := common.BytesToAddress([]byte("jeff")) genesis := core.WriteGenesisBlockForTesting(db) - chain := core.GenerateChain(genesis, db, 10, func(i int, gen *core.BlockGen) { + chain, receipts := core.GenerateChain(genesis, db, 10, func(i int, gen *core.BlockGen) { var receipts types.Receipts switch i { case 1: receipt := types.NewReceipt(nil, new(big.Int)) - receipt.SetLogs(vm.Logs{&vm.Log{Address: addr}}) + receipt.Logs = vm.Logs{&vm.Log{Address: addr}} gen.AddUncheckedReceipt(receipt) receipts = types.Receipts{receipt} case 2: receipt := types.NewReceipt(nil, new(big.Int)) - receipt.SetLogs(vm.Logs{&vm.Log{Address: addr}}) + receipt.Logs = vm.Logs{&vm.Log{Address: addr}} gen.AddUncheckedReceipt(receipt) receipts = types.Receipts{receipt} } @@ -37,7 +37,7 @@ func TestMipmapUpgrade(t *testing.T) { t.Fatal(err) } }) - for _, block := range chain { + for i, block := range chain { core.WriteBlock(db, block) if err := core.WriteCanonicalHash(db, block.Hash(), block.NumberU64()); err != nil { t.Fatalf("failed to insert block number: %v", err) @@ -45,7 +45,7 @@ func TestMipmapUpgrade(t *testing.T) { if err := core.WriteHeadBlockHash(db, block.Hash()); err != nil { t.Fatalf("failed to insert block number: %v", err) } - if err := core.PutBlockReceipts(db, block, block.Receipts()); err != nil { + if err := core.PutBlockReceipts(db, block.Hash(), receipts[i]); err != nil { t.Fatal("error writing block receipts:", err) } } diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 0298dfa0b..4bcbd8557 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -18,7 +18,9 @@ package downloader import ( + "crypto/rand" "errors" + "fmt" "math" "math/big" "strings" @@ -59,9 +61,11 @@ var ( maxQueuedStates = 256 * 1024 // [eth/63] Maximum number of state requests to queue (DOS protection) maxResultsProcess = 256 // Number of download results to import at once into the chain - headerCheckFrequency = 100 // Verification frequency of the downloaded headers during fast sync - minCheckedHeaders = 2048 // Number of headers to verify fully when approaching the chain head - minFullBlocks = 1024 // Number of blocks to retrieve fully even in fast sync + fsHeaderCheckFrequency = 100 // Verification frequency of the downloaded headers during fast sync + fsHeaderSafetyNet = 2048 // Number of headers to discard in case a chain violation is detected + fsHeaderForceVerify = 24 // Number of headers to verify before and after the pivot to accept it + fsPivotInterval = 512 // Number of headers out of which to randomize the pivot point + fsMinFullBlocks = 1024 // Number of blocks to retrieve fully even in fast sync ) var ( @@ -85,12 +89,14 @@ var ( errCancelHeaderFetch = errors.New("block header download canceled (requested)") errCancelBodyFetch = errors.New("block body download canceled (requested)") errCancelReceiptFetch = errors.New("receipt download canceled (requested)") + errCancelStateFetch = errors.New("state data download canceled (requested)") errNoSyncActive = errors.New("no sync active") ) type Downloader struct { - mode SyncMode // Synchronisation mode defining the strategies used - mux *event.TypeMux // Event multiplexer to announce sync operation events + mode SyncMode // Synchronisation mode defining the strategy used (per sync cycle) + noFast bool // Flag to disable fast syncing in case of a security error + mux *event.TypeMux // Event multiplexer to announce sync operation events queue *queue // Scheduler for selecting the hashes to download peers *peerSet // Set of active peers from which download can proceed @@ -150,13 +156,13 @@ type Downloader struct { } // New creates a new downloader to fetch hashes and blocks from remote peers. -func New(mode SyncMode, stateDb ethdb.Database, mux *event.TypeMux, hasHeader headerCheckFn, hasBlock blockCheckFn, getHeader headerRetrievalFn, +func New(stateDb ethdb.Database, mux *event.TypeMux, hasHeader headerCheckFn, hasBlock blockCheckFn, getHeader headerRetrievalFn, getBlock blockRetrievalFn, headHeader headHeaderRetrievalFn, headBlock headBlockRetrievalFn, headFastBlock headFastBlockRetrievalFn, commitHeadBlock headBlockCommitterFn, getTd tdRetrievalFn, insertHeaders headerChainInsertFn, insertBlocks blockChainInsertFn, insertReceipts receiptChainInsertFn, rollback chainRollbackFn, dropPeer peerDropFn) *Downloader { return &Downloader{ - mode: mode, + mode: FullSync, mux: mux, queue: newQueue(stateDb), peers: newPeerSet(), @@ -188,19 +194,28 @@ func New(mode SyncMode, stateDb ethdb.Database, mux *event.TypeMux, hasHeader he } } -// Boundaries retrieves the synchronisation boundaries, specifically the origin -// block where synchronisation started at (may have failed/suspended) and the -// latest known block which the synchonisation targets. -func (d *Downloader) Boundaries() (uint64, uint64) { +// Progress retrieves the synchronisation boundaries, specifically the origin +// block where synchronisation started at (may have failed/suspended); the block +// or header sync is currently at; and the latest known block which the sync targets. +func (d *Downloader) Progress() (uint64, uint64, uint64) { d.syncStatsLock.RLock() defer d.syncStatsLock.RUnlock() - return d.syncStatsChainOrigin, d.syncStatsChainHeight + current := uint64(0) + switch d.mode { + case FullSync: + current = d.headBlock().NumberU64() + case FastSync: + current = d.headFastBlock().NumberU64() + case LightSync: + current = d.headHeader().Number.Uint64() + } + return d.syncStatsChainOrigin, current, d.syncStatsChainHeight } // Synchronising returns whether the downloader is currently retrieving blocks. func (d *Downloader) Synchronising() bool { - return atomic.LoadInt32(&d.synchronising) > 0 + return atomic.LoadInt32(&d.synchronising) > 0 || atomic.LoadInt32(&d.processing) > 0 } // RegisterPeer injects a new download peer into the set of block source to be @@ -233,10 +248,10 @@ func (d *Downloader) UnregisterPeer(id string) error { // Synchronise tries to sync up our local block chain with a remote peer, both // adding various sanity checks as well as wrapping it with various log entries. -func (d *Downloader) Synchronise(id string, head common.Hash, td *big.Int) { +func (d *Downloader) Synchronise(id string, head common.Hash, td *big.Int, mode SyncMode) { glog.V(logger.Detail).Infof("Attempting synchronisation: %v, head [%x…], TD %v", id, head[:4], td) - switch err := d.synchronise(id, head, td); err { + switch err := d.synchronise(id, head, td, mode); err { case nil: glog.V(logger.Detail).Infof("Synchronisation completed") @@ -258,7 +273,7 @@ func (d *Downloader) Synchronise(id string, head common.Hash, td *big.Int) { // synchronise will select the peer and use it for synchronising. If an empty string is given // it will use the best peer possible and synchronize if it's TD is higher than our own. If any of the // checks fail an error will be returned. This method is synchronous -func (d *Downloader) synchronise(id string, hash common.Hash, td *big.Int) error { +func (d *Downloader) synchronise(id string, hash common.Hash, td *big.Int, mode SyncMode) error { // Mock out the synchonisation if testing if d.synchroniseMock != nil { return d.synchroniseMock(id, hash) @@ -298,6 +313,11 @@ func (d *Downloader) synchronise(id string, hash common.Hash, td *big.Int) error d.cancelCh = make(chan struct{}) d.cancelLock.Unlock() + // Set the requested sync mode, unless it's forbidden + d.mode = mode + if d.mode == FastSync && d.noFast { + d.mode = FullSync + } // Retrieve the origin peer and initiate the downloading process p := d.peers.Peer(id) if p == nil { @@ -306,13 +326,6 @@ func (d *Downloader) synchronise(id string, hash common.Hash, td *big.Int) error return d.syncWithPeer(p, hash, td) } -/* -// Has checks if the downloader knows about a particular hash, meaning that its -// either already downloaded of pending retrieval. -func (d *Downloader) Has(hash common.Hash) bool { - return d.queue.Has(hash) -} -*/ // syncWithPeer starts a block synchronization based on the hash chain from the // specified peer and head hash. func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err error) { @@ -387,8 +400,28 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e // Initiate the sync using a concurrent header and content retrieval algorithm pivot := uint64(0) - if latest > uint64(minFullBlocks) { - pivot = latest - uint64(minFullBlocks) + switch d.mode { + case LightSync: + pivot = latest + + case FastSync: + // Calculate the new fast/slow sync pivot point + pivotOffset, err := rand.Int(rand.Reader, big.NewInt(int64(fsPivotInterval))) + if err != nil { + panic(fmt.Sprintf("Failed to access crypto random source: %v", err)) + } + if latest > uint64(fsMinFullBlocks)+pivotOffset.Uint64() { + pivot = latest - uint64(fsMinFullBlocks) - pivotOffset.Uint64() + } + // If the point is below the origin, move origin back to ensure state download + if pivot < origin { + if pivot > 0 { + origin = pivot - 1 + } else { + origin = 0 + } + } + glog.V(logger.Debug).Infof("Fast syncing until pivot block #%d", pivot) } d.queue.Prepare(origin+1, d.mode, pivot) @@ -396,10 +429,10 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e d.syncInitHook(origin, latest) } errc := make(chan error, 4) - go func() { errc <- d.fetchHeaders(p, td, origin+1, latest) }() // Headers are always retrieved - go func() { errc <- d.fetchBodies(origin + 1) }() // Bodies are retrieved during normal and fast sync - go func() { errc <- d.fetchReceipts(origin + 1) }() // Receipts are retrieved during fast sync - go func() { errc <- d.fetchNodeData() }() // Node state data is retrieved during fast sync + go func() { errc <- d.fetchHeaders(p, td, origin+1) }() // Headers are always retrieved + go func() { errc <- d.fetchBodies(origin + 1) }() // Bodies are retrieved during normal and fast sync + go func() { errc <- d.fetchReceipts(origin + 1) }() // Receipts are retrieved during fast sync + go func() { errc <- d.fetchNodeData() }() // Node state data is retrieved during fast sync // If any fetcher fails, cancel the others var fail error @@ -844,7 +877,7 @@ func (d *Downloader) fetchBlocks61(from uint64) error { for _, peer := range idles { // Short circuit if throttling activated - if d.queue.ThrottleBlocks() { + if d.queue.ShouldThrottleBlocks() { throttled = true break } @@ -860,8 +893,13 @@ func (d *Downloader) fetchBlocks61(from uint64) error { } // Fetch the chunk and make sure any errors return the hashes to the queue if err := peer.Fetch61(request); err != nil { - glog.V(logger.Error).Infof("%v: fetch failed, rescheduling", peer) - d.queue.CancelBlocks(request) + // Although we could try and make an attempt to fix this, this error really + // means that we've double allocated a fetch task to a peer. If that is the + // case, the internal state of the downloader and the queue is very wrong so + // better hard crash and note the error instead of silently accumulating into + // a much bigger issue. + panic(fmt.Sprintf("%v: fetch assignment failed, hard panic", peer)) + d.queue.CancelBlocks(request) // noop for now } } // Make sure that we have peers available for fetching. If all peers have been tried @@ -1051,28 +1089,34 @@ func (d *Downloader) findAncestor(p *peer) (uint64, error) { // // The queue parameter can be used to switch between queuing headers for block // body download too, or directly import as pure header chains. -func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from, latest uint64) error { +func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error { glog.V(logger.Debug).Infof("%v: downloading headers from #%d", p, from) defer glog.V(logger.Debug).Infof("%v: header download terminated", p) + // Calculate the pivoting point for switching from fast to slow sync + pivot := d.queue.FastSyncPivot() + // Keep a count of uncertain headers to roll back rollback := []*types.Header{} defer func() { if len(rollback) > 0 { + // Flatten the headers and roll them back hashes := make([]common.Hash, len(rollback)) for i, header := range rollback { hashes[i] = header.Hash() } + lh, lfb, lb := d.headHeader().Number, d.headFastBlock().Number(), d.headBlock().Number() d.rollback(hashes) + glog.V(logger.Warn).Infof("Rolled back %d headers (LH: %d->%d, FB: %d->%d, LB: %d->%d)", + len(hashes), lh, d.headHeader().Number, lfb, d.headFastBlock().Number(), lb, d.headBlock().Number()) + + // If we're already past the pivot point, this could be an attack, disable fast sync + if rollback[len(rollback)-1].Number.Uint64() > pivot { + d.noFast = true + } } }() - // Calculate the pivoting point for switching from fast to slow sync - pivot := uint64(0) - if d.mode == FastSync && latest > uint64(minFullBlocks) { - pivot = latest - uint64(minFullBlocks) - } else if d.mode == LightSync { - pivot = latest - } + // Create a timeout timer, and the associated hash fetcher request := time.Now() // time of the last fetch request timeout := time.NewTimer(0) // timer to dump a non-responsive active peer @@ -1135,6 +1179,19 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from, latest uint64) err if !gotHeaders && td.Cmp(d.getTd(d.headBlock().Hash())) > 0 { return errStallingPeer } + // If fast or light syncing, ensure promised headers are indeed delivered. This is + // needed to detect scenarios where an attacker feeds a bad pivot and then bails out + // of delivering the post-pivot blocks that would flag the invalid content. + // + // This check cannot be executed "as is" for full imports, since blocks may still be + // queued for processing when the header download completes. However, as long as the + // peer gave us something useful, we're already happy/progressed (above check). + if d.mode == FastSync || d.mode == LightSync { + if td.Cmp(d.getTd(d.headHeader().Hash())) > 0 { + return errStallingPeer + } + } + rollback = nil return nil } gotHeaders = true @@ -1152,8 +1209,8 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from, latest uint64) err } } // If we're importing pure headers, verify based on their recentness - frequency := headerCheckFrequency - if headers[len(headers)-1].Number.Uint64()+uint64(minCheckedHeaders) > pivot { + frequency := fsHeaderCheckFrequency + if headers[len(headers)-1].Number.Uint64()+uint64(fsHeaderForceVerify) > pivot { frequency = 1 } if n, err := d.insertHeaders(headers, frequency); err != nil { @@ -1162,11 +1219,8 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from, latest uint64) err } // All verifications passed, store newly found uncertain headers rollback = append(rollback, unknown...) - if len(rollback) > minCheckedHeaders { - rollback = append(rollback[:0], rollback[len(rollback)-minCheckedHeaders:]...) - } - if headers[len(headers)-1].Number.Uint64() >= pivot { - rollback = rollback[:0] + if len(rollback) > fsHeaderSafetyNet { + rollback = append(rollback[:0], rollback[len(rollback)-fsHeaderSafetyNet:]...) } } if d.mode == FullSync || d.mode == FastSync { @@ -1230,12 +1284,11 @@ func (d *Downloader) fetchBodies(from uint64) error { expire = func() []string { return d.queue.ExpireBodies(bodyHardTTL) } fetch = func(p *peer, req *fetchRequest) error { return p.FetchBodies(req) } capacity = func(p *peer) int { return p.BlockCapacity() } - getIdles = func() ([]*peer, int) { return d.peers.BodyIdlePeers() } - setIdle = func(p *peer) { p.SetBlocksIdle() } + setIdle = func(p *peer) { p.SetBodiesIdle() } ) err := d.fetchParts(errCancelBodyFetch, d.bodyCh, deliver, d.bodyWakeCh, expire, - d.queue.PendingBlocks, d.queue.InFlightBlocks, d.queue.ThrottleBlocks, d.queue.ReserveBodies, - d.bodyFetchHook, fetch, d.queue.CancelBodies, capacity, getIdles, setIdle, "Body") + d.queue.PendingBlocks, d.queue.InFlightBlocks, d.queue.ShouldThrottleBlocks, d.queue.ReserveBodies, + d.bodyFetchHook, fetch, d.queue.CancelBodies, capacity, d.peers.BodyIdlePeers, setIdle, "Body") glog.V(logger.Debug).Infof("Block body download terminated: %v", err) return err @@ -1252,13 +1305,13 @@ func (d *Downloader) fetchReceipts(from uint64) error { pack := packet.(*receiptPack) return d.queue.DeliverReceipts(pack.peerId, pack.receipts) } - expire = func() []string { return d.queue.ExpireReceipts(bodyHardTTL) } + expire = func() []string { return d.queue.ExpireReceipts(receiptHardTTL) } fetch = func(p *peer, req *fetchRequest) error { return p.FetchReceipts(req) } capacity = func(p *peer) int { return p.ReceiptCapacity() } setIdle = func(p *peer) { p.SetReceiptsIdle() } ) err := d.fetchParts(errCancelReceiptFetch, d.receiptCh, deliver, d.receiptWakeCh, expire, - d.queue.PendingReceipts, d.queue.InFlightReceipts, d.queue.ThrottleReceipts, d.queue.ReserveReceipts, + d.queue.PendingReceipts, d.queue.InFlightReceipts, d.queue.ShouldThrottleReceipts, d.queue.ReserveReceipts, d.receiptFetchHook, fetch, d.queue.CancelReceipts, capacity, d.peers.ReceiptIdlePeers, setIdle, "Receipt") glog.V(logger.Debug).Infof("Receipt download terminated: %v", err) @@ -1307,9 +1360,9 @@ func (d *Downloader) fetchNodeData() error { capacity = func(p *peer) int { return p.NodeDataCapacity() } setIdle = func(p *peer) { p.SetNodeDataIdle() } ) - err := d.fetchParts(errCancelReceiptFetch, d.stateCh, deliver, d.stateWakeCh, expire, + err := d.fetchParts(errCancelStateFetch, d.stateCh, deliver, d.stateWakeCh, expire, d.queue.PendingNodeData, d.queue.InFlightNodeData, throttle, reserve, nil, fetch, - d.queue.CancelNodeData, capacity, d.peers.ReceiptIdlePeers, setIdle, "State") + d.queue.CancelNodeData, capacity, d.peers.NodeDataIdlePeers, setIdle, "State") glog.V(logger.Debug).Infof("Node state data download terminated: %v", err) return err @@ -1323,7 +1376,7 @@ func (d *Downloader) fetchParts(errCancel error, deliveryCh chan dataPack, deliv fetchHook func([]*types.Header), fetch func(*peer, *fetchRequest) error, cancel func(*fetchRequest), capacity func(*peer) int, idle func() ([]*peer, int), setIdle func(*peer), kind string) error { - // Create a ticker to detect expired retreival tasks + // Create a ticker to detect expired retrieval tasks ticker := time.NewTicker(100 * time.Millisecond) defer ticker.Stop() @@ -1366,11 +1419,6 @@ func (d *Downloader) fetchParts(errCancel error, deliveryCh chan dataPack, deliv // The hash chain is invalid (blocks are not ordered properly), abort return err - case errInvalidBody, errInvalidReceipt: - // The peer delivered something very bad, drop immediately - glog.V(logger.Error).Infof("%s: delivered invalid %s, dropping", peer, strings.ToLower(kind)) - d.dropPeer(peer.id) - case errNoFetchesPending: // Peer probably timed out with its delivery but came through // in the end, demote, but allow to to pull from this peer. @@ -1475,8 +1523,13 @@ func (d *Downloader) fetchParts(errCancel error, deliveryCh chan dataPack, deliv fetchHook(request.Headers) } if err := fetch(peer, request); err != nil { - glog.V(logger.Error).Infof("%v: %s fetch failed, rescheduling", peer, strings.ToLower(kind)) - cancel(request) + // Although we could try and make an attempt to fix this, this error really + // means that we've double allocated a fetch task to a peer. If that is the + // case, the internal state of the downloader and the queue is very wrong so + // better hard crash and note the error instead of silently accumulating into + // a much bigger issue. + panic(fmt.Sprintf("%v: %s fetch assignment failed, hard panic", peer, strings.ToLower(kind))) + cancel(request) // noop for now } running = true } @@ -1526,6 +1579,7 @@ func (d *Downloader) process() { // Repeat the processing as long as there are results to process for { // Fetch the next batch of results + pivot := d.queue.FastSyncPivot() // Fetch pivot before results to prevent reset race results := d.queue.TakeResults() if len(results) == 0 { return @@ -1545,7 +1599,6 @@ func (d *Downloader) process() { } // Retrieve the a batch of results to import var ( - headers = make([]*types.Header, 0, maxResultsProcess) blocks = make([]*types.Block, 0, maxResultsProcess) receipts = make([]types.Receipts, 0, maxResultsProcess) ) @@ -1556,11 +1609,9 @@ func (d *Downloader) process() { blocks = append(blocks, types.NewBlockWithHeader(result.Header).WithBody(result.Transactions, result.Uncles)) case d.mode == FastSync: blocks = append(blocks, types.NewBlockWithHeader(result.Header).WithBody(result.Transactions, result.Uncles)) - if result.Header.Number.Uint64() <= d.queue.fastSyncPivot { + if result.Header.Number.Uint64() <= pivot { receipts = append(receipts, result.Receipts) } - case d.mode == LightSync: - headers = append(headers, result.Header) } } // Try to process the results, aborting if there's an error @@ -1569,12 +1620,10 @@ func (d *Downloader) process() { index int ) switch { - case len(headers) > 0: - index, err = d.insertHeaders(headers, headerCheckFrequency) - case len(receipts) > 0: index, err = d.insertReceipts(blocks, receipts) - if err == nil && blocks[len(blocks)-1].NumberU64() == d.queue.fastSyncPivot { + if err == nil && blocks[len(blocks)-1].NumberU64() == pivot { + glog.V(logger.Debug).Infof("Committing block #%d [%x…] as the new head", blocks[len(blocks)-1].Number(), blocks[len(blocks)-1].Hash().Bytes()[:4]) index, err = len(blocks)-1, d.commitHeadBlock(blocks[len(blocks)-1].Hash()) } default: diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index f01650ebd..ef6f74a6b 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -136,7 +136,7 @@ type downloadTester struct { } // newTester creates a new downloader test mocker. -func newTester(mode SyncMode) *downloadTester { +func newTester() *downloadTester { tester := &downloadTester{ ownHashes: []common.Hash{genesis.Hash()}, ownHeaders: map[common.Hash]*types.Header{genesis.Hash(): genesis.Header()}, @@ -150,7 +150,7 @@ func newTester(mode SyncMode) *downloadTester { peerChainTds: make(map[string]map[common.Hash]*big.Int), } tester.stateDb, _ = ethdb.NewMemDatabase() - tester.downloader = New(mode, tester.stateDb, new(event.TypeMux), tester.hasHeader, tester.hasBlock, tester.getHeader, + tester.downloader = New(tester.stateDb, new(event.TypeMux), tester.hasHeader, tester.hasBlock, tester.getHeader, tester.getBlock, tester.headHeader, tester.headBlock, tester.headFastBlock, tester.commitHeadBlock, tester.getTd, tester.insertHeaders, tester.insertBlocks, tester.insertReceipts, tester.rollback, tester.dropPeer) @@ -158,7 +158,7 @@ func newTester(mode SyncMode) *downloadTester { } // sync starts synchronizing with a remote peer, blocking until it completes. -func (dl *downloadTester) sync(id string, td *big.Int) error { +func (dl *downloadTester) sync(id string, td *big.Int, mode SyncMode) error { dl.lock.RLock() hash := dl.peerHashes[id][0] // If no particular TD was requested, load from the peer's blockchain @@ -170,7 +170,7 @@ func (dl *downloadTester) sync(id string, td *big.Int) error { } dl.lock.RUnlock() - err := dl.downloader.synchronise(id, hash, td) + err := dl.downloader.synchronise(id, hash, td, mode) for { // If the queue is empty and processing stopped, break if dl.downloader.queue.Idle() && atomic.LoadInt32(&dl.downloader.processing) == 0 { @@ -214,7 +214,7 @@ func (dl *downloadTester) headHeader() *types.Header { defer dl.lock.RUnlock() for i := len(dl.ownHashes) - 1; i >= 0; i-- { - if header := dl.getHeader(dl.ownHashes[i]); header != nil { + if header := dl.ownHeaders[dl.ownHashes[i]]; header != nil { return header } } @@ -227,7 +227,7 @@ func (dl *downloadTester) headBlock() *types.Block { defer dl.lock.RUnlock() for i := len(dl.ownHashes) - 1; i >= 0; i-- { - if block := dl.getBlock(dl.ownHashes[i]); block != nil { + if block := dl.ownBlocks[dl.ownHashes[i]]; block != nil { if _, err := dl.stateDb.Get(block.Root().Bytes()); err == nil { return block } @@ -242,7 +242,7 @@ func (dl *downloadTester) headFastBlock() *types.Block { defer dl.lock.RUnlock() for i := len(dl.ownHashes) - 1; i >= 0; i-- { - if block := dl.getBlock(dl.ownHashes[i]); block != nil { + if block := dl.ownBlocks[dl.ownHashes[i]]; block != nil { return block } } @@ -291,7 +291,7 @@ func (dl *downloadTester) insertHeaders(headers []*types.Header, checkFreq int) } dl.ownHashes = append(dl.ownHashes, header.Hash()) dl.ownHeaders[header.Hash()] = header - dl.ownChainTd[header.Hash()] = dl.ownChainTd[header.ParentHash] + dl.ownChainTd[header.Hash()] = new(big.Int).Add(dl.ownChainTd[header.ParentHash], header.Difficulty) } return len(headers), nil } @@ -305,11 +305,13 @@ func (dl *downloadTester) insertBlocks(blocks types.Blocks) (int, error) { if _, ok := dl.ownBlocks[block.ParentHash()]; !ok { return i, errors.New("unknown parent") } - dl.ownHashes = append(dl.ownHashes, block.Hash()) - dl.ownHeaders[block.Hash()] = block.Header() + if _, ok := dl.ownHeaders[block.Hash()]; !ok { + dl.ownHashes = append(dl.ownHashes, block.Hash()) + dl.ownHeaders[block.Hash()] = block.Header() + } dl.ownBlocks[block.Hash()] = block - dl.stateDb.Put(block.Root().Bytes(), []byte{}) - dl.ownChainTd[block.Hash()] = dl.ownChainTd[block.ParentHash()] + dl.stateDb.Put(block.Root().Bytes(), []byte{0x00}) + dl.ownChainTd[block.Hash()] = new(big.Int).Add(dl.ownChainTd[block.ParentHash()], block.Difficulty()) } return len(blocks), nil } @@ -381,7 +383,19 @@ func (dl *downloadTester) newSlowPeer(id string, version int, hashes []common.Ha dl.peerReceipts[id] = make(map[common.Hash]types.Receipts) dl.peerChainTds[id] = make(map[common.Hash]*big.Int) - for _, hash := range hashes { + genesis := hashes[len(hashes)-1] + if header := headers[genesis]; header != nil { + dl.peerHeaders[id][genesis] = header + dl.peerChainTds[id][genesis] = header.Difficulty + } + if block := blocks[genesis]; block != nil { + dl.peerBlocks[id][genesis] = block + dl.peerChainTds[id][genesis] = block.Difficulty() + } + + for i := len(hashes) - 2; i >= 0; i-- { + hash := hashes[i] + if header, ok := headers[hash]; ok { dl.peerHeaders[id][hash] = header if _, ok := dl.peerHeaders[id][header.ParentHash]; ok { @@ -627,21 +641,28 @@ func assertOwnChain(t *testing.T, tester *downloadTester, length int) { // number of items of the various chain components. func assertOwnForkedChain(t *testing.T, tester *downloadTester, common int, lengths []int) { // Initialize the counters for the first fork - headers, blocks, receipts := lengths[0], lengths[0], lengths[0]-minFullBlocks - if receipts < 0 { - receipts = 1 + headers, blocks := lengths[0], lengths[0] + + minReceipts, maxReceipts := lengths[0]-fsMinFullBlocks-fsPivotInterval, lengths[0]-fsMinFullBlocks + if minReceipts < 0 { + minReceipts = 1 + } + if maxReceipts < 0 { + maxReceipts = 1 } // Update the counters for each subsequent fork for _, length := range lengths[1:] { headers += length - common blocks += length - common - receipts += length - common - minFullBlocks + + minReceipts += length - common - fsMinFullBlocks - fsPivotInterval + maxReceipts += length - common - fsMinFullBlocks } switch tester.downloader.mode { case FullSync: - receipts = 1 + minReceipts, maxReceipts = 1, 1 case LightSync: - blocks, receipts = 1, 1 + blocks, minReceipts, maxReceipts = 1, 1, 1 } if hs := len(tester.ownHeaders); hs != headers { t.Fatalf("synchronised headers mismatch: have %v, want %v", hs, headers) @@ -649,14 +670,20 @@ func assertOwnForkedChain(t *testing.T, tester *downloadTester, common int, leng if bs := len(tester.ownBlocks); bs != blocks { t.Fatalf("synchronised blocks mismatch: have %v, want %v", bs, blocks) } - if rs := len(tester.ownReceipts); rs != receipts { - t.Fatalf("synchronised receipts mismatch: have %v, want %v", rs, receipts) + if rs := len(tester.ownReceipts); rs < minReceipts || rs > maxReceipts { + t.Fatalf("synchronised receipts mismatch: have %v, want between [%v, %v]", rs, minReceipts, maxReceipts) } // Verify the state trie too for fast syncs if tester.downloader.mode == FastSync { - if index := lengths[len(lengths)-1] - minFullBlocks - 1; index > 0 { - if statedb := state.New(tester.ownHeaders[tester.ownHashes[index]].Root, tester.stateDb); statedb == nil { - t.Fatalf("state reconstruction failed") + index := 0 + if pivot := int(tester.downloader.queue.fastSyncPivot); pivot < common { + index = pivot + } else { + index = len(tester.ownHashes) - lengths[len(lengths)-1] + int(tester.downloader.queue.fastSyncPivot) + } + if index > 0 { + if statedb, err := state.New(tester.ownHeaders[tester.ownHashes[index]].Root, tester.stateDb); statedb == nil || err != nil { + t.Fatalf("state reconstruction failed: %v", err) } } } @@ -678,11 +705,11 @@ func testCanonicalSynchronisation(t *testing.T, protocol int, mode SyncMode) { targetBlocks := blockCacheLimit - 15 hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) - tester := newTester(mode) + tester := newTester() tester.newPeer("peer", protocol, hashes, headers, blocks, receipts) // Synchronise with the peer and make sure all relevant data was retrieved - if err := tester.sync("peer", nil); err != nil { + if err := tester.sync("peer", nil, mode); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } assertOwnChain(t, tester, targetBlocks+1) @@ -702,7 +729,7 @@ func testThrottling(t *testing.T, protocol int, mode SyncMode) { targetBlocks := 8 * blockCacheLimit hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) - tester := newTester(mode) + tester := newTester() tester.newPeer("peer", protocol, hashes, headers, blocks, receipts) // Wrap the importer to allow stepping @@ -714,7 +741,7 @@ func testThrottling(t *testing.T, protocol int, mode SyncMode) { // Start a synchronisation concurrently errc := make(chan error) go func() { - errc <- tester.sync("peer", nil) + errc <- tester.sync("peer", nil, mode) }() // Iteratively take some blocks, always checking the retrieval count for { @@ -726,10 +753,11 @@ func testThrottling(t *testing.T, protocol int, mode SyncMode) { break } // Wait a bit for sync to throttle itself - var cached int + var cached, frozen int for start := time.Now(); time.Since(start) < time.Second; { time.Sleep(25 * time.Millisecond) + tester.lock.RLock() tester.downloader.queue.lock.RLock() cached = len(tester.downloader.queue.blockDonePool) if mode == FastSync { @@ -739,16 +767,23 @@ func testThrottling(t *testing.T, protocol int, mode SyncMode) { } } } + frozen = int(atomic.LoadUint32(&blocked)) + retrieved = len(tester.ownBlocks) tester.downloader.queue.lock.RUnlock() + tester.lock.RUnlock() - if cached == blockCacheLimit || len(tester.ownBlocks)+cached+int(atomic.LoadUint32(&blocked)) == targetBlocks+1 { + if cached == blockCacheLimit || retrieved+cached+frozen == targetBlocks+1 { break } } // Make sure we filled up the cache, then exhaust it time.Sleep(25 * time.Millisecond) // give it a chance to screw up - if cached != blockCacheLimit && len(tester.ownBlocks)+cached+int(atomic.LoadUint32(&blocked)) != targetBlocks+1 { - t.Fatalf("block count mismatch: have %v, want %v (owned %v, target %v)", cached, blockCacheLimit, len(tester.ownBlocks), targetBlocks+1) + + tester.lock.RLock() + retrieved = len(tester.ownBlocks) + tester.lock.RUnlock() + if cached != blockCacheLimit && retrieved+cached+frozen != targetBlocks+1 { + t.Fatalf("block count mismatch: have %v, want %v (owned %v, blocked %v, target %v)", cached, blockCacheLimit, retrieved, frozen, targetBlocks+1) } // Permit the blocked blocks to import if atomic.LoadUint32(&blocked) > 0 { @@ -779,18 +814,18 @@ func testForkedSynchronisation(t *testing.T, protocol int, mode SyncMode) { common, fork := MaxHashFetch, 2*MaxHashFetch hashesA, hashesB, headersA, headersB, blocksA, blocksB, receiptsA, receiptsB := makeChainFork(common+fork, fork, genesis, nil) - tester := newTester(mode) + tester := newTester() tester.newPeer("fork A", protocol, hashesA, headersA, blocksA, receiptsA) tester.newPeer("fork B", protocol, hashesB, headersB, blocksB, receiptsB) // Synchronise with the peer and make sure all blocks were retrieved - if err := tester.sync("fork A", nil); err != nil { + if err := tester.sync("fork A", nil, mode); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } assertOwnChain(t, tester, common+fork+1) // Synchronise with the second peer and make sure that fork is pulled too - if err := tester.sync("fork B", nil); err != nil { + if err := tester.sync("fork B", nil, mode); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } assertOwnForkedChain(t, tester, common+1, []int{common + fork + 1, common + fork + 1}) @@ -798,7 +833,7 @@ func testForkedSynchronisation(t *testing.T, protocol int, mode SyncMode) { // Tests that an inactive downloader will not accept incoming hashes and blocks. func TestInactiveDownloader61(t *testing.T) { - tester := newTester(FullSync) + tester := newTester() // Check that neither hashes nor blocks are accepted if err := tester.downloader.DeliverHashes("bad peer", []common.Hash{}); err != errNoSyncActive { @@ -812,7 +847,7 @@ func TestInactiveDownloader61(t *testing.T) { // Tests that an inactive downloader will not accept incoming block headers and // bodies. func TestInactiveDownloader62(t *testing.T) { - tester := newTester(FullSync) + tester := newTester() // Check that neither block headers nor bodies are accepted if err := tester.downloader.DeliverHeaders("bad peer", []*types.Header{}); err != errNoSyncActive { @@ -826,7 +861,7 @@ func TestInactiveDownloader62(t *testing.T) { // Tests that an inactive downloader will not accept incoming block headers, // bodies and receipts. func TestInactiveDownloader63(t *testing.T) { - tester := newTester(FullSync) + tester := newTester() // Check that neither block headers nor bodies are accepted if err := tester.downloader.DeliverHeaders("bad peer", []*types.Header{}); err != errNoSyncActive { @@ -860,7 +895,7 @@ func testCancel(t *testing.T, protocol int, mode SyncMode) { } hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) - tester := newTester(mode) + tester := newTester() tester.newPeer("peer", protocol, hashes, headers, blocks, receipts) // Make sure canceling works with a pristine downloader @@ -869,7 +904,7 @@ func testCancel(t *testing.T, protocol int, mode SyncMode) { t.Errorf("download queue not idle") } // Synchronise with the peer, but cancel afterwards - if err := tester.sync("peer", nil); err != nil { + if err := tester.sync("peer", nil, mode); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } tester.downloader.cancel() @@ -893,12 +928,12 @@ func testMultiSynchronisation(t *testing.T, protocol int, mode SyncMode) { targetBlocks := targetPeers*blockCacheLimit - 15 hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) - tester := newTester(mode) + tester := newTester() for i := 0; i < targetPeers; i++ { id := fmt.Sprintf("peer #%d", i) tester.newPeer(id, protocol, hashes[i*blockCacheLimit:], headers, blocks, receipts) } - if err := tester.sync("peer #0", nil); err != nil { + if err := tester.sync("peer #0", nil, mode); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } assertOwnChain(t, tester, targetBlocks+1) @@ -920,14 +955,14 @@ func testMultiProtoSync(t *testing.T, protocol int, mode SyncMode) { hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) // Create peers of every type - tester := newTester(mode) - tester.newPeer("peer 61", 61, hashes, headers, blocks, receipts) - tester.newPeer("peer 62", 62, hashes, headers, blocks, receipts) + tester := newTester() + tester.newPeer("peer 61", 61, hashes, nil, blocks, nil) + tester.newPeer("peer 62", 62, hashes, headers, blocks, nil) tester.newPeer("peer 63", 63, hashes, headers, blocks, receipts) tester.newPeer("peer 64", 64, hashes, headers, blocks, receipts) - // Synchronise with the requestd peer and make sure all blocks were retrieved - if err := tester.sync(fmt.Sprintf("peer %d", protocol), nil); err != nil { + // Synchronise with the requested peer and make sure all blocks were retrieved + if err := tester.sync(fmt.Sprintf("peer %d", protocol), nil, mode); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } assertOwnChain(t, tester, targetBlocks+1) @@ -955,7 +990,7 @@ func testEmptyShortCircuit(t *testing.T, protocol int, mode SyncMode) { targetBlocks := 2*blockCacheLimit - 15 hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) - tester := newTester(mode) + tester := newTester() tester.newPeer("peer", protocol, hashes, headers, blocks, receipts) // Instrument the downloader to signal body requests @@ -967,7 +1002,7 @@ func testEmptyShortCircuit(t *testing.T, protocol int, mode SyncMode) { atomic.AddInt32(&receiptsHave, int32(len(headers))) } // Synchronise with the peer and make sure all blocks were retrieved - if err := tester.sync("peer", nil); err != nil { + if err := tester.sync("peer", nil, mode); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } assertOwnChain(t, tester, targetBlocks+1) @@ -980,7 +1015,7 @@ func testEmptyShortCircuit(t *testing.T, protocol int, mode SyncMode) { } } for hash, receipt := range receipts { - if mode == FastSync && len(receipt) > 0 && headers[hash].Number.Uint64() <= uint64(targetBlocks-minFullBlocks) { + if mode == FastSync && len(receipt) > 0 && headers[hash].Number.Uint64() <= tester.downloader.queue.fastSyncPivot { receiptsNeeded++ } } @@ -1006,19 +1041,19 @@ func testMissingHeaderAttack(t *testing.T, protocol int, mode SyncMode) { targetBlocks := blockCacheLimit - 15 hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) - tester := newTester(mode) + tester := newTester() // Attempt a full sync with an attacker feeding gapped headers tester.newPeer("attack", protocol, hashes, headers, blocks, receipts) missing := targetBlocks / 2 delete(tester.peerHeaders["attack"], hashes[missing]) - if err := tester.sync("attack", nil); err == nil { + if err := tester.sync("attack", nil, mode); err == nil { t.Fatalf("succeeded attacker synchronisation") } // Synchronise with the valid peer and make sure sync succeeds tester.newPeer("valid", protocol, hashes, headers, blocks, receipts) - if err := tester.sync("valid", nil); err != nil { + if err := tester.sync("valid", nil, mode); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } assertOwnChain(t, tester, targetBlocks+1) @@ -1038,7 +1073,7 @@ func testShiftedHeaderAttack(t *testing.T, protocol int, mode SyncMode) { targetBlocks := blockCacheLimit - 15 hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) - tester := newTester(mode) + tester := newTester() // Attempt a full sync with an attacker feeding shifted headers tester.newPeer("attack", protocol, hashes, headers, blocks, receipts) @@ -1046,12 +1081,12 @@ func testShiftedHeaderAttack(t *testing.T, protocol int, mode SyncMode) { delete(tester.peerBlocks["attack"], hashes[len(hashes)-2]) delete(tester.peerReceipts["attack"], hashes[len(hashes)-2]) - if err := tester.sync("attack", nil); err == nil { + if err := tester.sync("attack", nil, mode); err == nil { t.Fatalf("succeeded attacker synchronisation") } // Synchronise with the valid peer and make sure sync succeeds tester.newPeer("valid", protocol, hashes, headers, blocks, receipts) - if err := tester.sync("valid", nil); err != nil { + if err := tester.sync("valid", nil, mode); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } assertOwnChain(t, tester, targetBlocks+1) @@ -1064,92 +1099,81 @@ func TestInvalidHeaderRollback64Light(t *testing.T) { testInvalidHeaderRollback( func testInvalidHeaderRollback(t *testing.T, protocol int, mode SyncMode) { // Create a small enough block chain to download - targetBlocks := 3*minCheckedHeaders + minFullBlocks + targetBlocks := 3*fsHeaderSafetyNet + fsMinFullBlocks hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) - tester := newTester(mode) + tester := newTester() - // Attempt to sync with an attacker that feeds junk during the fast sync phase + // Attempt to sync with an attacker that feeds junk during the fast sync phase. + // This should result in the last fsHeaderSafetyNet headers being rolled back. tester.newPeer("fast-attack", protocol, hashes, headers, blocks, receipts) - missing := minCheckedHeaders + MaxHeaderFetch + 1 + missing := fsHeaderSafetyNet + MaxHeaderFetch + 1 delete(tester.peerHeaders["fast-attack"], hashes[len(hashes)-missing]) - if err := tester.sync("fast-attack", nil); err == nil { + if err := tester.sync("fast-attack", nil, mode); err == nil { t.Fatalf("succeeded fast attacker synchronisation") } if head := tester.headHeader().Number.Int64(); int(head) > MaxHeaderFetch { - t.Fatalf("rollback head mismatch: have %v, want at most %v", head, MaxHeaderFetch) + t.Errorf("rollback head mismatch: have %v, want at most %v", head, MaxHeaderFetch) } - // Attempt to sync with an attacker that feeds junk during the block import phase + // Attempt to sync with an attacker that feeds junk during the block import phase. + // This should result in both the last fsHeaderSafetyNet number of headers being + // rolled back, and also the pivot point being reverted to a non-block status. tester.newPeer("block-attack", protocol, hashes, headers, blocks, receipts) - missing = 3*minCheckedHeaders + MaxHeaderFetch + 1 + missing = 3*fsHeaderSafetyNet + MaxHeaderFetch + 1 delete(tester.peerHeaders["block-attack"], hashes[len(hashes)-missing]) - if err := tester.sync("block-attack", nil); err == nil { + if err := tester.sync("block-attack", nil, mode); err == nil { t.Fatalf("succeeded block attacker synchronisation") } + if head := tester.headHeader().Number.Int64(); int(head) > 2*fsHeaderSafetyNet+MaxHeaderFetch { + t.Errorf("rollback head mismatch: have %v, want at most %v", head, 2*fsHeaderSafetyNet+MaxHeaderFetch) + } if mode == FastSync { - // Fast sync should not discard anything below the verified pivot point - if head := tester.headHeader().Number.Int64(); int(head) < 3*minCheckedHeaders { - t.Fatalf("rollback head mismatch: have %v, want at least %v", head, 3*minCheckedHeaders) + if head := tester.headBlock().NumberU64(); head != 0 { + t.Errorf("fast sync pivot block #%d not rolled back", head) } - } else if mode == LightSync { - // Light sync should still discard data as before - if head := tester.headHeader().Number.Int64(); int(head) > 3*minCheckedHeaders { - t.Fatalf("rollback head mismatch: have %v, want at most %v", head, 3*minCheckedHeaders) - } - } - // Synchronise with the valid peer and make sure sync succeeds - tester.newPeer("valid", protocol, hashes, headers, blocks, receipts) - if err := tester.sync("valid", nil); err != nil { - t.Fatalf("failed to synchronise blocks: %v", err) } - assertOwnChain(t, tester, targetBlocks+1) -} + // Attempt to sync with an attacker that withholds promised blocks after the + // fast sync pivot point. This could be a trial to leave the node with a bad + // but already imported pivot block. + tester.newPeer("withhold-attack", protocol, hashes, headers, blocks, receipts) + missing = 3*fsHeaderSafetyNet + MaxHeaderFetch + 1 -// Tests that if a peer sends an invalid block piece (body or receipt) for a -// requested block, it gets dropped immediately by the downloader. -func TestInvalidContentAttack62(t *testing.T) { testInvalidContentAttack(t, 62, FullSync) } -func TestInvalidContentAttack63Full(t *testing.T) { testInvalidContentAttack(t, 63, FullSync) } -func TestInvalidContentAttack63Fast(t *testing.T) { testInvalidContentAttack(t, 63, FastSync) } -func TestInvalidContentAttack64Full(t *testing.T) { testInvalidContentAttack(t, 64, FullSync) } -func TestInvalidContentAttack64Fast(t *testing.T) { testInvalidContentAttack(t, 64, FastSync) } -func TestInvalidContentAttack64Light(t *testing.T) { testInvalidContentAttack(t, 64, LightSync) } - -func testInvalidContentAttack(t *testing.T, protocol int, mode SyncMode) { - // Create two peers, one feeding invalid block bodies - targetBlocks := 4*blockCacheLimit - 15 - hashes, headers, validBlocks, validReceipts := makeChain(targetBlocks, 0, genesis, nil) - - invalidBlocks := make(map[common.Hash]*types.Block) - for hash, block := range validBlocks { - invalidBlocks[hash] = types.NewBlockWithHeader(block.Header()) - } - invalidReceipts := make(map[common.Hash]types.Receipts) - for hash, _ := range validReceipts { - invalidReceipts[hash] = types.Receipts{&types.Receipt{}} + tester.downloader.noFast = false + tester.downloader.syncInitHook = func(uint64, uint64) { + for i := missing; i <= len(hashes); i++ { + delete(tester.peerHeaders["withhold-attack"], hashes[len(hashes)-i]) + } + tester.downloader.syncInitHook = nil } - tester := newTester(mode) - tester.newPeer("valid", protocol, hashes, headers, validBlocks, validReceipts) - if mode != LightSync { - tester.newPeer("body attack", protocol, hashes, headers, invalidBlocks, validReceipts) + if err := tester.sync("withhold-attack", nil, mode); err == nil { + t.Fatalf("succeeded withholding attacker synchronisation") + } + if head := tester.headHeader().Number.Int64(); int(head) > 2*fsHeaderSafetyNet+MaxHeaderFetch { + t.Errorf("rollback head mismatch: have %v, want at most %v", head, 2*fsHeaderSafetyNet+MaxHeaderFetch) } if mode == FastSync { - tester.newPeer("receipt attack", protocol, hashes, headers, validBlocks, invalidReceipts) + if head := tester.headBlock().NumberU64(); head != 0 { + t.Errorf("fast sync pivot block #%d not rolled back", head) + } } - // Synchronise with the valid peer (will pull contents from the attacker too) - if err := tester.sync("valid", nil); err != nil { + // Synchronise with the valid peer and make sure sync succeeds. Since the last + // rollback should also disable fast syncing for this process, verify that we + // did a fresh full sync. Note, we can't assert anything about the receipts + // since we won't purge the database of them, hence we can't use asserOwnChain. + tester.newPeer("valid", protocol, hashes, headers, blocks, receipts) + if err := tester.sync("valid", nil, mode); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } - assertOwnChain(t, tester, targetBlocks+1) - - // Make sure the attacker was detected and dropped in the mean time - if _, ok := tester.peerHashes["body attack"]; ok { - t.Fatalf("block body attacker not detected/dropped") + if hs := len(tester.ownHeaders); hs != len(headers) { + t.Fatalf("synchronised headers mismatch: have %v, want %v", hs, len(headers)) } - if _, ok := tester.peerHashes["receipt attack"]; ok { - t.Fatalf("receipt attacker not detected/dropped") + if mode != LightSync { + if bs := len(tester.ownBlocks); bs != len(blocks) { + t.Fatalf("synchronised blocks mismatch: have %v, want %v", bs, len(blocks)) + } } } @@ -1164,11 +1188,11 @@ func TestHighTDStarvationAttack64Fast(t *testing.T) { testHighTDStarvationAttac func TestHighTDStarvationAttack64Light(t *testing.T) { testHighTDStarvationAttack(t, 64, LightSync) } func testHighTDStarvationAttack(t *testing.T, protocol int, mode SyncMode) { - tester := newTester(mode) + tester := newTester() hashes, headers, blocks, receipts := makeChain(0, 0, genesis, nil) tester.newPeer("attack", protocol, []common.Hash{hashes[0]}, headers, blocks, receipts) - if err := tester.sync("attack", big.NewInt(1000000)); err != errStallingPeer { + if err := tester.sync("attack", big.NewInt(1000000), mode); err != errStallingPeer { t.Fatalf("synchronisation error mismatch: have %v, want %v", err, errStallingPeer) } } @@ -1206,7 +1230,7 @@ func testBlockHeaderAttackerDropping(t *testing.T, protocol int) { {errCancelBodyFetch, false}, // Synchronisation was canceled, origin may be innocent, don't drop } // Run the tests and check disconnection status - tester := newTester(FullSync) + tester := newTester() for i, tt := range tests { // Register a new peer and ensure it's presence id := fmt.Sprintf("test %d", i) @@ -1219,120 +1243,125 @@ func testBlockHeaderAttackerDropping(t *testing.T, protocol int) { // Simulate a synchronisation and check the required result tester.downloader.synchroniseMock = func(string, common.Hash) error { return tt.result } - tester.downloader.Synchronise(id, genesis.Hash(), big.NewInt(1000)) + tester.downloader.Synchronise(id, genesis.Hash(), big.NewInt(1000), FullSync) if _, ok := tester.peerHashes[id]; !ok != tt.drop { t.Errorf("test %d: peer drop mismatch for %v: have %v, want %v", i, tt.result, !ok, tt.drop) } } } -// Tests that synchronisation boundaries (origin block number and highest block -// number) is tracked and updated correctly. -func TestSyncBoundaries61(t *testing.T) { testSyncBoundaries(t, 61, FullSync) } -func TestSyncBoundaries62(t *testing.T) { testSyncBoundaries(t, 62, FullSync) } -func TestSyncBoundaries63Full(t *testing.T) { testSyncBoundaries(t, 63, FullSync) } -func TestSyncBoundaries63Fast(t *testing.T) { testSyncBoundaries(t, 63, FastSync) } -func TestSyncBoundaries64Full(t *testing.T) { testSyncBoundaries(t, 64, FullSync) } -func TestSyncBoundaries64Fast(t *testing.T) { testSyncBoundaries(t, 64, FastSync) } -func TestSyncBoundaries64Light(t *testing.T) { testSyncBoundaries(t, 64, LightSync) } - -func testSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { +// Tests that synchronisation progress (origin block number, current block number +// and highest block number) is tracked and updated correctly. +func TestSyncProgress61(t *testing.T) { testSyncProgress(t, 61, FullSync) } +func TestSyncProgress62(t *testing.T) { testSyncProgress(t, 62, FullSync) } +func TestSyncProgress63Full(t *testing.T) { testSyncProgress(t, 63, FullSync) } +func TestSyncProgress63Fast(t *testing.T) { testSyncProgress(t, 63, FastSync) } +func TestSyncProgress64Full(t *testing.T) { testSyncProgress(t, 64, FullSync) } +func TestSyncProgress64Fast(t *testing.T) { testSyncProgress(t, 64, FastSync) } +func TestSyncProgress64Light(t *testing.T) { testSyncProgress(t, 64, LightSync) } + +func testSyncProgress(t *testing.T, protocol int, mode SyncMode) { // Create a small enough block chain to download targetBlocks := blockCacheLimit - 15 hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) - // Set a sync init hook to catch boundary changes + // Set a sync init hook to catch progress changes starting := make(chan struct{}) progress := make(chan struct{}) - tester := newTester(mode) + tester := newTester() tester.downloader.syncInitHook = func(origin, latest uint64) { starting <- struct{}{} <-progress } - // Retrieve the sync boundaries and ensure they are zero (pristine sync) - if origin, latest := tester.downloader.Boundaries(); origin != 0 || latest != 0 { - t.Fatalf("Pristine boundary mismatch: have %v/%v, want %v/%v", origin, latest, 0, 0) + // Retrieve the sync progress and ensure they are zero (pristine sync) + if origin, current, latest := tester.downloader.Progress(); origin != 0 || current != 0 || latest != 0 { + t.Fatalf("Pristine progress mismatch: have %v/%v/%v, want %v/%v/%v", origin, current, latest, 0, 0, 0) } - // Synchronise half the blocks and check initial boundaries + // Synchronise half the blocks and check initial progress tester.newPeer("peer-half", protocol, hashes[targetBlocks/2:], headers, blocks, receipts) pending := new(sync.WaitGroup) pending.Add(1) go func() { defer pending.Done() - if err := tester.sync("peer-half", nil); err != nil { + if err := tester.sync("peer-half", nil, mode); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } }() <-starting - if origin, latest := tester.downloader.Boundaries(); origin != 0 || latest != uint64(targetBlocks/2+1) { - t.Fatalf("Initial boundary mismatch: have %v/%v, want %v/%v", origin, latest, 0, targetBlocks/2+1) + if origin, current, latest := tester.downloader.Progress(); origin != 0 || current != 0 || latest != uint64(targetBlocks/2+1) { + t.Fatalf("Initial progress mismatch: have %v/%v/%v, want %v/%v/%v", origin, current, latest, 0, 0, targetBlocks/2+1) } progress <- struct{}{} pending.Wait() - // Synchronise all the blocks and check continuation boundaries + // Synchronise all the blocks and check continuation progress tester.newPeer("peer-full", protocol, hashes, headers, blocks, receipts) pending.Add(1) go func() { defer pending.Done() - if err := tester.sync("peer-full", nil); err != nil { + if err := tester.sync("peer-full", nil, mode); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } }() <-starting - if origin, latest := tester.downloader.Boundaries(); origin != uint64(targetBlocks/2+1) || latest != uint64(targetBlocks) { - t.Fatalf("Completing boundary mismatch: have %v/%v, want %v/%v", origin, latest, targetBlocks/2+1, targetBlocks) + if origin, current, latest := tester.downloader.Progress(); origin != uint64(targetBlocks/2+1) || current != uint64(targetBlocks/2+1) || latest != uint64(targetBlocks) { + t.Fatalf("Completing progress mismatch: have %v/%v/%v, want %v/%v/%v", origin, current, latest, targetBlocks/2+1, targetBlocks/2+1, targetBlocks) } progress <- struct{}{} pending.Wait() + + // Check final progress after successful sync + if origin, current, latest := tester.downloader.Progress(); origin != uint64(targetBlocks/2+1) || current != uint64(targetBlocks) || latest != uint64(targetBlocks) { + t.Fatalf("Final progress mismatch: have %v/%v/%v, want %v/%v/%v", origin, current, latest, targetBlocks/2+1, targetBlocks, targetBlocks) + } } -// Tests that synchronisation boundaries (origin block number and highest block +// Tests that synchronisation progress (origin block number and highest block // number) is tracked and updated correctly in case of a fork (or manual head // revertal). -func TestForkedSyncBoundaries61(t *testing.T) { testForkedSyncBoundaries(t, 61, FullSync) } -func TestForkedSyncBoundaries62(t *testing.T) { testForkedSyncBoundaries(t, 62, FullSync) } -func TestForkedSyncBoundaries63Full(t *testing.T) { testForkedSyncBoundaries(t, 63, FullSync) } -func TestForkedSyncBoundaries63Fast(t *testing.T) { testForkedSyncBoundaries(t, 63, FastSync) } -func TestForkedSyncBoundaries64Full(t *testing.T) { testForkedSyncBoundaries(t, 64, FullSync) } -func TestForkedSyncBoundaries64Fast(t *testing.T) { testForkedSyncBoundaries(t, 64, FastSync) } -func TestForkedSyncBoundaries64Light(t *testing.T) { testForkedSyncBoundaries(t, 64, LightSync) } - -func testForkedSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { +func TestForkedSyncProgress61(t *testing.T) { testForkedSyncProgress(t, 61, FullSync) } +func TestForkedSyncProgress62(t *testing.T) { testForkedSyncProgress(t, 62, FullSync) } +func TestForkedSyncProgress63Full(t *testing.T) { testForkedSyncProgress(t, 63, FullSync) } +func TestForkedSyncProgress63Fast(t *testing.T) { testForkedSyncProgress(t, 63, FastSync) } +func TestForkedSyncProgress64Full(t *testing.T) { testForkedSyncProgress(t, 64, FullSync) } +func TestForkedSyncProgress64Fast(t *testing.T) { testForkedSyncProgress(t, 64, FastSync) } +func TestForkedSyncProgress64Light(t *testing.T) { testForkedSyncProgress(t, 64, LightSync) } + +func testForkedSyncProgress(t *testing.T, protocol int, mode SyncMode) { // Create a forked chain to simulate origin revertal common, fork := MaxHashFetch, 2*MaxHashFetch hashesA, hashesB, headersA, headersB, blocksA, blocksB, receiptsA, receiptsB := makeChainFork(common+fork, fork, genesis, nil) - // Set a sync init hook to catch boundary changes + // Set a sync init hook to catch progress changes starting := make(chan struct{}) progress := make(chan struct{}) - tester := newTester(mode) + tester := newTester() tester.downloader.syncInitHook = func(origin, latest uint64) { starting <- struct{}{} <-progress } - // Retrieve the sync boundaries and ensure they are zero (pristine sync) - if origin, latest := tester.downloader.Boundaries(); origin != 0 || latest != 0 { - t.Fatalf("Pristine boundary mismatch: have %v/%v, want %v/%v", origin, latest, 0, 0) + // Retrieve the sync progress and ensure they are zero (pristine sync) + if origin, current, latest := tester.downloader.Progress(); origin != 0 || current != 0 || latest != 0 { + t.Fatalf("Pristine progress mismatch: have %v/%v/%v, want %v/%v/%v", origin, current, latest, 0, 0, 0) } - // Synchronise with one of the forks and check boundaries + // Synchronise with one of the forks and check progress tester.newPeer("fork A", protocol, hashesA, headersA, blocksA, receiptsA) pending := new(sync.WaitGroup) pending.Add(1) go func() { defer pending.Done() - if err := tester.sync("fork A", nil); err != nil { + if err := tester.sync("fork A", nil, mode); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } }() <-starting - if origin, latest := tester.downloader.Boundaries(); origin != 0 || latest != uint64(len(hashesA)-1) { - t.Fatalf("Initial boundary mismatch: have %v/%v, want %v/%v", origin, latest, 0, len(hashesA)-1) + if origin, current, latest := tester.downloader.Progress(); origin != 0 || current != 0 || latest != uint64(len(hashesA)-1) { + t.Fatalf("Initial progress mismatch: have %v/%v/%v, want %v/%v/%v", origin, current, latest, 0, 0, len(hashesA)-1) } progress <- struct{}{} pending.Wait() @@ -1340,52 +1369,57 @@ func testForkedSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { // Simulate a successful sync above the fork tester.downloader.syncStatsChainOrigin = tester.downloader.syncStatsChainHeight - // Synchronise with the second fork and check boundary resets + // Synchronise with the second fork and check progress resets tester.newPeer("fork B", protocol, hashesB, headersB, blocksB, receiptsB) pending.Add(1) go func() { defer pending.Done() - if err := tester.sync("fork B", nil); err != nil { + if err := tester.sync("fork B", nil, mode); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } }() <-starting - if origin, latest := tester.downloader.Boundaries(); origin != uint64(common) || latest != uint64(len(hashesB)-1) { - t.Fatalf("Forking boundary mismatch: have %v/%v, want %v/%v", origin, latest, common, len(hashesB)-1) + if origin, current, latest := tester.downloader.Progress(); origin != uint64(common) || current != uint64(len(hashesA)-1) || latest != uint64(len(hashesB)-1) { + t.Fatalf("Forking progress mismatch: have %v/%v/%v, want %v/%v/%v", origin, current, latest, common, len(hashesA)-1, len(hashesB)-1) } progress <- struct{}{} pending.Wait() + + // Check final progress after successful sync + if origin, current, latest := tester.downloader.Progress(); origin != uint64(common) || current != uint64(len(hashesB)-1) || latest != uint64(len(hashesB)-1) { + t.Fatalf("Final progress mismatch: have %v/%v/%v, want %v/%v/%v", origin, current, latest, common, len(hashesB)-1, len(hashesB)-1) + } } -// Tests that if synchronisation is aborted due to some failure, then the boundary +// Tests that if synchronisation is aborted due to some failure, then the progress // origin is not updated in the next sync cycle, as it should be considered the // continuation of the previous sync and not a new instance. -func TestFailedSyncBoundaries61(t *testing.T) { testFailedSyncBoundaries(t, 61, FullSync) } -func TestFailedSyncBoundaries62(t *testing.T) { testFailedSyncBoundaries(t, 62, FullSync) } -func TestFailedSyncBoundaries63Full(t *testing.T) { testFailedSyncBoundaries(t, 63, FullSync) } -func TestFailedSyncBoundaries63Fast(t *testing.T) { testFailedSyncBoundaries(t, 63, FastSync) } -func TestFailedSyncBoundaries64Full(t *testing.T) { testFailedSyncBoundaries(t, 64, FullSync) } -func TestFailedSyncBoundaries64Fast(t *testing.T) { testFailedSyncBoundaries(t, 64, FastSync) } -func TestFailedSyncBoundaries64Light(t *testing.T) { testFailedSyncBoundaries(t, 64, LightSync) } - -func testFailedSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { +func TestFailedSyncProgress61(t *testing.T) { testFailedSyncProgress(t, 61, FullSync) } +func TestFailedSyncProgress62(t *testing.T) { testFailedSyncProgress(t, 62, FullSync) } +func TestFailedSyncProgress63Full(t *testing.T) { testFailedSyncProgress(t, 63, FullSync) } +func TestFailedSyncProgress63Fast(t *testing.T) { testFailedSyncProgress(t, 63, FastSync) } +func TestFailedSyncProgress64Full(t *testing.T) { testFailedSyncProgress(t, 64, FullSync) } +func TestFailedSyncProgress64Fast(t *testing.T) { testFailedSyncProgress(t, 64, FastSync) } +func TestFailedSyncProgress64Light(t *testing.T) { testFailedSyncProgress(t, 64, LightSync) } + +func testFailedSyncProgress(t *testing.T, protocol int, mode SyncMode) { // Create a small enough block chain to download targetBlocks := blockCacheLimit - 15 hashes, headers, blocks, receipts := makeChain(targetBlocks, 0, genesis, nil) - // Set a sync init hook to catch boundary changes + // Set a sync init hook to catch progress changes starting := make(chan struct{}) progress := make(chan struct{}) - tester := newTester(mode) + tester := newTester() tester.downloader.syncInitHook = func(origin, latest uint64) { starting <- struct{}{} <-progress } - // Retrieve the sync boundaries and ensure they are zero (pristine sync) - if origin, latest := tester.downloader.Boundaries(); origin != 0 || latest != 0 { - t.Fatalf("Pristine boundary mismatch: have %v/%v, want %v/%v", origin, latest, 0, 0) + // Retrieve the sync progress and ensure they are zero (pristine sync) + if origin, current, latest := tester.downloader.Progress(); origin != 0 || current != 0 || latest != 0 { + t.Fatalf("Pristine progress mismatch: have %v/%v/%v, want %v/%v/%v", origin, current, latest, 0, 0, 0) } // Attempt a full sync with a faulty peer tester.newPeer("faulty", protocol, hashes, headers, blocks, receipts) @@ -1399,62 +1433,67 @@ func testFailedSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { go func() { defer pending.Done() - if err := tester.sync("faulty", nil); err == nil { + if err := tester.sync("faulty", nil, mode); err == nil { t.Fatalf("succeeded faulty synchronisation") } }() <-starting - if origin, latest := tester.downloader.Boundaries(); origin != 0 || latest != uint64(targetBlocks) { - t.Fatalf("Initial boundary mismatch: have %v/%v, want %v/%v", origin, latest, 0, targetBlocks) + if origin, current, latest := tester.downloader.Progress(); origin != 0 || current != 0 || latest != uint64(targetBlocks) { + t.Fatalf("Initial progress mismatch: have %v/%v/%v, want %v/%v/%v", origin, current, latest, 0, 0, targetBlocks) } progress <- struct{}{} pending.Wait() - // Synchronise with a good peer and check that the boundary origin remind the same after a failure + // Synchronise with a good peer and check that the progress origin remind the same after a failure tester.newPeer("valid", protocol, hashes, headers, blocks, receipts) pending.Add(1) go func() { defer pending.Done() - if err := tester.sync("valid", nil); err != nil { + if err := tester.sync("valid", nil, mode); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } }() <-starting - if origin, latest := tester.downloader.Boundaries(); origin != 0 || latest != uint64(targetBlocks) { - t.Fatalf("Completing boundary mismatch: have %v/%v, want %v/%v", origin, latest, 0, targetBlocks) + if origin, current, latest := tester.downloader.Progress(); origin != 0 || current > uint64(targetBlocks/2) || latest != uint64(targetBlocks) { + t.Fatalf("Completing progress mismatch: have %v/%v/%v, want %v/0-%v/%v", origin, current, latest, 0, targetBlocks/2, targetBlocks) } progress <- struct{}{} pending.Wait() + + // Check final progress after successful sync + if origin, current, latest := tester.downloader.Progress(); origin > uint64(targetBlocks/2) || current != uint64(targetBlocks) || latest != uint64(targetBlocks) { + t.Fatalf("Final progress mismatch: have %v/%v/%v, want 0-%v/%v/%v", origin, current, latest, targetBlocks/2, targetBlocks, targetBlocks) + } } // Tests that if an attacker fakes a chain height, after the attack is detected, -// the boundary height is successfully reduced at the next sync invocation. -func TestFakedSyncBoundaries61(t *testing.T) { testFakedSyncBoundaries(t, 61, FullSync) } -func TestFakedSyncBoundaries62(t *testing.T) { testFakedSyncBoundaries(t, 62, FullSync) } -func TestFakedSyncBoundaries63Full(t *testing.T) { testFakedSyncBoundaries(t, 63, FullSync) } -func TestFakedSyncBoundaries63Fast(t *testing.T) { testFakedSyncBoundaries(t, 63, FastSync) } -func TestFakedSyncBoundaries64Full(t *testing.T) { testFakedSyncBoundaries(t, 64, FullSync) } -func TestFakedSyncBoundaries64Fast(t *testing.T) { testFakedSyncBoundaries(t, 64, FastSync) } -func TestFakedSyncBoundaries64Light(t *testing.T) { testFakedSyncBoundaries(t, 64, LightSync) } - -func testFakedSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { +// the progress height is successfully reduced at the next sync invocation. +func TestFakedSyncProgress61(t *testing.T) { testFakedSyncProgress(t, 61, FullSync) } +func TestFakedSyncProgress62(t *testing.T) { testFakedSyncProgress(t, 62, FullSync) } +func TestFakedSyncProgress63Full(t *testing.T) { testFakedSyncProgress(t, 63, FullSync) } +func TestFakedSyncProgress63Fast(t *testing.T) { testFakedSyncProgress(t, 63, FastSync) } +func TestFakedSyncProgress64Full(t *testing.T) { testFakedSyncProgress(t, 64, FullSync) } +func TestFakedSyncProgress64Fast(t *testing.T) { testFakedSyncProgress(t, 64, FastSync) } +func TestFakedSyncProgress64Light(t *testing.T) { testFakedSyncProgress(t, 64, LightSync) } + +func testFakedSyncProgress(t *testing.T, protocol int, mode SyncMode) { // Create a small block chain targetBlocks := blockCacheLimit - 15 hashes, headers, blocks, receipts := makeChain(targetBlocks+3, 0, genesis, nil) - // Set a sync init hook to catch boundary changes + // Set a sync init hook to catch progress changes starting := make(chan struct{}) progress := make(chan struct{}) - tester := newTester(mode) + tester := newTester() tester.downloader.syncInitHook = func(origin, latest uint64) { starting <- struct{}{} <-progress } - // Retrieve the sync boundaries and ensure they are zero (pristine sync) - if origin, latest := tester.downloader.Boundaries(); origin != 0 || latest != 0 { - t.Fatalf("Pristine boundary mismatch: have %v/%v, want %v/%v", origin, latest, 0, 0) + // Retrieve the sync progress and ensure they are zero (pristine sync) + if origin, current, latest := tester.downloader.Progress(); origin != 0 || current != 0 || latest != 0 { + t.Fatalf("Pristine progress mismatch: have %v/%v/%v, want %v/%v/%v", origin, current, latest, 0, 0, 0) } // Create and sync with an attacker that promises a higher chain than available tester.newPeer("attack", protocol, hashes, headers, blocks, receipts) @@ -1469,31 +1508,36 @@ func testFakedSyncBoundaries(t *testing.T, protocol int, mode SyncMode) { go func() { defer pending.Done() - if err := tester.sync("attack", nil); err == nil { + if err := tester.sync("attack", nil, mode); err == nil { t.Fatalf("succeeded attacker synchronisation") } }() <-starting - if origin, latest := tester.downloader.Boundaries(); origin != 0 || latest != uint64(targetBlocks+3) { - t.Fatalf("Initial boundary mismatch: have %v/%v, want %v/%v", origin, latest, 0, targetBlocks+3) + if origin, current, latest := tester.downloader.Progress(); origin != 0 || current != 0 || latest != uint64(targetBlocks+3) { + t.Fatalf("Initial progress mismatch: have %v/%v/%v, want %v/%v/%v", origin, current, latest, 0, 0, targetBlocks+3) } progress <- struct{}{} pending.Wait() - // Synchronise with a good peer and check that the boundary height has been reduced to the true value + // Synchronise with a good peer and check that the progress height has been reduced to the true value tester.newPeer("valid", protocol, hashes[3:], headers, blocks, receipts) pending.Add(1) go func() { defer pending.Done() - if err := tester.sync("valid", nil); err != nil { + if err := tester.sync("valid", nil, mode); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } }() <-starting - if origin, latest := tester.downloader.Boundaries(); origin != 0 || latest != uint64(targetBlocks) { - t.Fatalf("Initial boundary mismatch: have %v/%v, want %v/%v", origin, latest, 0, targetBlocks) + if origin, current, latest := tester.downloader.Progress(); origin != 0 || current > uint64(targetBlocks) || latest != uint64(targetBlocks) { + t.Fatalf("Completing progress mismatch: have %v/%v/%v, want %v/0-%v/%v", origin, current, latest, 0, targetBlocks, targetBlocks) } progress <- struct{}{} pending.Wait() + + // Check final progress after successful sync + if origin, current, latest := tester.downloader.Progress(); origin > uint64(targetBlocks) || current != uint64(targetBlocks) || latest != uint64(targetBlocks) { + t.Fatalf("Final progress mismatch: have %v/%v/%v, want 0-%v/%v/%v", origin, current, latest, targetBlocks, targetBlocks, targetBlocks) + } } diff --git a/eth/downloader/modes.go b/eth/downloader/modes.go index 8916dbb79..ec339c074 100644 --- a/eth/downloader/modes.go +++ b/eth/downloader/modes.go @@ -20,7 +20,7 @@ package downloader type SyncMode int const ( - FullSync SyncMode = iota // Synchronise the entire block-chain history from full blocks - FastSync // Quikcly download the headers, full sync only at the chain head + FullSync SyncMode = iota // Synchronise the entire blockchain history from full blocks + FastSync // Quickly download the headers, full sync only at the chain head LightSync // Download only the headers and terminate afterwards ) diff --git a/eth/downloader/peer.go b/eth/downloader/peer.go index 5011d5d46..1f457cb15 100644 --- a/eth/downloader/peer.go +++ b/eth/downloader/peer.go @@ -124,6 +124,10 @@ func (p *peer) Reset() { // Fetch61 sends a block retrieval request to the remote peer. func (p *peer) Fetch61(request *fetchRequest) error { + // Sanity check the protocol version + if p.version != 61 { + panic(fmt.Sprintf("block fetch [eth/61] requested on eth/%d", p.version)) + } // Short circuit if the peer is already fetching if !atomic.CompareAndSwapInt32(&p.blockIdle, 0, 1) { return errAlreadyFetching @@ -142,6 +146,10 @@ func (p *peer) Fetch61(request *fetchRequest) error { // FetchBodies sends a block body retrieval request to the remote peer. func (p *peer) FetchBodies(request *fetchRequest) error { + // Sanity check the protocol version + if p.version < 62 { + panic(fmt.Sprintf("body fetch [eth/62+] requested on eth/%d", p.version)) + } // Short circuit if the peer is already fetching if !atomic.CompareAndSwapInt32(&p.blockIdle, 0, 1) { return errAlreadyFetching @@ -160,6 +168,10 @@ func (p *peer) FetchBodies(request *fetchRequest) error { // FetchReceipts sends a receipt retrieval request to the remote peer. func (p *peer) FetchReceipts(request *fetchRequest) error { + // Sanity check the protocol version + if p.version < 63 { + panic(fmt.Sprintf("body fetch [eth/63+] requested on eth/%d", p.version)) + } // Short circuit if the peer is already fetching if !atomic.CompareAndSwapInt32(&p.receiptIdle, 0, 1) { return errAlreadyFetching @@ -178,6 +190,10 @@ func (p *peer) FetchReceipts(request *fetchRequest) error { // FetchNodeData sends a node state data retrieval request to the remote peer. func (p *peer) FetchNodeData(request *fetchRequest) error { + // Sanity check the protocol version + if p.version < 63 { + panic(fmt.Sprintf("node data fetch [eth/63+] requested on eth/%d", p.version)) + } // Short circuit if the peer is already fetching if !atomic.CompareAndSwapInt32(&p.stateIdle, 0, 1) { return errAlreadyFetching @@ -196,35 +212,35 @@ func (p *peer) FetchNodeData(request *fetchRequest) error { // SetBlocksIdle sets the peer to idle, allowing it to execute new retrieval requests. // Its block retrieval allowance will also be updated either up- or downwards, -// depending on whether the previous fetch completed in time or not. +// depending on whether the previous fetch completed in time. func (p *peer) SetBlocksIdle() { p.setIdle(p.blockStarted, blockSoftTTL, blockHardTTL, MaxBlockFetch, &p.blockCapacity, &p.blockIdle) } // SetBodiesIdle sets the peer to idle, allowing it to execute new retrieval requests. // Its block body retrieval allowance will also be updated either up- or downwards, -// depending on whether the previous fetch completed in time or not. +// depending on whether the previous fetch completed in time. func (p *peer) SetBodiesIdle() { - p.setIdle(p.blockStarted, bodySoftTTL, bodyHardTTL, MaxBlockFetch, &p.blockCapacity, &p.blockIdle) + p.setIdle(p.blockStarted, bodySoftTTL, bodyHardTTL, MaxBodyFetch, &p.blockCapacity, &p.blockIdle) } // SetReceiptsIdle sets the peer to idle, allowing it to execute new retrieval requests. // Its receipt retrieval allowance will also be updated either up- or downwards, -// depending on whether the previous fetch completed in time or not. +// depending on whether the previous fetch completed in time. func (p *peer) SetReceiptsIdle() { p.setIdle(p.receiptStarted, receiptSoftTTL, receiptHardTTL, MaxReceiptFetch, &p.receiptCapacity, &p.receiptIdle) } // SetNodeDataIdle sets the peer to idle, allowing it to execute new retrieval // requests. Its node data retrieval allowance will also be updated either up- or -// downwards, depending on whether the previous fetch completed in time or not. +// downwards, depending on whether the previous fetch completed in time. func (p *peer) SetNodeDataIdle() { p.setIdle(p.stateStarted, stateSoftTTL, stateSoftTTL, MaxStateFetch, &p.stateCapacity, &p.stateIdle) } // setIdle sets the peer to idle, allowing it to execute new retrieval requests. // Its data retrieval allowance will also be updated either up- or downwards, -// depending on whether the previous fetch completed in time or not. +// depending on whether the previous fetch completed in time. func (p *peer) setIdle(started time.Time, softTTL, hardTTL time.Duration, maxFetch int, capacity, idle *int32) { // Update the peer's download allowance based on previous performance scale := 2.0 diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go index 17fbb1c7f..56b46e285 100644 --- a/eth/downloader/queue.go +++ b/eth/downloader/queue.go @@ -56,9 +56,8 @@ type fetchRequest struct { Time time.Time // Time when the request was made } -// fetchResult is the assembly collecting partial results from potentially more -// than one fetcher routines, until all outstanding retrievals complete and the -// result as a whole can be processed. +// fetchResult is a struct collecting partial results from data fetchers until +// all outstanding pieces complete and the result as a whole can be processed. type fetchResult struct { Pending int // Number of data fetches still pending @@ -89,7 +88,7 @@ type queue struct { receiptPendPool map[string]*fetchRequest // [eth/63] Currently pending receipt retrieval operations receiptDonePool map[common.Hash]struct{} // [eth/63] Set of the completed receipt fetches - stateTaskIndex int // [eth/63] Counter indexing the added hashes to ensure prioritized retrieval order + stateTaskIndex int // [eth/63] Counter indexing the added hashes to ensure prioritised retrieval order stateTaskPool map[common.Hash]int // [eth/63] Pending node data retrieval tasks, mapping to their priority stateTaskQueue *prque.Prque // [eth/63] Priority queue of the hashes to fetch the node data for statePendPool map[string]*fetchRequest // [eth/63] Currently pending node data retrieval operations @@ -97,10 +96,10 @@ type queue struct { stateDatabase ethdb.Database // [eth/63] Trie database to populate during state reassembly stateScheduler *state.StateSync // [eth/63] State trie synchronisation scheduler and integrator stateProcessors int32 // [eth/63] Number of currently running state processors - stateSchedLock sync.RWMutex // [eth/63] Lock serializing access to the state scheduler + stateSchedLock sync.RWMutex // [eth/63] Lock serialising access to the state scheduler resultCache []*fetchResult // Downloaded but not yet delivered fetch results - resultOffset uint64 // Offset of the first cached fetch result in the block-chain + resultOffset uint64 // Offset of the first cached fetch result in the block chain lock sync.RWMutex } @@ -131,6 +130,9 @@ func (q *queue) Reset() { q.lock.Lock() defer q.lock.Unlock() + q.stateSchedLock.Lock() + defer q.stateSchedLock.Unlock() + q.mode = FullSync q.fastSyncPivot = 0 @@ -233,9 +235,17 @@ func (q *queue) Idle() bool { return (queued + pending + cached) == 0 } -// ThrottleBlocks checks if the download should be throttled (active block (body) +// FastSyncPivot retrieves the currently used fast sync pivot point. +func (q *queue) FastSyncPivot() uint64 { + q.lock.RLock() + defer q.lock.RUnlock() + + return q.fastSyncPivot +} + +// ShouldThrottleBlocks checks if the download should be throttled (active block (body) // fetches exceed block cache). -func (q *queue) ThrottleBlocks() bool { +func (q *queue) ShouldThrottleBlocks() bool { q.lock.RLock() defer q.lock.RUnlock() @@ -248,9 +258,9 @@ func (q *queue) ThrottleBlocks() bool { return pending >= len(q.resultCache)-len(q.blockDonePool) } -// ThrottleReceipts checks if the download should be throttled (active receipt +// ShouldThrottleReceipts checks if the download should be throttled (active receipt // fetches exceed block cache). -func (q *queue) ThrottleReceipts() bool { +func (q *queue) ShouldThrottleReceipts() bool { q.lock.RLock() defer q.lock.RUnlock() @@ -269,7 +279,7 @@ func (q *queue) Schedule61(hashes []common.Hash, fifo bool) []common.Hash { q.lock.Lock() defer q.lock.Unlock() - // Insert all the hashes prioritized in the arrival order + // Insert all the hashes prioritised in the arrival order inserts := make([]common.Hash, 0, len(hashes)) for _, hash := range hashes { // Skip anything we already have @@ -297,10 +307,10 @@ func (q *queue) Schedule(headers []*types.Header, from uint64) []*types.Header { q.lock.Lock() defer q.lock.Unlock() - // Insert all the headers prioritized by the contained block number + // Insert all the headers prioritised by the contained block number inserts := make([]*types.Header, 0, len(headers)) for _, header := range headers { - // Make sure chain order is honored and preserved throughout + // Make sure chain order is honoured and preserved throughout hash := header.Hash() if header.Number == nil || header.Number.Uint64() != from { glog.V(logger.Warn).Infof("Header #%v [%x] broke chain ordering, expected %d", header.Number, hash[:4], from) @@ -347,19 +357,29 @@ func (q *queue) GetHeadResult() *fetchResult { q.lock.RLock() defer q.lock.RUnlock() + // If there are no results pending, return nil if len(q.resultCache) == 0 || q.resultCache[0] == nil { return nil } + // If the next result is still incomplete, return nil if q.resultCache[0].Pending > 0 { return nil } + // If the next result is the fast sync pivot... if q.mode == FastSync && q.resultCache[0].Header.Number.Uint64() == q.fastSyncPivot { + // If the pivot state trie is still being pulled, return nil if len(q.stateTaskPool) > 0 { return nil } if q.PendingNodeData() > 0 { return nil } + // If the state is done, but not enough post-pivot headers were verified, stall... + for i := 0; i < fsHeaderForceVerify; i++ { + if i+1 >= len(q.resultCache) || q.resultCache[i+1] == nil { + return nil + } + } } return q.resultCache[0] } @@ -372,7 +392,7 @@ func (q *queue) TakeResults() []*fetchResult { // Accumulate all available results results := []*fetchResult{} - for _, result := range q.resultCache { + for i, result := range q.resultCache { // Stop if no more results are ready if result == nil || result.Pending > 0 { break @@ -385,6 +405,16 @@ func (q *queue) TakeResults() []*fetchResult { if q.PendingNodeData() > 0 { break } + // Even is state fetch is done, ensure post-pivot headers passed verifications + safe := true + for j := 0; j < fsHeaderForceVerify; j++ { + if i+j+1 >= len(q.resultCache) || q.resultCache[i+j+1] == nil { + safe = false + } + } + if !safe { + break + } } // If we've just inserted the fast sync pivot, stop as the following batch needs different insertion if q.mode == FastSync && result.Header.Number.Uint64() == q.fastSyncPivot+1 && len(results) > 0 { @@ -411,6 +441,9 @@ func (q *queue) TakeResults() []*fetchResult { // ReserveBlocks reserves a set of block hashes for the given peer, skipping any // previously failed download. func (q *queue) ReserveBlocks(p *peer, count int) *fetchRequest { + q.lock.Lock() + defer q.lock.Unlock() + return q.reserveHashes(p, count, q.hashQueue, nil, q.blockPendPool, len(q.resultCache)-len(q.blockDonePool)) } @@ -430,17 +463,21 @@ func (q *queue) ReserveNodeData(p *peer, count int) *fetchRequest { } } } + q.lock.Lock() + defer q.lock.Unlock() + return q.reserveHashes(p, count, q.stateTaskQueue, generator, q.statePendPool, count) } // reserveHashes reserves a set of hashes for the given peer, skipping previously // failed ones. +// +// Note, this method expects the queue lock to be already held for writing. The +// reason the lock is not obtained in here is because the parameters already need +// to access the queue, so they already need a lock anyway. func (q *queue) reserveHashes(p *peer, count int, taskQueue *prque.Prque, taskGen func(int), pendPool map[string]*fetchRequest, maxPending int) *fetchRequest { - q.lock.Lock() - defer q.lock.Unlock() - - // Short circuit if the peer's already downloading something (sanity check not - // to corrupt state) + // Short circuit if the peer's already downloading something (sanity check to + // not corrupt state) if _, ok := pendPool[p.id]; ok { return nil } @@ -492,30 +529,37 @@ func (q *queue) reserveHashes(p *peer, count int, taskQueue *prque.Prque, taskGe // previously failed downloads. Beside the next batch of needed fetches, it also // returns a flag whether empty blocks were queued requiring processing. func (q *queue) ReserveBodies(p *peer, count int) (*fetchRequest, bool, error) { - noop := func(header *types.Header) bool { + isNoop := func(header *types.Header) bool { return header.TxHash == types.EmptyRootHash && header.UncleHash == types.EmptyUncleHash } - return q.reserveHeaders(p, count, q.blockTaskPool, q.blockTaskQueue, q.blockPendPool, q.blockDonePool, noop) + q.lock.Lock() + defer q.lock.Unlock() + + return q.reserveHeaders(p, count, q.blockTaskPool, q.blockTaskQueue, q.blockPendPool, q.blockDonePool, isNoop) } // ReserveReceipts reserves a set of receipt fetches for the given peer, skipping // any previously failed downloads. Beside the next batch of needed fetches, it // also returns a flag whether empty receipts were queued requiring importing. func (q *queue) ReserveReceipts(p *peer, count int) (*fetchRequest, bool, error) { - noop := func(header *types.Header) bool { + isNoop := func(header *types.Header) bool { return header.ReceiptHash == types.EmptyRootHash } - return q.reserveHeaders(p, count, q.receiptTaskPool, q.receiptTaskQueue, q.receiptPendPool, q.receiptDonePool, noop) + q.lock.Lock() + defer q.lock.Unlock() + + return q.reserveHeaders(p, count, q.receiptTaskPool, q.receiptTaskQueue, q.receiptPendPool, q.receiptDonePool, isNoop) } // reserveHeaders reserves a set of data download operations for a given peer, // skipping any previously failed ones. This method is a generic version used // by the individual special reservation functions. +// +// Note, this method expects the queue lock to be already held for writing. The +// reason the lock is not obtained in here is because the parameters already need +// to access the queue, so they already need a lock anyway. func (q *queue) reserveHeaders(p *peer, count int, taskPool map[common.Hash]*types.Header, taskQueue *prque.Prque, - pendPool map[string]*fetchRequest, donePool map[common.Hash]struct{}, noop func(*types.Header) bool) (*fetchRequest, bool, error) { - q.lock.Lock() - defer q.lock.Unlock() - + pendPool map[string]*fetchRequest, donePool map[common.Hash]struct{}, isNoop func(*types.Header) bool) (*fetchRequest, bool, error) { // Short circuit if the pool has been depleted, or if the peer's already // downloading something (sanity check not to corrupt state) if taskQueue.Empty() { @@ -537,7 +581,7 @@ func (q *queue) reserveHeaders(p *peer, count int, taskPool map[common.Hash]*typ for proc := 0; proc < space && len(send) < count && !taskQueue.Empty(); proc++ { header := taskQueue.PopItem().(*types.Header) - // If we're the first to request this task, initialize the result container + // If we're the first to request this task, initialise the result container index := int(header.Number.Int64() - int64(q.resultOffset)) if index >= len(q.resultCache) || index < 0 { return nil, false, errInvalidChain @@ -553,7 +597,7 @@ func (q *queue) reserveHeaders(p *peer, count int, taskPool map[common.Hash]*typ } } // If this fetch task is a noop, skip this fetch operation - if noop(header) { + if isNoop(header) { donePool[header.Hash()] = struct{}{} delete(taskPool, header.Hash()) @@ -562,7 +606,7 @@ func (q *queue) reserveHeaders(p *peer, count int, taskPool map[common.Hash]*typ progress = true continue } - // Otherwise if not a known unknown block, add to the retrieve list + // Otherwise unless the peer is known not to have the data, add to the retrieve list if p.ignored.Has(header.Hash()) { skip = append(skip, header) } else { @@ -655,35 +699,48 @@ func (q *queue) Revoke(peerId string) { } // ExpireBlocks checks for in flight requests that exceeded a timeout allowance, -// canceling them and returning the responsible peers for penalization. +// canceling them and returning the responsible peers for penalisation. func (q *queue) ExpireBlocks(timeout time.Duration) []string { + q.lock.Lock() + defer q.lock.Unlock() + return q.expire(timeout, q.blockPendPool, q.hashQueue, blockTimeoutMeter) } // ExpireBodies checks for in flight block body requests that exceeded a timeout -// allowance, canceling them and returning the responsible peers for penalization. +// allowance, canceling them and returning the responsible peers for penalisation. func (q *queue) ExpireBodies(timeout time.Duration) []string { + q.lock.Lock() + defer q.lock.Unlock() + return q.expire(timeout, q.blockPendPool, q.blockTaskQueue, bodyTimeoutMeter) } // ExpireReceipts checks for in flight receipt requests that exceeded a timeout -// allowance, canceling them and returning the responsible peers for penalization. +// allowance, canceling them and returning the responsible peers for penalisation. func (q *queue) ExpireReceipts(timeout time.Duration) []string { + q.lock.Lock() + defer q.lock.Unlock() + return q.expire(timeout, q.receiptPendPool, q.receiptTaskQueue, receiptTimeoutMeter) } // ExpireNodeData checks for in flight node data requests that exceeded a timeout -// allowance, canceling them and returning the responsible peers for penalization. +// allowance, canceling them and returning the responsible peers for penalisation. func (q *queue) ExpireNodeData(timeout time.Duration) []string { + q.lock.Lock() + defer q.lock.Unlock() + return q.expire(timeout, q.statePendPool, q.stateTaskQueue, stateTimeoutMeter) } // expire is the generic check that move expired tasks from a pending pool back // into a task pool, returning all entities caught with expired tasks. +// +// Note, this method expects the queue lock to be already held for writing. The +// reason the lock is not obtained in here is because the parameters already need +// to access the queue, so they already need a lock anyway. func (q *queue) expire(timeout time.Duration, pendPool map[string]*fetchRequest, taskQueue *prque.Prque, timeoutMeter metrics.Meter) []string { - q.lock.Lock() - defer q.lock.Unlock() - // Iterate over the expired requests and return each to the queue peers := []string{} for id, request := range pendPool { @@ -764,7 +821,7 @@ func (q *queue) DeliverBlocks(id string, blocks []*types.Block) error { case len(errs) == 1 && (errs[0] == errInvalidChain || errs[0] == errInvalidBlock): return errs[0] - case len(errs) == len(request.Headers): + case len(errs) == len(blocks): return errStaleDelivery default: @@ -774,6 +831,9 @@ func (q *queue) DeliverBlocks(id string, blocks []*types.Block) error { // DeliverBodies injects a block body retrieval response into the results queue. func (q *queue) DeliverBodies(id string, txLists [][]*types.Transaction, uncleLists [][]*types.Header) error { + q.lock.Lock() + defer q.lock.Unlock() + reconstruct := func(header *types.Header, index int, result *fetchResult) error { if types.DeriveSha(types.Transactions(txLists[index])) != header.TxHash || types.CalcUncleHash(uncleLists[index]) != header.UncleHash { return errInvalidBody @@ -787,6 +847,9 @@ func (q *queue) DeliverBodies(id string, txLists [][]*types.Transaction, uncleLi // DeliverReceipts injects a receipt retrieval response into the results queue. func (q *queue) DeliverReceipts(id string, receiptList [][]*types.Receipt) error { + q.lock.Lock() + defer q.lock.Unlock() + reconstruct := func(header *types.Header, index int, result *fetchResult) error { if types.DeriveSha(types.Receipts(receiptList[index])) != header.ReceiptHash { return errInvalidReceipt @@ -798,11 +861,12 @@ func (q *queue) DeliverReceipts(id string, receiptList [][]*types.Receipt) error } // deliver injects a data retrieval response into the results queue. +// +// Note, this method expects the queue lock to be already held for writing. The +// reason the lock is not obtained in here is because the parameters already need +// to access the queue, so they already need a lock anyway. func (q *queue) deliver(id string, taskPool map[common.Hash]*types.Header, taskQueue *prque.Prque, pendPool map[string]*fetchRequest, donePool map[common.Hash]struct{}, reqTimer metrics.Timer, results int, reconstruct func(header *types.Header, index int, result *fetchResult) error) error { - q.lock.Lock() - defer q.lock.Unlock() - // Short circuit if the data was never requested request := pendPool[id] if request == nil { @@ -818,7 +882,10 @@ func (q *queue) deliver(id string, taskPool map[common.Hash]*types.Header, taskQ } } // Assemble each of the results with their headers and retrieved data parts - errs := make([]error, 0) + var ( + failure error + useful bool + ) for i, header := range request.Headers { // Short circuit assembly if no more fetch results are found if i >= results { @@ -827,15 +894,16 @@ func (q *queue) deliver(id string, taskPool map[common.Hash]*types.Header, taskQ // Reconstruct the next result if contents match up index := int(header.Number.Int64() - int64(q.resultOffset)) if index >= len(q.resultCache) || index < 0 || q.resultCache[index] == nil { - errs = []error{errInvalidChain} + failure = errInvalidChain break } if err := reconstruct(header, i, q.resultCache[index]); err != nil { - errs = []error{err} + failure = err break } donePool[header.Hash()] = struct{}{} q.resultCache[index].Pending-- + useful = true // Clean up a successful fetch request.Headers[i] = nil @@ -847,19 +915,16 @@ func (q *queue) deliver(id string, taskPool map[common.Hash]*types.Header, taskQ taskQueue.Push(header, -float32(header.Number.Uint64())) } } - // If none of the blocks were good, it's a stale delivery + // If none of the data was good, it's a stale delivery switch { - case len(errs) == 0: - return nil - - case len(errs) == 1 && (errs[0] == errInvalidChain || errs[0] == errInvalidBody || errs[0] == errInvalidReceipt): - return errs[0] + case failure == nil || failure == errInvalidChain: + return failure - case len(errs) == len(request.Headers): - return errStaleDelivery + case useful: + return fmt.Errorf("partial failure: %v", failure) default: - return fmt.Errorf("multiple failures: %v", errs) + return errStaleDelivery } } @@ -876,7 +941,7 @@ func (q *queue) DeliverNodeData(id string, data [][]byte, callback func(error, i stateReqTimer.UpdateSince(request.Time) delete(q.statePendPool, id) - // If no data was retrieved, mark them as unavailable for the origin peer + // If no data was retrieved, mark their hashes as unavailable for the origin peer if len(data) == 0 { for hash, _ := range request.Hashes { request.Peer.ignored.Add(hash) @@ -955,9 +1020,6 @@ func (q *queue) Prepare(offset uint64, mode SyncMode, pivot uint64) { if q.resultOffset < offset { q.resultOffset = offset } - q.fastSyncPivot = 0 - if mode == FastSync { - q.fastSyncPivot = pivot - } + q.fastSyncPivot = pivot q.mode = mode } diff --git a/eth/fetcher/fetcher.go b/eth/fetcher/fetcher.go index b8ec1fc55..d88d91982 100644 --- a/eth/fetcher/fetcher.go +++ b/eth/fetcher/fetcher.go @@ -142,9 +142,11 @@ type Fetcher struct { dropPeer peerDropFn // Drops a peer for misbehaving // Testing hooks - fetchingHook func([]common.Hash) // Method to call upon starting a block (eth/61) or header (eth/62) fetch - completingHook func([]common.Hash) // Method to call upon starting a block body fetch (eth/62) - importedHook func(*types.Block) // Method to call upon successful block import (both eth/61 and eth/62) + announceChangeHook func(common.Hash, bool) // Method to call upon adding or deleting a hash from the announce list + queueChangeHook func(common.Hash, bool) // Method to call upon adding or deleting a block from the import queue + fetchingHook func([]common.Hash) // Method to call upon starting a block (eth/61) or header (eth/62) fetch + completingHook func([]common.Hash) // Method to call upon starting a block body fetch (eth/62) + importedHook func(*types.Block) // Method to call upon successful block import (both eth/61 and eth/62) } // New creates a block fetcher to retrieve blocks based on hash announcements. @@ -324,11 +326,16 @@ func (f *Fetcher) loop() { height := f.chainHeight() for !f.queue.Empty() { op := f.queue.PopItem().(*inject) - + if f.queueChangeHook != nil { + f.queueChangeHook(op.block.Hash(), false) + } // If too high up the chain or phase, continue later number := op.block.NumberU64() if number > height+1 { f.queue.Push(op, -float32(op.block.NumberU64())) + if f.queueChangeHook != nil { + f.queueChangeHook(op.block.Hash(), true) + } break } // Otherwise if fresh and still unknown, try and import @@ -372,6 +379,9 @@ func (f *Fetcher) loop() { } f.announces[notification.origin] = count f.announced[notification.hash] = append(f.announced[notification.hash], notification) + if f.announceChangeHook != nil && len(f.announced[notification.hash]) == 1 { + f.announceChangeHook(notification.hash, true) + } if len(f.announced) == 1 { f.rescheduleFetch(fetchTimer) } @@ -714,7 +724,9 @@ func (f *Fetcher) enqueue(peer string, block *types.Block) { f.queues[peer] = count f.queued[hash] = op f.queue.Push(op, -float32(block.NumberU64())) - + if f.queueChangeHook != nil { + f.queueChangeHook(op.block.Hash(), true) + } if glog.V(logger.Debug) { glog.Infof("Peer %s: queued block #%d [%x…], total %v", peer, block.NumberU64(), hash.Bytes()[:4], f.queue.Size()) } @@ -781,7 +793,9 @@ func (f *Fetcher) forgetHash(hash common.Hash) { } } delete(f.announced, hash) - + if f.announceChangeHook != nil { + f.announceChangeHook(hash, false) + } // Remove any pending fetches and decrement the DOS counters if announce := f.fetching[hash]; announce != nil { f.announces[announce.origin]-- diff --git a/eth/fetcher/fetcher_test.go b/eth/fetcher/fetcher_test.go index 170a80aba..2404c8cfa 100644 --- a/eth/fetcher/fetcher_test.go +++ b/eth/fetcher/fetcher_test.go @@ -145,6 +145,9 @@ func (f *fetcherTester) insertChain(blocks types.Blocks) (int, error) { // dropPeer is an emulator for the peer removal, simply accumulating the various // peers dropped by the fetcher. func (f *fetcherTester) dropPeer(peer string) { + f.lock.Lock() + defer f.lock.Unlock() + f.drops[peer] = true } @@ -608,8 +611,11 @@ func TestDistantPropagationDiscarding(t *testing.T) { // Create a tester and simulate a head block being the middle of the above chain tester := newTester() + + tester.lock.Lock() tester.hashes = []common.Hash{head} tester.blocks = map[common.Hash]*types.Block{head: blocks[head]} + tester.lock.Unlock() // Ensure that a block with a lower number than the threshold is discarded tester.fetcher.Enqueue("lower", blocks[hashes[low]]) @@ -641,8 +647,11 @@ func testDistantAnnouncementDiscarding(t *testing.T, protocol int) { // Create a tester and simulate a head block being the middle of the above chain tester := newTester() + + tester.lock.Lock() tester.hashes = []common.Hash{head} tester.blocks = map[common.Hash]*types.Block{head: blocks[head]} + tester.lock.Unlock() headerFetcher := tester.makeHeaderFetcher(blocks, -gatherSlack) bodyFetcher := tester.makeBodyFetcher(blocks, 0) @@ -687,14 +696,22 @@ func testInvalidNumberAnnouncement(t *testing.T, protocol int) { tester.fetcher.Notify("bad", hashes[0], 2, time.Now().Add(-arriveTimeout), nil, headerFetcher, bodyFetcher) verifyImportEvent(t, imported, false) - if !tester.drops["bad"] { + tester.lock.RLock() + dropped := tester.drops["bad"] + tester.lock.RUnlock() + + if !dropped { t.Fatalf("peer with invalid numbered announcement not dropped") } // Make sure a good announcement passes without a drop tester.fetcher.Notify("good", hashes[0], 1, time.Now().Add(-arriveTimeout), nil, headerFetcher, bodyFetcher) verifyImportEvent(t, imported, true) - if tester.drops["good"] { + tester.lock.RLock() + dropped = tester.drops["good"] + tester.lock.RUnlock() + + if dropped { t.Fatalf("peer with valid numbered announcement dropped") } verifyImportDone(t, imported) @@ -752,9 +769,15 @@ func testHashMemoryExhaustionAttack(t *testing.T, protocol int) { // Create a tester with instrumented import hooks tester := newTester() - imported := make(chan *types.Block) + imported, announces := make(chan *types.Block), int32(0) tester.fetcher.importedHook = func(block *types.Block) { imported <- block } - + tester.fetcher.announceChangeHook = func(hash common.Hash, added bool) { + if added { + atomic.AddInt32(&announces, 1) + } else { + atomic.AddInt32(&announces, -1) + } + } // Create a valid chain and an infinite junk chain targetBlocks := hashLimit + 2*maxQueueDist hashes, blocks := makeChain(targetBlocks, 0, genesis) @@ -782,8 +805,8 @@ func testHashMemoryExhaustionAttack(t *testing.T, protocol int) { tester.fetcher.Notify("attacker", attack[i], 1 /* don't distance drop */, time.Now(), nil, attackerHeaderFetcher, attackerBodyFetcher) } } - if len(tester.fetcher.announced) != hashLimit+maxQueueDist { - t.Fatalf("queued announce count mismatch: have %d, want %d", len(tester.fetcher.announced), hashLimit+maxQueueDist) + if count := atomic.LoadInt32(&announces); count != hashLimit+maxQueueDist { + t.Fatalf("queued announce count mismatch: have %d, want %d", count, hashLimit+maxQueueDist) } // Wait for fetches to complete verifyImportCount(t, imported, maxQueueDist) @@ -807,9 +830,15 @@ func TestBlockMemoryExhaustionAttack(t *testing.T) { // Create a tester with instrumented import hooks tester := newTester() - imported := make(chan *types.Block) + imported, enqueued := make(chan *types.Block), int32(0) tester.fetcher.importedHook = func(block *types.Block) { imported <- block } - + tester.fetcher.queueChangeHook = func(hash common.Hash, added bool) { + if added { + atomic.AddInt32(&enqueued, 1) + } else { + atomic.AddInt32(&enqueued, -1) + } + } // Create a valid chain and a batch of dangling (but in range) blocks targetBlocks := hashLimit + 2*maxQueueDist hashes, blocks := makeChain(targetBlocks, 0, genesis) @@ -825,7 +854,7 @@ func TestBlockMemoryExhaustionAttack(t *testing.T) { tester.fetcher.Enqueue("attacker", block) } time.Sleep(200 * time.Millisecond) - if queued := tester.fetcher.queue.Size(); queued != blockLimit { + if queued := atomic.LoadInt32(&enqueued); queued != blockLimit { t.Fatalf("queued block count mismatch: have %d, want %d", queued, blockLimit) } // Queue up a batch of valid blocks, and check that a new peer is allowed to do so @@ -833,7 +862,7 @@ func TestBlockMemoryExhaustionAttack(t *testing.T) { tester.fetcher.Enqueue("valid", blocks[hashes[len(hashes)-3-i]]) } time.Sleep(100 * time.Millisecond) - if queued := tester.fetcher.queue.Size(); queued != blockLimit+maxQueueDist-1 { + if queued := atomic.LoadInt32(&enqueued); queued != blockLimit+maxQueueDist-1 { t.Fatalf("queued block count mismatch: have %d, want %d", queued, blockLimit+maxQueueDist-1) } // Insert the missing piece (and sanity check the import) diff --git a/eth/filters/filter_test.go b/eth/filters/filter_test.go index 9e7538fac..a5418e2e7 100644 --- a/eth/filters/filter_test.go +++ b/eth/filters/filter_test.go @@ -16,9 +16,9 @@ import ( func makeReceipt(addr common.Address) *types.Receipt { receipt := types.NewReceipt(nil, new(big.Int)) - receipt.SetLogs(vm.Logs{ + receipt.Logs = vm.Logs{ &vm.Log{Address: addr}, - }) + } receipt.Bloom = types.CreateBloom(types.Receipts{receipt}) return receipt } @@ -41,7 +41,7 @@ func BenchmarkMipmaps(b *testing.B) { defer db.Close() genesis := core.WriteGenesisBlockForTesting(db, core.GenesisAccount{addr1, big.NewInt(1000000)}) - chain := core.GenerateChain(genesis, db, 100010, func(i int, gen *core.BlockGen) { + chain, receipts := core.GenerateChain(genesis, db, 100010, func(i int, gen *core.BlockGen) { var receipts types.Receipts switch i { case 2403: @@ -70,7 +70,7 @@ func BenchmarkMipmaps(b *testing.B) { } core.WriteMipmapBloom(db, uint64(i+1), receipts) }) - for _, block := range chain { + for i, block := range chain { core.WriteBlock(db, block) if err := core.WriteCanonicalHash(db, block.Hash(), block.NumberU64()); err != nil { b.Fatalf("failed to insert block number: %v", err) @@ -78,11 +78,10 @@ func BenchmarkMipmaps(b *testing.B) { if err := core.WriteHeadBlockHash(db, block.Hash()); err != nil { b.Fatalf("failed to insert block number: %v", err) } - if err := core.PutBlockReceipts(db, block, block.Receipts()); err != nil { + if err := core.PutBlockReceipts(db, block.Hash(), receipts[i]); err != nil { b.Fatal("error writing block receipts:", err) } } - b.ResetTimer() filter := New(db) @@ -118,47 +117,47 @@ func TestFilters(t *testing.T) { defer db.Close() genesis := core.WriteGenesisBlockForTesting(db, core.GenesisAccount{addr, big.NewInt(1000000)}) - chain := core.GenerateChain(genesis, db, 1000, func(i int, gen *core.BlockGen) { + chain, receipts := core.GenerateChain(genesis, db, 1000, func(i int, gen *core.BlockGen) { var receipts types.Receipts switch i { case 1: receipt := types.NewReceipt(nil, new(big.Int)) - receipt.SetLogs(vm.Logs{ + receipt.Logs = vm.Logs{ &vm.Log{ Address: addr, Topics: []common.Hash{hash1}, }, - }) + } gen.AddUncheckedReceipt(receipt) receipts = types.Receipts{receipt} case 2: receipt := types.NewReceipt(nil, new(big.Int)) - receipt.SetLogs(vm.Logs{ + receipt.Logs = vm.Logs{ &vm.Log{ Address: addr, Topics: []common.Hash{hash2}, }, - }) + } gen.AddUncheckedReceipt(receipt) receipts = types.Receipts{receipt} case 998: receipt := types.NewReceipt(nil, new(big.Int)) - receipt.SetLogs(vm.Logs{ + receipt.Logs = vm.Logs{ &vm.Log{ Address: addr, Topics: []common.Hash{hash3}, }, - }) + } gen.AddUncheckedReceipt(receipt) receipts = types.Receipts{receipt} case 999: receipt := types.NewReceipt(nil, new(big.Int)) - receipt.SetLogs(vm.Logs{ + receipt.Logs = vm.Logs{ &vm.Log{ Address: addr, Topics: []common.Hash{hash4}, }, - }) + } gen.AddUncheckedReceipt(receipt) receipts = types.Receipts{receipt} } @@ -173,7 +172,7 @@ func TestFilters(t *testing.T) { // by one core.WriteMipmapBloom(db, uint64(i+1), receipts) }) - for _, block := range chain { + for i, block := range chain { core.WriteBlock(db, block) if err := core.WriteCanonicalHash(db, block.Hash(), block.NumberU64()); err != nil { t.Fatalf("failed to insert block number: %v", err) @@ -181,7 +180,7 @@ func TestFilters(t *testing.T) { if err := core.WriteHeadBlockHash(db, block.Hash()); err != nil { t.Fatalf("failed to insert block number: %v", err) } - if err := core.PutBlockReceipts(db, block, block.Receipts()); err != nil { + if err := core.PutBlockReceipts(db, block.Hash(), receipts[i]); err != nil { t.Fatal("error writing block receipts:", err) } } diff --git a/eth/handler.go b/eth/handler.go index 725178035..7dc7de80e 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -84,6 +84,11 @@ type ProtocolManager struct { // NewProtocolManager returns a new ethereum sub protocol manager. The Ethereum sub protocol manages peers capable // with the ethereum network. func NewProtocolManager(fastSync bool, networkId int, mux *event.TypeMux, txpool txPool, pow pow.PoW, blockchain *core.BlockChain, chaindb ethdb.Database) (*ProtocolManager, error) { + // Figure out whether to allow fast sync or not + if fastSync && blockchain.CurrentBlock().NumberU64() > 0 { + glog.V(logger.Info).Infof("blockchain not empty, fast sync disabled") + fastSync = false + } // Create the protocol manager with the base fields manager := &ProtocolManager{ fastSync: fastSync, @@ -103,7 +108,7 @@ func NewProtocolManager(fastSync bool, networkId int, mux *event.TypeMux, txpool if fastSync && version < eth63 { continue } - // Compatible, initialize the sub-protocol + // Compatible; initialise the sub-protocol version := version // Closure for the run manager.SubProtocols = append(manager.SubProtocols, p2p.Protocol{ Name: "eth", @@ -120,13 +125,9 @@ func NewProtocolManager(fastSync bool, networkId int, mux *event.TypeMux, txpool return nil, errIncompatibleConfig } // Construct the different synchronisation mechanisms - syncMode := downloader.FullSync - if fastSync { - syncMode = downloader.FastSync - } - manager.downloader = downloader.New(syncMode, chaindb, manager.eventMux, blockchain.HasHeader, blockchain.HasBlock, blockchain.GetHeader, - blockchain.GetBlock, blockchain.CurrentHeader, blockchain.CurrentBlock, blockchain.CurrentFastBlock, blockchain.FastSyncCommitHead, - blockchain.GetTd, blockchain.InsertHeaderChain, blockchain.InsertChain, blockchain.InsertReceiptChain, blockchain.Rollback, manager.removePeer) + manager.downloader = downloader.New(chaindb, manager.eventMux, blockchain.HasHeader, blockchain.HasBlock, blockchain.GetHeader, blockchain.GetBlock, + blockchain.CurrentHeader, blockchain.CurrentBlock, blockchain.CurrentFastBlock, blockchain.FastSyncCommitHead, blockchain.GetTd, + blockchain.InsertHeaderChain, blockchain.InsertChain, blockchain.InsertReceiptChain, blockchain.Rollback, manager.removePeer) validator := func(block *types.Block, parent *types.Block) error { return core.ValidateHeader(pow, block.Header(), parent.Header(), true, false) diff --git a/eth/handler_test.go b/eth/handler_test.go index 843b02fd4..ab2ce54b1 100644 --- a/eth/handler_test.go +++ b/eth/handler_test.go @@ -443,7 +443,9 @@ func testGetNodeData(t *testing.T, protocol int) { // Fetch for now the entire chain db hashes := []common.Hash{} for _, key := range pm.chaindb.(*ethdb.MemDatabase).Keys() { - hashes = append(hashes, common.BytesToHash(key)) + if len(key) == len(common.Hash{}) { + hashes = append(hashes, common.BytesToHash(key)) + } } p2p.Send(peer.app, 0x0d, hashes) msg, err := peer.app.ReadMsg() diff --git a/eth/metrics.go b/eth/metrics.go index cfab3bcb3..8231a06ff 100644 --- a/eth/metrics.go +++ b/eth/metrics.go @@ -101,7 +101,7 @@ func (rw *meteredMsgReadWriter) ReadMsg() (p2p.Msg, error) { packets, traffic = reqBlockInPacketsMeter, reqBlockInTrafficMeter case rw.version >= eth62 && msg.Code == BlockHeadersMsg: - packets, traffic = reqBlockInPacketsMeter, reqBlockInTrafficMeter + packets, traffic = reqHeaderInPacketsMeter, reqHeaderInTrafficMeter case rw.version >= eth62 && msg.Code == BlockBodiesMsg: packets, traffic = reqBodyInPacketsMeter, reqBodyInTrafficMeter diff --git a/eth/sync.go b/eth/sync.go index 6295083e2..b69a24556 100644 --- a/eth/sync.go +++ b/eth/sync.go @@ -22,6 +22,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/eth/downloader" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/p2p/discover" @@ -165,5 +166,20 @@ func (pm *ProtocolManager) synchronise(peer *peer) { return } // Otherwise try to sync with the downloader - pm.downloader.Synchronise(peer.id, peer.Head(), peer.Td()) + mode := downloader.FullSync + if pm.fastSync { + mode = downloader.FastSync + } + pm.downloader.Synchronise(peer.id, peer.Head(), peer.Td(), mode) + + // If fast sync was enabled, and we synced up, disable it + if pm.fastSync { + for pm.downloader.Synchronising() { + time.Sleep(100 * time.Millisecond) + } + if pm.blockchain.CurrentBlock().NumberU64() > 0 { + glog.V(logger.Info).Infof("fast sync complete, auto disabling") + pm.fastSync = false + } + } } diff --git a/eth/sync_test.go b/eth/sync_test.go new file mode 100644 index 000000000..f3a6718ab --- /dev/null +++ b/eth/sync_test.go @@ -0,0 +1,53 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package eth + +import ( + "testing" + "time" + + "github.com/ethereum/go-ethereum/p2p" + "github.com/ethereum/go-ethereum/p2p/discover" +) + +// Tests that fast sync gets disabled as soon as a real block is successfully +// imported into the blockchain. +func TestFastSyncDisabling(t *testing.T) { + // Create a pristine protocol manager, check that fast sync is left enabled + pmEmpty := newTestProtocolManagerMust(t, true, 0, nil, nil) + if !pmEmpty.fastSync { + t.Fatalf("fast sync disabled on pristine blockchain") + } + // Create a full protocol manager, check that fast sync gets disabled + pmFull := newTestProtocolManagerMust(t, true, 1024, nil, nil) + if pmFull.fastSync { + t.Fatalf("fast sync not disabled on non-empty blockchain") + } + // Sync up the two peers + io1, io2 := p2p.MsgPipe() + + go pmFull.handle(pmFull.newPeer(63, NetworkId, p2p.NewPeer(discover.NodeID{}, "empty", nil), io2)) + go pmEmpty.handle(pmEmpty.newPeer(63, NetworkId, p2p.NewPeer(discover.NodeID{}, "full", nil), io1)) + + time.Sleep(250 * time.Millisecond) + pmEmpty.synchronise(pmEmpty.peers.BestPeer()) + + // Check that fast sync was disabled + if pmEmpty.fastSync { + t.Fatalf("fast sync not disabled after successful synchronisation") + } +} diff --git a/ethdb/memory_database.go b/ethdb/memory_database.go index 330834fa4..01273b9db 100644 --- a/ethdb/memory_database.go +++ b/ethdb/memory_database.go @@ -17,6 +17,7 @@ package ethdb import ( + "errors" "fmt" "sync" @@ -56,7 +57,10 @@ func (db *MemDatabase) Get(key []byte) ([]byte, error) { db.lock.RLock() defer db.lock.RUnlock() - return db.db[string(key)], nil + if entry, ok := db.db[string(key)]; ok { + return entry, nil + } + return nil, errors.New("not found") } func (db *MemDatabase) Keys() [][]byte { @@ -132,8 +136,8 @@ func (b *memBatch) Write() error { b.lock.RLock() defer b.lock.RUnlock() - b.db.lock.RLock() - defer b.db.lock.RUnlock() + b.db.lock.Lock() + defer b.db.lock.Unlock() for _, kv := range b.writes { b.db.db[string(kv.k)] = kv.v diff --git a/rpc/api/eth.go b/rpc/api/eth.go index 6db006a46..4722682ff 100644 --- a/rpc/api/eth.go +++ b/rpc/api/eth.go @@ -168,9 +168,7 @@ func (self *ethApi) IsMining(req *shared.Request) (interface{}, error) { } func (self *ethApi) IsSyncing(req *shared.Request) (interface{}, error) { - current := self.ethereum.BlockChain().CurrentBlock().NumberU64() - origin, height := self.ethereum.Downloader().Boundaries() - + origin, current, height := self.ethereum.Downloader().Progress() if current < height { return map[string]interface{}{ "startingBlock": newHexNum(big.NewInt(int64(origin)).Bytes()), diff --git a/trie/sync.go b/trie/sync.go index bb112fb62..d55399d06 100644 --- a/trie/sync.go +++ b/trie/sync.go @@ -31,7 +31,7 @@ type request struct { object *node // Target node to populate with retrieved data (hashnode originally) parents []*request // Parent state nodes referencing this entry (notify all upon completion) - depth int // Depth level within the trie the node is located to prioritize DFS + depth int // Depth level within the trie the node is located to prioritise DFS deps int // Number of dependencies before allowed to commit this node callback TrieSyncLeafCallback // Callback to invoke if a leaf node it reached on this branch -- cgit v1.2.3 From 8b81ad1fc40080af441c0c6df94f0b2ea46e320b Mon Sep 17 00:00:00 2001 From: zelig Date: Tue, 22 Sep 2015 10:34:58 +0200 Subject: console: * lines with leading space are ommitted from history * exit processed even with whitespace around * all whitespace lines (not only empty ones) are ignored add 7 missing commands to admin api autocomplete registrar: methods now return proper error if reg addresses are not set. fixes #1457 rpc/console: fix personal.newAccount() regression. Now all comms accept interactive password registrar: add registrar tests for errors crypto: catch AES decryption error on presale wallet import + fix error msg format. fixes #1580 CLI: improve error message when starting a second instance of geth. fixes #1564 cli/accounts: unlock multiple accounts. fixes #1785 * make unlocking multiple accounts work with inline <() fd * passwdfile now correctly read only once * improve logs * fix CLI help text for unlocking fix regression with docRoot / admin API * docRoot/jspath passed to rpc/api ParseApis, which passes onto adminApi * docRoot field for JS console in order to pass when RPC is (re)started * improve flag desc for jspath common/docserver: catch http errors from response fix rpc/api tests common/natspec: fix end to end test (skipped because takes 8s) registrar: fix major regression: * deploy registrars on frontier * register HashsReg and UrlHint in GlobalRegistrar. * set all 3 contract addresses in code * zero out addresses first in tests --- cmd/geth/js.go | 55 +++++++++-------- cmd/geth/main.go | 66 +++++++++++---------- cmd/utils/cmd.go | 4 +- cmd/utils/flags.go | 10 +++- common/docserver/docserver.go | 6 ++ common/natspec/natspec_e2e_test.go | 117 +++++++++++++++++++++---------------- common/registrar/registrar.go | 52 +++++++++++++---- common/registrar/registrar_test.go | 62 +++++++++++++++++--- crypto/crypto.go | 5 +- eth/backend.go | 29 +++++++++ rpc/api/admin.go | 8 ++- rpc/api/api_test.go | 8 +-- rpc/api/personal.go | 17 +++++- rpc/api/personal_args.go | 17 +++--- rpc/api/utils.go | 11 +++- rpc/jeth.go | 2 +- rpc/useragent/remote_frontend.go | 25 ++++++++ xeth/frontend.go | 4 ++ 18 files changed, 347 insertions(+), 151 deletions(-) diff --git a/cmd/geth/js.go b/cmd/geth/js.go index b5ec82b57..8ebb04bce 100644 --- a/cmd/geth/js.go +++ b/cmd/geth/js.go @@ -45,9 +45,12 @@ import ( "github.com/robertkrimen/otto" ) -var passwordRegexp = regexp.MustCompile("personal.[nu]") - -const passwordRepl = "" +var ( + passwordRegexp = regexp.MustCompile("personal.[nu]") + leadingSpace = regexp.MustCompile("^ ") + onlyws = regexp.MustCompile("^\\s*$") + exit = regexp.MustCompile("^\\s*exit\\s*;*\\s*$") +) type prompter interface { AppendHistory(string) @@ -74,6 +77,7 @@ func (r dumbterm) PasswordPrompt(p string) (string, error) { func (r dumbterm) AppendHistory(string) {} type jsre struct { + docRoot string ds *docserver.DocServer re *re.JSRE ethereum *eth.Ethereum @@ -145,14 +149,14 @@ func apiWordCompleter(line string, pos int) (head string, completions []string, return begin, completionWords, end } -func newLightweightJSRE(libPath string, client comms.EthereumClient, datadir string, interactive bool) *jsre { +func newLightweightJSRE(docRoot string, client comms.EthereumClient, datadir string, interactive bool) *jsre { js := &jsre{ps1: "> "} js.wait = make(chan *big.Int) js.client = client - js.ds = docserver.New("/") + js.ds = docserver.New(docRoot) // update state in separare forever blocks - js.re = re.New(libPath) + js.re = re.New(docRoot) if err := js.apiBindings(js); err != nil { utils.Fatalf("Unable to initialize console - %v", err) } @@ -176,25 +180,25 @@ func newLightweightJSRE(libPath string, client comms.EthereumClient, datadir str return js } -func newJSRE(ethereum *eth.Ethereum, libPath, corsDomain string, client comms.EthereumClient, interactive bool, f xeth.Frontend) *jsre { - js := &jsre{ethereum: ethereum, ps1: "> "} +func newJSRE(ethereum *eth.Ethereum, docRoot, corsDomain string, client comms.EthereumClient, interactive bool, f xeth.Frontend) *jsre { + js := &jsre{ethereum: ethereum, ps1: "> ", docRoot: docRoot} // set default cors domain used by startRpc from CLI flag js.corsDomain = corsDomain if f == nil { f = js } - js.ds = docserver.New("/") + js.ds = docserver.New(docRoot) js.xeth = xeth.New(ethereum, f) js.wait = js.xeth.UpdateState() js.client = client if clt, ok := js.client.(*comms.InProcClient); ok { - if offeredApis, err := api.ParseApiString(shared.AllApis, codec.JSON, js.xeth, ethereum); err == nil { + if offeredApis, err := api.ParseApiString(shared.AllApis, codec.JSON, js.xeth, ethereum, docRoot); err == nil { clt.Initialize(api.Merge(offeredApis...)) } } // update state in separare forever blocks - js.re = re.New(libPath) + js.re = re.New(docRoot) if err := js.apiBindings(f); err != nil { utils.Fatalf("Unable to connect - %v", err) } @@ -277,7 +281,7 @@ func (js *jsre) apiBindings(f xeth.Frontend) error { apiNames = append(apiNames, a) } - apiImpl, err := api.ParseApiString(strings.Join(apiNames, ","), codec.JSON, js.xeth, js.ethereum) + apiImpl, err := api.ParseApiString(strings.Join(apiNames, ","), codec.JSON, js.xeth, js.ethereum, js.docRoot) if err != nil { utils.Fatalf("Unable to determine supported api's: %v", err) } @@ -334,6 +338,14 @@ func (js *jsre) apiBindings(f xeth.Frontend) error { return nil } +func (self *jsre) AskPassword() (string, bool) { + pass, err := self.PasswordPrompt("Passphrase: ") + if err != nil { + return "", false + } + return pass, true +} + func (self *jsre) ConfirmTransaction(tx string) bool { if self.ethereum.NatSpec { notice := natspec.GetNotice(self.xeth, tx, self.ds) @@ -405,18 +417,17 @@ func (self *jsre) interactive() { fmt.Println("caught interrupt, exiting") return case input, ok := <-inputln: - if !ok || indentCount <= 0 && input == "exit" { + if !ok || indentCount <= 0 && exit.MatchString(input) { return } - if input == "" { + if onlyws.MatchString(input) { continue } str += input + "\n" self.setIndent() if indentCount <= 0 { - hist := hidepassword(str[:len(str)-1]) - if len(hist) > 0 { - self.AppendHistory(hist) + if mustLogInHistory(str) { + self.AppendHistory(str[:len(str)-1]) } self.parseInput(str) str = "" @@ -425,12 +436,10 @@ func (self *jsre) interactive() { } } -func hidepassword(input string) string { - if passwordRegexp.MatchString(input) { - return passwordRepl - } else { - return input - } +func mustLogInHistory(input string) bool { + return len(input) == 0 || + passwordRegexp.MatchString(input) || + leadingSpace.MatchString(input) } func (self *jsre) withHistory(datadir string, op func(*os.File)) { diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 3e3a3eb03..8bdc01999 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -58,11 +58,6 @@ var ( gitCommit string // set via linker flagg nodeNameVersion string app *cli.App - - ExtraDataFlag = cli.StringFlag{ - Name: "extradata", - Usage: "Extra data for the miner", - } ) func init() { @@ -176,8 +171,12 @@ It is safe to transfer the entire directory or the individual keys therein between ethereum nodes by simply copying. Make sure you backup your keys regularly. -In order to use your account to send transactions, you need to unlock them using the -'--unlock' option. The argument is a comma +In order to use your account to send transactions, you need to unlock them using +the '--unlock' option. The argument is a space separated list of addresses or +indexes. If used non-interactively with a passwordfile, the file should contain +the respective passwords one per line. If you unlock n accounts and the password +file contains less than n entries, then the last password is meant to apply to +all remaining accounts. And finally. DO NOT FORGET YOUR PASSWORD. `, @@ -227,7 +226,7 @@ format to the newest format or change the password for an account. For non-interactive use the passphrase can be specified with the --password flag: - ethereum --password account new + ethereum --password account update
Since only one password can be given, only format update can be performed, changing your password is only possible interactively. @@ -354,7 +353,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso utils.GpobaseStepDownFlag, utils.GpobaseStepUpFlag, utils.GpobaseCorrectionFactorFlag, - ExtraDataFlag, + utils.ExtraDataFlag, } app.Before = func(ctx *cli.Context) error { utils.SetupLogger(ctx) @@ -380,8 +379,8 @@ func main() { // makeExtra resolves extradata for the miner from a flag or returns a default. func makeExtra(ctx *cli.Context) []byte { - if ctx.GlobalIsSet(ExtraDataFlag.Name) { - return []byte(ctx.GlobalString(ExtraDataFlag.Name)) + if ctx.GlobalIsSet(utils.ExtraDataFlag.Name) { + return []byte(ctx.GlobalString(utils.ExtraDataFlag.Name)) } return makeDefaultExtra() } @@ -517,28 +516,29 @@ func execJSFiles(ctx *cli.Context) { ethereum.WaitForShutdown() } -func unlockAccount(ctx *cli.Context, am *accounts.Manager, addr string, i int) (addrHex, auth string) { - utils.CheckLegalese(utils.MustDataDir(ctx)) +func unlockAccount(ctx *cli.Context, am *accounts.Manager, addr string, i int, inputpassphrases []string) (addrHex, auth string, passphrases []string) { + utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) var err error + passphrases = inputpassphrases addrHex, err = utils.ParamToAddress(addr, am) if err == nil { // Attempt to unlock the account 3 times attempts := 3 for tries := 0; tries < attempts; tries++ { msg := fmt.Sprintf("Unlocking account %s | Attempt %d/%d", addr, tries+1, attempts) - auth = getPassPhrase(ctx, msg, false, i) + auth, passphrases = getPassPhrase(ctx, msg, false, i, passphrases) err = am.Unlock(common.HexToAddress(addrHex), auth) - if err == nil { + if err == nil || passphrases != nil { break } } } if err != nil { - utils.Fatalf("Unlock account failed '%v'", err) + utils.Fatalf("Unlock account '%s' (%v) failed: %v", addr, addrHex, err) } - fmt.Printf("Account '%s' unlocked.\n", addr) + fmt.Printf("Account '%s' (%v) unlocked.\n", addr, addrHex) return } @@ -582,12 +582,13 @@ func startEth(ctx *cli.Context, eth *eth.Ethereum) { am := eth.AccountManager() account := ctx.GlobalString(utils.UnlockedAccountFlag.Name) accounts := strings.Split(account, " ") + var passphrases []string for i, account := range accounts { if len(account) > 0 { if account == "primary" { utils.Fatalf("the 'primary' keyword is deprecated. You can use integer indexes, but the indexes are not permanent, they can change if you add external keys, export your keys or copy your keystore to another node.") } - unlockAccount(ctx, am, account, i) + _, _, passphrases = unlockAccount(ctx, am, account, i, passphrases) } } // Start auxiliary services if enabled. @@ -624,7 +625,7 @@ func accountList(ctx *cli.Context) { } } -func getPassPhrase(ctx *cli.Context, desc string, confirmation bool, i int) (passphrase string) { +func getPassPhrase(ctx *cli.Context, desc string, confirmation bool, i int, inputpassphrases []string) (passphrase string, passphrases []string) { passfile := ctx.GlobalString(utils.PasswordFileFlag.Name) if len(passfile) == 0 { fmt.Println(desc) @@ -644,14 +645,17 @@ func getPassPhrase(ctx *cli.Context, desc string, confirmation bool, i int) (pas passphrase = auth } else { - passbytes, err := ioutil.ReadFile(passfile) - if err != nil { - utils.Fatalf("Unable to read password file '%s': %v", passfile, err) + passphrases = inputpassphrases + if passphrases == nil { + passbytes, err := ioutil.ReadFile(passfile) + if err != nil { + utils.Fatalf("Unable to read password file '%s': %v", passfile, err) + } + // this is backwards compatible if the same password unlocks several accounts + // it also has the consequence that trailing newlines will not count as part + // of the password, so --password <(echo -n 'pass') will now work without -n + passphrases = strings.Split(string(passbytes), "\n") } - // this is backwards compatible if the same password unlocks several accounts - // it also has the consequence that trailing newlines will not count as part - // of the password, so --password <(echo -n 'pass') will now work without -n - passphrases := strings.Split(string(passbytes), "\n") if i >= len(passphrases) { passphrase = passphrases[len(passphrases)-1] } else { @@ -665,7 +669,7 @@ func accountCreate(ctx *cli.Context) { utils.CheckLegalese(utils.MustDataDir(ctx)) am := utils.MakeAccountManager(ctx) - passphrase := getPassPhrase(ctx, "Your new account is locked with a password. Please give a password. Do not forget this password.", true, 0) + passphrase, _ := getPassPhrase(ctx, "Your new account is locked with a password. Please give a password. Do not forget this password.", true, 0, nil) acct, err := am.NewAccount(passphrase) if err != nil { utils.Fatalf("Could not create the account: %v", err) @@ -682,8 +686,8 @@ func accountUpdate(ctx *cli.Context) { utils.Fatalf("account address or index must be given as argument") } - addr, authFrom := unlockAccount(ctx, am, arg, 0) - authTo := getPassPhrase(ctx, "Please give a new password. Do not forget this password.", true, 0) + addr, authFrom, passphrases := unlockAccount(ctx, am, arg, 0, nil) + authTo, _ := getPassPhrase(ctx, "Please give a new password. Do not forget this password.", true, 0, passphrases) err := am.Update(common.HexToAddress(addr), authFrom, authTo) if err != nil { utils.Fatalf("Could not update the account: %v", err) @@ -703,7 +707,7 @@ func importWallet(ctx *cli.Context) { } am := utils.MakeAccountManager(ctx) - passphrase := getPassPhrase(ctx, "", false, 0) + passphrase, _ := getPassPhrase(ctx, "", false, 0, nil) acct, err := am.ImportPreSaleKey(keyJson, passphrase) if err != nil { @@ -720,7 +724,7 @@ func accountImport(ctx *cli.Context) { utils.Fatalf("keyfile must be given as argument") } am := utils.MakeAccountManager(ctx) - passphrase := getPassPhrase(ctx, "Your new account is locked with a password. Please give a password. Do not forget this password.", true, 0) + passphrase, _ := getPassPhrase(ctx, "Your new account is locked with a password. Please give a password. Do not forget this password.", true, 0, nil) acct, err := am.Import(keyfile, passphrase) if err != nil { utils.Fatalf("Could not create the account: %v", err) diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index 1fbd96dc8..9b75ccab4 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -40,7 +40,9 @@ const ( importBatchSize = 2500 ) -var interruptCallbacks = []func(os.Signal){} +var ( + interruptCallbacks = []func(os.Signal){} +) func openLogFile(Datadir string, filename string) *os.File { path := common.AbsolutePath(Datadir, filename) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index eb2a7d421..66ec46f80 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -183,6 +183,10 @@ var ( Usage: "Sets the minimal gasprice when mining transactions", Value: new(big.Int).Mul(big.NewInt(50), common.Shannon).String(), } + ExtraDataFlag = cli.StringFlag{ + Name: "extradata", + Usage: "Extra data for the miner", + } UnlockedAccountFlag = cli.StringFlag{ Name: "unlock", @@ -345,7 +349,7 @@ var ( // ATM the url is left to the user and deployment to JSpathFlag = cli.StringFlag{ Name: "jspath", - Usage: "JS library path to be used with console and js subcommands", + Usage: "JS root path for loadScript and document root for admin.httpGet", Value: ".", } SolcPathFlag = cli.StringFlag{ @@ -612,7 +616,7 @@ func StartIPC(eth *eth.Ethereum, ctx *cli.Context) error { xeth := xeth.New(eth, fe) codec := codec.JSON - apis, err := api.ParseApiString(ctx.GlobalString(IPCApiFlag.Name), codec, xeth, eth) + apis, err := api.ParseApiString(ctx.GlobalString(IPCApiFlag.Name), codec, xeth, eth, ctx.GlobalString(JSpathFlag.Name)) if err != nil { return nil, err } @@ -633,7 +637,7 @@ func StartRPC(eth *eth.Ethereum, ctx *cli.Context) error { xeth := xeth.New(eth, nil) codec := codec.JSON - apis, err := api.ParseApiString(ctx.GlobalString(RpcApiFlag.Name), codec, xeth, eth) + apis, err := api.ParseApiString(ctx.GlobalString(RpcApiFlag.Name), codec, xeth, eth, ctx.GlobalString(JSpathFlag.Name)) if err != nil { return err } diff --git a/common/docserver/docserver.go b/common/docserver/docserver.go index dac542ba7..cfc4e3b26 100644 --- a/common/docserver/docserver.go +++ b/common/docserver/docserver.go @@ -95,14 +95,20 @@ func (self *DocServer) Get(uri, path string) (content []byte, err error) { resp.Body.Close() } }() + if err != nil { return } + content, err = ioutil.ReadAll(resp.Body) if err != nil { return } + if resp.StatusCode/100 != 2 { + return content, fmt.Errorf("HTTP error: %s", resp.Status) + } + if path != "" { var abspath string abspath, err = filepath.Abs(path) diff --git a/common/natspec/natspec_e2e_test.go b/common/natspec/natspec_e2e_test.go index 02c2014ba..4149314c3 100644 --- a/common/natspec/natspec_e2e_test.go +++ b/common/natspec/natspec_e2e_test.go @@ -21,8 +21,8 @@ import ( "io/ioutil" "math/big" "os" + "path/filepath" "runtime" - "strings" "testing" "time" @@ -38,7 +38,9 @@ import ( ) const ( + testAddress = "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182" testBalance = "10000000000000000000" + testKey = "e6fab74a43941f82d89cb7faa408e227cdad3153c4720e540e855c19b15e6674" testFileName = "long_file_name_for_testing_registration_of_URLs_longer_than_32_bytes.content" @@ -48,7 +50,7 @@ const ( testExpNotice2 = `About to submit transaction (NatSpec notice error: abi key does not match any method): {"params":[{"to":"%s","data": "0x31e12c20"}]}` - testExpNotice3 = `About to submit transaction (no NatSpec info found for contract: content hash not found for '0x1392c62d05b2d149e22a339c531157ae06b44d39a674cce500064b12b9aeb019'): {"params":[{"to":"%s","data": "0x300a3bbfb3a2dea218de5d8bbe6c4645aadbf67b5ab00ecb1a9ec95dbdad6a0eed3e41a7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066696c653a2f2f2f746573742e636f6e74656e74"}]}` + testExpNotice3 = `About to submit transaction (no NatSpec info found for contract: HashToHash: content hash not found for '0x1392c62d05b2d149e22a339c531157ae06b44d39a674cce500064b12b9aeb019'): {"params":[{"to":"%s","data": "0x300a3bbfb3a2dea218de5d8bbe6c4645aadbf67b5ab00ecb1a9ec95dbdad6a0eed3e41a7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066696c653a2f2f2f746573742e636f6e74656e74"}]}` ) const ( @@ -100,6 +102,10 @@ type testFrontend struct { wantNatSpec bool } +func (self *testFrontend) AskPassword() (string, bool) { + return "", true +} + func (self *testFrontend) UnlockAccount(acc []byte) bool { self.ethereum.AccountManager().Unlock(common.BytesToAddress(acc), "password") return true @@ -115,42 +121,42 @@ func (self *testFrontend) ConfirmTransaction(tx string) bool { func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { - os.RemoveAll("/tmp/eth-natspec/") - - err = os.MkdirAll("/tmp/eth-natspec/keystore", os.ModePerm) + tmp, err := ioutil.TempDir("", "natspec-test") if err != nil { - panic(err) + t.Fatal(err) } - - // create a testAddress - ks := crypto.NewKeyStorePassphrase("/tmp/eth-natspec/keystore") + db, _ := ethdb.NewMemDatabase() + addr := common.HexToAddress(testAddress) + core.WriteGenesisBlockForTesting(db, core.GenesisAccount{addr, common.String2Big(testBalance)}) + ks := crypto.NewKeyStorePassphrase(filepath.Join(tmp, "keystore")) am := accounts.NewManager(ks) - testAccount, err := am.NewAccount("password") + keyb, err := crypto.HexToECDSA(testKey) if err != nil { - panic(err) + t.Fatal(err) + } + key := crypto.NewKeyFromECDSA(keyb) + err = ks.StoreKey(key, "") + if err != nil { + t.Fatal(err) } - testAddress := strings.TrimPrefix(testAccount.Address.Hex(), "0x") - - db, _ := ethdb.NewMemDatabase() - // set up mock genesis with balance on the testAddress - core.WriteGenesisBlockForTesting(db, core.GenesisAccount{common.HexToAddress(testAddress), common.String2Big(testBalance)}) - - // only use minimalistic stack with no networking - ethereum, err = eth.New(ð.Config{ - DataDir: "/tmp/eth-natspec", - AccountManager: am, - MaxPeers: 0, - PowTest: true, - Etherbase: common.HexToAddress(testAddress), - NewDB: func(path string) (ethdb.Database, error) { return db, nil }, - }) - + err = am.Unlock(key.Address, "") if err != nil { - panic(err) + t.Fatal(err) } - return + // only use minimalistic stack with no networking + return eth.New(ð.Config{ + DataDir: tmp, + AccountManager: am, + Etherbase: common.HexToAddress(testAddress), + MaxPeers: 0, + PowTest: true, + NewDB: func(path string) (ethdb.Database, error) { return db, nil }, + GpoMinGasPrice: common.Big1, + GpobaseCorrectionFactor: 1, + GpoMaxGasPrice: common.Big1, + }) } func testInit(t *testing.T) (self *testFrontend) { @@ -174,36 +180,49 @@ func testInit(t *testing.T) (self *testFrontend) { // initialise the registry contracts reg := registrar.New(self.xeth) - var registrarTxhash, hashRegTxhash, urlHintTxhash string - registrarTxhash, err = reg.SetGlobalRegistrar("", addr) + registrar.GlobalRegistrarAddr = "0x0" + + var txG, txH, txU string + txG, err = reg.SetGlobalRegistrar("", addr) if err != nil { - t.Errorf("error creating GlobalRegistrar: %v", err) + t.Fatalf("error creating GlobalRegistrar: %v", err) } + if !processTxs(self, t, 1) { + t.Fatalf("error mining txs") + } + recG := self.xeth.GetTxReceipt(common.HexToHash(txG)) + if recG == nil { + t.Fatalf("blockchain error creating GlobalRegistrar") + } + registrar.GlobalRegistrarAddr = recG.ContractAddress.Hex() - hashRegTxhash, err = reg.SetHashReg("", addr) + txH, err = reg.SetHashReg("", addr) if err != nil { t.Errorf("error creating HashReg: %v", err) } - urlHintTxhash, err = reg.SetUrlHint("", addr) + if !processTxs(self, t, 1) { + t.Errorf("error mining txs") + } + recH := self.xeth.GetTxReceipt(common.HexToHash(txH)) + if recH == nil { + t.Fatalf("blockchain error creating HashReg") + } + registrar.HashRegAddr = recH.ContractAddress.Hex() + + txU, err = reg.SetUrlHint("", addr) if err != nil { t.Errorf("error creating UrlHint: %v", err) } - if !processTxs(self, t, 3) { + if !processTxs(self, t, 1) { t.Errorf("error mining txs") } - _ = registrarTxhash - _ = hashRegTxhash - _ = urlHintTxhash - - /* TODO: - * lookup receipt and contract addresses by tx hash - * name registration for HashReg and UrlHint addresses - * mine those transactions - * then set once more SetHashReg SetUrlHint - */ + recU := self.xeth.GetTxReceipt(common.HexToHash(txU)) + if recU == nil { + t.Fatalf("blockchain error creating UrlHint") + } + registrar.UrlHintAddr = recU.ContractAddress.Hex() return - } // end to end test @@ -215,7 +234,7 @@ func TestNatspecE2E(t *testing.T) { addr, _ := tf.ethereum.Etherbase() // create a contractInfo file (mock cloud-deployed contract metadocs) - // incidentally this is the info for the registry contract itself + // incidentally this is the info for the HashReg contract itself ioutil.WriteFile("/tmp/"+testFileName, []byte(testContractInfo), os.ModePerm) dochash := crypto.Sha3Hash([]byte(testContractInfo)) @@ -223,10 +242,6 @@ func TestNatspecE2E(t *testing.T) { codeb := tf.xeth.CodeAtBytes(registrar.HashRegAddr) codehash := crypto.Sha3Hash(codeb) - // use resolver to register codehash->dochash->url - // test if globalregistry works - // registrar.HashRefAddr = "0x0" - // registrar.UrlHintAddr = "0x0" reg := registrar.New(tf.xeth) _, err := reg.SetHashToHash(addr, codehash, dochash) if err != nil { diff --git a/common/registrar/registrar.go b/common/registrar/registrar.go index d891e161e..24e45edb3 100644 --- a/common/registrar/registrar.go +++ b/common/registrar/registrar.go @@ -48,17 +48,16 @@ The Registrar uses 3 contracts on the blockchain: These contracts are (currently) not included in the genesis block. Each Set needs to be called once on each blockchain/network once. -Contract addresses need to be set (HashReg and UrlHint retrieved from the global -registrar the first time any Registrar method is called in a client session - -So the caller needs to make sure the relevant environment initialised the desired -contracts +Contract addresses need to be set the first time any Registrar method is called +in a client session. +This is done for frontier by default, otherwise the caller needs to make sure +the relevant environment initialised the desired contracts */ var ( - UrlHintAddr = "0x0" - HashRegAddr = "0x0" - GlobalRegistrarAddr = "0x0" - // GlobalRegistrarAddr = "0xc6d9d2cd449a754c494264e1809c50e34d64562b" + // GlobalRegistrarAddr = "0xc6d9d2cd449a754c494264e1809c50e34d64562b" // olympic + GlobalRegistrarAddr = "0x33990122638b9132ca29c723bdf037f1a891a70c" // frontier + HashRegAddr = "0x23bf622b5a65f6060d855fca401133ded3520620" // frontier + UrlHintAddr = "0x73ed5ef6c010727dfd2671dbb70faac19ec18626" // frontier zero = regexp.MustCompile("^(0x)?0*$") ) @@ -113,7 +112,7 @@ func (self *Registrar) SetGlobalRegistrar(namereg string, addr common.Address) ( GlobalRegistrarAddr = namereg return } - if GlobalRegistrarAddr == "0x0" || GlobalRegistrarAddr == "0x" { + if zero.MatchString(GlobalRegistrarAddr) { if (addr == common.Address{}) { err = fmt.Errorf("GlobalRegistrar address not found and sender for creation not given") return @@ -200,6 +199,9 @@ func (self *Registrar) SetUrlHint(urlhint string, addr common.Address) (txhash s // ReserveName(from, name) reserves name for the sender address in the globalRegistrar // the tx needs to be mined to take effect func (self *Registrar) ReserveName(address common.Address, name string) (txh string, err error) { + if zero.MatchString(GlobalRegistrarAddr) { + return "", fmt.Errorf("GlobalRegistrar address is not set") + } nameHex, extra := encodeName(name, 2) abi := reserveAbi + nameHex + extra glog.V(logger.Detail).Infof("Reserve data: %s", abi) @@ -215,6 +217,10 @@ func (self *Registrar) ReserveName(address common.Address, name string) (txh str // in the globalRegistrar using from as the sender of the transaction // the tx needs to be mined to take effect func (self *Registrar) SetAddressToName(from common.Address, name string, address common.Address) (txh string, err error) { + if zero.MatchString(GlobalRegistrarAddr) { + return "", fmt.Errorf("GlobalRegistrar address is not set") + } + nameHex, extra := encodeName(name, 6) addrHex := encodeAddress(address) @@ -231,6 +237,10 @@ func (self *Registrar) SetAddressToName(from common.Address, name string, addres // NameToAddr(from, name) queries the registrar for the address on name func (self *Registrar) NameToAddr(from common.Address, name string) (address common.Address, err error) { + if zero.MatchString(GlobalRegistrarAddr) { + return address, fmt.Errorf("GlobalRegistrar address is not set") + } + nameHex, extra := encodeName(name, 2) abi := resolveAbi + nameHex + extra glog.V(logger.Detail).Infof("NameToAddr data: %s", abi) @@ -249,6 +259,9 @@ func (self *Registrar) NameToAddr(from common.Address, name string) (address com // called as first step in the registration process on HashReg func (self *Registrar) SetOwner(address common.Address) (txh string, err error) { + if zero.MatchString(HashRegAddr) { + return "", fmt.Errorf("HashReg address is not set") + } return self.backend.Transact( address.Hex(), HashRegAddr, @@ -261,6 +274,10 @@ func (self *Registrar) SetOwner(address common.Address) (txh string, err error) // e.g., the contract Info combined Json Doc's ContentHash // to CodeHash of a contract or hash of a domain func (self *Registrar) SetHashToHash(address common.Address, codehash, dochash common.Hash) (txh string, err error) { + if zero.MatchString(HashRegAddr) { + return "", fmt.Errorf("HashReg address is not set") + } + _, err = self.SetOwner(address) if err != nil { return @@ -284,6 +301,10 @@ func (self *Registrar) SetHashToHash(address common.Address, codehash, dochash c // FIXME: silently doing nothing if sender is not the owner // note that with content addressed storage, this step is no longer necessary func (self *Registrar) SetUrlToHash(address common.Address, hash common.Hash, url string) (txh string, err error) { + if zero.MatchString(UrlHintAddr) { + return "", fmt.Errorf("UrlHint address is not set") + } + hashHex := common.Bytes2Hex(hash[:]) var urlHex string urlb := []byte(url) @@ -321,13 +342,17 @@ func (self *Registrar) SetUrlToHash(address common.Address, hash common.Hash, ur // resolution is costless non-transactional // implemented as direct retrieval from db func (self *Registrar) HashToHash(khash common.Hash) (chash common.Hash, err error) { + if zero.MatchString(HashRegAddr) { + return common.Hash{}, fmt.Errorf("HashReg address is not set") + } + // look up in hashReg at := HashRegAddr[2:] key := storageAddress(storageMapping(storageIdx2Addr(1), khash[:])) hash := self.backend.StorageAt(at, key) if hash == "0x0" || len(hash) < 3 || (hash == common.Hash{}.Hex()) { - err = fmt.Errorf("content hash not found for '%v'", khash.Hex()) + err = fmt.Errorf("HashToHash: content hash not found for '%v'", khash.Hex()) return } copy(chash[:], common.Hex2BytesFixed(hash[2:], 32)) @@ -339,6 +364,9 @@ func (self *Registrar) HashToHash(khash common.Hash) (chash common.Hash, err err // implemented as direct retrieval from db // if we use content addressed storage, this step is no longer necessary func (self *Registrar) HashToUrl(chash common.Hash) (uri string, err error) { + if zero.MatchString(UrlHintAddr) { + return "", fmt.Errorf("UrlHint address is not set") + } // look up in URL reg var str string = " " var idx uint32 @@ -358,7 +386,7 @@ func (self *Registrar) HashToUrl(chash common.Hash) (uri string, err error) { } if len(uri) == 0 { - err = fmt.Errorf("GetURLhint: URL hint not found for '%v'", chash.Hex()) + err = fmt.Errorf("HashToUrl: URL hint not found for '%v'", chash.Hex()) } return } diff --git a/common/registrar/registrar_test.go b/common/registrar/registrar_test.go index 63f283563..68ee65ab4 100644 --- a/common/registrar/registrar_test.go +++ b/common/registrar/registrar_test.go @@ -36,29 +36,31 @@ var ( ) func NewTestBackend() *testBackend { - HashRegAddr = common.BigToAddress(common.Big0).Hex() //[2:] - UrlHintAddr = common.BigToAddress(common.Big1).Hex() //[2:] self := &testBackend{} self.contracts = make(map[string](map[string]string)) + return self +} +func (self *testBackend) initHashReg() { self.contracts[HashRegAddr[2:]] = make(map[string]string) key := storageAddress(storageMapping(storageIdx2Addr(1), codehash[:])) self.contracts[HashRegAddr[2:]][key] = hash.Hex() +} +func (self *testBackend) initUrlHint() { self.contracts[UrlHintAddr[2:]] = make(map[string]string) mapaddr := storageMapping(storageIdx2Addr(1), hash[:]) - key = storageAddress(storageFixedArray(mapaddr, storageIdx2Addr(0))) + key := storageAddress(storageFixedArray(mapaddr, storageIdx2Addr(0))) self.contracts[UrlHintAddr[2:]][key] = common.ToHex([]byte(url)) key = storageAddress(storageFixedArray(mapaddr, storageIdx2Addr(1))) self.contracts[UrlHintAddr[2:]][key] = "0x0" - return self } func (self *testBackend) StorageAt(ca, sa string) (res string) { c := self.contracts[ca] if c == nil { - return + return "0x0" } res = c[sa] return @@ -84,9 +86,31 @@ func TestSetGlobalRegistrar(t *testing.T) { func TestHashToHash(t *testing.T) { b := NewTestBackend() res := New(b) - // res.SetHashReg() + HashRegAddr = "0x0" got, err := res.HashToHash(codehash) + if err == nil { + t.Errorf("expected error") + } else { + exp := "HashReg address is not set" + if err.Error() != exp { + t.Errorf("incorrect error, expected '%v', got '%v'", exp, err.Error()) + } + } + + HashRegAddr = common.BigToAddress(common.Big1).Hex() //[2:] + got, err = res.HashToHash(codehash) + if err == nil { + t.Errorf("expected error") + } else { + exp := "HashToHash: content hash not found for '" + codehash.Hex() + "'" + if err.Error() != exp { + t.Errorf("incorrect error, expected '%v', got '%v'", exp, err.Error()) + } + } + + b.initHashReg() + got, err = res.HashToHash(codehash) if err != nil { t.Errorf("expected no error, got %v", err) } else { @@ -99,11 +123,33 @@ func TestHashToHash(t *testing.T) { func TestHashToUrl(t *testing.T) { b := NewTestBackend() res := New(b) - // res.SetUrlHint() + UrlHintAddr = "0x0" got, err := res.HashToUrl(hash) + if err == nil { + t.Errorf("expected error") + } else { + exp := "UrlHint address is not set" + if err.Error() != exp { + t.Errorf("incorrect error, expected '%v', got '%v'", exp, err.Error()) + } + } + + UrlHintAddr = common.BigToAddress(common.Big2).Hex() //[2:] + got, err = res.HashToUrl(hash) + if err == nil { + t.Errorf("expected error") + } else { + exp := "HashToUrl: URL hint not found for '" + hash.Hex() + "'" + if err.Error() != exp { + t.Errorf("incorrect error, expected '%v', got '%v'", exp, err.Error()) + } + } + + b.initUrlHint() + got, err = res.HashToUrl(hash) if err != nil { - t.Errorf("expected error, got %v", err) + t.Errorf("expected no error, got %v", err) } else { if got != url { t.Errorf("incorrect result, expected '%v', got '%s'", url, got) diff --git a/crypto/crypto.go b/crypto/crypto.go index 49793ded9..035d2ab80 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -261,6 +261,9 @@ func decryptPreSaleKey(fileContent []byte, password string) (key *Key, err error passBytes := []byte(password) derivedKey := pbkdf2.Key(passBytes, passBytes, 2000, 16, sha256.New) plainText, err := aesCBCDecrypt(derivedKey, cipherText, iv) + if err != nil { + return nil, err + } ethPriv := Sha3(plainText) ecKey := ToECDSA(ethPriv) key = &Key{ @@ -271,7 +274,7 @@ func decryptPreSaleKey(fileContent []byte, password string) (key *Key, err error derivedAddr := hex.EncodeToString(key.Address.Bytes()) // needed because .Hex() gives leading "0x" expectedAddr := preSaleKeyStruct.EthAddr if derivedAddr != expectedAddr { - err = errors.New(fmt.Sprintf("decrypted addr not equal to expected addr ", derivedAddr, expectedAddr)) + err = fmt.Errorf("decrypted addr '%s' not equal to expected addr '%s'", derivedAddr, expectedAddr) } return key, err } diff --git a/eth/backend.go b/eth/backend.go index a4f656ecd..6ce0d0eb0 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -26,7 +26,9 @@ import ( "math/big" "os" "path/filepath" + "regexp" "strings" + "syscall" "time" "github.com/ethereum/ethash" @@ -62,6 +64,9 @@ const ( var ( jsonlogger = logger.NewJsonLogger() + datadirInUseErrNos = []uint{11, 32, 35} + portInUseErrRE = regexp.MustCompile("address already in use") + defaultBootNodes = []*discover.Node{ // ETH/DEV Go Bootnodes discover.MustParseNode("enode://a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@52.16.188.185:30303"), // IE @@ -282,6 +287,17 @@ func New(config *Config) (*Ethereum, error) { // Open the chain database and perform any upgrades needed chainDb, err := newdb(filepath.Join(config.DataDir, "chaindata")) if err != nil { + var ok bool + errno := uint(err.(syscall.Errno)) + for _, no := range datadirInUseErrNos { + if errno == no { + ok = true + break + } + } + if ok { + err = fmt.Errorf("%v (check if another instance of geth is already running with the same data directory '%s')", err, config.DataDir) + } return nil, fmt.Errorf("blockchain db err: %v", err) } if db, ok := chainDb.(*ethdb.LDBDatabase); ok { @@ -296,6 +312,16 @@ func New(config *Config) (*Ethereum, error) { dappDb, err := newdb(filepath.Join(config.DataDir, "dapp")) if err != nil { + var ok bool + for _, no := range datadirInUseErrNos { + if uint(err.(syscall.Errno)) == no { + ok = true + break + } + } + if ok { + err = fmt.Errorf("%v (check if another instance of geth is already running with the same data directory '%s')", err, config.DataDir) + } return nil, fmt.Errorf("dapp db err: %v", err) } if db, ok := dappDb.(*ethdb.LDBDatabase); ok { @@ -553,6 +579,9 @@ func (s *Ethereum) Start() error { }) err := s.net.Start() if err != nil { + if portInUseErrRE.MatchString(err.Error()) { + err = fmt.Errorf("%v (possibly another instance of geth is using the same port)", err) + } return err } diff --git a/rpc/api/admin.go b/rpc/api/admin.go index 6aa04e667..eed8d8366 100644 --- a/rpc/api/admin.go +++ b/rpc/api/admin.go @@ -84,17 +84,19 @@ type adminApi struct { ethereum *eth.Ethereum codec codec.Codec coder codec.ApiCoder + docRoot string ds *docserver.DocServer } // create a new admin api instance -func NewAdminApi(xeth *xeth.XEth, ethereum *eth.Ethereum, codec codec.Codec) *adminApi { +func NewAdminApi(xeth *xeth.XEth, ethereum *eth.Ethereum, codec codec.Codec, docRoot string) *adminApi { return &adminApi{ xeth: xeth, ethereum: ethereum, codec: codec, coder: codec.New(nil), - ds: docserver.New("/"), + docRoot: docRoot, + ds: docserver.New(docRoot), } } @@ -256,7 +258,7 @@ func (self *adminApi) StartRPC(req *shared.Request) (interface{}, error) { CorsDomain: args.CorsDomain, } - apis, err := ParseApiString(args.Apis, self.codec, self.xeth, self.ethereum) + apis, err := ParseApiString(args.Apis, self.codec, self.xeth, self.ethereum, self.docRoot) if err != nil { return false, err } diff --git a/rpc/api/api_test.go b/rpc/api/api_test.go index 131ef68f8..a4efb09c1 100644 --- a/rpc/api/api_test.go +++ b/rpc/api/api_test.go @@ -30,7 +30,7 @@ import ( ) func TestParseApiString(t *testing.T) { - apis, err := ParseApiString("", codec.JSON, nil, nil) + apis, err := ParseApiString("", codec.JSON, nil, nil, "") if err == nil { t.Errorf("Expected an err from parsing empty API string but got nil") } @@ -39,7 +39,7 @@ func TestParseApiString(t *testing.T) { t.Errorf("Expected 0 apis from empty API string") } - apis, err = ParseApiString("eth", codec.JSON, nil, nil) + apis, err = ParseApiString("eth", codec.JSON, nil, nil, "") if err != nil { t.Errorf("Expected nil err from parsing empty API string but got %v", err) } @@ -48,7 +48,7 @@ func TestParseApiString(t *testing.T) { t.Errorf("Expected 1 apis but got %d - %v", apis, apis) } - apis, err = ParseApiString("eth,eth", codec.JSON, nil, nil) + apis, err = ParseApiString("eth,eth", codec.JSON, nil, nil, "") if err != nil { t.Errorf("Expected nil err from parsing empty API string but got \"%v\"", err) } @@ -57,7 +57,7 @@ func TestParseApiString(t *testing.T) { t.Errorf("Expected 2 apis but got %d - %v", apis, apis) } - apis, err = ParseApiString("eth,invalid", codec.JSON, nil, nil) + apis, err = ParseApiString("eth,invalid", codec.JSON, nil, nil, "") if err == nil { t.Errorf("Expected an err but got no err") } diff --git a/rpc/api/personal.go b/rpc/api/personal.go index 1fb412612..4f347c610 100644 --- a/rpc/api/personal.go +++ b/rpc/api/personal.go @@ -98,9 +98,22 @@ func (self *personalApi) NewAccount(req *shared.Request) (interface{}, error) { if err := self.codec.Decode(req.Params, &args); err != nil { return nil, shared.NewDecodeParamError(err.Error()) } - + var passwd string + if args.Passphrase == nil { + fe := self.xeth.Frontend() + if fe == nil { + return false, fmt.Errorf("unable to create account: unable to interact with user") + } + var ok bool + passwd, ok = fe.AskPassword() + if !ok { + return false, fmt.Errorf("unable to create account: no password given") + } + } else { + passwd = *args.Passphrase + } am := self.ethereum.AccountManager() - acc, err := am.NewAccount(args.Passphrase) + acc, err := am.NewAccount(passwd) return acc.Address.Hex(), err } diff --git a/rpc/api/personal_args.go b/rpc/api/personal_args.go index 73dc6285e..5d215c71d 100644 --- a/rpc/api/personal_args.go +++ b/rpc/api/personal_args.go @@ -23,7 +23,7 @@ import ( ) type NewAccountArgs struct { - Passphrase string + Passphrase *string } func (args *NewAccountArgs) UnmarshalJSON(b []byte) (err error) { @@ -32,16 +32,15 @@ func (args *NewAccountArgs) UnmarshalJSON(b []byte) (err error) { return shared.NewDecodeParamError(err.Error()) } - if len(obj) < 1 { - return shared.NewInsufficientParamsError(len(obj), 1) - } - - if passhrase, ok := obj[0].(string); ok { - args.Passphrase = passhrase - return nil + if len(obj) >= 1 && obj[0] != nil { + if passphrasestr, ok := obj[0].(string); ok { + args.Passphrase = &passphrasestr + } else { + return shared.NewInvalidTypeError("passphrase", "not a string") + } } - return shared.NewInvalidTypeError("passhrase", "not a string") + return nil } type UnlockAccountArgs struct { diff --git a/rpc/api/utils.go b/rpc/api/utils.go index 76b2c531d..719cb8074 100644 --- a/rpc/api/utils.go +++ b/rpc/api/utils.go @@ -33,14 +33,21 @@ var ( "admin": []string{ "addPeer", "datadir", + "enableUserAgent", "exportChain", "getContractInfo", + "httpGet", "importChain", "nodeInfo", "peers", "register", "registerUrl", + "saveInfo", + "setGlobalRegistrar", + "setHashReg", + "setUrlHint", "setSolc", + "sleep", "sleepBlocks", "startNatSpec", "startRPC", @@ -146,7 +153,7 @@ var ( ) // Parse a comma separated API string to individual api's -func ParseApiString(apistr string, codec codec.Codec, xeth *xeth.XEth, eth *eth.Ethereum) ([]shared.EthereumApi, error) { +func ParseApiString(apistr string, codec codec.Codec, xeth *xeth.XEth, eth *eth.Ethereum, docRoot string) ([]shared.EthereumApi, error) { if len(strings.TrimSpace(apistr)) == 0 { return nil, fmt.Errorf("Empty apistr provided") } @@ -157,7 +164,7 @@ func ParseApiString(apistr string, codec codec.Codec, xeth *xeth.XEth, eth *eth. for i, name := range names { switch strings.ToLower(strings.TrimSpace(name)) { case shared.AdminApiName: - apis[i] = NewAdminApi(xeth, eth, codec) + apis[i] = NewAdminApi(xeth, eth, codec, docRoot) case shared.DebugApiName: apis[i] = NewDebugApi(xeth, eth, codec) case shared.DbApiName: diff --git a/rpc/jeth.go b/rpc/jeth.go index ae2603ae4..1260a3404 100644 --- a/rpc/jeth.go +++ b/rpc/jeth.go @@ -158,11 +158,11 @@ func (self *Jeth) askPassword(id interface{}, jsonrpc string, args []interface{} if len(args) >= 1 { if account, ok := args[0].(string); ok { fmt.Printf("Unlock account %s\n", account) - passwd, err = utils.PromptPassword("Passphrase: ", true) } else { return false } } + passwd, err = utils.PromptPassword("Passphrase: ", true) if err = self.client.Send(shared.NewRpcResponse(id, jsonrpc, passwd, err)); err != nil { glog.V(logger.Info).Infof("Unable to send user agent ask password response - %v\n", err) diff --git a/rpc/useragent/remote_frontend.go b/rpc/useragent/remote_frontend.go index 0dd4a6049..944ab287a 100644 --- a/rpc/useragent/remote_frontend.go +++ b/rpc/useragent/remote_frontend.go @@ -49,6 +49,31 @@ func (fe *RemoteFrontend) Enable() { fe.enabled = true } +func (fe *RemoteFrontend) AskPassword() (string, bool) { + if !fe.enabled { + return "", false + } + + err := fe.send(AskPasswordMethod) + if err != nil { + glog.V(logger.Error).Infof("Unable to send password request to agent - %v\n", err) + return "", false + } + + passwdRes, err := fe.recv() + if err != nil { + glog.V(logger.Error).Infof("Unable to recv password response from agent - %v\n", err) + return "", false + } + + if passwd, ok := passwdRes.Result.(string); ok { + return passwd, true + } + + return "", false + +} + // UnlockAccount asks the user agent for the user password and tries to unlock the account. // It will try 3 attempts before giving up. func (fe *RemoteFrontend) UnlockAccount(address []byte) bool { diff --git a/xeth/frontend.go b/xeth/frontend.go index e89282242..70d99ebc4 100644 --- a/xeth/frontend.go +++ b/xeth/frontend.go @@ -19,6 +19,9 @@ package xeth // Frontend should be implemented by users of XEth. Its methods are // called whenever XEth makes a decision that requires user input. type Frontend interface { + // AskPassword is called when a new account is created or updated + AskPassword() (string, bool) + // UnlockAccount is called when a transaction needs to be signed // but the key corresponding to the transaction's sender is // locked. @@ -40,5 +43,6 @@ type Frontend interface { // transactions but cannot not unlock any keys. type dummyFrontend struct{} +func (dummyFrontend) AskPassword() (string, bool) { return "", false } func (dummyFrontend) UnlockAccount([]byte) bool { return false } func (dummyFrontend) ConfirmTransaction(string) bool { return true } -- cgit v1.2.3 From 28c7b54d6860dbf03ca8a32c9d3989ec4019319c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 22 Oct 2015 13:09:30 +0300 Subject: core: fix #1921, decode all receipt field, not just consensus --- core/transaction_util.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/transaction_util.go b/core/transaction_util.go index 1a3681341..e2e5b9aee 100644 --- a/core/transaction_util.go +++ b/core/transaction_util.go @@ -124,13 +124,12 @@ func GetReceipt(db ethdb.Database, txHash common.Hash) *types.Receipt { if len(data) == 0 { return nil } - - var receipt types.Receipt + var receipt types.ReceiptForStorage err := rlp.DecodeBytes(data, &receipt) if err != nil { glog.V(logger.Core).Infoln("GetReceipt err:", err) } - return &receipt + return (*types.Receipt)(&receipt) } // GetBlockReceipts returns the receipts generated by the transactions -- cgit v1.2.3 From 3cf74336c99a8a0ee18291edd61be9c9587d3c6a Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 22 Oct 2015 22:22:04 +0200 Subject: eth: time out status message exchange after 5s --- eth/peer.go | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/eth/peer.go b/eth/peer.go index 68ce903a6..695e910f6 100644 --- a/eth/peer.go +++ b/eth/peer.go @@ -21,6 +21,7 @@ import ( "fmt" "math/big" "sync" + "time" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" @@ -38,8 +39,9 @@ var ( ) const ( - maxKnownTxs = 32768 // Maximum transactions hashes to keep in the known list (prevent DOS) - maxKnownBlocks = 1024 // Maximum block hashes to keep in the known list (prevent DOS) + maxKnownTxs = 32768 // Maximum transactions hashes to keep in the known list (prevent DOS) + maxKnownBlocks = 1024 // Maximum block hashes to keep in the known list (prevent DOS) + handshakeTimeout = 5 * time.Second ) type peer struct { @@ -267,8 +269,8 @@ func (p *peer) RequestReceipts(hashes []common.Hash) error { // Handshake executes the eth protocol handshake, negotiating version number, // network IDs, difficulties, head and genesis blocks. func (p *peer) Handshake(td *big.Int, head common.Hash, genesis common.Hash) error { - // Send out own handshake in a new thread - errc := make(chan error, 1) + errc := make(chan error, 2) + var status statusData // safe to read after two values have been received from errc go func() { errc <- p2p.Send(p.rw, StatusMsg, &statusData{ ProtocolVersion: uint32(p.version), @@ -278,7 +280,26 @@ func (p *peer) Handshake(td *big.Int, head common.Hash, genesis common.Hash) err GenesisBlock: genesis, }) }() - // In the mean time retrieve the remote status message + go func() { + errc <- p.readStatus(&status, genesis) + }() + timeout := time.NewTimer(handshakeTimeout) + defer timeout.Stop() + for i := 0; i < 2; i++ { + select { + case err := <-errc: + if err != nil { + return err + } + case <-timeout.C: + return p2p.DiscReadTimeout + } + } + p.td, p.head = status.TD, status.CurrentBlock + return nil +} + +func (p *peer) readStatus(status *statusData, genesis common.Hash) (err error) { msg, err := p.rw.ReadMsg() if err != nil { return err @@ -290,7 +311,6 @@ func (p *peer) Handshake(td *big.Int, head common.Hash, genesis common.Hash) err return errResp(ErrMsgTooLarge, "%v > %v", msg.Size, ProtocolMaxMsgSize) } // Decode the handshake and make sure everything matches - var status statusData if err := msg.Decode(&status); err != nil { return errResp(ErrDecode, "msg %v: %v", msg, err) } @@ -303,9 +323,7 @@ func (p *peer) Handshake(td *big.Int, head common.Hash, genesis common.Hash) err if int(status.ProtocolVersion) != p.version { return errResp(ErrProtocolVersionMismatch, "%d (!= %d)", status.ProtocolVersion, p.version) } - // Configure the remote peer, and sanity check out handshake too - p.td, p.head = status.TD, status.CurrentBlock - return <-errc + return nil } // String implements fmt.Stringer. -- cgit v1.2.3 From 145366c07e7a3a5a9021bd5c3fd6b1ed950d2680 Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Fri, 23 Oct 2015 14:25:18 +0200 Subject: tests: update JSON files, add new wrappers --- tests/block_test.go | 21 + .../files/BlockchainTests/bcBlockGasLimitTest.json | 56 +- tests/files/BlockchainTests/bcForkStressTest.json | 11573 +++++++++++++++++++ tests/files/BlockchainTests/bcGasPricerTest.json | 2101 ++-- .../files/BlockchainTests/bcInvalidHeaderTest.json | 346 +- tests/files/BlockchainTests/bcMultiChainTest.json | 3393 ++++++ tests/files/BlockchainTests/bcRPC_API_Test.json | 440 +- tests/files/BlockchainTests/bcStateTest.json | 390 + .../BlockchainTests/bcTotalDifficultyTest.json | 3578 ++++-- .../BlockchainTests/bcUncleHeaderValiditiy.json | 1023 +- tests/files/BlockchainTests/bcUncleTest.json | 1760 ++- tests/files/BlockchainTests/bcValidBlockTest.json | 991 +- .../files/StateTests/stCallCreateCallCodeTest.json | 10 +- tests/files/StateTests/stPreCompiledContracts.json | 73 +- tests/files/StateTests/stRefundTest.json | 74 +- tests/files/StateTests/stSpecialTest.json | 57 +- tests/files/StateTests/stSystemOperationsTest.json | 55 - .../files/VMTests/vmBitwiseLogicOperationTest.json | 180 +- tests/files/VMTests/vmBlockInfoTest.json | 36 +- tests/files/VMTests/vmEnvironmentalInfoTest.json | 156 +- tests/files/VMTests/vmIOandFlowOperationsTest.json | 49 +- tests/files/VMTests/vmLogTest.json | 138 +- tests/files/VMTests/vmPushDupSwapTest.json | 219 +- tests/files/VMTests/vmSha3Test.json | 54 +- tests/files/VMTests/vmSystemOperationsTest.json | 108 +- tests/files/VMTests/vmtests.json | 12 +- 26 files changed, 21947 insertions(+), 4946 deletions(-) create mode 100644 tests/files/BlockchainTests/bcForkStressTest.json create mode 100644 tests/files/BlockchainTests/bcMultiChainTest.json create mode 100644 tests/files/BlockchainTests/bcStateTest.json diff --git a/tests/block_test.go b/tests/block_test.go index 09fc8ebc9..827c5ed1d 100644 --- a/tests/block_test.go +++ b/tests/block_test.go @@ -77,6 +77,13 @@ func TestBcForkBlockTests(t *testing.T) { } } +func TestBcForkStress(t *testing.T) { + err := RunBlockTest(filepath.Join(blockTestDir, "bcForkStressTest.json"), BlockSkipTests) + if err != nil { + t.Fatal(err) + } +} + func TestBcTotalDifficulty(t *testing.T) { err := RunBlockTest(filepath.Join(blockTestDir, "bcTotalDifficultyTest.json"), BlockSkipTests) if err != nil { @@ -105,3 +112,17 @@ func TestBcRandom(t *testing.T) { t.Fatal(err) } } + +func TestBcMultiChain(t *testing.T) { + err := RunBlockTest(filepath.Join(blockTestDir, "bcMultiChainTest.json"), BlockSkipTests) + if err != nil { + t.Fatal(err) + } +} + +func TestBcState(t *testing.T) { + err := RunBlockTest(filepath.Join(blockTestDir, "bcStateTest.json"), BlockSkipTests) + if err != nil { + t.Fatal(err) + } +} diff --git a/tests/files/BlockchainTests/bcBlockGasLimitTest.json b/tests/files/BlockchainTests/bcBlockGasLimitTest.json index 117f089cf..4ef4c4fd8 100644 --- a/tests/files/BlockchainTests/bcBlockGasLimitTest.json +++ b/tests/files/BlockchainTests/bcBlockGasLimitTest.json @@ -9,18 +9,18 @@ "extraData" : "0x", "gasLimit" : "0x023ec6", "gasUsed" : "0x021536", - "hash" : "b89122823ece63f2ae6d25f6f8ace8c7b25f25338b0fd9296f2d9fd03a53dbb2", - "mixHash" : "282ddf505acb611fd31179bee1437d6cecf655f7c5b6c1540a086453224b5c0b", - "nonce" : "c708b719201c51ea", + "hash" : "e433cd38b3d31279392499dd9e4c4969afe85d52a2bf1c3f728e787526d20b57", + "mixHash" : "cf4ed8d7669d68dc3662bacaf5420eff1dba962056d1268a84b592851802a11f", + "nonce" : "99ac9fa654859890", "number" : "0x01", - "parentHash" : "021389994901f2912b3ffb4ed13db367bbaf4b27de5ff2f135710f0efd4f1ba1", + "parentHash" : "502a4f910dd14c9167d304f1e20a3587085b310a2c01ea7e9670c228edbeb11e", "receiptTrie" : "5c5b4fc43c2d45787f54e1ae7d27afdb4ad16dfc567c5692070d5c4556e0b1d7", "stateRoot" : "a65c2364cd0f1542d761823dc0109c6b072f14c20459598c5455c274601438f4", - "timestamp" : "0x55b7e373", + "timestamp" : "0x561bc63a", "transactionsTrie" : "70616ebd7ad2ed6fb7860cf7e9df00163842351c38a87cac2c1cb193895035a2", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf904a8f901faa0021389994901f2912b3ffb4ed13db367bbaf4b27de5ff2f135710f0efd4f1ba1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a65c2364cd0f1542d761823dc0109c6b072f14c20459598c5455c274601438f4a070616ebd7ad2ed6fb7860cf7e9df00163842351c38a87cac2c1cb193895035a2a05c5b4fc43c2d45787f54e1ae7d27afdb4ad16dfc567c5692070d5c4556e0b1d7b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000183023ec6830215368455b7e37380a0282ddf505acb611fd31179bee1437d6cecf655f7c5b6c1540a086453224b5c0b88c708b719201c51eaf902a7f85f800a8255f094aaaf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ca0575da4e21b66fa764be5f74da9389e67693d066fb0d1312e19e17e501da00ecda06baf5a5327595f6619dfc2fcb3f2e6fb410b5810af3cb52d0e7508038e91a188f85f010a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ba04fa966bf34b93abc1bcd665554b7f316b50f928477b50be0f3285ead29d18c5ba017bba0eeec1625ab433746955e125d46d80b7fdc97386c51266f842d8e02192ef85f020a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ca004377418ae981cc32b1312b4a427a1d69a821b28db8584f5f2bd8c6d42458adaa053a1dba1af177fac92f3b6af0a9fa46a22adf56e686c93794b6a012bf254abf5f85f030a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ca04fe13febd28a05f4fcb2f451d7ddc2dda56486d9f8c79a62b0ba4da775122615a0651b2382dd402df9ebc27f8cb4b2e0f3cea68dda2dca0ee9603608f0b6f51668f85f040a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ba078e6a0ba086a08f8450e208a399bb2f2d2a0d984acd2517c7c7df66ccfab567da013254002cd45a97fac049ae00afbc43ed0d9961d0c56a3b2382c80ce41c198ddf85f050a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ba0a7174d8f43ea71c8e3ca9477691add8d80ac8e0ed89d8d8b572041eef81f4a54a0534ea2e28ec4da3b5b944b18c51ec84a5cf35f5b3343c5fb86521fd2d388f506f85f060a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ba034bd04065833536a10c77ee2a43a5371bc6d34837088b861dd9d4b7f44074b59a078807715786a13876d3455716a6b9cb2186b7a4887a5c31160fc877454958616c0", + "rlp" : "0xf904a8f901faa0502a4f910dd14c9167d304f1e20a3587085b310a2c01ea7e9670c228edbeb11ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a65c2364cd0f1542d761823dc0109c6b072f14c20459598c5455c274601438f4a070616ebd7ad2ed6fb7860cf7e9df00163842351c38a87cac2c1cb193895035a2a05c5b4fc43c2d45787f54e1ae7d27afdb4ad16dfc567c5692070d5c4556e0b1d7b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000183023ec68302153684561bc63a80a0cf4ed8d7669d68dc3662bacaf5420eff1dba962056d1268a84b592851802a11f8899ac9fa654859890f902a7f85f800a8255f094aaaf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ca0575da4e21b66fa764be5f74da9389e67693d066fb0d1312e19e17e501da00ecda06baf5a5327595f6619dfc2fcb3f2e6fb410b5810af3cb52d0e7508038e91a188f85f010a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ba04fa966bf34b93abc1bcd665554b7f316b50f928477b50be0f3285ead29d18c5ba017bba0eeec1625ab433746955e125d46d80b7fdc97386c51266f842d8e02192ef85f020a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ca004377418ae981cc32b1312b4a427a1d69a821b28db8584f5f2bd8c6d42458adaa053a1dba1af177fac92f3b6af0a9fa46a22adf56e686c93794b6a012bf254abf5f85f030a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ca04fe13febd28a05f4fcb2f451d7ddc2dda56486d9f8c79a62b0ba4da775122615a0651b2382dd402df9ebc27f8cb4b2e0f3cea68dda2dca0ee9603608f0b6f51668f85f040a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ba078e6a0ba086a08f8450e208a399bb2f2d2a0d984acd2517c7c7df66ccfab567da013254002cd45a97fac049ae00afbc43ed0d9961d0c56a3b2382c80ce41c198ddf85f050a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ba0a7174d8f43ea71c8e3ca9477691add8d80ac8e0ed89d8d8b572041eef81f4a54a0534ea2e28ec4da3b5b944b18c51ec84a5cf35f5b3343c5fb86521fd2d388f506f85f060a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ba034bd04065833536a10c77ee2a43a5371bc6d34837088b861dd9d4b7f44074b59a078807715786a13876d3455716a6b9cb2186b7a4887a5c31160fc877454958616c0", "transactions" : [ { "data" : "0x", @@ -111,9 +111,9 @@ "extraData" : "0x42", "gasLimit" : "0x023e38", "gasUsed" : "0x00", - "hash" : "021389994901f2912b3ffb4ed13db367bbaf4b27de5ff2f135710f0efd4f1ba1", - "mixHash" : "f39921d8c240e71f5394c45564e1ef05dc5398fc3fe53c4e6848e8cfca1b3512", - "nonce" : "ddc2c65384622c0d", + "hash" : "502a4f910dd14c9167d304f1e20a3587085b310a2c01ea7e9670c228edbeb11e", + "mixHash" : "e22e898463379d46e98deeb6fe2cdda27f6fdc6f4b42838302dd0b4891282012", + "nonce" : "99f1fc570eb39f57", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -122,8 +122,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0af81e09f8c46ca322193edfda764fa7e88e81923f802f1d325ec0b0308ac2cd0a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200008083023e38808454c98c8142a0f39921d8c240e71f5394c45564e1ef05dc5398fc3fe53c4e6848e8cfca1b351288ddc2c65384622c0dc0c0", - "lastblockhash" : "b89122823ece63f2ae6d25f6f8ace8c7b25f25338b0fd9296f2d9fd03a53dbb2", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0af81e09f8c46ca322193edfda764fa7e88e81923f802f1d325ec0b0308ac2cd0a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200008083023e38808454c98c8142a0e22e898463379d46e98deeb6fe2cdda27f6fdc6f4b42838302dd0b48912820128899f1fc570eb39f57c0c0", + "lastblockhash" : "e433cd38b3d31279392499dd9e4c4969afe85d52a2bf1c3f728e787526d20b57", "postState" : { "8888f1f195afa192cfee860698584c030f4c9db1" : { "balance" : "0x456391824508d41c", @@ -167,7 +167,7 @@ "GasUsedHigherThanBlockGasLimitButNotWithRefundsSuicideLast" : { "blocks" : [ { - "rlp" : "0xf904a8f901faa0520a9ccfaff2c22c79353ab1cb9a9da36d711c0adae98f290bc4fd0074954494a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a001302fffb8d883bc90239b365b1a3ab589fdb5027eb611dc76ad1c80d0617088a04f808a207db7e3d77f93191e5b51533ee9c6b6ec143d99ef869de4d74ca70d46a0078d3e92ea6a94eddfbbce62275dda41f0321c91dc39ab4356eb00b7ae053c84b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000183023ec68301ec308455b7e37680a0735776e7b1f3effe85c6961daf260c17f2f855bf6a777851cd00ff5662d9cb7188c250504e8e1a136bf902a7f85f800a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ba01117bd549fe17f8383012bf168dabd9e70851fdf2f332e5bfea89318dddd6c77a001364d3a0e23f462052127c53a5473c428e2211806c927601562f840eb6b899cf85f010a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ba04fa966bf34b93abc1bcd665554b7f316b50f928477b50be0f3285ead29d18c5ba017bba0eeec1625ab433746955e125d46d80b7fdc97386c51266f842d8e02192ef85f020a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ca004377418ae981cc32b1312b4a427a1d69a821b28db8584f5f2bd8c6d42458adaa053a1dba1af177fac92f3b6af0a9fa46a22adf56e686c93794b6a012bf254abf5f85f030a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ca04fe13febd28a05f4fcb2f451d7ddc2dda56486d9f8c79a62b0ba4da775122615a0651b2382dd402df9ebc27f8cb4b2e0f3cea68dda2dca0ee9603608f0b6f51668f85f040a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ba078e6a0ba086a08f8450e208a399bb2f2d2a0d984acd2517c7c7df66ccfab567da013254002cd45a97fac049ae00afbc43ed0d9961d0c56a3b2382c80ce41c198ddf85f050a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ba0a7174d8f43ea71c8e3ca9477691add8d80ac8e0ed89d8d8b572041eef81f4a54a0534ea2e28ec4da3b5b944b18c51ec84a5cf35f5b3343c5fb86521fd2d388f506f85f060a8255f094aaaf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ca0c40c1300a7cc64b842c9421a6c6e985b5531020d1a26c82f9c6a5200154e91dfa052c28fc6dc0dad9ea23fcce6510a9dc23b9903b1b19a126ac25f77a195b50f83c0" + "rlp" : "0xf904a8f901faa0a88789a0ebcf96c1a73705b60cfe4ed947855ffe669f3f9d4366403dd58ed17aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a65c2364cd0f1542d761823dc0109c6b072f14c20459598c5455c274601438f4a039b55901ee38a65fa27c7d60137fd431afcf6a7615746ae9501e7cf0ca68bd11a0b19fdedc6b45294e091f08780e0e51b746e43897ab98eaf872d180e0cb157cceb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000183023dd48302153684561bc63d80a0eb5133a15a92e24f07d494e4a1cbc72e9a3d8fa5cadcb6149f406c89fb2c3bfe88ea027ba286f8d5b2f902a7f85f800a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ba01117bd549fe17f8383012bf168dabd9e70851fdf2f332e5bfea89318dddd6c77a001364d3a0e23f462052127c53a5473c428e2211806c927601562f840eb6b899cf85f010a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ba04fa966bf34b93abc1bcd665554b7f316b50f928477b50be0f3285ead29d18c5ba017bba0eeec1625ab433746955e125d46d80b7fdc97386c51266f842d8e02192ef85f020a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ca004377418ae981cc32b1312b4a427a1d69a821b28db8584f5f2bd8c6d42458adaa053a1dba1af177fac92f3b6af0a9fa46a22adf56e686c93794b6a012bf254abf5f85f030a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ca04fe13febd28a05f4fcb2f451d7ddc2dda56486d9f8c79a62b0ba4da775122615a0651b2382dd402df9ebc27f8cb4b2e0f3cea68dda2dca0ee9603608f0b6f51668f85f040a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ba078e6a0ba086a08f8450e208a399bb2f2d2a0d984acd2517c7c7df66ccfab567da013254002cd45a97fac049ae00afbc43ed0d9961d0c56a3b2382c80ce41c198ddf85f050a82520894bbbf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ba0a7174d8f43ea71c8e3ca9477691add8d80ac8e0ed89d8d8b572041eef81f4a54a0534ea2e28ec4da3b5b944b18c51ec84a5cf35f5b3343c5fb86521fd2d388f506f85f060a8255f094aaaf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ca0c40c1300a7cc64b842c9421a6c6e985b5531020d1a26c82f9c6a5200154e91dfa052c28fc6dc0dad9ea23fcce6510a9dc23b9903b1b19a126ac25f77a195b50f83c0" } ], "genesisBlockHeader" : { @@ -177,9 +177,9 @@ "extraData" : "0x42", "gasLimit" : "0x023e38", "gasUsed" : "0x00", - "hash" : "520a9ccfaff2c22c79353ab1cb9a9da36d711c0adae98f290bc4fd0074954494", - "mixHash" : "2fb99645a1aa227eed518edceffb67dc435f1a5d2248373cc9d1108519a692dc", - "nonce" : "eef57c2f698a780f", + "hash" : "a88789a0ebcf96c1a73705b60cfe4ed947855ffe669f3f9d4366403dd58ed17a", + "mixHash" : "5e365a8d2f4c91e9d67a88b440da630433fc08b484e89e32b01771cd8b7f85c9", + "nonce" : "3f12cb80e372f8b4", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -188,8 +188,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0af81e09f8c46ca322193edfda764fa7e88e81923f802f1d325ec0b0308ac2cd0a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200008083023e38808454c98c8142a02fb99645a1aa227eed518edceffb67dc435f1a5d2248373cc9d1108519a692dc88eef57c2f698a780fc0c0", - "lastblockhash" : "520a9ccfaff2c22c79353ab1cb9a9da36d711c0adae98f290bc4fd0074954494", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0af81e09f8c46ca322193edfda764fa7e88e81923f802f1d325ec0b0308ac2cd0a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200008083023e38808454c98c8142a05e365a8d2f4c91e9d67a88b440da630433fc08b484e89e32b01771cd8b7f85c9883f12cb80e372f8b4c0c0", + "lastblockhash" : "a88789a0ebcf96c1a73705b60cfe4ed947855ffe669f3f9d4366403dd58ed17a", "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "0x4a723dc6b40b8a9a000000", @@ -233,18 +233,18 @@ "extraData" : "0x", "gasLimit" : "0x01e8c1", "gasUsed" : "0x2906", - "hash" : "ce2d5abc315035161f60d7890f594b5bc1437e61b6bca7f2d1e5a51c3fece3be", - "mixHash" : "6e763bfab1cda2ddb8a24b7b43352f932080495a4f3a53bbe4ad1f0df8841994", - "nonce" : "d0543f12b58effd6", + "hash" : "d2263099eaafae9d7f4dcbd94d70d87a2584458a2255720379f4c72873feeee6", + "mixHash" : "4905ceb4acb4d5f6f205b0205f7c95d343f5be46001505d738508d0cc7cc86ba", + "nonce" : "4e1a3c143f09f0d2", "number" : "0x01", - "parentHash" : "4a75149e416adaceed8c2a77a691f28c26e2667891a60b23facf81518433986f", + "parentHash" : "5da0c900a0fb0958f01c630526a773c426ec8e49a0317af49251a8fc41971bf2", "receiptTrie" : "bc1ca7335ccb32ac45ecd0ef287eb7f2323801a695f23a3d241e6a2cf0b4a9af", "stateRoot" : "00a62f7cedb73f6ce84dc4e27a983adf20bb45553b11d1bb11b5f18fe450542d", - "timestamp" : "0x55b7e379", + "timestamp" : "0x561bc63f", "transactionsTrie" : "f0162cdb94cda8b79bf634c6093931008a12d1e4922821a992e34511b83ed0d5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a04a75149e416adaceed8c2a77a691f28c26e2667891a60b23facf81518433986fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a000a62f7cedb73f6ce84dc4e27a983adf20bb45553b11d1bb11b5f18fe450542da0f0162cdb94cda8b79bf634c6093931008a12d1e4922821a992e34511b83ed0d5a0bc1ca7335ccb32ac45ecd0ef287eb7f2323801a695f23a3d241e6a2cf0b4a9afb901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018301e8c18229068455b7e37980a06e763bfab1cda2ddb8a24b7b43352f932080495a4f3a53bbe4ad1f0df884199488d0543f12b58effd6f862f860800a830186a094aaaf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ba0444ed2cb67c1cce2c37add4bef48d3dda9ef05e28eaf023006036a4c5f7c96b0a00c56b07bfc50471d458e67923c91108b90cb7bba23f4d373f0a75632a413bd84c0", + "rlp" : "0xf90261f901f9a05da0c900a0fb0958f01c630526a773c426ec8e49a0317af49251a8fc41971bf2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a000a62f7cedb73f6ce84dc4e27a983adf20bb45553b11d1bb11b5f18fe450542da0f0162cdb94cda8b79bf634c6093931008a12d1e4922821a992e34511b83ed0d5a0bc1ca7335ccb32ac45ecd0ef287eb7f2323801a695f23a3d241e6a2cf0b4a9afb901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018301e8c182290684561bc63f80a04905ceb4acb4d5f6f205b0205f7c95d343f5be46001505d738508d0cc7cc86ba884e1a3c143f09f0d2f862f860800a830186a094aaaf5374fce5edbc8e2a8697c15331677e6ebf0b0a801ba0444ed2cb67c1cce2c37add4bef48d3dda9ef05e28eaf023006036a4c5f7c96b0a00c56b07bfc50471d458e67923c91108b90cb7bba23f4d373f0a75632a413bd84c0", "transactions" : [ { "data" : "0x", @@ -269,9 +269,9 @@ "extraData" : "0x42", "gasLimit" : "0x01e848", "gasUsed" : "0x00", - "hash" : "4a75149e416adaceed8c2a77a691f28c26e2667891a60b23facf81518433986f", - "mixHash" : "d900953346fa885c08a4f2f37709c29ab5bcfd468e8c0a456bd0b1b0f4a0a2b9", - "nonce" : "81b563460e47f2a4", + "hash" : "5da0c900a0fb0958f01c630526a773c426ec8e49a0317af49251a8fc41971bf2", + "mixHash" : "ee942ca5af3fecd8e5b9fc741d1f01db0f59159124d4808abea087bc1f90bb73", + "nonce" : "73e16454e5ece703", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -280,8 +280,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0af81e09f8c46ca322193edfda764fa7e88e81923f802f1d325ec0b0308ac2cd0a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808301e848808454c98c8142a0d900953346fa885c08a4f2f37709c29ab5bcfd468e8c0a456bd0b1b0f4a0a2b98881b563460e47f2a4c0c0", - "lastblockhash" : "ce2d5abc315035161f60d7890f594b5bc1437e61b6bca7f2d1e5a51c3fece3be", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0af81e09f8c46ca322193edfda764fa7e88e81923f802f1d325ec0b0308ac2cd0a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808301e848808454c98c8142a0ee942ca5af3fecd8e5b9fc741d1f01db0f59159124d4808abea087bc1f90bb738873e16454e5ece703c0c0", + "lastblockhash" : "d2263099eaafae9d7f4dcbd94d70d87a2584458a2255720379f4c72873feeee6", "postState" : { "8888f1f195afa192cfee860698584c030f4c9db1" : { "balance" : "0x4563918244f59a3c", diff --git a/tests/files/BlockchainTests/bcForkStressTest.json b/tests/files/BlockchainTests/bcForkStressTest.json new file mode 100644 index 000000000..1a0252441 --- /dev/null +++ b/tests/files/BlockchainTests/bcForkStressTest.json @@ -0,0 +1,11573 @@ +{ + "ForkStressTest" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "b9f4766249f6870a7c3307b6c330b319fb5775e4c57378f0174c90edeb0d65b7", + "mixHash" : "1e9afdb882b3f03f95e7388b45e149f960b1fcd4e07dd505d47b4bc814138b9e", + "nonce" : "cbf0a8f1662aea46", + "number" : "0x01", + "parentHash" : "358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bd", + "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", + "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", + "timestamp" : "0x561bbe18", + "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bbe1880a01e9afdb882b3f03f95e7388b45e149f960b1fcd4e07dd505d47b4bc814138b9e88cbf0a8f1662aea46f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x77c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8", + "s" : "0x3f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "db2a80256ce76a302a5b5566d3e751a854bb62f62ee492295ae334049cef8714", + "mixHash" : "59d630bc1f3ddf121c3bd4dee70c3072473eef1c17be773c5649af1b7c4483e6", + "nonce" : "8244efd130b1da52", + "number" : "0x02", + "parentHash" : "b9f4766249f6870a7c3307b6c330b319fb5775e4c57378f0174c90edeb0d65b7", + "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", + "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", + "timestamp" : "0x561bbe1a", + "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "A", + "rlp" : "0xf90260f901f9a0b9f4766249f6870a7c3307b6c330b319fb5775e4c57378f0174c90edeb0d65b7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bbe1a80a059d630bc1f3ddf121c3bd4dee70c3072473eef1c17be773c5649af1b7c4483e6888244efd130b1da52f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x33c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f23", + "s" : "0x1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cf", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "cfea881ce194d53c564c0abfde1638a9ca0d1463b64868fa9426ebaa220d0701", + "mixHash" : "4176bf67c70a6f09420347b29cd98ef191dc95118ce0f8b58f39897c9df311b8", + "nonce" : "3e555fd531073fc5", + "number" : "0x03", + "parentHash" : "db2a80256ce76a302a5b5566d3e751a854bb62f62ee492295ae334049cef8714", + "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", + "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", + "timestamp" : "0x561bbe1c", + "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0db2a80256ce76a302a5b5566d3e751a854bb62f62ee492295ae334049cef8714a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bbe1c80a04176bf67c70a6f09420347b29cd98ef191dc95118ce0f8b58f39897c9df311b8883e555fd531073fc5f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x15eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0ee", + "s" : "0x5d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "7d7c528362fbd9541750ffc8e942e689f03b435668df4bc15094fe95a831432d", + "mixHash" : "260251cd48d12da3972aa3dd73bfea90626b67b86106b1a6646dfdff349627c1", + "nonce" : "180daeb05b30891d", + "number" : "0x04", + "parentHash" : "cfea881ce194d53c564c0abfde1638a9ca0d1463b64868fa9426ebaa220d0701", + "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", + "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", + "timestamp" : "0x561bbe1e", + "transactionsTrie" : "9735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0cfea881ce194d53c564c0abfde1638a9ca0d1463b64868fa9426ebaa220d0701a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bbe1e80a0260251cd48d12da3972aa3dd73bfea90626b67b86106b1a6646dfdff349627c188180daeb05b30891df862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0xa7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840d", + "s" : "0x2078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f938d63395f1d0d397c460e8d4bc21b53b5e67ef92eac3a2c44471e634523ba0", + "mixHash" : "cb129830fe74b237b43dff290216091acb759c417dd1110cc536ed9ed95b3e7d", + "nonce" : "252655cad8a925f7", + "number" : "0x05", + "parentHash" : "7d7c528362fbd9541750ffc8e942e689f03b435668df4bc15094fe95a831432d", + "receiptTrie" : "e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9", + "stateRoot" : "72f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19", + "timestamp" : "0x561bbe1f", + "transactionsTrie" : "7e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "5", + "chainname" : "A", + "rlp" : "0xf90261f901f9a07d7c528362fbd9541750ffc8e942e689f03b435668df4bc15094fe95a831432da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a07e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bbe1f80a0cb129830fe74b237b43dff290216091acb759c417dd1110cc536ed9ed95b3e7d88252655cad8a925f7f862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29a0796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0xce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29", + "s" : "0x796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "2d66808ca33b2f273f7f8a944dc172bbdbd21450afc3ac21405e89c19d303b19", + "mixHash" : "520c5b04a7003589f1de121021ad13a831ae5fc284adfb08fbc632833ad4e533", + "nonce" : "4b90a27a1df6a8d8", + "number" : "0x06", + "parentHash" : "f938d63395f1d0d397c460e8d4bc21b53b5e67ef92eac3a2c44471e634523ba0", + "receiptTrie" : "849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01f", + "stateRoot" : "4fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640", + "timestamp" : "0x561bbe22", + "transactionsTrie" : "72e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fd", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0f938d63395f1d0d397c460e8d4bc21b53b5e67ef92eac3a2c44471e634523ba0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640a072e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fda0849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882520884561bbe2280a0520c5b04a7003589f1de121021ad13a831ae5fc284adfb08fbc632833ad4e533884b90a27a1df6a8d8f862f86005018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0b6a4064ef7d23f0e149472d6f1257055149840b6c73a4ae25e595b9f9fc78edca004ad52e8157ae742b551851d58fd6c3919cd7e5a0a9c6685d5bc630a657dcde7c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0xb6a4064ef7d23f0e149472d6f1257055149840b6c73a4ae25e595b9f9fc78edc", + "s" : "0x04ad52e8157ae742b551851d58fd6c3919cd7e5a0a9c6685d5bc630a657dcde7", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020180", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "a53ba0680981774c61463cd54e72de791e42121cc238721f6b2dab0fae094870", + "mixHash" : "3ee925be30ef56d4af7d8bd1435016d235e3cea03672047ed84d4436f24fd016", + "nonce" : "67019c432a587a88", + "number" : "0x07", + "parentHash" : "2d66808ca33b2f273f7f8a944dc172bbdbd21450afc3ac21405e89c19d303b19", + "receiptTrie" : "fa86f16d802244d9cf1a7355bf1ef7c68bebca8b427bea750813b7c091dc0ff2", + "stateRoot" : "8dfc8c0329a0aef2bde5023d5aa2067e965b50d9527bc91733f45aa0cf0c2a1d", + "timestamp" : "0x561bbe24", + "transactionsTrie" : "b599d73bc0f69c32741df069fac99e6a88ec762035157a4da4e56988ca234691", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "7", + "chainname" : "A", + "rlp" : "0xf90261f901f9a02d66808ca33b2f273f7f8a944dc172bbdbd21450afc3ac21405e89c19d303b19a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08dfc8c0329a0aef2bde5023d5aa2067e965b50d9527bc91733f45aa0cf0c2a1da0b599d73bc0f69c32741df069fac99e6a88ec762035157a4da4e56988ca234691a0fa86f16d802244d9cf1a7355bf1ef7c68bebca8b427bea750813b7c091dc0ff2b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882520884561bbe2480a03ee925be30ef56d4af7d8bd1435016d235e3cea03672047ed84d4436f24fd0168867019c432a587a88f862f86006018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba06e5cde32123fa42eeaa27497d538e8fd35c60eda30ead6c296750d3dfcc6d748a01926babbf8c4fef9eb45fe0d532cc30683a16b3415084a9043b27f513057014bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x06", + "r" : "0x6e5cde32123fa42eeaa27497d538e8fd35c60eda30ead6c296750d3dfcc6d748", + "s" : "0x1926babbf8c4fef9eb45fe0d532cc30683a16b3415084a9043b27f513057014b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0201c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "46d9f2dea3b213ddfc645c8b827ca6a74bde0054b76e5dc1070c60bba9a93d98", + "mixHash" : "3973fff10746a4a34ffe1231ed5dbb3fa8a165939bdfdafa8b5b521492a9c3c7", + "nonce" : "c2abd0d3de7f9b42", + "number" : "0x08", + "parentHash" : "a53ba0680981774c61463cd54e72de791e42121cc238721f6b2dab0fae094870", + "receiptTrie" : "129e8dcd3e2880de0795a0472065a402520bd37918c6d9a60d64854e300cf7dd", + "stateRoot" : "a62f540ccf204f049e5c7bbae8f4f73ea5817c37a1764812cbf120a87f5b4225", + "timestamp" : "0x561bbe26", + "transactionsTrie" : "7b01349f6ec832de83c289f71dfd836e9af6031c5b9b0935d4445c5449237b1a", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "8", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0a53ba0680981774c61463cd54e72de791e42121cc238721f6b2dab0fae094870a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a62f540ccf204f049e5c7bbae8f4f73ea5817c37a1764812cbf120a87f5b4225a07b01349f6ec832de83c289f71dfd836e9af6031c5b9b0935d4445c5449237b1aa0129e8dcd3e2880de0795a0472065a402520bd37918c6d9a60d64854e300cf7ddb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd882520884561bbe2680a03973fff10746a4a34ffe1231ed5dbb3fa8a165939bdfdafa8b5b521492a9c3c788c2abd0d3de7f9b42f862f86007018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca03ffd5dfb58490a6b7491f045acbe6930d2e7d1a636ac08e9f6b071c62f36b6f4a0069907c3301954e812fd2936731ca1dd2c07e362c050ffc3554c76acc11c2fa3c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x07", + "r" : "0x3ffd5dfb58490a6b7491f045acbe6930d2e7d1a636ac08e9f6b071c62f36b6f4", + "s" : "0x069907c3301954e812fd2936731ca1dd2c07e362c050ffc3554c76acc11c2fa3", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020200", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f7af49a261d3a45e75c970535f6e5dfa4764139e8f23e7e5359d4a9294d72ba7", + "mixHash" : "370886d3f7e3773590f565a79212d74826a803928bb91e3c6d174ab3ad59b45c", + "nonce" : "c6c83d04e1aeceb5", + "number" : "0x09", + "parentHash" : "46d9f2dea3b213ddfc645c8b827ca6a74bde0054b76e5dc1070c60bba9a93d98", + "receiptTrie" : "353f8e1730a3aa56c6853787c65fa09bff030cfc624de2637535a039285a9966", + "stateRoot" : "16671b78846a5ee341404f6bef367f9303c179870635f2e88709e6f788945ce0", + "timestamp" : "0x561bbe28", + "transactionsTrie" : "ab929a0fb5e6103a254e439ce0eb9275f55ae2b9f7f87292632fcae71dda99b9", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "9", + "chainname" : "A", + "rlp" : "0xf90261f901f9a046d9f2dea3b213ddfc645c8b827ca6a74bde0054b76e5dc1070c60bba9a93d98a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a016671b78846a5ee341404f6bef367f9303c179870635f2e88709e6f788945ce0a0ab929a0fb5e6103a254e439ce0eb9275f55ae2b9f7f87292632fcae71dda99b9a0353f8e1730a3aa56c6853787c65fa09bff030cfc624de2637535a039285a9966b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd882520884561bbe2880a0370886d3f7e3773590f565a79212d74826a803928bb91e3c6d174ab3ad59b45c88c6c83d04e1aeceb5f862f86008018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0820dd7609f5a6df98cd89c1b2340a276c142984b2464b7c5bc367f618248f794a00bd364a543b498adf4d98d712c9f739448be1e3126837cd2ec21eb610fd9df8dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x08", + "r" : "0x820dd7609f5a6df98cd89c1b2340a276c142984b2464b7c5bc367f618248f794", + "s" : "0x0bd364a543b498adf4d98d712c9f739448be1e3126837cd2ec21eb610fd9df8d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020240", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "da4fe259a69e7986f526e99a9c3126fc13b24579dc009d0122dde3138eb0aabc", + "mixHash" : "83b99dcfbea4100ef5a976eb87109058b5e4160c38d7504711bf288cadf0c07b", + "nonce" : "f3c0eaeab4e5c070", + "number" : "0x0a", + "parentHash" : "f7af49a261d3a45e75c970535f6e5dfa4764139e8f23e7e5359d4a9294d72ba7", + "receiptTrie" : "fcea8134fdac40836fe45b83f1799e85ddf4b10627a61b070ce0ad352cfb0b16", + "stateRoot" : "439f2265357c9cb4f62e88581320a46051098d1f5c3ca84f353fdf7144f015d5", + "timestamp" : "0x561bbe2a", + "transactionsTrie" : "10d442b3d14b5e5f43c50d8417aaa0cdc45ab1ec368392232646d1a240d9faa5", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "10", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0f7af49a261d3a45e75c970535f6e5dfa4764139e8f23e7e5359d4a9294d72ba7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0439f2265357c9cb4f62e88581320a46051098d1f5c3ca84f353fdf7144f015d5a010d442b3d14b5e5f43c50d8417aaa0cdc45ab1ec368392232646d1a240d9faa5a0fcea8134fdac40836fe45b83f1799e85ddf4b10627a61b070ce0ad352cfb0b16b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd882520884561bbe2a80a083b99dcfbea4100ef5a976eb87109058b5e4160c38d7504711bf288cadf0c07b88f3c0eaeab4e5c070f862f86009018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0187763a1aaa0f00bb652790661c06809cc77709fedc88f2b674d5f15bec36315a039ca18b1afd3e7b36b9873c6316c998bc760248299db831d3e1fc596ee53281fc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x09", + "r" : "0x187763a1aaa0f00bb652790661c06809cc77709fedc88f2b674d5f15bec36315", + "s" : "0x39ca18b1afd3e7b36b9873c6316c998bc760248299db831d3e1fc596ee53281f", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020280", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "1ae5d15438e2fc38da6ab3bf677f3b7965a2f083740588760d95cba106cf01d4", + "mixHash" : "63c0148ea9c98dfb400d73772831139b6a42c298d81ec60fe32cfe7cb16ffa06", + "nonce" : "3b131c2d625ef072", + "number" : "0x0b", + "parentHash" : "da4fe259a69e7986f526e99a9c3126fc13b24579dc009d0122dde3138eb0aabc", + "receiptTrie" : "9b83492cdbe8ab436a3ff3576e2e158ff5d6eea7b01797267da097cb393b7bbb", + "stateRoot" : "aa4df38c69945476a013d848533328b19d6f8433ce7b1182fc325502435071f1", + "timestamp" : "0x561bbe2c", + "transactionsTrie" : "5dd0ecc0d4a2f1a59afcbc6119cfc096cfe3ea319de027fe692e853fd9b2ebb7", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "11", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0da4fe259a69e7986f526e99a9c3126fc13b24579dc009d0122dde3138eb0aabca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0aa4df38c69945476a013d848533328b19d6f8433ce7b1182fc325502435071f1a05dd0ecc0d4a2f1a59afcbc6119cfc096cfe3ea319de027fe692e853fd9b2ebb7a09b83492cdbe8ab436a3ff3576e2e158ff5d6eea7b01797267da097cb393b7bbbb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202800b832fefd882520884561bbe2c80a063c0148ea9c98dfb400d73772831139b6a42c298d81ec60fe32cfe7cb16ffa06883b131c2d625ef072f862f8600a018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba02f254889f1435bba7a1b61fdafd6ff47c1612a192a50a47b7c04afe88341092ba0561030ec80cdfde708d6be835dd248aa553d108c3421eec1b8c0449b685998b1c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0a", + "r" : "0x2f254889f1435bba7a1b61fdafd6ff47c1612a192a50a47b7c04afe88341092b", + "s" : "0x561030ec80cdfde708d6be835dd248aa553d108c3421eec1b8c0449b685998b1", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0202c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "fef1b122dc1d4aea76dca13c6af262b983be18f179548febe24a5f4a3da12442", + "mixHash" : "7e2a23b81f779aaeedc42f4daa2f6ea95095385265568b10600e84c3fee9b1dc", + "nonce" : "13231eec2b9f697e", + "number" : "0x0c", + "parentHash" : "1ae5d15438e2fc38da6ab3bf677f3b7965a2f083740588760d95cba106cf01d4", + "receiptTrie" : "7a13fd259fb845b81806a84c7169057e5b7747fc6f3933922f9902f0f5323e1e", + "stateRoot" : "f44a8bfa0a288e3ae918e35ee8e75bd435f9d7dd3cfdc516f5bcd14cd40be008", + "timestamp" : "0x561bbe2d", + "transactionsTrie" : "30ab6abd3878f13dd91c6f6b2ca30ec18fde5795a5a0902ea1bf817e50d72c34", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "12", + "chainname" : "A", + "rlp" : "0xf90261f901f9a01ae5d15438e2fc38da6ab3bf677f3b7965a2f083740588760d95cba106cf01d4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f44a8bfa0a288e3ae918e35ee8e75bd435f9d7dd3cfdc516f5bcd14cd40be008a030ab6abd3878f13dd91c6f6b2ca30ec18fde5795a5a0902ea1bf817e50d72c34a07a13fd259fb845b81806a84c7169057e5b7747fc6f3933922f9902f0f5323e1eb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202c00c832fefd882520884561bbe2d80a07e2a23b81f779aaeedc42f4daa2f6ea95095385265568b10600e84c3fee9b1dc8813231eec2b9f697ef862f8600b018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca07f4078501f3d03c3dd684f88c87afdd5520314ce606534ab1849c08a02f40731a00b9bef0fea773593ca9e8c83c2f42133ff6a8706beed081077970b0c68918388c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0b", + "r" : "0x7f4078501f3d03c3dd684f88c87afdd5520314ce606534ab1849c08a02f40731", + "s" : "0x0b9bef0fea773593ca9e8c83c2f42133ff6a8706beed081077970b0c68918388", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020300", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "d22af7c2dbb9f443d3fe89b027dab71688f0889d1e0fa08a1cc17af7dcacd12d", + "mixHash" : "bca7215bc07b49eac0f70d768935be6cfc173008186eaf7507eca96cdf6647c8", + "nonce" : "1b358b9be7ece935", + "number" : "0x0d", + "parentHash" : "fef1b122dc1d4aea76dca13c6af262b983be18f179548febe24a5f4a3da12442", + "receiptTrie" : "7aae72037d6c0e98ce6cca097ee60bdcfbc66d4e7eab15372e3b963bb399b0b6", + "stateRoot" : "7487980351216e18471e50452423119d79a6573d890a59193210d3414186a4d7", + "timestamp" : "0x561bbe30", + "transactionsTrie" : "b26c16bf451bddeb2e246856f5a9fb0a18db77e5d3285e1ca8c98fad836be34f", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "13", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0fef1b122dc1d4aea76dca13c6af262b983be18f179548febe24a5f4a3da12442a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07487980351216e18471e50452423119d79a6573d890a59193210d3414186a4d7a0b26c16bf451bddeb2e246856f5a9fb0a18db77e5d3285e1ca8c98fad836be34fa07aae72037d6c0e98ce6cca097ee60bdcfbc66d4e7eab15372e3b963bb399b0b6b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203000d832fefd882520884561bbe3080a0bca7215bc07b49eac0f70d768935be6cfc173008186eaf7507eca96cdf6647c8881b358b9be7ece935f862f8600c018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca09f0d7ecfef3a7f29ace42475d105eefc86b9c9e7e8e9bbe0e6820d1b7b3c214fa0077147de33c9d0f963abcb947caad3c0fc5f4460ace2e561c308ecce3dc8ee14c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0c", + "r" : "0x9f0d7ecfef3a7f29ace42475d105eefc86b9c9e7e8e9bbe0e6820d1b7b3c214f", + "s" : "0x077147de33c9d0f963abcb947caad3c0fc5f4460ace2e561c308ecce3dc8ee14", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020340", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "bcbeaed7ac3dab4cff5d44b674bb38a86fac1e36748c322bd9c54bdbbb702be5", + "mixHash" : "f9a48df615e02aa9ffa0ed15c666d35119cd215487391b3b02015ea87c790254", + "nonce" : "29397e8342e77aec", + "number" : "0x0e", + "parentHash" : "d22af7c2dbb9f443d3fe89b027dab71688f0889d1e0fa08a1cc17af7dcacd12d", + "receiptTrie" : "c0bcc49c9646a662037ad064829b866b956b5649e02a51e48f5548bfbe10d2da", + "stateRoot" : "ed83080a8d306d62bbd540b9415689671875b141ab790a171100222274619e78", + "timestamp" : "0x561bbe32", + "transactionsTrie" : "8edec89c92fd2d1b9f54c030079372b3601630d02f0d5adeef82a0f2d2831434", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "14", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0d22af7c2dbb9f443d3fe89b027dab71688f0889d1e0fa08a1cc17af7dcacd12da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ed83080a8d306d62bbd540b9415689671875b141ab790a171100222274619e78a08edec89c92fd2d1b9f54c030079372b3601630d02f0d5adeef82a0f2d2831434a0c0bcc49c9646a662037ad064829b866b956b5649e02a51e48f5548bfbe10d2dab9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203400e832fefd882520884561bbe3280a0f9a48df615e02aa9ffa0ed15c666d35119cd215487391b3b02015ea87c7902548829397e8342e77aecf862f8600d018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba01c99d428d48c700f0ce72c3d5be7d994c861e93f238f714de8619ce2dc09f7a4a037ec77ba5898d2535e23a7df1bb0a3e0ce23ff92326d1566d51e1f9a949d5480c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0d", + "r" : "0x1c99d428d48c700f0ce72c3d5be7d994c861e93f238f714de8619ce2dc09f7a4", + "s" : "0x37ec77ba5898d2535e23a7df1bb0a3e0ce23ff92326d1566d51e1f9a949d5480", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020380", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "6d56bcf45af3bcb8a7ca06c52d43a8d767aee270d10e87cab40b20dc2955e993", + "mixHash" : "bdc29093d1ff94b4168c638a40074778373c12e678eadb8d322cfb1ef262155f", + "nonce" : "b8041600e038cdeb", + "number" : "0x0f", + "parentHash" : "bcbeaed7ac3dab4cff5d44b674bb38a86fac1e36748c322bd9c54bdbbb702be5", + "receiptTrie" : "cb50499ae4bc14ca2301d35a44d94089e0c0977d51d48cf920a7ef74f77bc4d9", + "stateRoot" : "c8868b6a8181a5e3815745d6d583821676943db8909d339f9f78b2c9ccd3df3b", + "timestamp" : "0x561bbe33", + "transactionsTrie" : "15e1ed472ef87edbceda2018a24b60d7497090b6797078b68a592cfd58d5d425", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "15", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0bcbeaed7ac3dab4cff5d44b674bb38a86fac1e36748c322bd9c54bdbbb702be5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c8868b6a8181a5e3815745d6d583821676943db8909d339f9f78b2c9ccd3df3ba015e1ed472ef87edbceda2018a24b60d7497090b6797078b68a592cfd58d5d425a0cb50499ae4bc14ca2301d35a44d94089e0c0977d51d48cf920a7ef74f77bc4d9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203800f832fefd882520884561bbe3380a0bdc29093d1ff94b4168c638a40074778373c12e678eadb8d322cfb1ef262155f88b8041600e038cdebf862f8600e018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba02828f94dcdc43d17ff9028a1ba1aff16dd69233a11a96a8305c0aa08ac7b07cea077edabac675f1d990d0b9aab0cb002022f6f6dc395be07b59094a3130e3eadc9c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0e", + "r" : "0x2828f94dcdc43d17ff9028a1ba1aff16dd69233a11a96a8305c0aa08ac7b07ce", + "s" : "0x77edabac675f1d990d0b9aab0cb002022f6f6dc395be07b59094a3130e3eadc9", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0203c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "4bb732fe92c48082d2d3b541846de8c7fa1a43e7f02d968c51f4f0d87820d269", + "mixHash" : "c89e6531eda70d780be4307e5565ae4493de4abb34fce29d502b899b646481cd", + "nonce" : "4224853975191783", + "number" : "0x10", + "parentHash" : "6d56bcf45af3bcb8a7ca06c52d43a8d767aee270d10e87cab40b20dc2955e993", + "receiptTrie" : "a4ba5e8447b3f32769a892dd7b90f7f61f4c0c362373fff447f468ffc58e1704", + "stateRoot" : "61badaa2d39665943d61a74107cda3d6ce74dd359cd56f1463d3b0fc3fbef661", + "timestamp" : "0x561bbe36", + "transactionsTrie" : "30d8b7dd8fef857dc9dd98256f2898b740f8cf15fcc845467cf628ba307d2700", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "16", + "chainname" : "A", + "rlp" : "0xf90261f901f9a06d56bcf45af3bcb8a7ca06c52d43a8d767aee270d10e87cab40b20dc2955e993a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a061badaa2d39665943d61a74107cda3d6ce74dd359cd56f1463d3b0fc3fbef661a030d8b7dd8fef857dc9dd98256f2898b740f8cf15fcc845467cf628ba307d2700a0a4ba5e8447b3f32769a892dd7b90f7f61f4c0c362373fff447f468ffc58e1704b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203c010832fefd882520884561bbe3680a0c89e6531eda70d780be4307e5565ae4493de4abb34fce29d502b899b646481cd884224853975191783f862f8600f018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0580049a463f7fe7077e0179e095a2fcdf11ab43e410d7ca30199237634b0c474a0585cf7a85794a7423e6a83e1821f8484e5b867e9c90185e98e2fa15e7f31de2dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0f", + "r" : "0x580049a463f7fe7077e0179e095a2fcdf11ab43e410d7ca30199237634b0c474", + "s" : "0x585cf7a85794a7423e6a83e1821f8484e5b867e9c90185e98e2fa15e7f31de2d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020400", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "af262abc6925414dd132b638098dfefc9d0a105167da9f7be3855fe114e4770d", + "mixHash" : "bd03e240e62601c9f8a44e20af59e4fa73145a4a78be3fd0ced9738c70677ce4", + "nonce" : "a47bda81919bd9d4", + "number" : "0x11", + "parentHash" : "4bb732fe92c48082d2d3b541846de8c7fa1a43e7f02d968c51f4f0d87820d269", + "receiptTrie" : "7b33618f7c3bc9224d5db90c4e1be4f5383110063d253fa8f3ff524d1655a706", + "stateRoot" : "27dcf7f1a8aedfa73c957cb5316416c83519e02c00cba428be732121a8fb284b", + "timestamp" : "0x561bbe37", + "transactionsTrie" : "296ddb78c8f1b2580e8b1f704023a99253ded2118e92e3508eedf8cbc7811bd3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "17", + "chainname" : "A", + "rlp" : "0xf90261f901f9a04bb732fe92c48082d2d3b541846de8c7fa1a43e7f02d968c51f4f0d87820d269a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a027dcf7f1a8aedfa73c957cb5316416c83519e02c00cba428be732121a8fb284ba0296ddb78c8f1b2580e8b1f704023a99253ded2118e92e3508eedf8cbc7811bd3a07b33618f7c3bc9224d5db90c4e1be4f5383110063d253fa8f3ff524d1655a706b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302040011832fefd882520884561bbe3780a0bd03e240e62601c9f8a44e20af59e4fa73145a4a78be3fd0ced9738c70677ce488a47bda81919bd9d4f862f86010018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0357bee1003d7e0e72faa1d712ae581b203f3e4bef7d5f647b28d8e4dbb24e5e0a004e7f569343f85e26a1956f8d4faf56ff3d2b071e8bef2acb414da8e483d68bec0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x10", + "r" : "0x357bee1003d7e0e72faa1d712ae581b203f3e4bef7d5f647b28d8e4dbb24e5e0", + "s" : "0x04e7f569343f85e26a1956f8d4faf56ff3d2b071e8bef2acb414da8e483d68be", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020440", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "1be988dce652b1c07c5bf3fd2e8ec01abbadc09bcb5ad49dce22fdc20502cc9d", + "mixHash" : "843eaf9c192e1d46a5ba6127f99979bb85b4b6a74b37c28fd7a10c6566913756", + "nonce" : "6196cdee9b44fec8", + "number" : "0x12", + "parentHash" : "af262abc6925414dd132b638098dfefc9d0a105167da9f7be3855fe114e4770d", + "receiptTrie" : "ed31779fdbecfc67dc2c6ddd6a2af33b80d5d3d570954bb871f8b5804efd9bbc", + "stateRoot" : "d414902f6f2e0718fcee149f202c71b934c13762a457e467e0c32173fc0ba219", + "timestamp" : "0x561bbe39", + "transactionsTrie" : "ca5f55cb090326f77309b025cac6d30acbfa9e81e48a4c76a815f4549b00676c", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "18", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0af262abc6925414dd132b638098dfefc9d0a105167da9f7be3855fe114e4770da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d414902f6f2e0718fcee149f202c71b934c13762a457e467e0c32173fc0ba219a0ca5f55cb090326f77309b025cac6d30acbfa9e81e48a4c76a815f4549b00676ca0ed31779fdbecfc67dc2c6ddd6a2af33b80d5d3d570954bb871f8b5804efd9bbcb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302044012832fefd882520884561bbe3980a0843eaf9c192e1d46a5ba6127f99979bb85b4b6a74b37c28fd7a10c6566913756886196cdee9b44fec8f862f86011018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba064eb15cdbb22817720491c9077a8a4d07273deb1504a7efa9147f6421a3c7d36a04434827c72d3780f12e1f4c6ad146630b5298d678b6d5f28507a7636ea809c4dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x11", + "r" : "0x64eb15cdbb22817720491c9077a8a4d07273deb1504a7efa9147f6421a3c7d36", + "s" : "0x4434827c72d3780f12e1f4c6ad146630b5298d678b6d5f28507a7636ea809c4d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020480", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f76ab7204042bdcdb329877b5efe8cdd25a92cd9d907021a8b2ee74072293a23", + "mixHash" : "9e1bc8064a63a1a50057ccdea1e55773a58e81b64a6889a0668dfa1c2a35c99c", + "nonce" : "37017cd0e340f633", + "number" : "0x13", + "parentHash" : "1be988dce652b1c07c5bf3fd2e8ec01abbadc09bcb5ad49dce22fdc20502cc9d", + "receiptTrie" : "a395da873d485a784b4197c882b2a46ab3b9c520cef676f926b788dc15dd96fd", + "stateRoot" : "7ca503a82f35372a79d3c872a9f415b6e9b3bb81fbae47ecc851f2b7ff4ca6b6", + "timestamp" : "0x561bbe3b", + "transactionsTrie" : "21d3cf8bc03a3aa6b8677ec0670dc23daecb83a13a91fb8d4ddf8c0d0bfc11f4", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "19", + "chainname" : "A", + "rlp" : "0xf90261f901f9a01be988dce652b1c07c5bf3fd2e8ec01abbadc09bcb5ad49dce22fdc20502cc9da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07ca503a82f35372a79d3c872a9f415b6e9b3bb81fbae47ecc851f2b7ff4ca6b6a021d3cf8bc03a3aa6b8677ec0670dc23daecb83a13a91fb8d4ddf8c0d0bfc11f4a0a395da873d485a784b4197c882b2a46ab3b9c520cef676f926b788dc15dd96fdb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302048013832fefd882520884561bbe3b80a09e1bc8064a63a1a50057ccdea1e55773a58e81b64a6889a0668dfa1c2a35c99c8837017cd0e340f633f862f86012018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0323246582abd0cc984c3f259de2b93df30f5e6424395cb1404dde893b075f329a014e5d8269ff1dbb2004607654e0d9a40096b7cc0566ba2e5f6ed0f3a438e06f8c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x12", + "r" : "0x323246582abd0cc984c3f259de2b93df30f5e6424395cb1404dde893b075f329", + "s" : "0x14e5d8269ff1dbb2004607654e0d9a40096b7cc0566ba2e5f6ed0f3a438e06f8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0204c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "aa083d759a5a463d315d073545e63aeb63abcf4cac92d45b5242167b20cc9c69", + "mixHash" : "74c7fae8f88af8e6a90caa3e7212d0d95d87c9342a5e67b7bce8c7e2da24fec1", + "nonce" : "e171d3a4dad53eb1", + "number" : "0x14", + "parentHash" : "f76ab7204042bdcdb329877b5efe8cdd25a92cd9d907021a8b2ee74072293a23", + "receiptTrie" : "d32d77aaf9e5333e1dcad937e50208854a20cd37faf1e6363d7507c64eea990a", + "stateRoot" : "ae498510c9c5eafbfb220c91fdae8a9ad5050e719fc98c828aeec8721c4f0ed1", + "timestamp" : "0x561bbe3e", + "transactionsTrie" : "d60b1af1b601285b12c4168b0c12b1d3b52d292a6ae59e98acb4616cc55d9bc7", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "20", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0f76ab7204042bdcdb329877b5efe8cdd25a92cd9d907021a8b2ee74072293a23a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ae498510c9c5eafbfb220c91fdae8a9ad5050e719fc98c828aeec8721c4f0ed1a0d60b1af1b601285b12c4168b0c12b1d3b52d292a6ae59e98acb4616cc55d9bc7a0d32d77aaf9e5333e1dcad937e50208854a20cd37faf1e6363d7507c64eea990ab9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830204c014832fefd882520884561bbe3e80a074c7fae8f88af8e6a90caa3e7212d0d95d87c9342a5e67b7bce8c7e2da24fec188e171d3a4dad53eb1f862f86013018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0d5dca4f4c9fb81dad21eccb5e89eb1ec49e0be73f18663932b2f7a098c41d9c9a018e2fb5792e9892341b134585bdf690f19597ba465e6c434bad483d250bde24dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x13", + "r" : "0xd5dca4f4c9fb81dad21eccb5e89eb1ec49e0be73f18663932b2f7a098c41d9c9", + "s" : "0x18e2fb5792e9892341b134585bdf690f19597ba465e6c434bad483d250bde24d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020500", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "7cf6a43e7a68c787d7105488e853283f47daf3acc64523857a430a7b230634e3", + "mixHash" : "51bba0ec3a5e5d5c7cf4702c3d2c47db647a1e39ed984b0f01a984574c8eb029", + "nonce" : "e7c85085a3b6ab7f", + "number" : "0x15", + "parentHash" : "aa083d759a5a463d315d073545e63aeb63abcf4cac92d45b5242167b20cc9c69", + "receiptTrie" : "54badce9a393718de044873ba9177f37f485ca9e34e713323c93347136de9de1", + "stateRoot" : "9020d74e2d6d1355ad1792cbe357ab67d9fb1b29a2083a4feca97e4a93122bd9", + "timestamp" : "0x561bbe3f", + "transactionsTrie" : "a64735f53dc899a3bacf659748f40a44466a5fcc2a73797d3900dffe41f4cf34", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "21", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0aa083d759a5a463d315d073545e63aeb63abcf4cac92d45b5242167b20cc9c69a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a09020d74e2d6d1355ad1792cbe357ab67d9fb1b29a2083a4feca97e4a93122bd9a0a64735f53dc899a3bacf659748f40a44466a5fcc2a73797d3900dffe41f4cf34a054badce9a393718de044873ba9177f37f485ca9e34e713323c93347136de9de1b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302050015832fefd882520884561bbe3f80a051bba0ec3a5e5d5c7cf4702c3d2c47db647a1e39ed984b0f01a984574c8eb02988e7c85085a3b6ab7ff862f86014018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0b161c8af361fadb90382fc1e5a66a76908bd8fc988a984174389bc89d8bf045da05485ed7d0a270e2d0c53fe18c2bca5651ca5d66e6aaa889bd82e3879124c538bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x14", + "r" : "0xb161c8af361fadb90382fc1e5a66a76908bd8fc988a984174389bc89d8bf045d", + "s" : "0x5485ed7d0a270e2d0c53fe18c2bca5651ca5d66e6aaa889bd82e3879124c538b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020540", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "b58e3b706f0e16a288fce5799319c714c1ba69412709041eee5284d8587dfe73", + "mixHash" : "0d4d40e572f31e3435905039c7983ec87ec654344e372fd3e23b3a98d8e15ff9", + "nonce" : "98d05bb0ceadd0f7", + "number" : "0x16", + "parentHash" : "7cf6a43e7a68c787d7105488e853283f47daf3acc64523857a430a7b230634e3", + "receiptTrie" : "a91e4de626d33a783ece82087072081b8d7d6d98c91f1cd8177ab1ce56211703", + "stateRoot" : "dd969737c2346d8196057c79d27301dcd9f6af38ba1df94a9116f2b6b61a9576", + "timestamp" : "0x561bbe41", + "transactionsTrie" : "a59af08c0a599652f73946fba6d853050ac96df44f9cea79685da5b5642ff1d2", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "22", + "chainname" : "A", + "rlp" : "0xf90261f901f9a07cf6a43e7a68c787d7105488e853283f47daf3acc64523857a430a7b230634e3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0dd969737c2346d8196057c79d27301dcd9f6af38ba1df94a9116f2b6b61a9576a0a59af08c0a599652f73946fba6d853050ac96df44f9cea79685da5b5642ff1d2a0a91e4de626d33a783ece82087072081b8d7d6d98c91f1cd8177ab1ce56211703b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302054016832fefd882520884561bbe4180a00d4d40e572f31e3435905039c7983ec87ec654344e372fd3e23b3a98d8e15ff98898d05bb0ceadd0f7f862f86015018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0d145d4a373af51e57d9e2f5f298bd7fec31b893a42b249cc5344ff9c065e8f09a040b15a58b2ac218f88903fe3915468a92639814644378efe279e35b1bf9b4b18c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x15", + "r" : "0xd145d4a373af51e57d9e2f5f298bd7fec31b893a42b249cc5344ff9c065e8f09", + "s" : "0x40b15a58b2ac218f88903fe3915468a92639814644378efe279e35b1bf9b4b18", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020580", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "716d5f1057b5ed6b2a2d6b57d7c8d8c06deabac1d89cbf2685e5cd726867ccec", + "mixHash" : "fe1c0f3c293042f2acd968b3422bac2b0ac2185a92727223474898627988875c", + "nonce" : "3465d48313e1bd6f", + "number" : "0x17", + "parentHash" : "b58e3b706f0e16a288fce5799319c714c1ba69412709041eee5284d8587dfe73", + "receiptTrie" : "7d4458033c0c57fe184c1df702e48a0fe8bfc950af3349b51a20f18966d2a942", + "stateRoot" : "b68187da60f4cbd4232a0ad89fd02b3a6c6ddff7b28756d63b4cb3036e0bab7c", + "timestamp" : "0x561bbe44", + "transactionsTrie" : "5c82036b1d2026422bae2eff8fc9564cc2fd3e7e08c131ddc068dd53374d0763", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "23", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0b58e3b706f0e16a288fce5799319c714c1ba69412709041eee5284d8587dfe73a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b68187da60f4cbd4232a0ad89fd02b3a6c6ddff7b28756d63b4cb3036e0bab7ca05c82036b1d2026422bae2eff8fc9564cc2fd3e7e08c131ddc068dd53374d0763a07d4458033c0c57fe184c1df702e48a0fe8bfc950af3349b51a20f18966d2a942b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302058017832fefd882520884561bbe4480a0fe1c0f3c293042f2acd968b3422bac2b0ac2185a92727223474898627988875c883465d48313e1bd6ff862f86016018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca04d8ad424545e52145ba47db288202f31acb94853663d6e9e601d2d7dac38c024a0058ad8a4d0f0b7d1f11d60d7af7be896fd3a02a06153207b4d8d86067ed29642c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x16", + "r" : "0x4d8ad424545e52145ba47db288202f31acb94853663d6e9e601d2d7dac38c024", + "s" : "0x058ad8a4d0f0b7d1f11d60d7af7be896fd3a02a06153207b4d8d86067ed29642", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0205c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "08332136da1a9c7c71282401358635d1d10eb755bd45a536146c3ff334f1cb76", + "mixHash" : "ff006472e94277f7ea7b66fac1250d5b16e73e8ab078c3ed1f2269d033e0e97b", + "nonce" : "4530cfb2cc017b60", + "number" : "0x18", + "parentHash" : "716d5f1057b5ed6b2a2d6b57d7c8d8c06deabac1d89cbf2685e5cd726867ccec", + "receiptTrie" : "f8b08f12f3f6f073117f49094daac37582dbd96f55bda17e6bf044cf9059963e", + "stateRoot" : "8db80121bc2b3cede977491f5c5694231b2a8ea9f2c3668b0f9254fd334ecf81", + "timestamp" : "0x561bbe46", + "transactionsTrie" : "a6faf995dbe3cdf65e9c0cfd61f7df322e1c7415fd1e94e1e67e81d6448e741a", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "24", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0716d5f1057b5ed6b2a2d6b57d7c8d8c06deabac1d89cbf2685e5cd726867cceca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08db80121bc2b3cede977491f5c5694231b2a8ea9f2c3668b0f9254fd334ecf81a0a6faf995dbe3cdf65e9c0cfd61f7df322e1c7415fd1e94e1e67e81d6448e741aa0f8b08f12f3f6f073117f49094daac37582dbd96f55bda17e6bf044cf9059963eb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830205c018832fefd882520884561bbe4680a0ff006472e94277f7ea7b66fac1250d5b16e73e8ab078c3ed1f2269d033e0e97b884530cfb2cc017b60f862f86017018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0c35255e99566cc1749b15dea81acc2024fa69f2aa2dc6bf91599c3410fee2e73a063ccde1230a3953f481cf3b72eac3035d67d6a883b1922a32ab878217db33616c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x17", + "r" : "0xc35255e99566cc1749b15dea81acc2024fa69f2aa2dc6bf91599c3410fee2e73", + "s" : "0x63ccde1230a3953f481cf3b72eac3035d67d6a883b1922a32ab878217db33616", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020600", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "1bc62a131f3471bfea7b51e6ddc850b3bb434f53b39bf2c342330501c7b4ec9d", + "mixHash" : "bb61e9fde89bf786918d2c92891c605f20f805792df2695392a3c5bdfa137e25", + "nonce" : "1fae06514cc94575", + "number" : "0x19", + "parentHash" : "08332136da1a9c7c71282401358635d1d10eb755bd45a536146c3ff334f1cb76", + "receiptTrie" : "9a59a692d7ae81f5f88535e6597e45c1c658e8d30c6eefb487338b3711cf0b1d", + "stateRoot" : "1767395f85b6db0737aa76eb9b37ae0d7deea70108280fb271385c8b86b6cd86", + "timestamp" : "0x561bbe48", + "transactionsTrie" : "b7939976a2f5a9fba157e1e74f7b36985892df92135029aa83d43a05678593f2", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "25", + "chainname" : "A", + "rlp" : "0xf90261f901f9a008332136da1a9c7c71282401358635d1d10eb755bd45a536146c3ff334f1cb76a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01767395f85b6db0737aa76eb9b37ae0d7deea70108280fb271385c8b86b6cd86a0b7939976a2f5a9fba157e1e74f7b36985892df92135029aa83d43a05678593f2a09a59a692d7ae81f5f88535e6597e45c1c658e8d30c6eefb487338b3711cf0b1db90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302060019832fefd882520884561bbe4880a0bb61e9fde89bf786918d2c92891c605f20f805792df2695392a3c5bdfa137e25881fae06514cc94575f862f86018018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca030813c40e0e2958932b30aeacdf1ff8d0cf25158539e34005bd27dc5ac0146cba0211e027a9d83020d189557e016bbf2d84ebbffe04934899c6f76c7662eb5a0a2c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x18", + "r" : "0x30813c40e0e2958932b30aeacdf1ff8d0cf25158539e34005bd27dc5ac0146cb", + "s" : "0x211e027a9d83020d189557e016bbf2d84ebbffe04934899c6f76c7662eb5a0a2", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "91656ee087e7de70d0e3d45015280ad884716719ba20592d8431e73abc6d551f", + "mixHash" : "d645bfdf1a34bbff9b9f33010aeb9f9f8db6ae95d84c0b35a82e7bff75553f5e", + "nonce" : "c332e0f57a86c081", + "number" : "0x01", + "parentHash" : "358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bd", + "receiptTrie" : "bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbb", + "stateRoot" : "1b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4", + "timestamp" : "0x561bbe4b", + "transactionsTrie" : "89176230d5c4ac60168e999c7a9fbea712992e712c253d635601a9d625c640fa", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "B", + "rlp" : "0xf90261f901f9a0358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4a089176230d5c4ac60168e999c7a9fbea712992e712c253d635601a9d625c640faa0bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbbb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bbe4b80a0d645bfdf1a34bbff9b9f33010aeb9f9f8db6ae95d84c0b35a82e7bff75553f5e88c332e0f57a86c081f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca066995adf6b8ce265233fe0ef11b24f7571908674be85c347eed4359396cfa4b1a0458062325e034ea6722559f0153094069424c0d508b7b104f2635a52bfaaa532c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x66995adf6b8ce265233fe0ef11b24f7571908674be85c347eed4359396cfa4b1", + "s" : "0x458062325e034ea6722559f0153094069424c0d508b7b104f2635a52bfaaa532", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "0a14153435ca4f133192a07e72ca9dbb7a264e462f2f0a8d581b4d1a9deadd45", + "mixHash" : "54788d3fc21cd31733fa9ab35f6ee57aeb137f0df936c4a66954915936ced452", + "nonce" : "1696d7760366b4e3", + "number" : "0x02", + "parentHash" : "91656ee087e7de70d0e3d45015280ad884716719ba20592d8431e73abc6d551f", + "receiptTrie" : "7fa6b426f40ed9fbcfdf1491008649c83e02bd4648492ff92d79de72c15cd11a", + "stateRoot" : "7cefe422fd5c4adc434377bf4b7ae17c091cbe1c6fc687986debbec9c432994b", + "timestamp" : "0x561bbe4e", + "transactionsTrie" : "ee25beffeb5eac6c784f998a43fa94ec0f14a51dd622cdc2053bdec158668f10", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "B", + "rlp" : "0xf90261f901f9a091656ee087e7de70d0e3d45015280ad884716719ba20592d8431e73abc6d551fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07cefe422fd5c4adc434377bf4b7ae17c091cbe1c6fc687986debbec9c432994ba0ee25beffeb5eac6c784f998a43fa94ec0f14a51dd622cdc2053bdec158668f10a07fa6b426f40ed9fbcfdf1491008649c83e02bd4648492ff92d79de72c15cd11ab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bbe4e80a054788d3fc21cd31733fa9ab35f6ee57aeb137f0df936c4a66954915936ced452881696d7760366b4e3f862f86001018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0980634f5a00a7f661d51ea32359055d30a5733c6aa82419c735777a5b1ca433aa06aa3d1b409caa91c9c4c168ff135fa6c2d82f46ff73f045828eba348bf7f0fbec0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x980634f5a00a7f661d51ea32359055d30a5733c6aa82419c735777a5b1ca433a", + "s" : "0x6aa3d1b409caa91c9c4c168ff135fa6c2d82f46ff73f045828eba348bf7f0fbe", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "5c66666fede17086379b45b93bf79a58876e23d69dbc580c5628ad36c263ea1a", + "mixHash" : "865e0db5bf3e85c20d894408adc88743347df5c91d75a76107909efe933bb4a5", + "nonce" : "58a9f519871d82f1", + "number" : "0x03", + "parentHash" : "0a14153435ca4f133192a07e72ca9dbb7a264e462f2f0a8d581b4d1a9deadd45", + "receiptTrie" : "546e386ac47458adaf92a8287ff45ba235f50258d511b64bab523d3154ac3d8c", + "stateRoot" : "e299c301437bb4db4ae024dc6cfad95a96c1370b8e246336997b9781f8d92598", + "timestamp" : "0x561bbe4f", + "transactionsTrie" : "c49b79ff0d5d6d01c6647e54b273de59aee2a05dc5e4fd06f6c7752637cab353", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "B", + "rlp" : "0xf90261f901f9a00a14153435ca4f133192a07e72ca9dbb7a264e462f2f0a8d581b4d1a9deadd45a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e299c301437bb4db4ae024dc6cfad95a96c1370b8e246336997b9781f8d92598a0c49b79ff0d5d6d01c6647e54b273de59aee2a05dc5e4fd06f6c7752637cab353a0546e386ac47458adaf92a8287ff45ba235f50258d511b64bab523d3154ac3d8cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bbe4f80a0865e0db5bf3e85c20d894408adc88743347df5c91d75a76107909efe933bb4a58858a9f519871d82f1f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0276bcc58edef1b711670d795666908f912e27482081cd017313ba92b935a19c1a00e2dd822223a07eac2384486ef2cf68a7ae2817aa1e884cc6c2c4728e48eb2fbc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x276bcc58edef1b711670d795666908f912e27482081cd017313ba92b935a19c1", + "s" : "0x0e2dd822223a07eac2384486ef2cf68a7ae2817aa1e884cc6c2c4728e48eb2fb", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "005cd33f083658f4e62abcc4138e4d3a41b81c2e3a939c11c48385ab019eb165", + "mixHash" : "ec1c3d9b994982dd622a1e52c4bc0f3d270979e1aed8a31eafc4828e3994397f", + "nonce" : "eafbc3484a4937fb", + "number" : "0x04", + "parentHash" : "5c66666fede17086379b45b93bf79a58876e23d69dbc580c5628ad36c263ea1a", + "receiptTrie" : "9b421e1a4feec6c2fe042920721e95d3e6402e8df644b731914497b6e28f2715", + "stateRoot" : "9195c6dc447656d95b794e74a3ea739502030d2cdd84ba911cd010f904be07bf", + "timestamp" : "0x561bbe52", + "transactionsTrie" : "1747033ae8b28f1e0ab563a95deb7aec0fc0bc6d26f200c536b0a8b386e4802d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "chainname" : "B", + "rlp" : "0xf90261f901f9a05c66666fede17086379b45b93bf79a58876e23d69dbc580c5628ad36c263ea1aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a09195c6dc447656d95b794e74a3ea739502030d2cdd84ba911cd010f904be07bfa01747033ae8b28f1e0ab563a95deb7aec0fc0bc6d26f200c536b0a8b386e4802da09b421e1a4feec6c2fe042920721e95d3e6402e8df644b731914497b6e28f2715b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bbe5280a0ec1c3d9b994982dd622a1e52c4bc0f3d270979e1aed8a31eafc4828e3994397f88eafbc3484a4937fbf862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0f3de61997e78562f49a99817d170c3c3061b953dac12464c4b78c778f8c46f30a06a2bd676f1b4d3bc9e3749907fe120acbb266cc61a064e81a6614398fd3f35cdc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0xf3de61997e78562f49a99817d170c3c3061b953dac12464c4b78c778f8c46f30", + "s" : "0x6a2bd676f1b4d3bc9e3749907fe120acbb266cc61a064e81a6614398fd3f35cd", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "8435f83c6608910f81d36fcb5bca82c08da0bf2b1851d974ccb6c43a909920b8", + "mixHash" : "15a3264fc611d18ef2146f9c67b54dd3aa8757498d2a19c9f894be97b8b36ea6", + "nonce" : "2edffcd4f360dfb7", + "number" : "0x05", + "parentHash" : "005cd33f083658f4e62abcc4138e4d3a41b81c2e3a939c11c48385ab019eb165", + "receiptTrie" : "94cddaec6242ef6d009419ffcaacba40ee18e5ef9860521dd014f929913558a0", + "stateRoot" : "17680524b3d899e448793fc6a0b66338dd4a48388b961f630251c40537596439", + "timestamp" : "0x561bbe54", + "transactionsTrie" : "43fc7d2de0ca811ddc51ed5920389da581815ba28e3fee2336896f5fc2464e08", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "5", + "chainname" : "B", + "rlp" : "0xf90261f901f9a0005cd33f083658f4e62abcc4138e4d3a41b81c2e3a939c11c48385ab019eb165a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a017680524b3d899e448793fc6a0b66338dd4a48388b961f630251c40537596439a043fc7d2de0ca811ddc51ed5920389da581815ba28e3fee2336896f5fc2464e08a094cddaec6242ef6d009419ffcaacba40ee18e5ef9860521dd014f929913558a0b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bbe5480a015a3264fc611d18ef2146f9c67b54dd3aa8757498d2a19c9f894be97b8b36ea6882edffcd4f360dfb7f862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca0dafc491980deb11e0a1100f6dd35f677f425a2c2bea9cc4412e81ff1ca126d93a042f5a5e0453b6e5e1e73d78a3f73b41be1655611341e76f47ac0a7b163607108c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0xdafc491980deb11e0a1100f6dd35f677f425a2c2bea9cc4412e81ff1ca126d93", + "s" : "0x42f5a5e0453b6e5e1e73d78a3f73b41be1655611341e76f47ac0a7b163607108", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "d55b87b4898e06f6736b2355ef56854d47875b1ed0ebbe86ec0b9484a9d46764", + "mixHash" : "2e28e22f5613cb525be3da7196b6c2183002c44338db5c70f6425ad7ef3e39e2", + "nonce" : "425dd5092e4b3fb4", + "number" : "0x06", + "parentHash" : "8435f83c6608910f81d36fcb5bca82c08da0bf2b1851d974ccb6c43a909920b8", + "receiptTrie" : "65d6e44c64959abf819e4a49c5e40b9d386a0ecdeb4f27b07191ac8b6b691ddd", + "stateRoot" : "cc095dfb6ca19045041ac1370eda55c8b9b8b0a33bf0c69a4a14e892642c9ebf", + "timestamp" : "0x561bbe57", + "transactionsTrie" : "e4251feb89a2eed50eece32ec4a5c66801a31a60496080848f667554ad6aa205", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "chainname" : "B", + "rlp" : "0xf90261f901f9a08435f83c6608910f81d36fcb5bca82c08da0bf2b1851d974ccb6c43a909920b8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cc095dfb6ca19045041ac1370eda55c8b9b8b0a33bf0c69a4a14e892642c9ebfa0e4251feb89a2eed50eece32ec4a5c66801a31a60496080848f667554ad6aa205a065d6e44c64959abf819e4a49c5e40b9d386a0ecdeb4f27b07191ac8b6b691dddb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882520884561bbe5780a02e28e22f5613cb525be3da7196b6c2183002c44338db5c70f6425ad7ef3e39e288425dd5092e4b3fb4f862f86005018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca064b00b1d1a7cb10dd8efc1d6099e45bc21ebedf579b74577875c0d43d6d72147a03cb26f5ead597212c0d5ac9ea6a96aa296e423b70a3e809a3184962343066ce3c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0x64b00b1d1a7cb10dd8efc1d6099e45bc21ebedf579b74577875c0d43d6d72147", + "s" : "0x3cb26f5ead597212c0d5ac9ea6a96aa296e423b70a3e809a3184962343066ce3", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020180", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "b02aea3cc5e3ed27ee9ba8effc264398208ff766a26d2f8ac82857a0ec52cbe9", + "mixHash" : "60ba57c44b6846946599e6f1c9d3a41240429adf6fd5fae138cff303a28f5111", + "nonce" : "8731f03b9f41e9bd", + "number" : "0x07", + "parentHash" : "d55b87b4898e06f6736b2355ef56854d47875b1ed0ebbe86ec0b9484a9d46764", + "receiptTrie" : "5a55fa0dc4646849377616de136d45dcb8e082298cb06ee1d72bb237d56630bd", + "stateRoot" : "1e2b960493fb71fe17752cef80f4ea50a60fa506d489bcfcb3164d5636381f6a", + "timestamp" : "0x561bbe59", + "transactionsTrie" : "9f6bf37b155e34576d817e189ecc9c6733de0125cb9c135a5fd090000dee9e70", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "7", + "chainname" : "B", + "rlp" : "0xf90261f901f9a0d55b87b4898e06f6736b2355ef56854d47875b1ed0ebbe86ec0b9484a9d46764a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01e2b960493fb71fe17752cef80f4ea50a60fa506d489bcfcb3164d5636381f6aa09f6bf37b155e34576d817e189ecc9c6733de0125cb9c135a5fd090000dee9e70a05a55fa0dc4646849377616de136d45dcb8e082298cb06ee1d72bb237d56630bdb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882520884561bbe5980a060ba57c44b6846946599e6f1c9d3a41240429adf6fd5fae138cff303a28f5111888731f03b9f41e9bdf862f86006018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca0ae2a9003527cc9e07ffe8546869d42b08651c749eedf771118a2922737bd5f18a06cd93e1ce90b136eab09cdbc7c4902c571ef71ea22f50c074fb37d9b2203b9efc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x06", + "r" : "0xae2a9003527cc9e07ffe8546869d42b08651c749eedf771118a2922737bd5f18", + "s" : "0x6cd93e1ce90b136eab09cdbc7c4902c571ef71ea22f50c074fb37d9b2203b9ef", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0201c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "7303e925e8ff49ae148ac1cc20b7f59a3fa55519a4d587f5d43d3ad90197f19a", + "mixHash" : "b106c61e57c7ecaa6806f076c24276fbbee5fa8ccf13c7a00719de1e47f50365", + "nonce" : "a4c9c9adbc8cbaed", + "number" : "0x08", + "parentHash" : "b02aea3cc5e3ed27ee9ba8effc264398208ff766a26d2f8ac82857a0ec52cbe9", + "receiptTrie" : "78b799cea4600a8f909c7f14c0399519c50bf08865e4567105c00e35c8abce15", + "stateRoot" : "5c8ba4df37b101064216bbc7ac9185e5673313ecc65e2cb2a1a92f8a11859e22", + "timestamp" : "0x561bbe5b", + "transactionsTrie" : "e675b7ca28d389306c58d5b7594ad6beb105adc9c3105950ff2bc154b16a88e0", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "8", + "chainname" : "B", + "rlp" : "0xf90261f901f9a0b02aea3cc5e3ed27ee9ba8effc264398208ff766a26d2f8ac82857a0ec52cbe9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05c8ba4df37b101064216bbc7ac9185e5673313ecc65e2cb2a1a92f8a11859e22a0e675b7ca28d389306c58d5b7594ad6beb105adc9c3105950ff2bc154b16a88e0a078b799cea4600a8f909c7f14c0399519c50bf08865e4567105c00e35c8abce15b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd882520884561bbe5b80a0b106c61e57c7ecaa6806f076c24276fbbee5fa8ccf13c7a00719de1e47f5036588a4c9c9adbc8cbaedf862f86007018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0cd1cf9401cb2a0cce2960822097244baa2a73807a51cab6bb6cae0f6a24ae623a06e38597d0268509547e39f81aba7eabee477fef65615e17ced4381fe65a29413c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x07", + "r" : "0xcd1cf9401cb2a0cce2960822097244baa2a73807a51cab6bb6cae0f6a24ae623", + "s" : "0x6e38597d0268509547e39f81aba7eabee477fef65615e17ced4381fe65a29413", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020200", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "e8b7f60e7989e399dcb4c53dda27b344301a73abaa670df5d502533892a8e546", + "mixHash" : "3915bf356d3e759b6f34566c6d82ab620d967b350f99474ff8fbdf0632a2f63f", + "nonce" : "b8b00ee9b894586d", + "number" : "0x09", + "parentHash" : "7303e925e8ff49ae148ac1cc20b7f59a3fa55519a4d587f5d43d3ad90197f19a", + "receiptTrie" : "ea2cccbdb29cbc098c6c509f40dec917af9371449e149f833533da1444787438", + "stateRoot" : "ff032ac169e9be7dc9d148d360b29a70d900a980aa755cdb96d8bfc5b5a4117c", + "timestamp" : "0x561bbe5d", + "transactionsTrie" : "32b0c275b7e886816a6c6b2d46007fb6f25531e2f4ac06f8911e152e1ad94a06", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "9", + "chainname" : "B", + "rlp" : "0xf90261f901f9a07303e925e8ff49ae148ac1cc20b7f59a3fa55519a4d587f5d43d3ad90197f19aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ff032ac169e9be7dc9d148d360b29a70d900a980aa755cdb96d8bfc5b5a4117ca032b0c275b7e886816a6c6b2d46007fb6f25531e2f4ac06f8911e152e1ad94a06a0ea2cccbdb29cbc098c6c509f40dec917af9371449e149f833533da1444787438b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd882520884561bbe5d80a03915bf356d3e759b6f34566c6d82ab620d967b350f99474ff8fbdf0632a2f63f88b8b00ee9b894586df862f86008018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba00c0715eb55dcc943028ebabbaeccffcdce08b71393f39df50028e1e9276f589aa00628df06f1e42168a5260d5cd4534bbdbd08a6e2dd585fe7969085354fd5cbcfc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x08", + "r" : "0x0c0715eb55dcc943028ebabbaeccffcdce08b71393f39df50028e1e9276f589a", + "s" : "0x0628df06f1e42168a5260d5cd4534bbdbd08a6e2dd585fe7969085354fd5cbcf", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020240", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "2c031ace1675111d10560f57c590de48c60a6f05011d92a51a87ba0c6ab7f50f", + "mixHash" : "00a45145084b7e2d20612bbe545a359a55d447a4e868a767785cbac6dfb465f6", + "nonce" : "c61636825ffce995", + "number" : "0x0a", + "parentHash" : "e8b7f60e7989e399dcb4c53dda27b344301a73abaa670df5d502533892a8e546", + "receiptTrie" : "339b1bbf7aa48dbc87ae98567d3e98c9a1a45d709751c2bf2790476d4d940388", + "stateRoot" : "839fafa70fbbcb1501b29fd3e160ea323b033cd9b613033957f15d8e4c9049fb", + "timestamp" : "0x561bbe5f", + "transactionsTrie" : "b398e037ae05747ff5b9daddc4e9842eb99a368bf0cc46e1d9bf64825a2157e6", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "10", + "chainname" : "B", + "rlp" : "0xf90261f901f9a0e8b7f60e7989e399dcb4c53dda27b344301a73abaa670df5d502533892a8e546a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0839fafa70fbbcb1501b29fd3e160ea323b033cd9b613033957f15d8e4c9049fba0b398e037ae05747ff5b9daddc4e9842eb99a368bf0cc46e1d9bf64825a2157e6a0339b1bbf7aa48dbc87ae98567d3e98c9a1a45d709751c2bf2790476d4d940388b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd882520884561bbe5f80a000a45145084b7e2d20612bbe545a359a55d447a4e868a767785cbac6dfb465f688c61636825ffce995f862f86009018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca0ae782d46f74af9f80575ac0a50be6a4572b09e8acd6a2c167c18eacfbd9d5933a007b4c086c2266287bb47f060873d20ebefc7bacdd432e11a9486f05671f2f802c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x09", + "r" : "0xae782d46f74af9f80575ac0a50be6a4572b09e8acd6a2c167c18eacfbd9d5933", + "s" : "0x07b4c086c2266287bb47f060873d20ebefc7bacdd432e11a9486f05671f2f802", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020280", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "b741e7ccc5b36f0903bf60c47d6a7958bd802735aa8d3708da9a024b8aab8742", + "mixHash" : "69178fad2911b377849aa6fd88f4236cd7b2a010198ad8f231f51e5023dd5b4b", + "nonce" : "81076b96c58d8ed8", + "number" : "0x0b", + "parentHash" : "2c031ace1675111d10560f57c590de48c60a6f05011d92a51a87ba0c6ab7f50f", + "receiptTrie" : "e74da86782c317472c9f22dd81ef938110bdb198c34f05421c471f8d8a774b51", + "stateRoot" : "8d9142b3e9d2f58ad29126de63a340f2351b0f2a83b6e72c1a22859e836409a7", + "timestamp" : "0x561bbe62", + "transactionsTrie" : "2e5590cfa0948bd0852b11205141993957d73ec7d69d5d644e9a12c1abdafd05", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "11", + "chainname" : "B", + "rlp" : "0xf90261f901f9a02c031ace1675111d10560f57c590de48c60a6f05011d92a51a87ba0c6ab7f50fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08d9142b3e9d2f58ad29126de63a340f2351b0f2a83b6e72c1a22859e836409a7a02e5590cfa0948bd0852b11205141993957d73ec7d69d5d644e9a12c1abdafd05a0e74da86782c317472c9f22dd81ef938110bdb198c34f05421c471f8d8a774b51b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202800b832fefd882520884561bbe6280a069178fad2911b377849aa6fd88f4236cd7b2a010198ad8f231f51e5023dd5b4b8881076b96c58d8ed8f862f8600a018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba099fa43662c2229e857e3878a7cded819de676cfb811be28aa7814079d908f2c5a06054c0deea88ed554ddac674add908b2af45160f3f65b99ce853402b3f4883c8c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0a", + "r" : "0x99fa43662c2229e857e3878a7cded819de676cfb811be28aa7814079d908f2c5", + "s" : "0x6054c0deea88ed554ddac674add908b2af45160f3f65b99ce853402b3f4883c8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0202c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "0a55c680dc4102eb2ea613ee224665ff7e932d8f754b923d8e7b9f0322838530", + "mixHash" : "dc0f16d527991e38761f20fbd7aa41d9dca1500eef65bf33c7c14525a2d6c863", + "nonce" : "b8da876e018091b1", + "number" : "0x0c", + "parentHash" : "b741e7ccc5b36f0903bf60c47d6a7958bd802735aa8d3708da9a024b8aab8742", + "receiptTrie" : "8c896a3b944e3bb69493ccfc8e1bd4988018988dd29db332d2d2b95410a7e075", + "stateRoot" : "e93dbbfd3ff7905c3889e575eed1b46f8d67a84b6342cff5ec868995a1879608", + "timestamp" : "0x561bbe64", + "transactionsTrie" : "5b73d32aa4b7172b3064dee08c22dec4812648a8490418fdcf4e2fab98e6aa5b", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "12", + "chainname" : "B", + "rlp" : "0xf90261f901f9a0b741e7ccc5b36f0903bf60c47d6a7958bd802735aa8d3708da9a024b8aab8742a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e93dbbfd3ff7905c3889e575eed1b46f8d67a84b6342cff5ec868995a1879608a05b73d32aa4b7172b3064dee08c22dec4812648a8490418fdcf4e2fab98e6aa5ba08c896a3b944e3bb69493ccfc8e1bd4988018988dd29db332d2d2b95410a7e075b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202c00c832fefd882520884561bbe6480a0dc0f16d527991e38761f20fbd7aa41d9dca1500eef65bf33c7c14525a2d6c86388b8da876e018091b1f862f8600b018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0ee5e234f538dc4117ebd96c6969cfc2496aeb3c8ad53e09c7c93b7c9f1edb578a071e5d89881c2532fc4c7a86205a13e088ec7d42a5a1536c6868657eef38ac370c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0b", + "r" : "0xee5e234f538dc4117ebd96c6969cfc2496aeb3c8ad53e09c7c93b7c9f1edb578", + "s" : "0x71e5d89881c2532fc4c7a86205a13e088ec7d42a5a1536c6868657eef38ac370", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020300", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "db1c390b38a944d05babc9b7155a959d19c3046cd7b8c53bd4642a344b49c411", + "mixHash" : "a7596bd08e197f79343385ddf855dd68e388f6c2208cf52fb86f87d366180152", + "nonce" : "045b44e633c2b9c4", + "number" : "0x0d", + "parentHash" : "0a55c680dc4102eb2ea613ee224665ff7e932d8f754b923d8e7b9f0322838530", + "receiptTrie" : "9b10073277b9619756d1477f9cb11c16ec624d0ea3a52820b919867eca991ee9", + "stateRoot" : "3e9e9f822b3754ee6338ec7692d2285645ee7fa78c171c07a39a44afc4f9b1c3", + "timestamp" : "0x561bbe66", + "transactionsTrie" : "f64ce2ea054addda1b7facc170287aa7797c3d0757b7f1b12dcf65dc5cb262d2", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "13", + "chainname" : "B", + "rlp" : "0xf90261f901f9a00a55c680dc4102eb2ea613ee224665ff7e932d8f754b923d8e7b9f0322838530a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a03e9e9f822b3754ee6338ec7692d2285645ee7fa78c171c07a39a44afc4f9b1c3a0f64ce2ea054addda1b7facc170287aa7797c3d0757b7f1b12dcf65dc5cb262d2a09b10073277b9619756d1477f9cb11c16ec624d0ea3a52820b919867eca991ee9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203000d832fefd882520884561bbe6680a0a7596bd08e197f79343385ddf855dd68e388f6c2208cf52fb86f87d36618015288045b44e633c2b9c4f862f8600c018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0ccab735de9b12cd53c7cd182b07b725ec3ac3b93ddf66cbf5019780d0555469fa001f3cd01de38240c4dd6a55dada821b52e4a0b703c07ac4c0536d9e529bff067c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0c", + "r" : "0xccab735de9b12cd53c7cd182b07b725ec3ac3b93ddf66cbf5019780d0555469f", + "s" : "0x01f3cd01de38240c4dd6a55dada821b52e4a0b703c07ac4c0536d9e529bff067", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020340", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "0f056366aee24dc32720e46fee3da9c98cada4a5617eb49f64ba0d12825eaa85", + "mixHash" : "a29e95aab468947bcdf06e167a148df084fc468ec18cec0a7e419f77cbf303a1", + "nonce" : "3ecfb8d0f2688001", + "number" : "0x0e", + "parentHash" : "db1c390b38a944d05babc9b7155a959d19c3046cd7b8c53bd4642a344b49c411", + "receiptTrie" : "8a2af43583b83004562bb7c1dcb18788217efbb751c528bbc004b78465c0c2b6", + "stateRoot" : "6b6655432d4253991ee3aad77a0ee483b579cb3f3f16e06032af894348d7d744", + "timestamp" : "0x561bbe68", + "transactionsTrie" : "0d8184e443e2a71eee3edd9df0358ef1ad4524a423b2f14e0a2195e943212431", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "14", + "chainname" : "B", + "rlp" : "0xf90261f901f9a0db1c390b38a944d05babc9b7155a959d19c3046cd7b8c53bd4642a344b49c411a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a06b6655432d4253991ee3aad77a0ee483b579cb3f3f16e06032af894348d7d744a00d8184e443e2a71eee3edd9df0358ef1ad4524a423b2f14e0a2195e943212431a08a2af43583b83004562bb7c1dcb18788217efbb751c528bbc004b78465c0c2b6b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203400e832fefd882520884561bbe6880a0a29e95aab468947bcdf06e167a148df084fc468ec18cec0a7e419f77cbf303a1883ecfb8d0f2688001f862f8600d018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca06018d1b319dc81ae1bef944e6f253ce887bcf9630ac725bcc237e44b157a556ea053a855c5ffd62f316cbeaa39287a45155ca812ac171aab55025d3132df67a4d6c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0d", + "r" : "0x6018d1b319dc81ae1bef944e6f253ce887bcf9630ac725bcc237e44b157a556e", + "s" : "0x53a855c5ffd62f316cbeaa39287a45155ca812ac171aab55025d3132df67a4d6", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020380", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "906adf97d93f7a30aa2119ab2d77aac41f1b0fec2082ec27348f5f75e30d96f2", + "mixHash" : "da1d18982c3486feb6a2c77e9d9d1191a6ab0a24a6732a995d55aa4423c012b3", + "nonce" : "e187e92c94581ad2", + "number" : "0x0f", + "parentHash" : "0f056366aee24dc32720e46fee3da9c98cada4a5617eb49f64ba0d12825eaa85", + "receiptTrie" : "3dff23ec957ef61ccdceb4f7d61980f9f2c8f0cf38e1b13726dd6638c80862b3", + "stateRoot" : "17f9b68e15e133af101a73afe089d0acf5439c4f1687e434f49b34fc95e32884", + "timestamp" : "0x561bbe6a", + "transactionsTrie" : "ab603fa23c66cf02cba365cfbca0e922b2c94a759c912642b6cd77bb12922158", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "15", + "chainname" : "B", + "rlp" : "0xf90261f901f9a00f056366aee24dc32720e46fee3da9c98cada4a5617eb49f64ba0d12825eaa85a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a017f9b68e15e133af101a73afe089d0acf5439c4f1687e434f49b34fc95e32884a0ab603fa23c66cf02cba365cfbca0e922b2c94a759c912642b6cd77bb12922158a03dff23ec957ef61ccdceb4f7d61980f9f2c8f0cf38e1b13726dd6638c80862b3b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203800f832fefd882520884561bbe6a80a0da1d18982c3486feb6a2c77e9d9d1191a6ab0a24a6732a995d55aa4423c012b388e187e92c94581ad2f862f8600e018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba02256d59c49e81c2b4bea6ecffb5b455a268ab9c912cfe5f91e69dda1a4994a9ba01d3fab2e752f8fa96f74c839197bea850ba5d52201db4a9201aba01774cb0d20c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0e", + "r" : "0x2256d59c49e81c2b4bea6ecffb5b455a268ab9c912cfe5f91e69dda1a4994a9b", + "s" : "0x1d3fab2e752f8fa96f74c839197bea850ba5d52201db4a9201aba01774cb0d20", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0203c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "c535474834d4088a151d85ac722cb182b7f637947d5940b1f4230b723a9626a4", + "mixHash" : "4557e268095c010a5d95e92ce7f092f6cba4a998d26222d74e0eb2c1c3fea3ff", + "nonce" : "e004ceb0f96e663b", + "number" : "0x10", + "parentHash" : "906adf97d93f7a30aa2119ab2d77aac41f1b0fec2082ec27348f5f75e30d96f2", + "receiptTrie" : "f5508ba396bd9950714328ff6e20bd9cbbdcf2dcdf1d8bb40576b57baf92c6ff", + "stateRoot" : "df8c0c9c4dbb3397127c7458c4c4ce7bf12883eee0c8c88f28e34605e589945c", + "timestamp" : "0x561bbe6c", + "transactionsTrie" : "4c36838cbbac671e1fc958bd3419e57782c8d0209c660f68a187f49682c6c813", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "16", + "chainname" : "B", + "rlp" : "0xf90261f901f9a0906adf97d93f7a30aa2119ab2d77aac41f1b0fec2082ec27348f5f75e30d96f2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0df8c0c9c4dbb3397127c7458c4c4ce7bf12883eee0c8c88f28e34605e589945ca04c36838cbbac671e1fc958bd3419e57782c8d0209c660f68a187f49682c6c813a0f5508ba396bd9950714328ff6e20bd9cbbdcf2dcdf1d8bb40576b57baf92c6ffb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203c010832fefd882520884561bbe6c80a04557e268095c010a5d95e92ce7f092f6cba4a998d26222d74e0eb2c1c3fea3ff88e004ceb0f96e663bf862f8600f018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca0a4a236541921c3bf6b36d2cd1dea2c84784b77464a77ce90d6333c081689d447a02d88dc33aa0f9b34b18c8c9d5e4e80b287714c2e6fb8bc1b1ed67b0093185e9bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0f", + "r" : "0xa4a236541921c3bf6b36d2cd1dea2c84784b77464a77ce90d6333c081689d447", + "s" : "0x2d88dc33aa0f9b34b18c8c9d5e4e80b287714c2e6fb8bc1b1ed67b0093185e9b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020400", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "78350759750266e1afa8b731b568bfb261e16ff8188daf69f48e18567011bb54", + "mixHash" : "8dd444ef99c0dadf5c2516c9f0616eb68b12aefc473f18ec03c3a50cb17cc422", + "nonce" : "66316f8b15a66cb3", + "number" : "0x11", + "parentHash" : "c535474834d4088a151d85ac722cb182b7f637947d5940b1f4230b723a9626a4", + "receiptTrie" : "dda9371e981175ab26550e8709adee55a092ced98e4d9cc599aa3a0a1d75af3b", + "stateRoot" : "0951e14743bc07bf71defce5b250bbd22894b47ca7ca3dff8280bdcccb5e90b0", + "timestamp" : "0x561bbe6e", + "transactionsTrie" : "70ed0dd5601fbcea519c185d7dbccf8a23d070e826b9a5863234bffde0755810", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "17", + "chainname" : "B", + "rlp" : "0xf90261f901f9a0c535474834d4088a151d85ac722cb182b7f637947d5940b1f4230b723a9626a4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00951e14743bc07bf71defce5b250bbd22894b47ca7ca3dff8280bdcccb5e90b0a070ed0dd5601fbcea519c185d7dbccf8a23d070e826b9a5863234bffde0755810a0dda9371e981175ab26550e8709adee55a092ced98e4d9cc599aa3a0a1d75af3bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302040011832fefd882520884561bbe6e80a08dd444ef99c0dadf5c2516c9f0616eb68b12aefc473f18ec03c3a50cb17cc4228866316f8b15a66cb3f862f86010018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba03e5e3d2d83a0aeaca5aa36199f360f481219f66de6b1c50c72511bfb2f2a7119a0181c83e9744e3d8d1d08515377d5f436b881b4f906384b55f6627d2565471157c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x10", + "r" : "0x3e5e3d2d83a0aeaca5aa36199f360f481219f66de6b1c50c72511bfb2f2a7119", + "s" : "0x181c83e9744e3d8d1d08515377d5f436b881b4f906384b55f6627d2565471157", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020440", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "4ff2050d1cd108705b32a4d106b37dcccb65249c0f67649af2280d38575a963f", + "mixHash" : "d9323cb18b5817828aea9e5bb0349b6d17cd73830fbd06d2ba08210f4b407700", + "nonce" : "367120b580cd21af", + "number" : "0x12", + "parentHash" : "78350759750266e1afa8b731b568bfb261e16ff8188daf69f48e18567011bb54", + "receiptTrie" : "00450bfba92949bf13863e94b4757099da4c8c583caf9d793b28999830dca9f8", + "stateRoot" : "fae2ee21c3620d9ea455b83b9954ff0b6975e9e5b6dabb6ec2685aab64120959", + "timestamp" : "0x561bbe70", + "transactionsTrie" : "463dbf79c094bf7bb9d141bd1bd6d572e27e998e3d52b3ce107e8a663a2f31ac", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "18", + "chainname" : "B", + "rlp" : "0xf90261f901f9a078350759750266e1afa8b731b568bfb261e16ff8188daf69f48e18567011bb54a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0fae2ee21c3620d9ea455b83b9954ff0b6975e9e5b6dabb6ec2685aab64120959a0463dbf79c094bf7bb9d141bd1bd6d572e27e998e3d52b3ce107e8a663a2f31aca000450bfba92949bf13863e94b4757099da4c8c583caf9d793b28999830dca9f8b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302044012832fefd882520884561bbe7080a0d9323cb18b5817828aea9e5bb0349b6d17cd73830fbd06d2ba08210f4b40770088367120b580cd21aff862f86011018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba04e0f45053eb6912e49cc5fd3dce1ce33f9b20a26155c34d580fc059c037190eaa001bd5e5ad9ec32594a0894d0bc5de8525ed73a7769415fec418fb3d8c89d447fc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x11", + "r" : "0x4e0f45053eb6912e49cc5fd3dce1ce33f9b20a26155c34d580fc059c037190ea", + "s" : "0x01bd5e5ad9ec32594a0894d0bc5de8525ed73a7769415fec418fb3d8c89d447f", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020480", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "a9912139e35b4d8dba3b25dbb6c60079a336b617524589628c81fc3ca180b899", + "mixHash" : "f0807da39184f044d57f3166e7aa8254b812b2184f219370e7976ba1a4cfcc9e", + "nonce" : "fab356d3e0f5ecde", + "number" : "0x13", + "parentHash" : "4ff2050d1cd108705b32a4d106b37dcccb65249c0f67649af2280d38575a963f", + "receiptTrie" : "91b19af8e8768df44df03dd611ea8107d567600b80cc3b24a45bfc80787a6446", + "stateRoot" : "49a03e645d1c207076cbdfeb65c7f20b85d4ec500e9c5af7891f20b558567880", + "timestamp" : "0x561bbe72", + "transactionsTrie" : "8863887f05d59b293ec0db56c72647df94d4637c21f9382a12d7ad23db45a395", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "19", + "chainname" : "B", + "rlp" : "0xf90261f901f9a04ff2050d1cd108705b32a4d106b37dcccb65249c0f67649af2280d38575a963fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a049a03e645d1c207076cbdfeb65c7f20b85d4ec500e9c5af7891f20b558567880a08863887f05d59b293ec0db56c72647df94d4637c21f9382a12d7ad23db45a395a091b19af8e8768df44df03dd611ea8107d567600b80cc3b24a45bfc80787a6446b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302048013832fefd882520884561bbe7280a0f0807da39184f044d57f3166e7aa8254b812b2184f219370e7976ba1a4cfcc9e88fab356d3e0f5ecdef862f86012018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0e5b519cf27dda89da2dafdbcb32e77bedd800a5fdc61e74d32c226c932c4946da0421ed33a37e84c4608005edb92fd8a58db78e86cd8a85ff77c3d5704f2249184c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x12", + "r" : "0xe5b519cf27dda89da2dafdbcb32e77bedd800a5fdc61e74d32c226c932c4946d", + "s" : "0x421ed33a37e84c4608005edb92fd8a58db78e86cd8a85ff77c3d5704f2249184", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0204c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "2aafbc6055f2a02c36a4bd8c47f8d99d13612183b98b992ae06fd62e0e2c47cd", + "mixHash" : "8591f93b5b31c900fe4d0fcab9196e3907c6eda47b3cac5c0ebd5b21ec9b5341", + "nonce" : "5ba932abef3de536", + "number" : "0x14", + "parentHash" : "a9912139e35b4d8dba3b25dbb6c60079a336b617524589628c81fc3ca180b899", + "receiptTrie" : "c52f0f8f868a397773b4a945f9b9e345189902aad3b2f0240d65160cacf56d92", + "stateRoot" : "1659d63a65556ed5dc0fc234d01f62ad91ba978980ab1bbf139804b6858fca6d", + "timestamp" : "0x561bbe74", + "transactionsTrie" : "c5c196b35af61759148fce1e613eefdc17d0b3d8e2a8c055e1ac6cbe015a1ac2", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "20", + "chainname" : "B", + "rlp" : "0xf90261f901f9a0a9912139e35b4d8dba3b25dbb6c60079a336b617524589628c81fc3ca180b899a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01659d63a65556ed5dc0fc234d01f62ad91ba978980ab1bbf139804b6858fca6da0c5c196b35af61759148fce1e613eefdc17d0b3d8e2a8c055e1ac6cbe015a1ac2a0c52f0f8f868a397773b4a945f9b9e345189902aad3b2f0240d65160cacf56d92b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830204c014832fefd882520884561bbe7480a08591f93b5b31c900fe4d0fcab9196e3907c6eda47b3cac5c0ebd5b21ec9b5341885ba932abef3de536f862f86013018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba03f001199e788ac74a6cd5749b631b33348aeceda7c122aa19cd9560048fc6a89a0215cec631412851c758cd588f1c6590d97372232e39a203e7694f00cdb82c1b6c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x13", + "r" : "0x3f001199e788ac74a6cd5749b631b33348aeceda7c122aa19cd9560048fc6a89", + "s" : "0x215cec631412851c758cd588f1c6590d97372232e39a203e7694f00cdb82c1b6", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020500", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "9825c76d361c63999d87f6fbdde80e0540795c25f3aa534e2c1a02d56c027483", + "mixHash" : "ac629deb6e661b072909c70bf3f59b9d7ea29e7e557fef2e474c89a05f5f6603", + "nonce" : "6079fdccf88d93f1", + "number" : "0x15", + "parentHash" : "2aafbc6055f2a02c36a4bd8c47f8d99d13612183b98b992ae06fd62e0e2c47cd", + "receiptTrie" : "185351a5a096e69165fdd9658627b918741d3e06d2d7a904a3c2bd8704224768", + "stateRoot" : "98874550deee52530b6020d20c740596775dc0108fbe44f8fca8b3a3576df928", + "timestamp" : "0x561bbe76", + "transactionsTrie" : "c204c43d2a8dd01cc6510e6933029a6d2bea82ec89c2b201e5513774017dc444", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "21", + "chainname" : "B", + "rlp" : "0xf90261f901f9a02aafbc6055f2a02c36a4bd8c47f8d99d13612183b98b992ae06fd62e0e2c47cda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a098874550deee52530b6020d20c740596775dc0108fbe44f8fca8b3a3576df928a0c204c43d2a8dd01cc6510e6933029a6d2bea82ec89c2b201e5513774017dc444a0185351a5a096e69165fdd9658627b918741d3e06d2d7a904a3c2bd8704224768b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302050015832fefd882520884561bbe7680a0ac629deb6e661b072909c70bf3f59b9d7ea29e7e557fef2e474c89a05f5f6603886079fdccf88d93f1f862f86014018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca09790cf3c15a92fa654cf909a47eb19c189325aa9367468f3ed24149c9f413517a033311b25fc05a104c02a2c314afbd9040308f83a97be4e9a56ea24da7728597bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x14", + "r" : "0x9790cf3c15a92fa654cf909a47eb19c189325aa9367468f3ed24149c9f413517", + "s" : "0x33311b25fc05a104c02a2c314afbd9040308f83a97be4e9a56ea24da7728597b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020540", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "0cf382c80a78e2777a6cb5a428c5e4e058f14338647f1d5136fe847b462325eb", + "mixHash" : "c5409f513578b6bd8aa4442fbabd50b5d04c4366a3851d84773811a9148306df", + "nonce" : "49211cdcb1787495", + "number" : "0x16", + "parentHash" : "9825c76d361c63999d87f6fbdde80e0540795c25f3aa534e2c1a02d56c027483", + "receiptTrie" : "fd6941b78497d941069eaab9f9ce3a225911000fe8c8e4ae9bd8c5e540c59c26", + "stateRoot" : "f4a30787d91fa8bb40a007a029c94564d719e4cec77088428dee0ab2458ead37", + "timestamp" : "0x561bbe78", + "transactionsTrie" : "4403b5d3355ac7868529e0f487470b2e91e6d3b4f7981e9fc0824c109c0cb2ee", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "22", + "chainname" : "B", + "rlp" : "0xf90261f901f9a09825c76d361c63999d87f6fbdde80e0540795c25f3aa534e2c1a02d56c027483a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f4a30787d91fa8bb40a007a029c94564d719e4cec77088428dee0ab2458ead37a04403b5d3355ac7868529e0f487470b2e91e6d3b4f7981e9fc0824c109c0cb2eea0fd6941b78497d941069eaab9f9ce3a225911000fe8c8e4ae9bd8c5e540c59c26b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302054016832fefd882520884561bbe7880a0c5409f513578b6bd8aa4442fbabd50b5d04c4366a3851d84773811a9148306df8849211cdcb1787495f862f86015018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca085495f9fa1799af76f4ee58809c223dc2966a3d2b319a6ac3d723377d12decc4a00e770d5ecf00a436ca91497f4942e5e6fb48c14aadf81c003a22074c9a8cf6b5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x15", + "r" : "0x85495f9fa1799af76f4ee58809c223dc2966a3d2b319a6ac3d723377d12decc4", + "s" : "0x0e770d5ecf00a436ca91497f4942e5e6fb48c14aadf81c003a22074c9a8cf6b5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020580", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "8f2adab7b36503658e41f8f1a8e3c2ad1f9719bd76941a4063b9694b69acbcf6", + "mixHash" : "39b07471e003df456e6b50b2d247ffc91985e55d6ab48eb82a4ca4803b289cad", + "nonce" : "0a048cbb0436b2f3", + "number" : "0x17", + "parentHash" : "0cf382c80a78e2777a6cb5a428c5e4e058f14338647f1d5136fe847b462325eb", + "receiptTrie" : "57b6b1dcf58dc35cd1150d1b21c4cf64ad349d06b62e900d07eb3f822857dfa3", + "stateRoot" : "0df98c2493347eb6de6bd333ef57c69cea13643c8c28590f86f55ffc5a1a05a3", + "timestamp" : "0x561bbe7b", + "transactionsTrie" : "228353d9bf2624fb1d870baa6791be04ef132b467eab0269b5059dc78fa0bf96", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "23", + "chainname" : "B", + "rlp" : "0xf90261f901f9a00cf382c80a78e2777a6cb5a428c5e4e058f14338647f1d5136fe847b462325eba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00df98c2493347eb6de6bd333ef57c69cea13643c8c28590f86f55ffc5a1a05a3a0228353d9bf2624fb1d870baa6791be04ef132b467eab0269b5059dc78fa0bf96a057b6b1dcf58dc35cd1150d1b21c4cf64ad349d06b62e900d07eb3f822857dfa3b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302058017832fefd882520884561bbe7b80a039b07471e003df456e6b50b2d247ffc91985e55d6ab48eb82a4ca4803b289cad880a048cbb0436b2f3f862f86016018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0ed40c8a5290161fe5e76673afa3a37cff6d91c9bb88d3bf2e48a8502852a9ecca02bc03f3f9e2bf4eec99b2d09208f5b14ab4ff5e32ead615afbbe591b472fcbe4c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x16", + "r" : "0xed40c8a5290161fe5e76673afa3a37cff6d91c9bb88d3bf2e48a8502852a9ecc", + "s" : "0x2bc03f3f9e2bf4eec99b2d09208f5b14ab4ff5e32ead615afbbe591b472fcbe4", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0205c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "2c20de13fcbcf9ce43bd29fe194aa82aed2a4641b87a1a839ddf3a3608a6fa34", + "mixHash" : "440638989e3458d0b402dee0f2975102e5b398f070ff5af3b72aa8a5c943dada", + "nonce" : "2384e3ef0a8f1042", + "number" : "0x18", + "parentHash" : "8f2adab7b36503658e41f8f1a8e3c2ad1f9719bd76941a4063b9694b69acbcf6", + "receiptTrie" : "7dd52c9ac92684990ad96504b8aa775c82ed26552f91ce18d08287f84a6afc79", + "stateRoot" : "38e9f4ac22fcd2a42c89bbbc8d783d3a712ce64ca3f36e68d9e019f92a9542fe", + "timestamp" : "0x561bbe7d", + "transactionsTrie" : "9011039dae549a2ff0d1b62ef7666d36978d1529a863c2b49cd60a3c43b7b4f8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "24", + "chainname" : "B", + "rlp" : "0xf90261f901f9a08f2adab7b36503658e41f8f1a8e3c2ad1f9719bd76941a4063b9694b69acbcf6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a038e9f4ac22fcd2a42c89bbbc8d783d3a712ce64ca3f36e68d9e019f92a9542fea09011039dae549a2ff0d1b62ef7666d36978d1529a863c2b49cd60a3c43b7b4f8a07dd52c9ac92684990ad96504b8aa775c82ed26552f91ce18d08287f84a6afc79b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830205c018832fefd882520884561bbe7d80a0440638989e3458d0b402dee0f2975102e5b398f070ff5af3b72aa8a5c943dada882384e3ef0a8f1042f862f86017018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0dddd8e57d3cb5bd1808e29644e418f7181cf6f4d646945a36eb75a2bd2af8097a031b2ecf87fdae72809f621cd275dff31aab292427fe18a07880d464157be2d10c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x17", + "r" : "0xdddd8e57d3cb5bd1808e29644e418f7181cf6f4d646945a36eb75a2bd2af8097", + "s" : "0x31b2ecf87fdae72809f621cd275dff31aab292427fe18a07880d464157be2d10", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020600", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "3ddcb21497ae156045ea59dbf7f8678765f2f4f88ff838d2d036bbb502c0182c", + "mixHash" : "d8e1de3c527c5c8868c45f88e4cdca467c97b41a2e2ea676b0a04a6b8c182c4c", + "nonce" : "69caaaa03c4f4b48", + "number" : "0x19", + "parentHash" : "2c20de13fcbcf9ce43bd29fe194aa82aed2a4641b87a1a839ddf3a3608a6fa34", + "receiptTrie" : "f1085c96256447f130bbe37d5d5a8b5f7d8f9b7b02bdd2580bcd474fdbc12334", + "stateRoot" : "d3d60d62757820a24443f6b60b2be95fae17c1f44854051af58de51170cd4233", + "timestamp" : "0x561bbe7e", + "transactionsTrie" : "f6c8ea5cae2659d01fee8dc3b5e717c434084c38eb0106f67893146684b7bd59", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "25", + "chainname" : "B", + "rlp" : "0xf90261f901f9a02c20de13fcbcf9ce43bd29fe194aa82aed2a4641b87a1a839ddf3a3608a6fa34a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d3d60d62757820a24443f6b60b2be95fae17c1f44854051af58de51170cd4233a0f6c8ea5cae2659d01fee8dc3b5e717c434084c38eb0106f67893146684b7bd59a0f1085c96256447f130bbe37d5d5a8b5f7d8f9b7b02bdd2580bcd474fdbc12334b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302060019832fefd882520884561bbe7e80a0d8e1de3c527c5c8868c45f88e4cdca467c97b41a2e2ea676b0a04a6b8c182c4c8869caaaa03c4f4b48f862f86018018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca00de6eb26cd9013ecc6669e12a9e830993c36eb16a8147da91416d2c188968620a048cbebed36a3b4242b03ead75eb6395536c15d0b0dce78202de245ed6659b776c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x18", + "r" : "0x0de6eb26cd9013ecc6669e12a9e830993c36eb16a8147da91416d2c188968620", + "s" : "0x48cbebed36a3b4242b03ead75eb6395536c15d0b0dce78202de245ed6659b776", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020640", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "bb1bfed127475c99f11c40f672fd8dd077643b3fcaf4a397d0bbeccdde279aec", + "mixHash" : "a1fbbe2cfde2142e92164f4b4f476f93ec7f531aecf22cb6ba2bea59318b028e", + "nonce" : "464f231a07ec078f", + "number" : "0x1a", + "parentHash" : "3ddcb21497ae156045ea59dbf7f8678765f2f4f88ff838d2d036bbb502c0182c", + "receiptTrie" : "af115ffe30ee7f2bb86de6882b7faeb1d6cca834e55906db0a3d36abe9137c66", + "stateRoot" : "748a638b7cb7a354e37b3350351140bcb5758add880cdc2dd42a04cd7b7db8bd", + "timestamp" : "0x561bbe80", + "transactionsTrie" : "12e846ad4241c429426b5ac91193eb02a70a8a572bdc8ef0eb39acd38bf55f07", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "26", + "chainname" : "B", + "rlp" : "0xf90261f901f9a03ddcb21497ae156045ea59dbf7f8678765f2f4f88ff838d2d036bbb502c0182ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0748a638b7cb7a354e37b3350351140bcb5758add880cdc2dd42a04cd7b7db8bda012e846ad4241c429426b5ac91193eb02a70a8a572bdc8ef0eb39acd38bf55f07a0af115ffe30ee7f2bb86de6882b7faeb1d6cca834e55906db0a3d36abe9137c66b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830206401a832fefd882520884561bbe8080a0a1fbbe2cfde2142e92164f4b4f476f93ec7f531aecf22cb6ba2bea59318b028e88464f231a07ec078ff862f86019018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca05a86e2db51cc8909ac781a1000480ed69bc64861b495cb1dc3f7aa39127ff9a1a07b0fb273169a8d59fbf7be0a152eb2a55d0a63ff4d0a0f1246de11fb87aa9171c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x19", + "r" : "0x5a86e2db51cc8909ac781a1000480ed69bc64861b495cb1dc3f7aa39127ff9a1", + "s" : "0x7b0fb273169a8d59fbf7be0a152eb2a55d0a63ff4d0a0f1246de11fb87aa9171", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f51cc04c24ec96116361e6ac4da7794bf7dc2b761935c9b411001ae87ffdb481", + "mixHash" : "6cb6f09534939735d910e28a2d4209b8d4867dd69b7eb014a0dcc8ba09096be7", + "nonce" : "2d5916b161321f90", + "number" : "0x01", + "parentHash" : "358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bd", + "receiptTrie" : "7e8810b6679c2fb4a35a4cb2c857acdec17e1b274845847466e17e4618a12333", + "stateRoot" : "64b147da7f348a7b908f9691d764632a070d6083b42a19081596beb76bde9825", + "timestamp" : "0x561bbe81", + "transactionsTrie" : "2574dfc54462f4c2d9017b3ef2b389e0fa64aade0cdc42cac797f27bab9b427e", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "C", + "rlp" : "0xf90263f901f9a0358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a064b147da7f348a7b908f9691d764632a070d6083b42a19081596beb76bde9825a02574dfc54462f4c2d9017b3ef2b389e0fa64aade0cdc42cac797f27bab9b427ea07e8810b6679c2fb4a35a4cb2c857acdec17e1b274845847466e17e4618a12333b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bbe8180a06cb6f09534939735d910e28a2d4209b8d4867dd69b7eb014a0dcc8ba09096be7882d5916b161321f90f864f86280018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca07c76817e5b018f8e7c2c61773ca204a56a37a881cd13b73444dd43c58a623c2aa063355a29a46f232ada6ce9795c8ce04ccb3dde836369f5b54373b200f34aa466c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x7c76817e5b018f8e7c2c61773ca204a56a37a881cd13b73444dd43c58a623c2a", + "s" : "0x63355a29a46f232ada6ce9795c8ce04ccb3dde836369f5b54373b200f34aa466", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "9959f03cad0cc7c40d380255363141a49e07eec5d846b33c1918b1d2c869ae16", + "mixHash" : "5f8ac9a543aa5c89d6890a2a96ab31e70301b90f3fb3cf4f2c26f73db192da05", + "nonce" : "9211fb23abdafdaa", + "number" : "0x02", + "parentHash" : "f51cc04c24ec96116361e6ac4da7794bf7dc2b761935c9b411001ae87ffdb481", + "receiptTrie" : "0eebe5325d39ccaab5a280886b3faf1018cb464d19f1d10d8bfe790df06a7d3e", + "stateRoot" : "753ce439a3af7b3464d9d8696d4447d9aa34aa032abf439f7a0ca66f0689a069", + "timestamp" : "0x561bbe83", + "transactionsTrie" : "63982f66df5bc78afeb0b6e464d74ffdbd6002bf2be35ddcef62bdabc3897286", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "C", + "rlp" : "0xf90263f901f9a0f51cc04c24ec96116361e6ac4da7794bf7dc2b761935c9b411001ae87ffdb481a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0753ce439a3af7b3464d9d8696d4447d9aa34aa032abf439f7a0ca66f0689a069a063982f66df5bc78afeb0b6e464d74ffdbd6002bf2be35ddcef62bdabc3897286a00eebe5325d39ccaab5a280886b3faf1018cb464d19f1d10d8bfe790df06a7d3eb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bbe8380a05f8ac9a543aa5c89d6890a2a96ab31e70301b90f3fb3cf4f2c26f73db192da05889211fb23abdafdaaf864f86201018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca021d588468763a8039aab65fc130d08e11e58f947caa822986ff556196f83182ba03e5d76a800fc0025e78d9a0b44e7515230b6b15b36ec3697a3e74fe04b36bf15c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x21d588468763a8039aab65fc130d08e11e58f947caa822986ff556196f83182b", + "s" : "0x3e5d76a800fc0025e78d9a0b44e7515230b6b15b36ec3697a3e74fe04b36bf15", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "5408bf6fe3fd6e35520cbf43e538633ae0187db8d220d2b4ba844ed2b4007b4b", + "mixHash" : "996867aaedd281d1b94aee365f8354f4f7b1b93a20fb43bea96f3531c674c383", + "nonce" : "1c6425138e1a099c", + "number" : "0x03", + "parentHash" : "9959f03cad0cc7c40d380255363141a49e07eec5d846b33c1918b1d2c869ae16", + "receiptTrie" : "5e4896d2ca61a941d960b442762206ddb1bde28f9a01b19dea6b5c88bd4dc377", + "stateRoot" : "29bd8543d5fe1f522badabba89bc4d997cb997ef2e0b21317e0ef0ad5df57a82", + "timestamp" : "0x561bbe84", + "transactionsTrie" : "6383b235ef2035477263a5d8459733e2700db28e90dc1c828b3e1ac4516a565f", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "C", + "rlp" : "0xf90263f901f9a09959f03cad0cc7c40d380255363141a49e07eec5d846b33c1918b1d2c869ae16a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a029bd8543d5fe1f522badabba89bc4d997cb997ef2e0b21317e0ef0ad5df57a82a06383b235ef2035477263a5d8459733e2700db28e90dc1c828b3e1ac4516a565fa05e4896d2ca61a941d960b442762206ddb1bde28f9a01b19dea6b5c88bd4dc377b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bbe8480a0996867aaedd281d1b94aee365f8354f4f7b1b93a20fb43bea96f3531c674c383881c6425138e1a099cf864f86202018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba06a406c9db6d00df058a7a0cf44e6bbb3fd0dc1a42375f5874a6f9ee79dfc2d33a068a16f421613a6db4f48aeb51f1823b1d1935167101441c5163c0825f60d32d1c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x6a406c9db6d00df058a7a0cf44e6bbb3fd0dc1a42375f5874a6f9ee79dfc2d33", + "s" : "0x68a16f421613a6db4f48aeb51f1823b1d1935167101441c5163c0825f60d32d1", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "aaf4dc35045b732e584a702489b940a0a0013074d4de55469acbaffc91d14176", + "mixHash" : "4a1733e3dc290852c79d62442733badfeb171620aee2808a3cc8d2be46c2aeaa", + "nonce" : "cfa62511be75f090", + "number" : "0x04", + "parentHash" : "5408bf6fe3fd6e35520cbf43e538633ae0187db8d220d2b4ba844ed2b4007b4b", + "receiptTrie" : "21f2fa4e150ba5ad8d759007b38194aee1d3c08796214d6b8ab06b74978e66ac", + "stateRoot" : "2fa405602b7f1f41f7ccdb2d9f0a90656b797ee8c1301e2973eee08dd3344bd8", + "timestamp" : "0x561bbe88", + "transactionsTrie" : "7bf5f5f5d5e03c8a626ddaafc54669b4a2141302069c4ec0a3d8c8a07e653512", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "chainname" : "C", + "rlp" : "0xf90263f901f9a05408bf6fe3fd6e35520cbf43e538633ae0187db8d220d2b4ba844ed2b4007b4ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a02fa405602b7f1f41f7ccdb2d9f0a90656b797ee8c1301e2973eee08dd3344bd8a07bf5f5f5d5e03c8a626ddaafc54669b4a2141302069c4ec0a3d8c8a07e653512a021f2fa4e150ba5ad8d759007b38194aee1d3c08796214d6b8ab06b74978e66acb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bbe8880a04a1733e3dc290852c79d62442733badfeb171620aee2808a3cc8d2be46c2aeaa88cfa62511be75f090f864f86203018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca0f89468364d038b348ede7e2cf022313138b408ec07d9c648f89d51ba73d63466a02f52d4e977921416022574d20408d57e995e6aaa6690995a7071ba621da2aa25c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0xf89468364d038b348ede7e2cf022313138b408ec07d9c648f89d51ba73d63466", + "s" : "0x2f52d4e977921416022574d20408d57e995e6aaa6690995a7071ba621da2aa25", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f19c0b9b1e7b8d44514dba43f10617f68ada44bbb8ca45d6f9647b5f396bebcf", + "mixHash" : "ee36d2412f5549607a2a8d3ad154c76f7e2acd4c7761a59b5606ae121fccdb50", + "nonce" : "8dbaa048bff784ed", + "number" : "0x05", + "parentHash" : "aaf4dc35045b732e584a702489b940a0a0013074d4de55469acbaffc91d14176", + "receiptTrie" : "d4a9762fe3b41aa50cd37486b394cd330a1e33c93c54987489de4ac04c289f68", + "stateRoot" : "5f61e64de74ffe8521a823be0e28cefd21ae98e4d4ae4d4043beebee751390e9", + "timestamp" : "0x561bbe8e", + "transactionsTrie" : "4f943076ed6d0fe8a48a29a03827fd08ef201f68f7705dc0f266f46b35096a82", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "5", + "chainname" : "C", + "rlp" : "0xf90263f901f9a0aaf4dc35045b732e584a702489b940a0a0013074d4de55469acbaffc91d14176a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05f61e64de74ffe8521a823be0e28cefd21ae98e4d4ae4d4043beebee751390e9a04f943076ed6d0fe8a48a29a03827fd08ef201f68f7705dc0f266f46b35096a82a0d4a9762fe3b41aa50cd37486b394cd330a1e33c93c54987489de4ac04c289f68b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bbe8e80a0ee36d2412f5549607a2a8d3ad154c76f7e2acd4c7761a59b5606ae121fccdb50888dbaa048bff784edf864f86204018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba038f7697eaad439de7adb0a46a217846b63524ff9dd22f322fd902423ed4e9fc1a0702a8fa98029d52ad9f0e7756db8e2c8277f57e7ff356c4e12965cbed6603336c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0x38f7697eaad439de7adb0a46a217846b63524ff9dd22f322fd902423ed4e9fc1", + "s" : "0x702a8fa98029d52ad9f0e7756db8e2c8277f57e7ff356c4e12965cbed6603336", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "0dd8ad2eb0b79aad0af1189da4a31964d1043d596b470a6ffb983f19e9395b24", + "mixHash" : "b83d7a90a9670977e1c253915d0a1bb0b93872304931581c320add20897f716b", + "nonce" : "bba5a1ab6db4307a", + "number" : "0x06", + "parentHash" : "f19c0b9b1e7b8d44514dba43f10617f68ada44bbb8ca45d6f9647b5f396bebcf", + "receiptTrie" : "67fd88ba2e949b9e1fcb3f31db12f79756cb9907d6e44f61a64870f0b673df30", + "stateRoot" : "59b69d536feb0869c9910cd031b14317c66b683874f6c95028711c7f37fa7075", + "timestamp" : "0x561bbe8f", + "transactionsTrie" : "7398169245666b33176c90a74b67896f7f8abea4b40bcbb23515baa1ae5da884", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "chainname" : "C", + "rlp" : "0xf90263f901f9a0f19c0b9b1e7b8d44514dba43f10617f68ada44bbb8ca45d6f9647b5f396bebcfa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a059b69d536feb0869c9910cd031b14317c66b683874f6c95028711c7f37fa7075a07398169245666b33176c90a74b67896f7f8abea4b40bcbb23515baa1ae5da884a067fd88ba2e949b9e1fcb3f31db12f79756cb9907d6e44f61a64870f0b673df30b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882520884561bbe8f80a0b83d7a90a9670977e1c253915d0a1bb0b93872304931581c320add20897f716b88bba5a1ab6db4307af864f86205018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca0c56d21b935548182582513c0ea834c0e8465e0ab6afd3f8ecaadf9b6f86df90ba04448927a2c68c5fb23ba817689ea20c8857790f77a5e92b58d9bb63a86d0afafc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0xc56d21b935548182582513c0ea834c0e8465e0ab6afd3f8ecaadf9b6f86df90b", + "s" : "0x4448927a2c68c5fb23ba817689ea20c8857790f77a5e92b58d9bb63a86d0afaf", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020180", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "4fde33e16dc62ff662661246e813981657b6176e69c2b0429fdc51d1c5ee13fe", + "mixHash" : "bef8845aa0216e5402ac8821ee41bf7391e1a6829b66f6ef042e21e09a6142c8", + "nonce" : "566498a10b96921b", + "number" : "0x07", + "parentHash" : "0dd8ad2eb0b79aad0af1189da4a31964d1043d596b470a6ffb983f19e9395b24", + "receiptTrie" : "b57372ec048cf23e16e5a781fd41e946d7de3ea930fa3f9b92793e058ad3c9f1", + "stateRoot" : "242fc61ea8592beb88170d29e2aeb601412af318b810913ca2d3ef37649cc9e2", + "timestamp" : "0x561bbe92", + "transactionsTrie" : "a4a354cd3764deb80d6b6f53c1f8d21f81a7eadcd39fec4dd6eedaf9368a7bf5", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "7", + "chainname" : "C", + "rlp" : "0xf90263f901f9a00dd8ad2eb0b79aad0af1189da4a31964d1043d596b470a6ffb983f19e9395b24a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0242fc61ea8592beb88170d29e2aeb601412af318b810913ca2d3ef37649cc9e2a0a4a354cd3764deb80d6b6f53c1f8d21f81a7eadcd39fec4dd6eedaf9368a7bf5a0b57372ec048cf23e16e5a781fd41e946d7de3ea930fa3f9b92793e058ad3c9f1b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882520884561bbe9280a0bef8845aa0216e5402ac8821ee41bf7391e1a6829b66f6ef042e21e09a6142c888566498a10b96921bf864f86206018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca0c543939d3748cd055d4ec5625d5acc551fce704a5414ab94a87a5f0aad4c07f7a0250513e0c9d6ae68b732485c034d6c271fe68f3b9f6f8053e494d3611a3e28d7c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x06", + "r" : "0xc543939d3748cd055d4ec5625d5acc551fce704a5414ab94a87a5f0aad4c07f7", + "s" : "0x250513e0c9d6ae68b732485c034d6c271fe68f3b9f6f8053e494d3611a3e28d7", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0201c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "620d0296e5e789fb9e0cb778a05ea1f94adf8a762060a21fd7017176d659a606", + "mixHash" : "d7490752a0dc29e6cad18e21c043d062d786ac17ce847a658b202d215331dba9", + "nonce" : "f71e623d935bcdff", + "number" : "0x08", + "parentHash" : "4fde33e16dc62ff662661246e813981657b6176e69c2b0429fdc51d1c5ee13fe", + "receiptTrie" : "7dfad130a7d0273aee6d478fa3fe6c9439ab82b81ed3fe001a203ae45a81e142", + "stateRoot" : "7393f73f38eb029a6540d1bd4357d6ffd1d91e1ba5559de5deb4f3b7382b73ce", + "timestamp" : "0x561bbe96", + "transactionsTrie" : "cc76d7ecafc8d0b991fe3e7ebb855046c0a26f69d22acbf5048b5ba673ebc5f2", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "8", + "chainname" : "C", + "rlp" : "0xf90263f901f9a04fde33e16dc62ff662661246e813981657b6176e69c2b0429fdc51d1c5ee13fea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07393f73f38eb029a6540d1bd4357d6ffd1d91e1ba5559de5deb4f3b7382b73cea0cc76d7ecafc8d0b991fe3e7ebb855046c0a26f69d22acbf5048b5ba673ebc5f2a07dfad130a7d0273aee6d478fa3fe6c9439ab82b81ed3fe001a203ae45a81e142b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd882520884561bbe9680a0d7490752a0dc29e6cad18e21c043d062d786ac17ce847a658b202d215331dba988f71e623d935bcdfff864f86207018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba0f352b51bd7f09a31e7db39dc03668c417ade24f06838cf575b9a2eea05c149d9a01464dcf669ca806a16bbcfb79fd90c2b84322d46d8122e7376fd085c8fd33af9c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x07", + "r" : "0xf352b51bd7f09a31e7db39dc03668c417ade24f06838cf575b9a2eea05c149d9", + "s" : "0x1464dcf669ca806a16bbcfb79fd90c2b84322d46d8122e7376fd085c8fd33af9", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020200", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "d3df961d58cb2bde59faf6b3606d34fd5275193c5a952747c599f9cf4bbc6d6b", + "mixHash" : "86062c4462eb3e2254e195c3fd4c970142c68ed555fbcd41970f54d2817496f3", + "nonce" : "3ff4b2e63633d831", + "number" : "0x09", + "parentHash" : "620d0296e5e789fb9e0cb778a05ea1f94adf8a762060a21fd7017176d659a606", + "receiptTrie" : "91e451b0ab7543f0cfb721277bf6e6f35d84da01464dce1318fe49d4b010d56f", + "stateRoot" : "3147d14767eb9e771470e2e243a7ebdf8cc98c5c83965d83d5937b5780043628", + "timestamp" : "0x561bbe99", + "transactionsTrie" : "ead40f807418abfa7ec8d4de091d96a15ac228a4532555c8efb0cb6889fee1da", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "9", + "chainname" : "C", + "rlp" : "0xf90263f901f9a0620d0296e5e789fb9e0cb778a05ea1f94adf8a762060a21fd7017176d659a606a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a03147d14767eb9e771470e2e243a7ebdf8cc98c5c83965d83d5937b5780043628a0ead40f807418abfa7ec8d4de091d96a15ac228a4532555c8efb0cb6889fee1daa091e451b0ab7543f0cfb721277bf6e6f35d84da01464dce1318fe49d4b010d56fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd882520884561bbe9980a086062c4462eb3e2254e195c3fd4c970142c68ed555fbcd41970f54d2817496f3883ff4b2e63633d831f864f86208018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba03e36f57f83215822e9e654da5c13c9f67e399b6eb418624ce11a9779f1bd2ab6a03e1af47a333eccd19f4acafce859e185fba3a05356774277a5c74fa8f2d06a95c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x08", + "r" : "0x3e36f57f83215822e9e654da5c13c9f67e399b6eb418624ce11a9779f1bd2ab6", + "s" : "0x3e1af47a333eccd19f4acafce859e185fba3a05356774277a5c74fa8f2d06a95", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020240", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "77ef6b68043539a9d55dd1a0a742018d7fc682c39c0efd9934324a6fde9f7f1b", + "mixHash" : "1ce7b0a13057244c8831e6d5cfaeadcbe3ffd51ef1dca13ff9ce990c32ea6cb7", + "nonce" : "fd463fdfb5f7823c", + "number" : "0x0a", + "parentHash" : "d3df961d58cb2bde59faf6b3606d34fd5275193c5a952747c599f9cf4bbc6d6b", + "receiptTrie" : "4c358df09e2f19e91e8c400a3a1660ac29ae7c14e869e67f8f28bacc8837bdf0", + "stateRoot" : "74e8cafeb7e498b0596fb7d6c23ca4158e67a0570dba43833becf94baa53f88c", + "timestamp" : "0x561bbe9b", + "transactionsTrie" : "be421f5ce9516c65b10e7a7b40ebf127f8a5d497660adfd626ed0ba243f09b0d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "10", + "chainname" : "C", + "rlp" : "0xf90263f901f9a0d3df961d58cb2bde59faf6b3606d34fd5275193c5a952747c599f9cf4bbc6d6ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a074e8cafeb7e498b0596fb7d6c23ca4158e67a0570dba43833becf94baa53f88ca0be421f5ce9516c65b10e7a7b40ebf127f8a5d497660adfd626ed0ba243f09b0da04c358df09e2f19e91e8c400a3a1660ac29ae7c14e869e67f8f28bacc8837bdf0b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd882520884561bbe9b80a01ce7b0a13057244c8831e6d5cfaeadcbe3ffd51ef1dca13ff9ce990c32ea6cb788fd463fdfb5f7823cf864f86209018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba0392fedd9f10e7757c614650438d8990d133f26955ea4bc4b2060e21601c10f94a00e26019a5329eefd31833e854a73dbab301caed315aa84e91febc807900563e2c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x09", + "r" : "0x392fedd9f10e7757c614650438d8990d133f26955ea4bc4b2060e21601c10f94", + "s" : "0x0e26019a5329eefd31833e854a73dbab301caed315aa84e91febc807900563e2", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020280", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "aa6bc013d4146d672293088425a2b5f726662361700624792be2556ccb088361", + "mixHash" : "d8968c7678f2941bd059ad9d7abf8d8fc7ac1aea17f656da676f069121b40c49", + "nonce" : "abc13bc748ebf884", + "number" : "0x0b", + "parentHash" : "77ef6b68043539a9d55dd1a0a742018d7fc682c39c0efd9934324a6fde9f7f1b", + "receiptTrie" : "d0efd844000483a62c558d97be38d9c2e5cf8c2eb87ba6950ffa4d6b06a44e53", + "stateRoot" : "bea16f21f95f56833fabf1b68ce140823a9110d517ed86dbdc5921e11aab11df", + "timestamp" : "0x561bbe9e", + "transactionsTrie" : "81974b38c0381e3801372cf1592a02c972ee7018eaf75c415b0cbbf039b0ad0a", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "11", + "chainname" : "C", + "rlp" : "0xf90263f901f9a077ef6b68043539a9d55dd1a0a742018d7fc682c39c0efd9934324a6fde9f7f1ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0bea16f21f95f56833fabf1b68ce140823a9110d517ed86dbdc5921e11aab11dfa081974b38c0381e3801372cf1592a02c972ee7018eaf75c415b0cbbf039b0ad0aa0d0efd844000483a62c558d97be38d9c2e5cf8c2eb87ba6950ffa4d6b06a44e53b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202800b832fefd882520884561bbe9e80a0d8968c7678f2941bd059ad9d7abf8d8fc7ac1aea17f656da676f069121b40c4988abc13bc748ebf884f864f8620a018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba0d995ed2190893154ddcf005c185602a6745eeab526abad3090efeb0ce418dfd2a02131a9230c5c2a827b6b92a01aa75120468b94f4269e70c34f9f89063cf29bcec0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0a", + "r" : "0xd995ed2190893154ddcf005c185602a6745eeab526abad3090efeb0ce418dfd2", + "s" : "0x2131a9230c5c2a827b6b92a01aa75120468b94f4269e70c34f9f89063cf29bce", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0202c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "5683c77f8fac786d71b58fa82ed5adb1efbf963668e3ad0307a2ffb658442e7a", + "mixHash" : "7ed6eebb77e3614cb5ee8635b30a4f60bb13e7413fdb62d3c5dc883f5c3dd34e", + "nonce" : "3c42d1b67be4aae9", + "number" : "0x0c", + "parentHash" : "aa6bc013d4146d672293088425a2b5f726662361700624792be2556ccb088361", + "receiptTrie" : "539477926f10186f66fa0c96648b3c92fdab5cf702a06e47f119d87fb09196e0", + "stateRoot" : "4b0d1de39b627bb647d8f5756b2b2890db3eb19b4a7fd3c2bc370017bda1ca33", + "timestamp" : "0x561bbea2", + "transactionsTrie" : "e376b8ca1fa2eb15c8460212be7cd1f295a6dbdb2f47b7b0d7fa9d6e2fc42057", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "12", + "chainname" : "C", + "rlp" : "0xf90263f901f9a0aa6bc013d4146d672293088425a2b5f726662361700624792be2556ccb088361a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04b0d1de39b627bb647d8f5756b2b2890db3eb19b4a7fd3c2bc370017bda1ca33a0e376b8ca1fa2eb15c8460212be7cd1f295a6dbdb2f47b7b0d7fa9d6e2fc42057a0539477926f10186f66fa0c96648b3c92fdab5cf702a06e47f119d87fb09196e0b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202c00c832fefd882520884561bbea280a07ed6eebb77e3614cb5ee8635b30a4f60bb13e7413fdb62d3c5dc883f5c3dd34e883c42d1b67be4aae9f864f8620b018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba061f6acf066a31b5a9b0c74baf0de71d022f337c170fc465a827d6c50326e3e9ea018ec6b70fb2261c8d1f5364c2394f0003dd91fadffad7cd15b2171f163a86943c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0b", + "r" : "0x61f6acf066a31b5a9b0c74baf0de71d022f337c170fc465a827d6c50326e3e9e", + "s" : "0x18ec6b70fb2261c8d1f5364c2394f0003dd91fadffad7cd15b2171f163a86943", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020300", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "4405447f425192002e8c259b83286c9a446d68a1925867b1758db7f7dbb9e632", + "mixHash" : "d28b38d4eb51ba2372346cffddbd26f48584708c947c7595130fa7f8bddd4123", + "nonce" : "7c7ef87400c95b52", + "number" : "0x0d", + "parentHash" : "5683c77f8fac786d71b58fa82ed5adb1efbf963668e3ad0307a2ffb658442e7a", + "receiptTrie" : "088a93c47534042e24ab2e76714e17977a96d9b1f637f258d0e35b0951a6f750", + "stateRoot" : "ed04d02d78dd39e90edc88a837aebc8792b007fea6e6d1f021e278f8a8e212e0", + "timestamp" : "0x561bbea5", + "transactionsTrie" : "2d0a2fcb99128ea291fb5e3062ae3cc7f50b674ca6b8951a032e57fe7b2d1c13", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "13", + "chainname" : "C", + "rlp" : "0xf90263f901f9a05683c77f8fac786d71b58fa82ed5adb1efbf963668e3ad0307a2ffb658442e7aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ed04d02d78dd39e90edc88a837aebc8792b007fea6e6d1f021e278f8a8e212e0a02d0a2fcb99128ea291fb5e3062ae3cc7f50b674ca6b8951a032e57fe7b2d1c13a0088a93c47534042e24ab2e76714e17977a96d9b1f637f258d0e35b0951a6f750b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203000d832fefd882520884561bbea580a0d28b38d4eb51ba2372346cffddbd26f48584708c947c7595130fa7f8bddd4123887c7ef87400c95b52f864f8620c018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba00f3bf11cc91cf881b6970470ea1af35b8eb715940f96849144f1dc412c5226caa07e01475262623f1d12223594d55a594fcafcf1a99f85dc9e98279bdcf0a60afcc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0c", + "r" : "0x0f3bf11cc91cf881b6970470ea1af35b8eb715940f96849144f1dc412c5226ca", + "s" : "0x7e01475262623f1d12223594d55a594fcafcf1a99f85dc9e98279bdcf0a60afc", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020340", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "3c98f03001979d64c75afeff4a0f140d2b350c53cdef883e4988cbc121970e28", + "mixHash" : "9ebc65de54e236da0d5585ec32b91737a00edbdb6455eecc3821bf41c9f1d5f5", + "nonce" : "f2d988038fdff219", + "number" : "0x0e", + "parentHash" : "4405447f425192002e8c259b83286c9a446d68a1925867b1758db7f7dbb9e632", + "receiptTrie" : "ac36f87ee33d163ad6a087b0d356a92a52508af4d1ffcc88e65fae4b2e16f91e", + "stateRoot" : "06cadf60d12c2f1cc07ca1cfa842514de128a1e90bd5a1550e87df648f39a5ea", + "timestamp" : "0x561bbea8", + "transactionsTrie" : "a5a7a6a5447c297869cf971766b0d9787b3780ff96368bfe377a8be84abf81c3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "14", + "chainname" : "C", + "rlp" : "0xf90263f901f9a04405447f425192002e8c259b83286c9a446d68a1925867b1758db7f7dbb9e632a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a006cadf60d12c2f1cc07ca1cfa842514de128a1e90bd5a1550e87df648f39a5eaa0a5a7a6a5447c297869cf971766b0d9787b3780ff96368bfe377a8be84abf81c3a0ac36f87ee33d163ad6a087b0d356a92a52508af4d1ffcc88e65fae4b2e16f91eb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203400e832fefd882520884561bbea880a09ebc65de54e236da0d5585ec32b91737a00edbdb6455eecc3821bf41c9f1d5f588f2d988038fdff219f864f8620d018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba0c2499b0f3d953410de9b16142a5b526ef94ddcde82d1b375092633744791afb2a074acd0342762143f3b2a177949f42911dfe678bffe4ebb1977063a9bef84c962c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0d", + "r" : "0xc2499b0f3d953410de9b16142a5b526ef94ddcde82d1b375092633744791afb2", + "s" : "0x74acd0342762143f3b2a177949f42911dfe678bffe4ebb1977063a9bef84c962", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020380", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "1e3873bf988ee81c798112a17c8d4116d8750ca94ea69555f6b40b0eb7c5db39", + "mixHash" : "0899f08aee016f348df9025a62efb2c367cec3d96cbe4cfbd1f5454b897cd8fb", + "nonce" : "10bd56be5458a9bf", + "number" : "0x0f", + "parentHash" : "3c98f03001979d64c75afeff4a0f140d2b350c53cdef883e4988cbc121970e28", + "receiptTrie" : "77d82d42a3ef447a16d44394fee9a91b569a74d46a1dde68c15bcdbf20787932", + "stateRoot" : "d53066c17733513128814b02404eec2f821daf83e2b596fd394e507edd58305a", + "timestamp" : "0x561bbeaa", + "transactionsTrie" : "7af9fcc1ad229256b5d5ed29f171a5a0ee6ced9e05371a3b77f511a86150872f", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "15", + "chainname" : "C", + "rlp" : "0xf90263f901f9a03c98f03001979d64c75afeff4a0f140d2b350c53cdef883e4988cbc121970e28a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d53066c17733513128814b02404eec2f821daf83e2b596fd394e507edd58305aa07af9fcc1ad229256b5d5ed29f171a5a0ee6ced9e05371a3b77f511a86150872fa077d82d42a3ef447a16d44394fee9a91b569a74d46a1dde68c15bcdbf20787932b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203800f832fefd882520884561bbeaa80a00899f08aee016f348df9025a62efb2c367cec3d96cbe4cfbd1f5454b897cd8fb8810bd56be5458a9bff864f8620e018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca01f708fe16715feb102b05178f6b46662e14e17a6743cf60fbe4551255f785d01a07079365cd3716754d6346cc95ac2f1ccb6a4328cfcfc1fef52a5c08fc2111c92c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0e", + "r" : "0x1f708fe16715feb102b05178f6b46662e14e17a6743cf60fbe4551255f785d01", + "s" : "0x7079365cd3716754d6346cc95ac2f1ccb6a4328cfcfc1fef52a5c08fc2111c92", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0203c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "11aaf0b0a2d3167105d3ae2774604bb11d51c08938184756de0e76ac6d08ab10", + "mixHash" : "2c5fadf065fd7f27b64850a8834e8ecd75567c2311ae32981eda02446d0c7a77", + "nonce" : "36c662cda742d08f", + "number" : "0x10", + "parentHash" : "1e3873bf988ee81c798112a17c8d4116d8750ca94ea69555f6b40b0eb7c5db39", + "receiptTrie" : "39fe1b72def672f3d55305289d27bdd6561756e2d8875574221d4685f9425a85", + "stateRoot" : "0fc3633209046293fd2dd5c16b23159d5b43a0a006ded65f49bdd199eb8f1918", + "timestamp" : "0x561bbeac", + "transactionsTrie" : "b36d4b1149130f8a5eac46bac74e4d58420b10f338c4ad143576a0ad50d3da09", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "16", + "chainname" : "C", + "rlp" : "0xf90263f901f9a01e3873bf988ee81c798112a17c8d4116d8750ca94ea69555f6b40b0eb7c5db39a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00fc3633209046293fd2dd5c16b23159d5b43a0a006ded65f49bdd199eb8f1918a0b36d4b1149130f8a5eac46bac74e4d58420b10f338c4ad143576a0ad50d3da09a039fe1b72def672f3d55305289d27bdd6561756e2d8875574221d4685f9425a85b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203c010832fefd882520884561bbeac80a02c5fadf065fd7f27b64850a8834e8ecd75567c2311ae32981eda02446d0c7a778836c662cda742d08ff864f8620f018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba004fc85f1e37b6decb0371decc04815e0361b8a8f0b681508f2550198810589dba032408728e64f3e476518ba0b7b5a0a1a856b1ffae5b865ed7b217ee3e8ce1152c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0f", + "r" : "0x04fc85f1e37b6decb0371decc04815e0361b8a8f0b681508f2550198810589db", + "s" : "0x32408728e64f3e476518ba0b7b5a0a1a856b1ffae5b865ed7b217ee3e8ce1152", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020400", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "eed62dfb0e40f2f5f075fe26ea2f84b15a9f48338aa2c19ec18ad1dd487c73ba", + "mixHash" : "9a830dd32fb8c348c6185a4994948c79874e54fefb3211cf13f432ad9f11e501", + "nonce" : "58e68aa07545b03b", + "number" : "0x11", + "parentHash" : "11aaf0b0a2d3167105d3ae2774604bb11d51c08938184756de0e76ac6d08ab10", + "receiptTrie" : "3d4b5bda3707ac04b5d1a87fa9dff194d3a4db1dac1b545b0eddda3eb7a180fa", + "stateRoot" : "6ab4e5135443bdeafb5c1493f893a288b0592de53ce3d33cd98c14a241863a32", + "timestamp" : "0x561bbeae", + "transactionsTrie" : "5f4e7459f0dfdd78325ea52895ac830c2542b3d4fb402458309bd38cb3aef538", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "17", + "chainname" : "C", + "rlp" : "0xf90263f901f9a011aaf0b0a2d3167105d3ae2774604bb11d51c08938184756de0e76ac6d08ab10a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a06ab4e5135443bdeafb5c1493f893a288b0592de53ce3d33cd98c14a241863a32a05f4e7459f0dfdd78325ea52895ac830c2542b3d4fb402458309bd38cb3aef538a03d4b5bda3707ac04b5d1a87fa9dff194d3a4db1dac1b545b0eddda3eb7a180fab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302040011832fefd882520884561bbeae80a09a830dd32fb8c348c6185a4994948c79874e54fefb3211cf13f432ad9f11e5018858e68aa07545b03bf864f86210018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca037a3d7fd95be0dd2c7f38cb3813fe0759dda2d19620b53172becdfd35a8dec2da02a0cabfee4aadab72ca4ae539f5d799def81e377be0f2a89c3fdabc95fa59cc0c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x10", + "r" : "0x37a3d7fd95be0dd2c7f38cb3813fe0759dda2d19620b53172becdfd35a8dec2d", + "s" : "0x2a0cabfee4aadab72ca4ae539f5d799def81e377be0f2a89c3fdabc95fa59cc0", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020440", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "3d077b906d0abb7febe3bed59ddffe012c627d13072772310deaddd1de682535", + "mixHash" : "8c59dcb722f5845722d60a728adbd2de8ccff660a686c4fd08e4ea2fd8ac95c1", + "nonce" : "062ca5b98312f5cf", + "number" : "0x12", + "parentHash" : "eed62dfb0e40f2f5f075fe26ea2f84b15a9f48338aa2c19ec18ad1dd487c73ba", + "receiptTrie" : "5e6aafb74743372da636b264ddced5d7ccbed9d3da71b260eb88b70763079687", + "stateRoot" : "12b86b9d737f0dabcd2d7593e449e78d4d15c7bddaee9527a7a8ffb7b35270b7", + "timestamp" : "0x561bbeb2", + "transactionsTrie" : "b17e90310acf52c4e6dccd7f55cb0c54fc42371d983a8198c49dab6d0e1f3279", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "18", + "chainname" : "C", + "rlp" : "0xf90263f901f9a0eed62dfb0e40f2f5f075fe26ea2f84b15a9f48338aa2c19ec18ad1dd487c73baa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a012b86b9d737f0dabcd2d7593e449e78d4d15c7bddaee9527a7a8ffb7b35270b7a0b17e90310acf52c4e6dccd7f55cb0c54fc42371d983a8198c49dab6d0e1f3279a05e6aafb74743372da636b264ddced5d7ccbed9d3da71b260eb88b70763079687b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302044012832fefd882520884561bbeb280a08c59dcb722f5845722d60a728adbd2de8ccff660a686c4fd08e4ea2fd8ac95c188062ca5b98312f5cff864f86211018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca0c305eca65a067c6fbf0ee6e52c8cebcbedbfb88d19640f3f0ed5fe53b0d43144a061a43f631eefdd37207e362c41891a9cec87b44eb9c3a1055177ffd66d0dc39fc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x11", + "r" : "0xc305eca65a067c6fbf0ee6e52c8cebcbedbfb88d19640f3f0ed5fe53b0d43144", + "s" : "0x61a43f631eefdd37207e362c41891a9cec87b44eb9c3a1055177ffd66d0dc39f", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020480", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "a1669a93bef6deee92a130ba48944736bdd5c36bced92ad3de8c67bad1550d8f", + "mixHash" : "97caea6802ba007c94f481cdefb7f60c5b28d1fe14b7b24761397ca6343e70c7", + "nonce" : "c69534b336961de4", + "number" : "0x13", + "parentHash" : "3d077b906d0abb7febe3bed59ddffe012c627d13072772310deaddd1de682535", + "receiptTrie" : "1c5a893a2f521bbf40f7bf6fb0e42a9e0e09759dd938004fa420375027eb0b13", + "stateRoot" : "570302b6728b3a7c5541796a9645cc90a21c671bab6804f3dbee4b151e14f3cf", + "timestamp" : "0x561bbeb6", + "transactionsTrie" : "be0dbc00ba8c852824d161243dacf049014cf0b29cbe4b0b9df059ab06a24a46", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "19", + "chainname" : "C", + "rlp" : "0xf90263f901f9a03d077b906d0abb7febe3bed59ddffe012c627d13072772310deaddd1de682535a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0570302b6728b3a7c5541796a9645cc90a21c671bab6804f3dbee4b151e14f3cfa0be0dbc00ba8c852824d161243dacf049014cf0b29cbe4b0b9df059ab06a24a46a01c5a893a2f521bbf40f7bf6fb0e42a9e0e09759dd938004fa420375027eb0b13b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302048013832fefd882520884561bbeb680a097caea6802ba007c94f481cdefb7f60c5b28d1fe14b7b24761397ca6343e70c788c69534b336961de4f864f86212018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca07afcb8c884d7594e77e748779c39e8d2758024b2f1b1cff212be7370bc71e770a04a2d9d98985c258d77072494eca4694a979f15d89cab15d35a7b9ee0dc76ce94c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x12", + "r" : "0x7afcb8c884d7594e77e748779c39e8d2758024b2f1b1cff212be7370bc71e770", + "s" : "0x4a2d9d98985c258d77072494eca4694a979f15d89cab15d35a7b9ee0dc76ce94", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0204c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "48059cf025b7792645018d77587491a913f47c279b440925d985164ecb357af9", + "mixHash" : "e14c85b415ef51a4d1ed7602cac5288fc6603acf3827575eda1566e31ed10561", + "nonce" : "02a1fae4dd36be9b", + "number" : "0x14", + "parentHash" : "a1669a93bef6deee92a130ba48944736bdd5c36bced92ad3de8c67bad1550d8f", + "receiptTrie" : "c0b49b47b708a827537442d0904f01d7f80f09aa223c00a583923e840e0dac71", + "stateRoot" : "f32a007f02867a6a9899ef346523a59c0d95b8bda857eb5df8d461e0e5feacae", + "timestamp" : "0x561bbeb9", + "transactionsTrie" : "132f51015f79c3b255c8f7cd2e716baacf97e98ee6312623adaf79409984b890", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "20", + "chainname" : "C", + "rlp" : "0xf90263f901f9a0a1669a93bef6deee92a130ba48944736bdd5c36bced92ad3de8c67bad1550d8fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f32a007f02867a6a9899ef346523a59c0d95b8bda857eb5df8d461e0e5feacaea0132f51015f79c3b255c8f7cd2e716baacf97e98ee6312623adaf79409984b890a0c0b49b47b708a827537442d0904f01d7f80f09aa223c00a583923e840e0dac71b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830204c014832fefd882520884561bbeb980a0e14c85b415ef51a4d1ed7602cac5288fc6603acf3827575eda1566e31ed105618802a1fae4dd36be9bf864f86213018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba0438c18fc31211419f55760a7d96654e87c43dd69c7bf02b7625a511f260fc459a051cd332f7fbf3e881453f0ad541813ed5c09cda1825d8eb9d61fa8a5806458d3c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x13", + "r" : "0x438c18fc31211419f55760a7d96654e87c43dd69c7bf02b7625a511f260fc459", + "s" : "0x51cd332f7fbf3e881453f0ad541813ed5c09cda1825d8eb9d61fa8a5806458d3", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020500", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "2563b3eca39cbc0ed28cab8af97e6b4b35e1980f1ab6ed9cae8dc58fb98a2626", + "mixHash" : "8c675a6c46f2399f28e51d55ad48c64924bd4e22b03ddfb7605afc7b7807aca5", + "nonce" : "81a8f3d750f94f64", + "number" : "0x15", + "parentHash" : "48059cf025b7792645018d77587491a913f47c279b440925d985164ecb357af9", + "receiptTrie" : "4a3cc99d45b6b2578799c85f77d86ed47031a2adc9c7d3397e92609cf61710fa", + "stateRoot" : "698bc6963f1f7ba56e2398d9793a4ae2a91c5cfbef3fabbfc26e24b9bc883f96", + "timestamp" : "0x561bbebb", + "transactionsTrie" : "792d08e3bb08ff21b0dea907c6a73ddb694bb6336683270682b5b68ac8ed9fdb", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "21", + "chainname" : "C", + "rlp" : "0xf90263f901f9a048059cf025b7792645018d77587491a913f47c279b440925d985164ecb357af9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0698bc6963f1f7ba56e2398d9793a4ae2a91c5cfbef3fabbfc26e24b9bc883f96a0792d08e3bb08ff21b0dea907c6a73ddb694bb6336683270682b5b68ac8ed9fdba04a3cc99d45b6b2578799c85f77d86ed47031a2adc9c7d3397e92609cf61710fab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302050015832fefd882520884561bbebb80a08c675a6c46f2399f28e51d55ad48c64924bd4e22b03ddfb7605afc7b7807aca58881a8f3d750f94f64f864f86214018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba0b49cca4168e3fe1fef997c199ae60ac69b9a56af7e625135c96386a9c4ab6287a04dd0eb4fbb54b4b75e333dcc724ecde68021b191a478e799c5f27559c3278c3dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x14", + "r" : "0xb49cca4168e3fe1fef997c199ae60ac69b9a56af7e625135c96386a9c4ab6287", + "s" : "0x4dd0eb4fbb54b4b75e333dcc724ecde68021b191a478e799c5f27559c3278c3d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020540", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "3ade9634a1e5d6cdd6845dab2c453308e3c43f3bd6d38d6b2bf8e968a5c776b4", + "mixHash" : "0f38ac97b80b283e8db5377bce9347365bcd3d091688909dc97c05c80bc32c95", + "nonce" : "b67e6eb2c01ccd70", + "number" : "0x16", + "parentHash" : "2563b3eca39cbc0ed28cab8af97e6b4b35e1980f1ab6ed9cae8dc58fb98a2626", + "receiptTrie" : "82dace2b5d5d9199663872f5d0803da14b8c82b2a8ef5ceb1ff2c23525631d20", + "stateRoot" : "478eddbd8a4d2270b6956633e52d1bd386d65601b60d74941301e3c66438b88a", + "timestamp" : "0x561bbebd", + "transactionsTrie" : "1bff8cc1773ecfcb2aff2b23e1452302dda27b7f8355ce70d8e1a71fd195745e", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "22", + "chainname" : "C", + "rlp" : "0xf90263f901f9a02563b3eca39cbc0ed28cab8af97e6b4b35e1980f1ab6ed9cae8dc58fb98a2626a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0478eddbd8a4d2270b6956633e52d1bd386d65601b60d74941301e3c66438b88aa01bff8cc1773ecfcb2aff2b23e1452302dda27b7f8355ce70d8e1a71fd195745ea082dace2b5d5d9199663872f5d0803da14b8c82b2a8ef5ceb1ff2c23525631d20b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302054016832fefd882520884561bbebd80a00f38ac97b80b283e8db5377bce9347365bcd3d091688909dc97c05c80bc32c9588b67e6eb2c01ccd70f864f86215018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca030db92031e03d3380564b7ec44cb8df9498c5d6ca41214e941aa6bcb57d08d50a037129acc3f14635953e6f2817cb8bde6b07689e0d321c4b5e8e9e71f4df307b6c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x15", + "r" : "0x30db92031e03d3380564b7ec44cb8df9498c5d6ca41214e941aa6bcb57d08d50", + "s" : "0x37129acc3f14635953e6f2817cb8bde6b07689e0d321c4b5e8e9e71f4df307b6", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020580", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "335c2b8bd7b968addf690be26281a24d353355b62b35f50020b4de8e2b0f3788", + "mixHash" : "87faaec5efaa2c5a6af5480c6a14a5c1be9f81cc26d2fbc31352d2989d7a72b7", + "nonce" : "3cd3b70d8ae3cfa6", + "number" : "0x17", + "parentHash" : "3ade9634a1e5d6cdd6845dab2c453308e3c43f3bd6d38d6b2bf8e968a5c776b4", + "receiptTrie" : "0eac1ced5fd5497ceab5c80a155538954d67c63cc233c6854606df233a2ddce6", + "stateRoot" : "5b4b3b8fb0dd5d43dcb4ba8b9fdce9b98fa6af27dc83c9034e729edc771ff979", + "timestamp" : "0x561bbebf", + "transactionsTrie" : "efa97a7ea4fa11ae4391ce4615348c0e127b625f870ef64bd06aec742bd402ef", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "23", + "chainname" : "C", + "rlp" : "0xf90263f901f9a03ade9634a1e5d6cdd6845dab2c453308e3c43f3bd6d38d6b2bf8e968a5c776b4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05b4b3b8fb0dd5d43dcb4ba8b9fdce9b98fa6af27dc83c9034e729edc771ff979a0efa97a7ea4fa11ae4391ce4615348c0e127b625f870ef64bd06aec742bd402efa00eac1ced5fd5497ceab5c80a155538954d67c63cc233c6854606df233a2ddce6b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302058017832fefd882520884561bbebf80a087faaec5efaa2c5a6af5480c6a14a5c1be9f81cc26d2fbc31352d2989d7a72b7883cd3b70d8ae3cfa6f864f86216018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca0610d5473b4e8d91c08ef3520e10b2328e0eb0ac60397b4f3095f139ded98681fa047e9aefea7eb450671231c2cda14cbbbd3cf1e4398ab71c5c1ae633d72b0a7e6c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x16", + "r" : "0x610d5473b4e8d91c08ef3520e10b2328e0eb0ac60397b4f3095f139ded98681f", + "s" : "0x47e9aefea7eb450671231c2cda14cbbbd3cf1e4398ab71c5c1ae633d72b0a7e6", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0205c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "436ace15ccf0755daa63a1126e884ebeee8843bd024ad0ede4f33868d22f7555", + "mixHash" : "a7e4d93e1573fffd8a50bed93fcc916ba10cc4cfa67afedb7c2cf44791f60e66", + "nonce" : "ac10c2899705338b", + "number" : "0x18", + "parentHash" : "335c2b8bd7b968addf690be26281a24d353355b62b35f50020b4de8e2b0f3788", + "receiptTrie" : "b9d911b0876da3ed48f7caf51ec843e046742c4f2af53bcd4d0e91c9626854b4", + "stateRoot" : "d4f28697f8d021c109800291fa76ec47eaf64575cdda0d7756f631d166763533", + "timestamp" : "0x561bbec1", + "transactionsTrie" : "e4e7bf7e7cd8dd36a82df3eaecdc5b3d6b8afcafa87a1b78252678c7ea17cb33", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "24", + "chainname" : "C", + "rlp" : "0xf90263f901f9a0335c2b8bd7b968addf690be26281a24d353355b62b35f50020b4de8e2b0f3788a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d4f28697f8d021c109800291fa76ec47eaf64575cdda0d7756f631d166763533a0e4e7bf7e7cd8dd36a82df3eaecdc5b3d6b8afcafa87a1b78252678c7ea17cb33a0b9d911b0876da3ed48f7caf51ec843e046742c4f2af53bcd4d0e91c9626854b4b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830205c018832fefd882520884561bbec180a0a7e4d93e1573fffd8a50bed93fcc916ba10cc4cfa67afedb7c2cf44791f60e6688ac10c2899705338bf864f86217018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba0ae3f2ab2182d0fa25e847416469d0b06ccc019b04f0bc09d490d6cb60c0d0bb2a007a2fa97ba49937d7e7f774998ff9e15bface1cd9f07fab453fc41269a27e031c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x17", + "r" : "0xae3f2ab2182d0fa25e847416469d0b06ccc019b04f0bc09d490d6cb60c0d0bb2", + "s" : "0x07a2fa97ba49937d7e7f774998ff9e15bface1cd9f07fab453fc41269a27e031", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020600", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "b3925c46f8d08e690192fdff67c33b437d1c8b040f2a6573e1e06af4f02b9651", + "mixHash" : "03fc5a6b97f18a2f1050b7f8d6a917fe383c3344b962990c595d1c54e6108a46", + "nonce" : "75fdd35b774f4f30", + "number" : "0x19", + "parentHash" : "436ace15ccf0755daa63a1126e884ebeee8843bd024ad0ede4f33868d22f7555", + "receiptTrie" : "31405bb4ee134814946bbcbecec9dcc64acafc6d7c6f9c1a0e02d79838990575", + "stateRoot" : "ebe71e7d43108b892db1d0fef0d115fd2965061b2a16023fbff3f3688f318d77", + "timestamp" : "0x561bbec3", + "transactionsTrie" : "150ac80e3bbded3f14ab5e7513d587d0e5fb1e4ece1775ca341b1ccc64a88de4", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "25", + "chainname" : "C", + "rlp" : "0xf90263f901f9a0436ace15ccf0755daa63a1126e884ebeee8843bd024ad0ede4f33868d22f7555a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ebe71e7d43108b892db1d0fef0d115fd2965061b2a16023fbff3f3688f318d77a0150ac80e3bbded3f14ab5e7513d587d0e5fb1e4ece1775ca341b1ccc64a88de4a031405bb4ee134814946bbcbecec9dcc64acafc6d7c6f9c1a0e02d79838990575b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302060019832fefd882520884561bbec380a003fc5a6b97f18a2f1050b7f8d6a917fe383c3344b962990c595d1c54e6108a468875fdd35b774f4f30f864f86218018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca084eac23a6346158d2162182d0ebcbc9965d56b1d2b5fbf268204acca4bee6e3ea02d649816bf2aa1694cc1261cecab62ca040294dab1d8879553475e71fbdc8245c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x18", + "r" : "0x84eac23a6346158d2162182d0ebcbc9965d56b1d2b5fbf268204acca4bee6e3e", + "s" : "0x2d649816bf2aa1694cc1261cecab62ca040294dab1d8879553475e71fbdc8245", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "3286e5832a0c24a643ee2544b32f7edef6ec989e3e35c020fc7f1b5cc982b2c4", + "mixHash" : "4fd3bf2ae85ce473382cef846ce8599e61233927012baaa2719dc59adb9581b7", + "nonce" : "39f3b02818024fc0", + "number" : "0x01", + "parentHash" : "358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bd", + "receiptTrie" : "6aa1e44f24b69e6f3c398ed2be6eee2d8b7b57480aa2a8a9085e77d2d3d06a55", + "stateRoot" : "4325a011e3c2f9f72c35f60ca7f9915004f68c3357694aad4848bfe625c4622f", + "timestamp" : "0x561bbec6", + "transactionsTrie" : "517131da8d5dbdce45a2a393ea59f742e9411a12431070cfe60400536d26faa9", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "D", + "rlp" : "0xf90263f901f9a0358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04325a011e3c2f9f72c35f60ca7f9915004f68c3357694aad4848bfe625c4622fa0517131da8d5dbdce45a2a393ea59f742e9411a12431070cfe60400536d26faa9a06aa1e44f24b69e6f3c398ed2be6eee2d8b7b57480aa2a8a9085e77d2d3d06a55b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bbec680a04fd3bf2ae85ce473382cef846ce8599e61233927012baaa2719dc59adb9581b78839f3b02818024fc0f864f86280018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba0875b81c32db08fc17fb8917235d69b3959aeeea4e8d827d1a34a5d79aad74ad3a05abf22636cb905d225c7e65065f2f00db0810d9fca77fd6aadc6832de2dc06c6c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x875b81c32db08fc17fb8917235d69b3959aeeea4e8d827d1a34a5d79aad74ad3", + "s" : "0x5abf22636cb905d225c7e65065f2f00db0810d9fca77fd6aadc6832de2dc06c6", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "764b8e42af13102db4ae07e82d85f49d3eecf346e2efd7b5b1335ce12a965f73", + "mixHash" : "65709130d720bd180f1362daa01805fae0e9238e1e7c65411c648c21d91b2372", + "nonce" : "8b6a938de35c53e3", + "number" : "0x02", + "parentHash" : "3286e5832a0c24a643ee2544b32f7edef6ec989e3e35c020fc7f1b5cc982b2c4", + "receiptTrie" : "ff12306239527e2507f40989c979fafbc3b8a95e2ac9d87d26e0f10fafa1da7c", + "stateRoot" : "0912289a247a213bb1fd68c3d4ad6f1c61b60ec553ef1e1fd12a3354a720cd5e", + "timestamp" : "0x561bbec9", + "transactionsTrie" : "7a23a1b4789d236eb3edfe4709fbf0269fdc22bd08fa48799c6c9f7b0dc2fc42", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "D", + "rlp" : "0xf90263f901f9a03286e5832a0c24a643ee2544b32f7edef6ec989e3e35c020fc7f1b5cc982b2c4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00912289a247a213bb1fd68c3d4ad6f1c61b60ec553ef1e1fd12a3354a720cd5ea07a23a1b4789d236eb3edfe4709fbf0269fdc22bd08fa48799c6c9f7b0dc2fc42a0ff12306239527e2507f40989c979fafbc3b8a95e2ac9d87d26e0f10fafa1da7cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bbec980a065709130d720bd180f1362daa01805fae0e9238e1e7c65411c648c21d91b2372888b6a938de35c53e3f864f86201018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba03751f7e63119f172bc7c7ce417c4f3570eb29a06103cdff0d5d23e537bcb6f01a0637f26bd0f382eae584404294dc9ff61c154e81696781601e791fd7e95717b2dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x3751f7e63119f172bc7c7ce417c4f3570eb29a06103cdff0d5d23e537bcb6f01", + "s" : "0x637f26bd0f382eae584404294dc9ff61c154e81696781601e791fd7e95717b2d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "4e978a337d94c0683a9d502b1eac3beb627fa7a0be8ced23b3acef7baa6ed56b", + "mixHash" : "ead32a0996d0dfaad1f53469f21b386555848e9ec8b49d0675bc95258469a4b2", + "nonce" : "02857e9ebc0e5941", + "number" : "0x03", + "parentHash" : "764b8e42af13102db4ae07e82d85f49d3eecf346e2efd7b5b1335ce12a965f73", + "receiptTrie" : "079a220f268e9c199c166ecdf5cb527dee36b0b3929c01eb304698fff245fffc", + "stateRoot" : "349b5c0b55ab5a61277407ca809181275555465df79c71c5545751f7dee5438e", + "timestamp" : "0x561bbecc", + "transactionsTrie" : "7273938d4695b5d9facfde4118ecf2262b6e4117051420c80b30aebc6ae6bca1", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "D", + "rlp" : "0xf90263f901f9a0764b8e42af13102db4ae07e82d85f49d3eecf346e2efd7b5b1335ce12a965f73a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0349b5c0b55ab5a61277407ca809181275555465df79c71c5545751f7dee5438ea07273938d4695b5d9facfde4118ecf2262b6e4117051420c80b30aebc6ae6bca1a0079a220f268e9c199c166ecdf5cb527dee36b0b3929c01eb304698fff245fffcb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bbecc80a0ead32a0996d0dfaad1f53469f21b386555848e9ec8b49d0675bc95258469a4b28802857e9ebc0e5941f864f86202018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0ccb891c1476a75413e034afd5865278640a0b5e8d24d09b8847bc93ed4901ba8a05b3b420affac6aee7b809aadf4c03c09073ba5f59826e587ea1f631d41e2a23bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0xccb891c1476a75413e034afd5865278640a0b5e8d24d09b8847bc93ed4901ba8", + "s" : "0x5b3b420affac6aee7b809aadf4c03c09073ba5f59826e587ea1f631d41e2a23b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "ee86e461d4cfd455113ca48ae2a8ef91a5adce48f53f2d069997ed804d5d49f8", + "mixHash" : "7d18e16bab2d8bc7b6833c34ef45d344a6982d1fab0c639e3a8327353d4c3290", + "nonce" : "94a2cc435acd9a7c", + "number" : "0x04", + "parentHash" : "4e978a337d94c0683a9d502b1eac3beb627fa7a0be8ced23b3acef7baa6ed56b", + "receiptTrie" : "ea9bac70a18fc6caefc21d334803e07061307f51623ba0bceb5edb3bad7e9bc7", + "stateRoot" : "c1648028171f796636eab026e0744c2928f01604fc79c6fd9759e2e6b6518711", + "timestamp" : "0x561bbecd", + "transactionsTrie" : "f414248719c341aee8a75df4004631133864eea91d9d8fd6b5109d475790f769", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "chainname" : "D", + "rlp" : "0xf90263f901f9a04e978a337d94c0683a9d502b1eac3beb627fa7a0be8ced23b3acef7baa6ed56ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c1648028171f796636eab026e0744c2928f01604fc79c6fd9759e2e6b6518711a0f414248719c341aee8a75df4004631133864eea91d9d8fd6b5109d475790f769a0ea9bac70a18fc6caefc21d334803e07061307f51623ba0bceb5edb3bad7e9bc7b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bbecd80a07d18e16bab2d8bc7b6833c34ef45d344a6982d1fab0c639e3a8327353d4c32908894a2cc435acd9a7cf864f86203018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca06567ef72829bf84de45fb4ded8e5c6092c8ae4440e3da10a9564d60e62d26be2a039963c5253d34fc0f380daec19537a356ccb1dc4096b6c2f79ec4aa38850995cc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0x6567ef72829bf84de45fb4ded8e5c6092c8ae4440e3da10a9564d60e62d26be2", + "s" : "0x39963c5253d34fc0f380daec19537a356ccb1dc4096b6c2f79ec4aa38850995c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "d5fee3efd09c17e16bf0ae31c6214136c0f0a06e1f76ba5260c5d93587297b30", + "mixHash" : "9d07f32d6742c668f84b401274f82df0d4f6beb9477e846a70a77fc4d5668e34", + "nonce" : "446cc5b6988a41d1", + "number" : "0x05", + "parentHash" : "ee86e461d4cfd455113ca48ae2a8ef91a5adce48f53f2d069997ed804d5d49f8", + "receiptTrie" : "21f214604286d1d6cc387295903b26fb2e4d875ac396d31e8faff84bc1079386", + "stateRoot" : "a3f107f7c3dd6378c79c7efd45175c05f59c8ce9054b998a86212bfd3505cec7", + "timestamp" : "0x561bbed0", + "transactionsTrie" : "a23e1975a13f7acc887e242cc0c6b0a0bbcc32d01783f8ee8e5f7dd068fad2d0", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "5", + "chainname" : "D", + "rlp" : "0xf90263f901f9a0ee86e461d4cfd455113ca48ae2a8ef91a5adce48f53f2d069997ed804d5d49f8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a3f107f7c3dd6378c79c7efd45175c05f59c8ce9054b998a86212bfd3505cec7a0a23e1975a13f7acc887e242cc0c6b0a0bbcc32d01783f8ee8e5f7dd068fad2d0a021f214604286d1d6cc387295903b26fb2e4d875ac396d31e8faff84bc1079386b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bbed080a09d07f32d6742c668f84b401274f82df0d4f6beb9477e846a70a77fc4d5668e3488446cc5b6988a41d1f864f86204018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca059210f61dcf97fc8672fb232a4fd5a32e04a5ba4f08ee37c283cef5d57316bb9a05df5a1834a3daa586d48f50b4b3c319e77457eaac4897e591b42be1c48221fd5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0x59210f61dcf97fc8672fb232a4fd5a32e04a5ba4f08ee37c283cef5d57316bb9", + "s" : "0x5df5a1834a3daa586d48f50b4b3c319e77457eaac4897e591b42be1c48221fd5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f1ae8fa370508ad3bd72dc31cee517ed0c1a7681bb414106d491672737c6d4a5", + "mixHash" : "beecddc79d21b24b193f69c4764701dc8090bfa2b1faf600e8fed95331ecbf95", + "nonce" : "f9e1cf85f7c58dad", + "number" : "0x06", + "parentHash" : "d5fee3efd09c17e16bf0ae31c6214136c0f0a06e1f76ba5260c5d93587297b30", + "receiptTrie" : "46995ec66ede60c732df3ddd184d897fc8994e72643dc7b024d5ef520e170def", + "stateRoot" : "7076712f646cb5ad6676ebca9dbfee179e4b0b5c35a9a153be4e2a5fb6864200", + "timestamp" : "0x561bbed1", + "transactionsTrie" : "e39aa720f7afda75d2f96a9a69be087ac66010cb23c34ff07ee8272f7705fb27", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "chainname" : "D", + "rlp" : "0xf90263f901f9a0d5fee3efd09c17e16bf0ae31c6214136c0f0a06e1f76ba5260c5d93587297b30a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07076712f646cb5ad6676ebca9dbfee179e4b0b5c35a9a153be4e2a5fb6864200a0e39aa720f7afda75d2f96a9a69be087ac66010cb23c34ff07ee8272f7705fb27a046995ec66ede60c732df3ddd184d897fc8994e72643dc7b024d5ef520e170defb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882520884561bbed180a0beecddc79d21b24b193f69c4764701dc8090bfa2b1faf600e8fed95331ecbf9588f9e1cf85f7c58dadf864f86205018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba08487a021a6ebd89e54bb97d54b2f62871ba65ae363267663ecc31bd91b6c0b81a056f0ae3898a0d9598fa3c84e17e61d48080fc5c5a76c3aa420a8e39c04e3cfa5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0x8487a021a6ebd89e54bb97d54b2f62871ba65ae363267663ecc31bd91b6c0b81", + "s" : "0x56f0ae3898a0d9598fa3c84e17e61d48080fc5c5a76c3aa420a8e39c04e3cfa5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020180", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "24d5c6cd9462cd039d398698a6c7ed3a80e985878b0641cf897f7f5814f2c443", + "mixHash" : "09f4345a27e7c6375bd21d63904c3d852610d4bc4607ee606c6d8ba12a4e3370", + "nonce" : "990b2cbebd88fa3a", + "number" : "0x07", + "parentHash" : "f1ae8fa370508ad3bd72dc31cee517ed0c1a7681bb414106d491672737c6d4a5", + "receiptTrie" : "3320480c88a502c58c70d38d5fec7bcf1b02ba3fc30350dec9da9dc542c6f685", + "stateRoot" : "8eb9a7a83802e7e4494f5f1fc09477acfda5792020116a8bc746a899bb936d48", + "timestamp" : "0x561bbed3", + "transactionsTrie" : "53796c83ec191274702f254a1ee977424308bacc6b05bb2fef7ca2dadb816a42", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "7", + "chainname" : "D", + "rlp" : "0xf90263f901f9a0f1ae8fa370508ad3bd72dc31cee517ed0c1a7681bb414106d491672737c6d4a5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08eb9a7a83802e7e4494f5f1fc09477acfda5792020116a8bc746a899bb936d48a053796c83ec191274702f254a1ee977424308bacc6b05bb2fef7ca2dadb816a42a03320480c88a502c58c70d38d5fec7bcf1b02ba3fc30350dec9da9dc542c6f685b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882520884561bbed380a009f4345a27e7c6375bd21d63904c3d852610d4bc4607ee606c6d8ba12a4e337088990b2cbebd88fa3af864f86206018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0aaa981bfd2b105f76a0aef7e117ea047b01d6bb153d8729c8c9b9e89f2ec9681a049cd356a9d6641414a0b343030817f7cdb903f229484f0cd89b67164834e7000c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x06", + "r" : "0xaaa981bfd2b105f76a0aef7e117ea047b01d6bb153d8729c8c9b9e89f2ec9681", + "s" : "0x49cd356a9d6641414a0b343030817f7cdb903f229484f0cd89b67164834e7000", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0201c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "72520bfeadcf0133c646e223629790d69749f9546179ccf99bc15151c7ebf575", + "mixHash" : "17c017cc57e093b7672c8d56a7c42f98484ff6ec1a9bb5f24fa4d8865ca0a9c2", + "nonce" : "6bb420f0f6939ae0", + "number" : "0x08", + "parentHash" : "24d5c6cd9462cd039d398698a6c7ed3a80e985878b0641cf897f7f5814f2c443", + "receiptTrie" : "62a54f0235cce8297a84dee2ceb88f305a9e20ee18cbb065e558c3a1d06184a0", + "stateRoot" : "cec44de1ec4cc6fb93fcff8defaa67aafe63308bcd83000608051584418fb1b0", + "timestamp" : "0x561bbed5", + "transactionsTrie" : "88692a381e7fa4e989486fe33f3b62e79b59486c1352fbbbcbabb87eda76c9d3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "8", + "chainname" : "D", + "rlp" : "0xf90263f901f9a024d5c6cd9462cd039d398698a6c7ed3a80e985878b0641cf897f7f5814f2c443a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cec44de1ec4cc6fb93fcff8defaa67aafe63308bcd83000608051584418fb1b0a088692a381e7fa4e989486fe33f3b62e79b59486c1352fbbbcbabb87eda76c9d3a062a54f0235cce8297a84dee2ceb88f305a9e20ee18cbb065e558c3a1d06184a0b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd882520884561bbed580a017c017cc57e093b7672c8d56a7c42f98484ff6ec1a9bb5f24fa4d8865ca0a9c2886bb420f0f6939ae0f864f86207018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca085c3b66d064a06c9bfe05b9ebda4a55c205a84c58fdbf4a30c2b05c78bbd760fa00a2841e5e2ffbc9fa31bce28cd5f401095353c6ffeda50cc5f2aca8bd95d0efbc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x07", + "r" : "0x85c3b66d064a06c9bfe05b9ebda4a55c205a84c58fdbf4a30c2b05c78bbd760f", + "s" : "0x0a2841e5e2ffbc9fa31bce28cd5f401095353c6ffeda50cc5f2aca8bd95d0efb", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020200", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "83a1872f4b3a05e38409ab5844ff724f17604d099218d67bcdd144a50884a7bc", + "mixHash" : "184cffe9c3c35e325d9344b2b27b49d920ede6d74b7646da621bb1004a04355a", + "nonce" : "5bb3d2c90bbbf683", + "number" : "0x09", + "parentHash" : "72520bfeadcf0133c646e223629790d69749f9546179ccf99bc15151c7ebf575", + "receiptTrie" : "6106f4521ccfbd1bcd193ef63c1e08bd5c29154e9ade3af77095586fc419539a", + "stateRoot" : "289e44b10542f49476c317abea6a098d334b275285c3e5e36f67f6f99b6e7422", + "timestamp" : "0x561bbed7", + "transactionsTrie" : "d37467009fd0adf0a115dcf071d1db09207fd65b6e983ebf7a1d9e8c6a59ccc7", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "9", + "chainname" : "D", + "rlp" : "0xf90263f901f9a072520bfeadcf0133c646e223629790d69749f9546179ccf99bc15151c7ebf575a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0289e44b10542f49476c317abea6a098d334b275285c3e5e36f67f6f99b6e7422a0d37467009fd0adf0a115dcf071d1db09207fd65b6e983ebf7a1d9e8c6a59ccc7a06106f4521ccfbd1bcd193ef63c1e08bd5c29154e9ade3af77095586fc419539ab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd882520884561bbed780a0184cffe9c3c35e325d9344b2b27b49d920ede6d74b7646da621bb1004a04355a885bb3d2c90bbbf683f864f86208018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba06478c93f03fbd85df39ad8d5ecb068d7b3937fe79e4f9992b32c4d40ad58bcdfa010c92feed75a4e892ac0ece29c0a30ad71716b09fbda7c88c08474d445c4ea1dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x08", + "r" : "0x6478c93f03fbd85df39ad8d5ecb068d7b3937fe79e4f9992b32c4d40ad58bcdf", + "s" : "0x10c92feed75a4e892ac0ece29c0a30ad71716b09fbda7c88c08474d445c4ea1d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020240", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "7cdfa756a41f06ebc18ca221d68014f9f737557906124a67d7b58d11e2291e94", + "mixHash" : "877c13c188e89061cf54aa9c52de598c21b04336ad59628fc8c6c0c2201be035", + "nonce" : "e44e55d0db515fea", + "number" : "0x0a", + "parentHash" : "83a1872f4b3a05e38409ab5844ff724f17604d099218d67bcdd144a50884a7bc", + "receiptTrie" : "36ad16e1f3254ca91ff9bc829285719dfd7814cb4eaa8e71c2b958a811501e23", + "stateRoot" : "1494c9102ed5926f348eba68bffe0a60e1085bf9e6ce6b2aa11081fc7960440e", + "timestamp" : "0x561bbed9", + "transactionsTrie" : "2b9d255b7f1a01db4f4bdb506a75e6664eee8cd7e386e26b295199e0e3283e62", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "10", + "chainname" : "D", + "rlp" : "0xf90263f901f9a083a1872f4b3a05e38409ab5844ff724f17604d099218d67bcdd144a50884a7bca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01494c9102ed5926f348eba68bffe0a60e1085bf9e6ce6b2aa11081fc7960440ea02b9d255b7f1a01db4f4bdb506a75e6664eee8cd7e386e26b295199e0e3283e62a036ad16e1f3254ca91ff9bc829285719dfd7814cb4eaa8e71c2b958a811501e23b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd882520884561bbed980a0877c13c188e89061cf54aa9c52de598c21b04336ad59628fc8c6c0c2201be03588e44e55d0db515feaf864f86209018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0ca81f73cf818521d6a8a43d1d3b3295215a6a6384d90234ca6d4aa954197cb05a0129533bc15c142eef56462ad9f4cd5ff6ca27605f4ba8ff7c5d411e9b1026616c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x09", + "r" : "0xca81f73cf818521d6a8a43d1d3b3295215a6a6384d90234ca6d4aa954197cb05", + "s" : "0x129533bc15c142eef56462ad9f4cd5ff6ca27605f4ba8ff7c5d411e9b1026616", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020280", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "14e4ccd9aaab2ec1d3dbefb3a5750f20dd4bbdb67f65ed73f281be5c8fb91f74", + "mixHash" : "8f51a3de8d0f39f739579aa98e3b34c029652d3702b9ac5ce81389ea2835457d", + "nonce" : "5bfc9f3d4f108cd6", + "number" : "0x0b", + "parentHash" : "7cdfa756a41f06ebc18ca221d68014f9f737557906124a67d7b58d11e2291e94", + "receiptTrie" : "9235fea55d5308ff7644b60cc51958887857269d9de07850f67201904a4cd46b", + "stateRoot" : "7d3cd9ad2b0a3cd7c8ee7e58f57ba7389e327ecec28b95175d90974d1623c4df", + "timestamp" : "0x561bbeda", + "transactionsTrie" : "f1b7b7abd402152a29d6e004340908584c3c14d92e56a32727dcbb10e240877e", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "11", + "chainname" : "D", + "rlp" : "0xf90263f901f9a07cdfa756a41f06ebc18ca221d68014f9f737557906124a67d7b58d11e2291e94a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07d3cd9ad2b0a3cd7c8ee7e58f57ba7389e327ecec28b95175d90974d1623c4dfa0f1b7b7abd402152a29d6e004340908584c3c14d92e56a32727dcbb10e240877ea09235fea55d5308ff7644b60cc51958887857269d9de07850f67201904a4cd46bb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202800b832fefd882520884561bbeda80a08f51a3de8d0f39f739579aa98e3b34c029652d3702b9ac5ce81389ea2835457d885bfc9f3d4f108cd6f864f8620a018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0acaae457cabd616f95715626604f30e7c469de1d857dbe84478388e1475c9ceda02128dc98cf34b26da3456703fc7d164a303994b1901f1239b9b1f22af173cebfc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0a", + "r" : "0xacaae457cabd616f95715626604f30e7c469de1d857dbe84478388e1475c9ced", + "s" : "0x2128dc98cf34b26da3456703fc7d164a303994b1901f1239b9b1f22af173cebf", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0202c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "3eeacd81de7478b43aa9c6376c373d28ad77ac3d6e8c4fcca7bdbea640f28961", + "mixHash" : "03750db9dfc5e6b2af2e9e51511242884644ca4255297b8b9f557dfe5131638e", + "nonce" : "8a38b771c66b70f3", + "number" : "0x0c", + "parentHash" : "14e4ccd9aaab2ec1d3dbefb3a5750f20dd4bbdb67f65ed73f281be5c8fb91f74", + "receiptTrie" : "20fa2703a9e14d6122f88997c9506f5e66e140238942e9ded272a1f44d0c0aa4", + "stateRoot" : "5a8920280e8e856b48f2db2a9059e774ffe18934efa013bb213b4e12e3568bbf", + "timestamp" : "0x561bbedc", + "transactionsTrie" : "a52f2cbd44312747b15f70c57ad232ec3d8a29df8cd16fb53c813ed6bb037192", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "12", + "chainname" : "D", + "rlp" : "0xf90263f901f9a014e4ccd9aaab2ec1d3dbefb3a5750f20dd4bbdb67f65ed73f281be5c8fb91f74a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05a8920280e8e856b48f2db2a9059e774ffe18934efa013bb213b4e12e3568bbfa0a52f2cbd44312747b15f70c57ad232ec3d8a29df8cd16fb53c813ed6bb037192a020fa2703a9e14d6122f88997c9506f5e66e140238942e9ded272a1f44d0c0aa4b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202c00c832fefd882520884561bbedc80a003750db9dfc5e6b2af2e9e51511242884644ca4255297b8b9f557dfe5131638e888a38b771c66b70f3f864f8620b018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0c3827f5f94441a7d22bff4b343924a3d09260569eb869fa9553e96147f7ff74fa04aa947c879a1edb1f097e2a218a03bb4363fc636de7b95ae4d2f26b12daf6ec3c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0b", + "r" : "0xc3827f5f94441a7d22bff4b343924a3d09260569eb869fa9553e96147f7ff74f", + "s" : "0x4aa947c879a1edb1f097e2a218a03bb4363fc636de7b95ae4d2f26b12daf6ec3", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020300", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "52ae71622b5ac0c8efe0029f2b459ba8c7c298bd40cc6d1ee2b13ee25d125ac8", + "mixHash" : "c7b7d2f3aecbb6361c61b3519c8d8875ebace28686d991b00291ee395cbaa010", + "nonce" : "73439f7d4bc7812f", + "number" : "0x0d", + "parentHash" : "3eeacd81de7478b43aa9c6376c373d28ad77ac3d6e8c4fcca7bdbea640f28961", + "receiptTrie" : "b41d41f5dc9e2413bd2f35364185160690e61769cb708b0cb6e45f53d787eb76", + "stateRoot" : "317df0709ef7091dbc7d3153637230fc312fb271263be43a2627aaea12ddf70f", + "timestamp" : "0x561bbedf", + "transactionsTrie" : "c260a4ed42e2d514563cb63ce50ac6505b671301637d65fdf64c5d20622e087d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "13", + "chainname" : "D", + "rlp" : "0xf90263f901f9a03eeacd81de7478b43aa9c6376c373d28ad77ac3d6e8c4fcca7bdbea640f28961a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0317df0709ef7091dbc7d3153637230fc312fb271263be43a2627aaea12ddf70fa0c260a4ed42e2d514563cb63ce50ac6505b671301637d65fdf64c5d20622e087da0b41d41f5dc9e2413bd2f35364185160690e61769cb708b0cb6e45f53d787eb76b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203000d832fefd882520884561bbedf80a0c7b7d2f3aecbb6361c61b3519c8d8875ebace28686d991b00291ee395cbaa0108873439f7d4bc7812ff864f8620c018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba07a1cc897dd2a447c3ad5ab0a84a7d2a8e9ad57741f4060a06d2bf540542a92e6a075ffcaf435338dbccce9d21991b7f25c159ca77eb7f3f68d29d253e28a020793c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0c", + "r" : "0x7a1cc897dd2a447c3ad5ab0a84a7d2a8e9ad57741f4060a06d2bf540542a92e6", + "s" : "0x75ffcaf435338dbccce9d21991b7f25c159ca77eb7f3f68d29d253e28a020793", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020340", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "0b8c71ea8c38253a5d978f66741d725328a6070480c019fb50283ec67fa0e450", + "mixHash" : "773bffc7614ecda8159f37d8709a531d614eb7c1e21af0c89416cca98ef60d7e", + "nonce" : "d11a55187bd7201b", + "number" : "0x0e", + "parentHash" : "52ae71622b5ac0c8efe0029f2b459ba8c7c298bd40cc6d1ee2b13ee25d125ac8", + "receiptTrie" : "006727b25df8d39e7c61d09aab209ed3d1f8f2934b750f5c26aa9662551f2572", + "stateRoot" : "35581d70ac97d713e3cc0aa9071a5e525b148f16fda113a3dfd04e2a986079a5", + "timestamp" : "0x561bbee1", + "transactionsTrie" : "888abace6d2ea2dcad9f49d363b0585b27b75f361b87efb664d723ec6ecf2e66", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "14", + "chainname" : "D", + "rlp" : "0xf90263f901f9a052ae71622b5ac0c8efe0029f2b459ba8c7c298bd40cc6d1ee2b13ee25d125ac8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a035581d70ac97d713e3cc0aa9071a5e525b148f16fda113a3dfd04e2a986079a5a0888abace6d2ea2dcad9f49d363b0585b27b75f361b87efb664d723ec6ecf2e66a0006727b25df8d39e7c61d09aab209ed3d1f8f2934b750f5c26aa9662551f2572b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203400e832fefd882520884561bbee180a0773bffc7614ecda8159f37d8709a531d614eb7c1e21af0c89416cca98ef60d7e88d11a55187bd7201bf864f8620d018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca019f27620e69b8e8d19737252da03fa55d8e9faa6bf0e6ddc880ce9b0b501792ca009ebd6b3f1f0ae667e213ddcca21bc017af26d7e11c5475c8268171b3a0cfb8fc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0d", + "r" : "0x19f27620e69b8e8d19737252da03fa55d8e9faa6bf0e6ddc880ce9b0b501792c", + "s" : "0x09ebd6b3f1f0ae667e213ddcca21bc017af26d7e11c5475c8268171b3a0cfb8f", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020380", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "977b5ff43a5b86c1d5e60f1dc903cc7eeb8dbdc495311fbdfcc97e1585b8c5da", + "mixHash" : "c3f30d96fa7cb73239ddd79434fca43cd0672b4c753a9fb8b4255e177df58964", + "nonce" : "246065db5aeffb69", + "number" : "0x0f", + "parentHash" : "0b8c71ea8c38253a5d978f66741d725328a6070480c019fb50283ec67fa0e450", + "receiptTrie" : "6628b2fb8a7108b258d4b4f0c2c3e161e4c6b384cfe220152da80e60cf50e9d8", + "stateRoot" : "df9c525bc69611f930e330cdf69ff6621f0d1260c0ce8925555964d93f700a4f", + "timestamp" : "0x561bbee2", + "transactionsTrie" : "28ca66586b4bce4652aa9d251232930949ed4117a95f2748419119b973eb6190", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "15", + "chainname" : "D", + "rlp" : "0xf90263f901f9a00b8c71ea8c38253a5d978f66741d725328a6070480c019fb50283ec67fa0e450a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0df9c525bc69611f930e330cdf69ff6621f0d1260c0ce8925555964d93f700a4fa028ca66586b4bce4652aa9d251232930949ed4117a95f2748419119b973eb6190a06628b2fb8a7108b258d4b4f0c2c3e161e4c6b384cfe220152da80e60cf50e9d8b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203800f832fefd882520884561bbee280a0c3f30d96fa7cb73239ddd79434fca43cd0672b4c753a9fb8b4255e177df5896488246065db5aeffb69f864f8620e018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0a991f498c34e3d89aeba3e5e6d61ed0ce9cf406c367709bb19b7608a79beff9da01aaff10adf9a63ff9afae06daa9923d4d95c45fdf5526d0bb1b54227528f0519c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0e", + "r" : "0xa991f498c34e3d89aeba3e5e6d61ed0ce9cf406c367709bb19b7608a79beff9d", + "s" : "0x1aaff10adf9a63ff9afae06daa9923d4d95c45fdf5526d0bb1b54227528f0519", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0203c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "dd38331ba20ef0deefb201501719109491fed4940cdb337e5f3c4d1fb367dda7", + "mixHash" : "dd62ad733a3c24e3e19aa12a81853aeff2d0ed875e8be57e5904d01a2a350588", + "nonce" : "69758acc96f55b49", + "number" : "0x10", + "parentHash" : "977b5ff43a5b86c1d5e60f1dc903cc7eeb8dbdc495311fbdfcc97e1585b8c5da", + "receiptTrie" : "57da65d874f02ec5a7926ced87773db132d4c8deb793673c5aabcdcfc1aeaa72", + "stateRoot" : "b2e9b83bdfecc41b8d39c2e890ff9893d4048529078f009184e6648779eedcdb", + "timestamp" : "0x561bbee4", + "transactionsTrie" : "4442c5a84e6423ff1d3649ed5e62b30261d8cef49fa86a7db74b0f7971516141", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "16", + "chainname" : "D", + "rlp" : "0xf90263f901f9a0977b5ff43a5b86c1d5e60f1dc903cc7eeb8dbdc495311fbdfcc97e1585b8c5daa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b2e9b83bdfecc41b8d39c2e890ff9893d4048529078f009184e6648779eedcdba04442c5a84e6423ff1d3649ed5e62b30261d8cef49fa86a7db74b0f7971516141a057da65d874f02ec5a7926ced87773db132d4c8deb793673c5aabcdcfc1aeaa72b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203c010832fefd882520884561bbee480a0dd62ad733a3c24e3e19aa12a81853aeff2d0ed875e8be57e5904d01a2a3505888869758acc96f55b49f864f8620f018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba093b45ffb4e937a80a79bf4158446776877ff38e3943ba1f1236bedbeaba27734a01fcb18293dd2e2b9389fa610911570b22471a37e86bf767761740e6e8338a20bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0f", + "r" : "0x93b45ffb4e937a80a79bf4158446776877ff38e3943ba1f1236bedbeaba27734", + "s" : "0x1fcb18293dd2e2b9389fa610911570b22471a37e86bf767761740e6e8338a20b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020400", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "395292a90969a2b668d043cb48412f97d88a7833bce487560507fce4a68c2856", + "mixHash" : "3692dbc8c61a323c4282a0d2eaaff7bb033cd915136504e94239aa7aa27f9f77", + "nonce" : "9426e2ead12a24b1", + "number" : "0x11", + "parentHash" : "dd38331ba20ef0deefb201501719109491fed4940cdb337e5f3c4d1fb367dda7", + "receiptTrie" : "e37d38e6746ae7e6a6a80245f9858750ac8a4e4ae00f1675ac4723ec69905949", + "stateRoot" : "a2cd811c2f388b13673c43563a616b1b4fd91feef8cd352dbfa0dc016465d3db", + "timestamp" : "0x561bbee5", + "transactionsTrie" : "7d02c4833de5fd04d27269884fb08094d64b201e0971e11b8ac16050ccc84247", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "17", + "chainname" : "D", + "rlp" : "0xf90263f901f9a0dd38331ba20ef0deefb201501719109491fed4940cdb337e5f3c4d1fb367dda7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a2cd811c2f388b13673c43563a616b1b4fd91feef8cd352dbfa0dc016465d3dba07d02c4833de5fd04d27269884fb08094d64b201e0971e11b8ac16050ccc84247a0e37d38e6746ae7e6a6a80245f9858750ac8a4e4ae00f1675ac4723ec69905949b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302040011832fefd882520884561bbee580a03692dbc8c61a323c4282a0d2eaaff7bb033cd915136504e94239aa7aa27f9f77889426e2ead12a24b1f864f86210018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca02471e07e498a2f1b174d55f6da0f50f507078a0222a9bb8f7a0973eb887ee7e4a0705ff26cac70f04e6bd8644237f2b52b8c4403f97a29b6872a821e7c62105d61c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x10", + "r" : "0x2471e07e498a2f1b174d55f6da0f50f507078a0222a9bb8f7a0973eb887ee7e4", + "s" : "0x705ff26cac70f04e6bd8644237f2b52b8c4403f97a29b6872a821e7c62105d61", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020440", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "7f06ebcd59c85ced42afdfbd3374a531d00922435e40401cf8f5aa7dc61f9708", + "mixHash" : "81efdddd86f39f08b9ad88f79cb8dcc1d1daf8a2f24f914f59cd0eabb5bb8875", + "nonce" : "68ad5e988b92e363", + "number" : "0x12", + "parentHash" : "395292a90969a2b668d043cb48412f97d88a7833bce487560507fce4a68c2856", + "receiptTrie" : "a30a77e85b7dcc77c08848691a367e57a0a11333697fb33ec03dcdc3660da48c", + "stateRoot" : "d6544eaa6ccb1faec8a8f8a4a0fa5fa997c2e22dce6ee595c3476bf89508c19f", + "timestamp" : "0x561bbee6", + "transactionsTrie" : "da6fb9530ace55ca75d3d050dd7297b5114e808930e5f9f8469d64c1f5372f25", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "18", + "chainname" : "D", + "rlp" : "0xf90263f901f9a0395292a90969a2b668d043cb48412f97d88a7833bce487560507fce4a68c2856a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d6544eaa6ccb1faec8a8f8a4a0fa5fa997c2e22dce6ee595c3476bf89508c19fa0da6fb9530ace55ca75d3d050dd7297b5114e808930e5f9f8469d64c1f5372f25a0a30a77e85b7dcc77c08848691a367e57a0a11333697fb33ec03dcdc3660da48cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302044012832fefd882520884561bbee680a081efdddd86f39f08b9ad88f79cb8dcc1d1daf8a2f24f914f59cd0eabb5bb88758868ad5e988b92e363f864f86211018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca05514a0dfb3047746866a77bac4b5b63543fe5d329420e151afd59ccfe5560e5fa04a30f3bd0e2f5dffd60bbdb4e85e764a27f24f1c5250d6fef0ead227e06d1fb9c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x11", + "r" : "0x5514a0dfb3047746866a77bac4b5b63543fe5d329420e151afd59ccfe5560e5f", + "s" : "0x4a30f3bd0e2f5dffd60bbdb4e85e764a27f24f1c5250d6fef0ead227e06d1fb9", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020480", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "7a3d704e19cf1878ff02d402cad1befb80ce09b57e9e3c4c685f46d17a52eef6", + "mixHash" : "a188ff7ae604cba28aeac6fdc84a155cbcadc470e7994dbf021f4515fd5c1acc", + "nonce" : "29c3dc48516ecb11", + "number" : "0x13", + "parentHash" : "7f06ebcd59c85ced42afdfbd3374a531d00922435e40401cf8f5aa7dc61f9708", + "receiptTrie" : "eac158fad516432aa1c1de8b951cd2789dd6f21a1538e0ca213aac4ba7b60b94", + "stateRoot" : "46139e6da579185ae8edc8a336c548c69a78935ed452ac094fb067b52d151fc5", + "timestamp" : "0x561bbee8", + "transactionsTrie" : "2c63ff1f073a6daa140f61a24227262ca6ef7e4a092449444fb220e91d5ca0a3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "19", + "chainname" : "D", + "rlp" : "0xf90263f901f9a07f06ebcd59c85ced42afdfbd3374a531d00922435e40401cf8f5aa7dc61f9708a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a046139e6da579185ae8edc8a336c548c69a78935ed452ac094fb067b52d151fc5a02c63ff1f073a6daa140f61a24227262ca6ef7e4a092449444fb220e91d5ca0a3a0eac158fad516432aa1c1de8b951cd2789dd6f21a1538e0ca213aac4ba7b60b94b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302048013832fefd882520884561bbee880a0a188ff7ae604cba28aeac6fdc84a155cbcadc470e7994dbf021f4515fd5c1acc8829c3dc48516ecb11f864f86212018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0b6854e26314681db056dbf99d9502a1acc3f29b6e533afbb340b9b64a342b0fba057d6237667f478e87862bcb902aed157e0efb39ebd9ac3a92d4f3a29726529b5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x12", + "r" : "0xb6854e26314681db056dbf99d9502a1acc3f29b6e533afbb340b9b64a342b0fb", + "s" : "0x57d6237667f478e87862bcb902aed157e0efb39ebd9ac3a92d4f3a29726529b5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0204c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "807049cfbdc207aaf30765f9dadb050bbd093c8e0ed74891fe214b041af13fa7", + "mixHash" : "fdfce9c2d69713c97ffabfef6f5e50c9cbf08b661cbb4d978aa09f7303864e66", + "nonce" : "851f82d9fbe8e685", + "number" : "0x14", + "parentHash" : "7a3d704e19cf1878ff02d402cad1befb80ce09b57e9e3c4c685f46d17a52eef6", + "receiptTrie" : "873c7e66b781338d642def9920c795c7d0a2e71f329c9c95330dcb058e110c0a", + "stateRoot" : "697078ac4b73a28f1a6e8bab905e204676b0e0a3d7e3a5060aff1d57faa2f716", + "timestamp" : "0x561bbeeb", + "transactionsTrie" : "0fa0b5ae1009bf92e5b8e37abdcdcaf8f720096bc2989f2995f5a09f9fbf7ed8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "20", + "chainname" : "D", + "rlp" : "0xf90263f901f9a07a3d704e19cf1878ff02d402cad1befb80ce09b57e9e3c4c685f46d17a52eef6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0697078ac4b73a28f1a6e8bab905e204676b0e0a3d7e3a5060aff1d57faa2f716a00fa0b5ae1009bf92e5b8e37abdcdcaf8f720096bc2989f2995f5a09f9fbf7ed8a0873c7e66b781338d642def9920c795c7d0a2e71f329c9c95330dcb058e110c0ab9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830204c014832fefd882520884561bbeeb80a0fdfce9c2d69713c97ffabfef6f5e50c9cbf08b661cbb4d978aa09f7303864e6688851f82d9fbe8e685f864f86213018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba090a0a14f57f9a58f6b7bc6896aaa6fe31c6963a12e77586134fa167fb260aa88a03cc022425a21f3f88452b79fe24db60257ecc2ba40322eb528fb263491c9f092c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x13", + "r" : "0x90a0a14f57f9a58f6b7bc6896aaa6fe31c6963a12e77586134fa167fb260aa88", + "s" : "0x3cc022425a21f3f88452b79fe24db60257ecc2ba40322eb528fb263491c9f092", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020500", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "4a95890a564abd4bd1a3a66cb640500227867de64b6a2c38da4bfce7e357dff6", + "mixHash" : "db40644b3da67736d352038e1b92ca294884f6e63e70c1cbee2d5f5d50a4a260", + "nonce" : "d745a23e878e2f19", + "number" : "0x15", + "parentHash" : "807049cfbdc207aaf30765f9dadb050bbd093c8e0ed74891fe214b041af13fa7", + "receiptTrie" : "d2d959e25fda18851cd73ad65e60c912caa5c9f7a30dd04dc76b6f1a6728da6c", + "stateRoot" : "90bc46ca204aa68f57e57617194c4996ac69727fe5629a2fd811d65e631844d6", + "timestamp" : "0x561bbeed", + "transactionsTrie" : "5a2b4add2a566391dc24c042f83e1d5bc78dab5c306a5cccfd066096553bee67", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "21", + "chainname" : "D", + "rlp" : "0xf90263f901f9a0807049cfbdc207aaf30765f9dadb050bbd093c8e0ed74891fe214b041af13fa7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a090bc46ca204aa68f57e57617194c4996ac69727fe5629a2fd811d65e631844d6a05a2b4add2a566391dc24c042f83e1d5bc78dab5c306a5cccfd066096553bee67a0d2d959e25fda18851cd73ad65e60c912caa5c9f7a30dd04dc76b6f1a6728da6cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302050015832fefd882520884561bbeed80a0db40644b3da67736d352038e1b92ca294884f6e63e70c1cbee2d5f5d50a4a26088d745a23e878e2f19f864f86214018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba01e23e65a978e67928d2f04e676b6cc49d18870f47980b131ca02fc1fb9c50611a0014dc79a923af6f69c233cafd606718dd50e24d5fbda9d35587a684dc5e14628c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x14", + "r" : "0x1e23e65a978e67928d2f04e676b6cc49d18870f47980b131ca02fc1fb9c50611", + "s" : "0x014dc79a923af6f69c233cafd606718dd50e24d5fbda9d35587a684dc5e14628", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020540", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "c32c564534b8ef7df9b5a7886bd71556c574f1089464ec708fe25beb733be280", + "mixHash" : "5db643a2d7c31bf457fcf47e30ff6a346961f12141642483efe82bc6998a892b", + "nonce" : "34ad96eaf50e9599", + "number" : "0x16", + "parentHash" : "4a95890a564abd4bd1a3a66cb640500227867de64b6a2c38da4bfce7e357dff6", + "receiptTrie" : "ab38dca9e4f0a47549ed36cb978320225dddef9f76713d848134079b66c57ee4", + "stateRoot" : "6e51d9b39cf72798a674c10fb74eba2cc53bea60ee8c319069887e58ba35a031", + "timestamp" : "0x561bbeee", + "transactionsTrie" : "7501f1d112c55b54919cf6af439708f2f010bdb4357516ca3646292f3ea4bfd8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "22", + "chainname" : "D", + "rlp" : "0xf90263f901f9a04a95890a564abd4bd1a3a66cb640500227867de64b6a2c38da4bfce7e357dff6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a06e51d9b39cf72798a674c10fb74eba2cc53bea60ee8c319069887e58ba35a031a07501f1d112c55b54919cf6af439708f2f010bdb4357516ca3646292f3ea4bfd8a0ab38dca9e4f0a47549ed36cb978320225dddef9f76713d848134079b66c57ee4b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302054016832fefd882520884561bbeee80a05db643a2d7c31bf457fcf47e30ff6a346961f12141642483efe82bc6998a892b8834ad96eaf50e9599f864f86215018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca08393c27e8b1658ba9d0de41553a1f40c8d7054daf6258f17d188f525e37fabc4a006321e9df3cd7d02479a9db54eb764a27e5c78cc9f34899ff223efaad9a0b126c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x15", + "r" : "0x8393c27e8b1658ba9d0de41553a1f40c8d7054daf6258f17d188f525e37fabc4", + "s" : "0x06321e9df3cd7d02479a9db54eb764a27e5c78cc9f34899ff223efaad9a0b126", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020580", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "34efc4d1e44297bc8b08455acd61932eb1de6b0bf7e62573da21b6c9c046b115", + "mixHash" : "39c97b3285af9e1186402826206dd518c665594d3e2c4ee3135dc8eb7317f8c8", + "nonce" : "2d829cb7c28bf6fb", + "number" : "0x17", + "parentHash" : "c32c564534b8ef7df9b5a7886bd71556c574f1089464ec708fe25beb733be280", + "receiptTrie" : "95890ec65ef7e006e341431331330b6cfc9293d87f854eb908ebf9919fc93253", + "stateRoot" : "8ecc351b000c38ff0e3adf5a8383fbe5a6c80524ef8e0ead95fe3b4d34e71f08", + "timestamp" : "0x561bbeef", + "transactionsTrie" : "bfd282d92b8e564ad1ff263f6ae03b93a069f10f00d3e723a296800a757f1ff3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "23", + "chainname" : "D", + "rlp" : "0xf90263f901f9a0c32c564534b8ef7df9b5a7886bd71556c574f1089464ec708fe25beb733be280a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08ecc351b000c38ff0e3adf5a8383fbe5a6c80524ef8e0ead95fe3b4d34e71f08a0bfd282d92b8e564ad1ff263f6ae03b93a069f10f00d3e723a296800a757f1ff3a095890ec65ef7e006e341431331330b6cfc9293d87f854eb908ebf9919fc93253b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302058017832fefd882520884561bbeef80a039c97b3285af9e1186402826206dd518c665594d3e2c4ee3135dc8eb7317f8c8882d829cb7c28bf6fbf864f86216018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba0cfb1ca5f71db91c77be594c61534914f492061474bd1e580cc8e1595f4b20043a078b4cfed0c7ec633a6442ac76748146ecfe8e76702840373150104c31c8535a9c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x16", + "r" : "0xcfb1ca5f71db91c77be594c61534914f492061474bd1e580cc8e1595f4b20043", + "s" : "0x78b4cfed0c7ec633a6442ac76748146ecfe8e76702840373150104c31c8535a9", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0205c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "3cf913c065ddfed1192813ec796a6ef4bbf7262596eede3eb79f96e152593b77", + "mixHash" : "db0614c55e39100aecb2a4394e9502a5b9bc7a9b74c397d58455a15019a09ad1", + "nonce" : "1cb8ea78f10eb943", + "number" : "0x18", + "parentHash" : "34efc4d1e44297bc8b08455acd61932eb1de6b0bf7e62573da21b6c9c046b115", + "receiptTrie" : "9d8083550c7f882bd5de852c8b7158b1ce7514561a87fd86505b185ebfdd1666", + "stateRoot" : "15cc51eeac2abff97b7ebebc17fd16493d4f88930bfd47193276539c24ffe02e", + "timestamp" : "0x561bbef2", + "transactionsTrie" : "26cce381fef66f447739c2d22bdd85038f492bbcb8095cd8ebc03cdfbbf12f06", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "24", + "chainname" : "D", + "rlp" : "0xf90263f901f9a034efc4d1e44297bc8b08455acd61932eb1de6b0bf7e62573da21b6c9c046b115a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a015cc51eeac2abff97b7ebebc17fd16493d4f88930bfd47193276539c24ffe02ea026cce381fef66f447739c2d22bdd85038f492bbcb8095cd8ebc03cdfbbf12f06a09d8083550c7f882bd5de852c8b7158b1ce7514561a87fd86505b185ebfdd1666b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830205c018832fefd882520884561bbef280a0db0614c55e39100aecb2a4394e9502a5b9bc7a9b74c397d58455a15019a09ad1881cb8ea78f10eb943f864f86217018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca03f77a5cf014af7e1b4a2fddeb245325e5c704e79613ac5762ef0edddf1e37424a024e43a44c6251ea8cc538fc3eb367ad3118bb94ba6ed62dd67a82f319effd397c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x17", + "r" : "0x3f77a5cf014af7e1b4a2fddeb245325e5c704e79613ac5762ef0edddf1e37424", + "s" : "0x24e43a44c6251ea8cc538fc3eb367ad3118bb94ba6ed62dd67a82f319effd397", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020600", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "8524c14bb10c94857d3797ef490caf06fee520892ac8c06ea92ab34d669f3843", + "mixHash" : "976af88b2a0949d97b6533fb8821a21911b9a21840e2f4b74271efde383e5b23", + "nonce" : "0f6cafbbe1d58714", + "number" : "0x19", + "parentHash" : "3cf913c065ddfed1192813ec796a6ef4bbf7262596eede3eb79f96e152593b77", + "receiptTrie" : "3da16534b3e5e09a892eb33cc9c3a1976f7386e554712f291ed153979f5f0045", + "stateRoot" : "a437e2db8a5f098a4215d33659bc2ffdfc8fb9dd79ebbf69f1352cdede048509", + "timestamp" : "0x561bbef7", + "transactionsTrie" : "dfe9380cb8af4857e14dd649b10ac6be666228c4900bcecb03195ac2b7924e46", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "25", + "chainname" : "D", + "rlp" : "0xf90263f901f9a03cf913c065ddfed1192813ec796a6ef4bbf7262596eede3eb79f96e152593b77a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a437e2db8a5f098a4215d33659bc2ffdfc8fb9dd79ebbf69f1352cdede048509a0dfe9380cb8af4857e14dd649b10ac6be666228c4900bcecb03195ac2b7924e46a03da16534b3e5e09a892eb33cc9c3a1976f7386e554712f291ed153979f5f0045b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302060019832fefd882520884561bbef780a0976af88b2a0949d97b6533fb8821a21911b9a21840e2f4b74271efde383e5b23880f6cafbbe1d58714f864f86218018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba0413ba7864ede7067807a60784e3e1626c346706553dd0fb3d0692da842afd4d0a00bef5b40aa02ff70b8feae7f6073e2be81a57d819c130a2175b250c5cfe203b5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x18", + "r" : "0x413ba7864ede7067807a60784e3e1626c346706553dd0fb3d0692da842afd4d0", + "s" : "0x0bef5b40aa02ff70b8feae7f6073e2be81a57d819c130a2175b250c5cfe203b5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "95f926bd8a48fd55c3569499ef901e725f87472ed5d463cb18f51088bbaf2a8d", + "mixHash" : "154bddb1a1be1e1d66afd38e22dddd7034055ea561584260e913c3b6ea24f298", + "nonce" : "630283eb76f7b2c6", + "number" : "0x01", + "parentHash" : "358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bd", + "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", + "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", + "timestamp" : "0x561bbef9", + "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a0358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bbef980a0154bddb1a1be1e1d66afd38e22dddd7034055ea561584260e913c3b6ea24f29888630283eb76f7b2c6f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x77c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8", + "s" : "0x3f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f3b3550cf99ace055e8ec7a2555de8438ed73b877323846e5bc622bd9ab7b610", + "mixHash" : "11d51536016290746730db6e85e494bbdcd843908c24e65e555a86e1b6fb3436", + "nonce" : "ae34d3265dfd0dd9", + "number" : "0x02", + "parentHash" : "95f926bd8a48fd55c3569499ef901e725f87472ed5d463cb18f51088bbaf2a8d", + "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", + "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", + "timestamp" : "0x561bbefc", + "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "AA", + "rlp" : "0xf90260f901f9a095f926bd8a48fd55c3569499ef901e725f87472ed5d463cb18f51088bbaf2a8da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bbefc80a011d51536016290746730db6e85e494bbdcd843908c24e65e555a86e1b6fb343688ae34d3265dfd0dd9f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x33c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f23", + "s" : "0x1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cf", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "cabbd6f9a74a5666952251fbdb24bd3674ec546de79013af1dd06e5b5dddb972", + "mixHash" : "dba157bbbd7814873375efcae926f959d3af7190263b88ab8c9712f94f8b2846", + "nonce" : "d0647658b7da75f7", + "number" : "0x03", + "parentHash" : "f3b3550cf99ace055e8ec7a2555de8438ed73b877323846e5bc622bd9ab7b610", + "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", + "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", + "timestamp" : "0x561bbeff", + "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a0f3b3550cf99ace055e8ec7a2555de8438ed73b877323846e5bc622bd9ab7b610a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bbeff80a0dba157bbbd7814873375efcae926f959d3af7190263b88ab8c9712f94f8b284688d0647658b7da75f7f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x15eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0ee", + "s" : "0x5d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f3e2559cb6a969da249ea0aa1793b0f2be287e349e6a00973dbb90236d1deb61", + "mixHash" : "b0145ead7a6e6d96583c08ced7fa1ff13415c83bb4208ce8742b5b476385e8ba", + "nonce" : "777650449f0d26e9", + "number" : "0x04", + "parentHash" : "cabbd6f9a74a5666952251fbdb24bd3674ec546de79013af1dd06e5b5dddb972", + "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", + "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", + "timestamp" : "0x561bbf01", + "transactionsTrie" : "9735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a0cabbd6f9a74a5666952251fbdb24bd3674ec546de79013af1dd06e5b5dddb972a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bbf0180a0b0145ead7a6e6d96583c08ced7fa1ff13415c83bb4208ce8742b5b476385e8ba88777650449f0d26e9f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0xa7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840d", + "s" : "0x2078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "1fe26db4e91359a05c903217433a45eb124e15b574a365f84ff595930d536de8", + "mixHash" : "9274e7bb8630fe646ebb3738ce87ed130e0d4812503831ca48c5e0abf7a90b6e", + "nonce" : "247427557c8bbd68", + "number" : "0x05", + "parentHash" : "f3e2559cb6a969da249ea0aa1793b0f2be287e349e6a00973dbb90236d1deb61", + "receiptTrie" : "e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9", + "stateRoot" : "72f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19", + "timestamp" : "0x561bbf02", + "transactionsTrie" : "7e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "5", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a0f3e2559cb6a969da249ea0aa1793b0f2be287e349e6a00973dbb90236d1deb61a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a07e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bbf0280a09274e7bb8630fe646ebb3738ce87ed130e0d4812503831ca48c5e0abf7a90b6e88247427557c8bbd68f862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29a0796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0xce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29", + "s" : "0x796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f53c54e6f8e63f25149e47aa1564413d80e1cd7488d5310377762a3cc4d57884", + "mixHash" : "54a82ee7f168407eb93407dd96959653e9c31c4b46f0a931149ce79a2cd99052", + "nonce" : "494ced245fda5fcb", + "number" : "0x06", + "parentHash" : "1fe26db4e91359a05c903217433a45eb124e15b574a365f84ff595930d536de8", + "receiptTrie" : "849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01f", + "stateRoot" : "4fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640", + "timestamp" : "0x561bbf05", + "transactionsTrie" : "72e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fd", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a01fe26db4e91359a05c903217433a45eb124e15b574a365f84ff595930d536de8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640a072e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fda0849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882520884561bbf0580a054a82ee7f168407eb93407dd96959653e9c31c4b46f0a931149ce79a2cd9905288494ced245fda5fcbf862f86005018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0b6a4064ef7d23f0e149472d6f1257055149840b6c73a4ae25e595b9f9fc78edca004ad52e8157ae742b551851d58fd6c3919cd7e5a0a9c6685d5bc630a657dcde7c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0xb6a4064ef7d23f0e149472d6f1257055149840b6c73a4ae25e595b9f9fc78edc", + "s" : "0x04ad52e8157ae742b551851d58fd6c3919cd7e5a0a9c6685d5bc630a657dcde7", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020180", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "0ef4a019a674e71c22405e4128c15b132fac06449cdb9810158f217fe40d34d5", + "mixHash" : "5d1526563e8d560deb0b587f5b3dd8260d9a3e7b418d2c691017390646da7e1c", + "nonce" : "9f0ff7cfb40dbbc9", + "number" : "0x07", + "parentHash" : "f53c54e6f8e63f25149e47aa1564413d80e1cd7488d5310377762a3cc4d57884", + "receiptTrie" : "fa86f16d802244d9cf1a7355bf1ef7c68bebca8b427bea750813b7c091dc0ff2", + "stateRoot" : "8dfc8c0329a0aef2bde5023d5aa2067e965b50d9527bc91733f45aa0cf0c2a1d", + "timestamp" : "0x561bbf07", + "transactionsTrie" : "b599d73bc0f69c32741df069fac99e6a88ec762035157a4da4e56988ca234691", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "7", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a0f53c54e6f8e63f25149e47aa1564413d80e1cd7488d5310377762a3cc4d57884a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08dfc8c0329a0aef2bde5023d5aa2067e965b50d9527bc91733f45aa0cf0c2a1da0b599d73bc0f69c32741df069fac99e6a88ec762035157a4da4e56988ca234691a0fa86f16d802244d9cf1a7355bf1ef7c68bebca8b427bea750813b7c091dc0ff2b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882520884561bbf0780a05d1526563e8d560deb0b587f5b3dd8260d9a3e7b418d2c691017390646da7e1c889f0ff7cfb40dbbc9f862f86006018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba06e5cde32123fa42eeaa27497d538e8fd35c60eda30ead6c296750d3dfcc6d748a01926babbf8c4fef9eb45fe0d532cc30683a16b3415084a9043b27f513057014bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x06", + "r" : "0x6e5cde32123fa42eeaa27497d538e8fd35c60eda30ead6c296750d3dfcc6d748", + "s" : "0x1926babbf8c4fef9eb45fe0d532cc30683a16b3415084a9043b27f513057014b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0201c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "c6c30539ac90eb4e92cef20124592e7fb19ee8859a2da11d0c90ed636eaf0e1d", + "mixHash" : "2d4e8f14f578a34d2dcf7880a9eeaeefb89d4a9bc375f95b3a0acc14b7c1ecba", + "nonce" : "fe5b327d27d6decb", + "number" : "0x08", + "parentHash" : "0ef4a019a674e71c22405e4128c15b132fac06449cdb9810158f217fe40d34d5", + "receiptTrie" : "129e8dcd3e2880de0795a0472065a402520bd37918c6d9a60d64854e300cf7dd", + "stateRoot" : "a62f540ccf204f049e5c7bbae8f4f73ea5817c37a1764812cbf120a87f5b4225", + "timestamp" : "0x561bbf09", + "transactionsTrie" : "7b01349f6ec832de83c289f71dfd836e9af6031c5b9b0935d4445c5449237b1a", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "8", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a00ef4a019a674e71c22405e4128c15b132fac06449cdb9810158f217fe40d34d5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a62f540ccf204f049e5c7bbae8f4f73ea5817c37a1764812cbf120a87f5b4225a07b01349f6ec832de83c289f71dfd836e9af6031c5b9b0935d4445c5449237b1aa0129e8dcd3e2880de0795a0472065a402520bd37918c6d9a60d64854e300cf7ddb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd882520884561bbf0980a02d4e8f14f578a34d2dcf7880a9eeaeefb89d4a9bc375f95b3a0acc14b7c1ecba88fe5b327d27d6decbf862f86007018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca03ffd5dfb58490a6b7491f045acbe6930d2e7d1a636ac08e9f6b071c62f36b6f4a0069907c3301954e812fd2936731ca1dd2c07e362c050ffc3554c76acc11c2fa3c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x07", + "r" : "0x3ffd5dfb58490a6b7491f045acbe6930d2e7d1a636ac08e9f6b071c62f36b6f4", + "s" : "0x069907c3301954e812fd2936731ca1dd2c07e362c050ffc3554c76acc11c2fa3", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020200", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "cc44e8743cd7b4c09582fcbf413c876112b588a6102cd46c575084a344e8ef68", + "mixHash" : "4eef12c5eb155be9ca664f6fab2c9698c080b9a79237d771096cc1f515d87128", + "nonce" : "dbbfb306daf77216", + "number" : "0x09", + "parentHash" : "c6c30539ac90eb4e92cef20124592e7fb19ee8859a2da11d0c90ed636eaf0e1d", + "receiptTrie" : "353f8e1730a3aa56c6853787c65fa09bff030cfc624de2637535a039285a9966", + "stateRoot" : "16671b78846a5ee341404f6bef367f9303c179870635f2e88709e6f788945ce0", + "timestamp" : "0x561bbf0b", + "transactionsTrie" : "ab929a0fb5e6103a254e439ce0eb9275f55ae2b9f7f87292632fcae71dda99b9", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "9", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a0c6c30539ac90eb4e92cef20124592e7fb19ee8859a2da11d0c90ed636eaf0e1da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a016671b78846a5ee341404f6bef367f9303c179870635f2e88709e6f788945ce0a0ab929a0fb5e6103a254e439ce0eb9275f55ae2b9f7f87292632fcae71dda99b9a0353f8e1730a3aa56c6853787c65fa09bff030cfc624de2637535a039285a9966b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd882520884561bbf0b80a04eef12c5eb155be9ca664f6fab2c9698c080b9a79237d771096cc1f515d8712888dbbfb306daf77216f862f86008018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0820dd7609f5a6df98cd89c1b2340a276c142984b2464b7c5bc367f618248f794a00bd364a543b498adf4d98d712c9f739448be1e3126837cd2ec21eb610fd9df8dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x08", + "r" : "0x820dd7609f5a6df98cd89c1b2340a276c142984b2464b7c5bc367f618248f794", + "s" : "0x0bd364a543b498adf4d98d712c9f739448be1e3126837cd2ec21eb610fd9df8d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020240", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "6d25a0412a5fac2e4968da57f3345fc189059ccc75e755f763fcf041a1acfd35", + "mixHash" : "ef645eaf1976e04b4dea6fa429fae121e9dfd9217c5cf8d390f24bba3da99ee1", + "nonce" : "079ef20c0a5d7fb0", + "number" : "0x0a", + "parentHash" : "cc44e8743cd7b4c09582fcbf413c876112b588a6102cd46c575084a344e8ef68", + "receiptTrie" : "fcea8134fdac40836fe45b83f1799e85ddf4b10627a61b070ce0ad352cfb0b16", + "stateRoot" : "439f2265357c9cb4f62e88581320a46051098d1f5c3ca84f353fdf7144f015d5", + "timestamp" : "0x561bbf0d", + "transactionsTrie" : "10d442b3d14b5e5f43c50d8417aaa0cdc45ab1ec368392232646d1a240d9faa5", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "10", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a0cc44e8743cd7b4c09582fcbf413c876112b588a6102cd46c575084a344e8ef68a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0439f2265357c9cb4f62e88581320a46051098d1f5c3ca84f353fdf7144f015d5a010d442b3d14b5e5f43c50d8417aaa0cdc45ab1ec368392232646d1a240d9faa5a0fcea8134fdac40836fe45b83f1799e85ddf4b10627a61b070ce0ad352cfb0b16b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd882520884561bbf0d80a0ef645eaf1976e04b4dea6fa429fae121e9dfd9217c5cf8d390f24bba3da99ee188079ef20c0a5d7fb0f862f86009018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0187763a1aaa0f00bb652790661c06809cc77709fedc88f2b674d5f15bec36315a039ca18b1afd3e7b36b9873c6316c998bc760248299db831d3e1fc596ee53281fc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x09", + "r" : "0x187763a1aaa0f00bb652790661c06809cc77709fedc88f2b674d5f15bec36315", + "s" : "0x39ca18b1afd3e7b36b9873c6316c998bc760248299db831d3e1fc596ee53281f", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020280", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "ab389a6a231fb5a34a9b9eef84721abf8391c1369c5bf995a9385db7fa17be20", + "mixHash" : "0e6f824a334d45a6027d2e4c0d0f5546f5ac2a22ddd891d11258188676277524", + "nonce" : "2b59729b5563c268", + "number" : "0x0b", + "parentHash" : "6d25a0412a5fac2e4968da57f3345fc189059ccc75e755f763fcf041a1acfd35", + "receiptTrie" : "9b83492cdbe8ab436a3ff3576e2e158ff5d6eea7b01797267da097cb393b7bbb", + "stateRoot" : "aa4df38c69945476a013d848533328b19d6f8433ce7b1182fc325502435071f1", + "timestamp" : "0x561bbf11", + "transactionsTrie" : "5dd0ecc0d4a2f1a59afcbc6119cfc096cfe3ea319de027fe692e853fd9b2ebb7", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "11", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a06d25a0412a5fac2e4968da57f3345fc189059ccc75e755f763fcf041a1acfd35a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0aa4df38c69945476a013d848533328b19d6f8433ce7b1182fc325502435071f1a05dd0ecc0d4a2f1a59afcbc6119cfc096cfe3ea319de027fe692e853fd9b2ebb7a09b83492cdbe8ab436a3ff3576e2e158ff5d6eea7b01797267da097cb393b7bbbb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202800b832fefd882520884561bbf1180a00e6f824a334d45a6027d2e4c0d0f5546f5ac2a22ddd891d11258188676277524882b59729b5563c268f862f8600a018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba02f254889f1435bba7a1b61fdafd6ff47c1612a192a50a47b7c04afe88341092ba0561030ec80cdfde708d6be835dd248aa553d108c3421eec1b8c0449b685998b1c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0a", + "r" : "0x2f254889f1435bba7a1b61fdafd6ff47c1612a192a50a47b7c04afe88341092b", + "s" : "0x561030ec80cdfde708d6be835dd248aa553d108c3421eec1b8c0449b685998b1", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0202c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "e3fff35215d650bc5dab900fe0b1abb2000495bff6ae98f453d72278322f1c73", + "mixHash" : "2491f2b9681e5da965e7bf5235767816838dcfdd7fd37ae0971e0376ad228301", + "nonce" : "d2ecbce5e9711f00", + "number" : "0x0c", + "parentHash" : "ab389a6a231fb5a34a9b9eef84721abf8391c1369c5bf995a9385db7fa17be20", + "receiptTrie" : "7a13fd259fb845b81806a84c7169057e5b7747fc6f3933922f9902f0f5323e1e", + "stateRoot" : "f44a8bfa0a288e3ae918e35ee8e75bd435f9d7dd3cfdc516f5bcd14cd40be008", + "timestamp" : "0x561bbf14", + "transactionsTrie" : "30ab6abd3878f13dd91c6f6b2ca30ec18fde5795a5a0902ea1bf817e50d72c34", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "12", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a0ab389a6a231fb5a34a9b9eef84721abf8391c1369c5bf995a9385db7fa17be20a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f44a8bfa0a288e3ae918e35ee8e75bd435f9d7dd3cfdc516f5bcd14cd40be008a030ab6abd3878f13dd91c6f6b2ca30ec18fde5795a5a0902ea1bf817e50d72c34a07a13fd259fb845b81806a84c7169057e5b7747fc6f3933922f9902f0f5323e1eb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202c00c832fefd882520884561bbf1480a02491f2b9681e5da965e7bf5235767816838dcfdd7fd37ae0971e0376ad22830188d2ecbce5e9711f00f862f8600b018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca07f4078501f3d03c3dd684f88c87afdd5520314ce606534ab1849c08a02f40731a00b9bef0fea773593ca9e8c83c2f42133ff6a8706beed081077970b0c68918388c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0b", + "r" : "0x7f4078501f3d03c3dd684f88c87afdd5520314ce606534ab1849c08a02f40731", + "s" : "0x0b9bef0fea773593ca9e8c83c2f42133ff6a8706beed081077970b0c68918388", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020300", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "7ddb2337e03b5487d3015eb7bd7547dc74326168c9a8c9a792cd48e9ae013640", + "mixHash" : "94c9e72dd43549303de8dad679956f5fd605b8e4dec45d0f30c2155af9cd7e32", + "nonce" : "e0aec5a169daa427", + "number" : "0x0d", + "parentHash" : "e3fff35215d650bc5dab900fe0b1abb2000495bff6ae98f453d72278322f1c73", + "receiptTrie" : "7aae72037d6c0e98ce6cca097ee60bdcfbc66d4e7eab15372e3b963bb399b0b6", + "stateRoot" : "7487980351216e18471e50452423119d79a6573d890a59193210d3414186a4d7", + "timestamp" : "0x561bbf16", + "transactionsTrie" : "b26c16bf451bddeb2e246856f5a9fb0a18db77e5d3285e1ca8c98fad836be34f", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "13", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a0e3fff35215d650bc5dab900fe0b1abb2000495bff6ae98f453d72278322f1c73a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07487980351216e18471e50452423119d79a6573d890a59193210d3414186a4d7a0b26c16bf451bddeb2e246856f5a9fb0a18db77e5d3285e1ca8c98fad836be34fa07aae72037d6c0e98ce6cca097ee60bdcfbc66d4e7eab15372e3b963bb399b0b6b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203000d832fefd882520884561bbf1680a094c9e72dd43549303de8dad679956f5fd605b8e4dec45d0f30c2155af9cd7e3288e0aec5a169daa427f862f8600c018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca09f0d7ecfef3a7f29ace42475d105eefc86b9c9e7e8e9bbe0e6820d1b7b3c214fa0077147de33c9d0f963abcb947caad3c0fc5f4460ace2e561c308ecce3dc8ee14c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0c", + "r" : "0x9f0d7ecfef3a7f29ace42475d105eefc86b9c9e7e8e9bbe0e6820d1b7b3c214f", + "s" : "0x077147de33c9d0f963abcb947caad3c0fc5f4460ace2e561c308ecce3dc8ee14", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020340", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "a13c201f0e4778fc96bccdc82b3e36d21172f50bf48c725db5963d1d139a92d1", + "mixHash" : "7281eff5b1d30ed711f1c7a370f9b853a518bf27ed347689485c0fceb98865a7", + "nonce" : "04d0a6da48348f47", + "number" : "0x0e", + "parentHash" : "7ddb2337e03b5487d3015eb7bd7547dc74326168c9a8c9a792cd48e9ae013640", + "receiptTrie" : "c0bcc49c9646a662037ad064829b866b956b5649e02a51e48f5548bfbe10d2da", + "stateRoot" : "ed83080a8d306d62bbd540b9415689671875b141ab790a171100222274619e78", + "timestamp" : "0x561bbf18", + "transactionsTrie" : "8edec89c92fd2d1b9f54c030079372b3601630d02f0d5adeef82a0f2d2831434", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "14", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a07ddb2337e03b5487d3015eb7bd7547dc74326168c9a8c9a792cd48e9ae013640a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ed83080a8d306d62bbd540b9415689671875b141ab790a171100222274619e78a08edec89c92fd2d1b9f54c030079372b3601630d02f0d5adeef82a0f2d2831434a0c0bcc49c9646a662037ad064829b866b956b5649e02a51e48f5548bfbe10d2dab9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203400e832fefd882520884561bbf1880a07281eff5b1d30ed711f1c7a370f9b853a518bf27ed347689485c0fceb98865a78804d0a6da48348f47f862f8600d018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba01c99d428d48c700f0ce72c3d5be7d994c861e93f238f714de8619ce2dc09f7a4a037ec77ba5898d2535e23a7df1bb0a3e0ce23ff92326d1566d51e1f9a949d5480c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0d", + "r" : "0x1c99d428d48c700f0ce72c3d5be7d994c861e93f238f714de8619ce2dc09f7a4", + "s" : "0x37ec77ba5898d2535e23a7df1bb0a3e0ce23ff92326d1566d51e1f9a949d5480", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020380", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "92e173dfe2b3c0fc54d9720110179a02d2a6163ef729fcc0673ed7854812461a", + "mixHash" : "f223e9154ed8d24fecb52fed0861a1d65c4d50f976500faf8fa5c0aae12f6ab7", + "nonce" : "fcc8d9efc3452b64", + "number" : "0x0f", + "parentHash" : "a13c201f0e4778fc96bccdc82b3e36d21172f50bf48c725db5963d1d139a92d1", + "receiptTrie" : "cb50499ae4bc14ca2301d35a44d94089e0c0977d51d48cf920a7ef74f77bc4d9", + "stateRoot" : "c8868b6a8181a5e3815745d6d583821676943db8909d339f9f78b2c9ccd3df3b", + "timestamp" : "0x561bbf1a", + "transactionsTrie" : "15e1ed472ef87edbceda2018a24b60d7497090b6797078b68a592cfd58d5d425", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "15", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a0a13c201f0e4778fc96bccdc82b3e36d21172f50bf48c725db5963d1d139a92d1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c8868b6a8181a5e3815745d6d583821676943db8909d339f9f78b2c9ccd3df3ba015e1ed472ef87edbceda2018a24b60d7497090b6797078b68a592cfd58d5d425a0cb50499ae4bc14ca2301d35a44d94089e0c0977d51d48cf920a7ef74f77bc4d9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203800f832fefd882520884561bbf1a80a0f223e9154ed8d24fecb52fed0861a1d65c4d50f976500faf8fa5c0aae12f6ab788fcc8d9efc3452b64f862f8600e018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba02828f94dcdc43d17ff9028a1ba1aff16dd69233a11a96a8305c0aa08ac7b07cea077edabac675f1d990d0b9aab0cb002022f6f6dc395be07b59094a3130e3eadc9c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0e", + "r" : "0x2828f94dcdc43d17ff9028a1ba1aff16dd69233a11a96a8305c0aa08ac7b07ce", + "s" : "0x77edabac675f1d990d0b9aab0cb002022f6f6dc395be07b59094a3130e3eadc9", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0203c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "1e7687e23020d606b37395b381404515f8ba7422c03026b35117afa0a60f840a", + "mixHash" : "2afeb4598e852bbeafe95e407fb8d8936462ab51a999fa7a7136d538345478d8", + "nonce" : "18dfd39d2abf8133", + "number" : "0x10", + "parentHash" : "92e173dfe2b3c0fc54d9720110179a02d2a6163ef729fcc0673ed7854812461a", + "receiptTrie" : "a4ba5e8447b3f32769a892dd7b90f7f61f4c0c362373fff447f468ffc58e1704", + "stateRoot" : "61badaa2d39665943d61a74107cda3d6ce74dd359cd56f1463d3b0fc3fbef661", + "timestamp" : "0x561bbf1d", + "transactionsTrie" : "30d8b7dd8fef857dc9dd98256f2898b740f8cf15fcc845467cf628ba307d2700", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "16", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a092e173dfe2b3c0fc54d9720110179a02d2a6163ef729fcc0673ed7854812461aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a061badaa2d39665943d61a74107cda3d6ce74dd359cd56f1463d3b0fc3fbef661a030d8b7dd8fef857dc9dd98256f2898b740f8cf15fcc845467cf628ba307d2700a0a4ba5e8447b3f32769a892dd7b90f7f61f4c0c362373fff447f468ffc58e1704b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203c010832fefd882520884561bbf1d80a02afeb4598e852bbeafe95e407fb8d8936462ab51a999fa7a7136d538345478d88818dfd39d2abf8133f862f8600f018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0580049a463f7fe7077e0179e095a2fcdf11ab43e410d7ca30199237634b0c474a0585cf7a85794a7423e6a83e1821f8484e5b867e9c90185e98e2fa15e7f31de2dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0f", + "r" : "0x580049a463f7fe7077e0179e095a2fcdf11ab43e410d7ca30199237634b0c474", + "s" : "0x585cf7a85794a7423e6a83e1821f8484e5b867e9c90185e98e2fa15e7f31de2d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020400", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "70556c11fd1ef24b36a09faf64f722c454e2c9e71184d3687791e073ca1bbe54", + "mixHash" : "3ca99d85db78a9451cd832b374dbf950f36e127fb77c15ea99c49f195b43a9b7", + "nonce" : "595d707401ba4821", + "number" : "0x11", + "parentHash" : "1e7687e23020d606b37395b381404515f8ba7422c03026b35117afa0a60f840a", + "receiptTrie" : "7b33618f7c3bc9224d5db90c4e1be4f5383110063d253fa8f3ff524d1655a706", + "stateRoot" : "27dcf7f1a8aedfa73c957cb5316416c83519e02c00cba428be732121a8fb284b", + "timestamp" : "0x561bbf1f", + "transactionsTrie" : "296ddb78c8f1b2580e8b1f704023a99253ded2118e92e3508eedf8cbc7811bd3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "17", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a01e7687e23020d606b37395b381404515f8ba7422c03026b35117afa0a60f840aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a027dcf7f1a8aedfa73c957cb5316416c83519e02c00cba428be732121a8fb284ba0296ddb78c8f1b2580e8b1f704023a99253ded2118e92e3508eedf8cbc7811bd3a07b33618f7c3bc9224d5db90c4e1be4f5383110063d253fa8f3ff524d1655a706b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302040011832fefd882520884561bbf1f80a03ca99d85db78a9451cd832b374dbf950f36e127fb77c15ea99c49f195b43a9b788595d707401ba4821f862f86010018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0357bee1003d7e0e72faa1d712ae581b203f3e4bef7d5f647b28d8e4dbb24e5e0a004e7f569343f85e26a1956f8d4faf56ff3d2b071e8bef2acb414da8e483d68bec0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x10", + "r" : "0x357bee1003d7e0e72faa1d712ae581b203f3e4bef7d5f647b28d8e4dbb24e5e0", + "s" : "0x04e7f569343f85e26a1956f8d4faf56ff3d2b071e8bef2acb414da8e483d68be", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020440", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "126b28170008c03e217ea8c382a3bef4145c5cb5af29ba0917386355a8a1c4af", + "mixHash" : "5e16d41370388baab73d85da37224573233b1ffa454998dbff5bac6e5ad0bd48", + "nonce" : "09794d602b686549", + "number" : "0x12", + "parentHash" : "70556c11fd1ef24b36a09faf64f722c454e2c9e71184d3687791e073ca1bbe54", + "receiptTrie" : "ed31779fdbecfc67dc2c6ddd6a2af33b80d5d3d570954bb871f8b5804efd9bbc", + "stateRoot" : "d414902f6f2e0718fcee149f202c71b934c13762a457e467e0c32173fc0ba219", + "timestamp" : "0x561bbf21", + "transactionsTrie" : "ca5f55cb090326f77309b025cac6d30acbfa9e81e48a4c76a815f4549b00676c", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "18", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a070556c11fd1ef24b36a09faf64f722c454e2c9e71184d3687791e073ca1bbe54a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d414902f6f2e0718fcee149f202c71b934c13762a457e467e0c32173fc0ba219a0ca5f55cb090326f77309b025cac6d30acbfa9e81e48a4c76a815f4549b00676ca0ed31779fdbecfc67dc2c6ddd6a2af33b80d5d3d570954bb871f8b5804efd9bbcb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302044012832fefd882520884561bbf2180a05e16d41370388baab73d85da37224573233b1ffa454998dbff5bac6e5ad0bd488809794d602b686549f862f86011018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba064eb15cdbb22817720491c9077a8a4d07273deb1504a7efa9147f6421a3c7d36a04434827c72d3780f12e1f4c6ad146630b5298d678b6d5f28507a7636ea809c4dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x11", + "r" : "0x64eb15cdbb22817720491c9077a8a4d07273deb1504a7efa9147f6421a3c7d36", + "s" : "0x4434827c72d3780f12e1f4c6ad146630b5298d678b6d5f28507a7636ea809c4d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020480", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "413b32b7ffacf4ee06a2fe850d4f401562fafe6873b1c0a9bb9c88e85d1affc6", + "mixHash" : "7b4789b4b7f3093d5f729f67d89322e99fa40dd76ad6f27311c5e9e0a3d3841e", + "nonce" : "b8119423a693a9c3", + "number" : "0x13", + "parentHash" : "126b28170008c03e217ea8c382a3bef4145c5cb5af29ba0917386355a8a1c4af", + "receiptTrie" : "a395da873d485a784b4197c882b2a46ab3b9c520cef676f926b788dc15dd96fd", + "stateRoot" : "7ca503a82f35372a79d3c872a9f415b6e9b3bb81fbae47ecc851f2b7ff4ca6b6", + "timestamp" : "0x561bbf23", + "transactionsTrie" : "21d3cf8bc03a3aa6b8677ec0670dc23daecb83a13a91fb8d4ddf8c0d0bfc11f4", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "19", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a0126b28170008c03e217ea8c382a3bef4145c5cb5af29ba0917386355a8a1c4afa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07ca503a82f35372a79d3c872a9f415b6e9b3bb81fbae47ecc851f2b7ff4ca6b6a021d3cf8bc03a3aa6b8677ec0670dc23daecb83a13a91fb8d4ddf8c0d0bfc11f4a0a395da873d485a784b4197c882b2a46ab3b9c520cef676f926b788dc15dd96fdb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302048013832fefd882520884561bbf2380a07b4789b4b7f3093d5f729f67d89322e99fa40dd76ad6f27311c5e9e0a3d3841e88b8119423a693a9c3f862f86012018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0323246582abd0cc984c3f259de2b93df30f5e6424395cb1404dde893b075f329a014e5d8269ff1dbb2004607654e0d9a40096b7cc0566ba2e5f6ed0f3a438e06f8c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x12", + "r" : "0x323246582abd0cc984c3f259de2b93df30f5e6424395cb1404dde893b075f329", + "s" : "0x14e5d8269ff1dbb2004607654e0d9a40096b7cc0566ba2e5f6ed0f3a438e06f8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0204c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "89bba354d5cac3b08d1953dff2dd14570ff6a2a9126208520de18b8daf4a116e", + "mixHash" : "746ee04ecf1790a620741b42937658824e75b997a8aae0f32cf50c8ae4f43f48", + "nonce" : "6d7a7c6c41cb8142", + "number" : "0x14", + "parentHash" : "413b32b7ffacf4ee06a2fe850d4f401562fafe6873b1c0a9bb9c88e85d1affc6", + "receiptTrie" : "d32d77aaf9e5333e1dcad937e50208854a20cd37faf1e6363d7507c64eea990a", + "stateRoot" : "ae498510c9c5eafbfb220c91fdae8a9ad5050e719fc98c828aeec8721c4f0ed1", + "timestamp" : "0x561bbf25", + "transactionsTrie" : "d60b1af1b601285b12c4168b0c12b1d3b52d292a6ae59e98acb4616cc55d9bc7", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "20", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a0413b32b7ffacf4ee06a2fe850d4f401562fafe6873b1c0a9bb9c88e85d1affc6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ae498510c9c5eafbfb220c91fdae8a9ad5050e719fc98c828aeec8721c4f0ed1a0d60b1af1b601285b12c4168b0c12b1d3b52d292a6ae59e98acb4616cc55d9bc7a0d32d77aaf9e5333e1dcad937e50208854a20cd37faf1e6363d7507c64eea990ab9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830204c014832fefd882520884561bbf2580a0746ee04ecf1790a620741b42937658824e75b997a8aae0f32cf50c8ae4f43f48886d7a7c6c41cb8142f862f86013018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0d5dca4f4c9fb81dad21eccb5e89eb1ec49e0be73f18663932b2f7a098c41d9c9a018e2fb5792e9892341b134585bdf690f19597ba465e6c434bad483d250bde24dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x13", + "r" : "0xd5dca4f4c9fb81dad21eccb5e89eb1ec49e0be73f18663932b2f7a098c41d9c9", + "s" : "0x18e2fb5792e9892341b134585bdf690f19597ba465e6c434bad483d250bde24d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020500", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "6e34a3d63997c5bd61e81d29706b30b91a418463e0b6c1233bcbb66bf6f44f24", + "mixHash" : "b23827d023255ff4757ea822247933fc1c0a00f28f323f66c4f37be121a69da9", + "nonce" : "06c287448ebf064f", + "number" : "0x15", + "parentHash" : "89bba354d5cac3b08d1953dff2dd14570ff6a2a9126208520de18b8daf4a116e", + "receiptTrie" : "54badce9a393718de044873ba9177f37f485ca9e34e713323c93347136de9de1", + "stateRoot" : "9020d74e2d6d1355ad1792cbe357ab67d9fb1b29a2083a4feca97e4a93122bd9", + "timestamp" : "0x561bbf27", + "transactionsTrie" : "a64735f53dc899a3bacf659748f40a44466a5fcc2a73797d3900dffe41f4cf34", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "21", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a089bba354d5cac3b08d1953dff2dd14570ff6a2a9126208520de18b8daf4a116ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a09020d74e2d6d1355ad1792cbe357ab67d9fb1b29a2083a4feca97e4a93122bd9a0a64735f53dc899a3bacf659748f40a44466a5fcc2a73797d3900dffe41f4cf34a054badce9a393718de044873ba9177f37f485ca9e34e713323c93347136de9de1b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302050015832fefd882520884561bbf2780a0b23827d023255ff4757ea822247933fc1c0a00f28f323f66c4f37be121a69da98806c287448ebf064ff862f86014018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0b161c8af361fadb90382fc1e5a66a76908bd8fc988a984174389bc89d8bf045da05485ed7d0a270e2d0c53fe18c2bca5651ca5d66e6aaa889bd82e3879124c538bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x14", + "r" : "0xb161c8af361fadb90382fc1e5a66a76908bd8fc988a984174389bc89d8bf045d", + "s" : "0x5485ed7d0a270e2d0c53fe18c2bca5651ca5d66e6aaa889bd82e3879124c538b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020540", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "e1eabcbf26c8fcef3e9d641de4f88a791cc874a1c785f6f1ef88e90a78b993ae", + "mixHash" : "571aded764680451cc93238578269cda6b51acfa77846bc3124ac447202abd5c", + "nonce" : "4ebce6a0ef450cff", + "number" : "0x16", + "parentHash" : "6e34a3d63997c5bd61e81d29706b30b91a418463e0b6c1233bcbb66bf6f44f24", + "receiptTrie" : "a91e4de626d33a783ece82087072081b8d7d6d98c91f1cd8177ab1ce56211703", + "stateRoot" : "dd969737c2346d8196057c79d27301dcd9f6af38ba1df94a9116f2b6b61a9576", + "timestamp" : "0x561bbf2a", + "transactionsTrie" : "a59af08c0a599652f73946fba6d853050ac96df44f9cea79685da5b5642ff1d2", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "22", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a06e34a3d63997c5bd61e81d29706b30b91a418463e0b6c1233bcbb66bf6f44f24a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0dd969737c2346d8196057c79d27301dcd9f6af38ba1df94a9116f2b6b61a9576a0a59af08c0a599652f73946fba6d853050ac96df44f9cea79685da5b5642ff1d2a0a91e4de626d33a783ece82087072081b8d7d6d98c91f1cd8177ab1ce56211703b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302054016832fefd882520884561bbf2a80a0571aded764680451cc93238578269cda6b51acfa77846bc3124ac447202abd5c884ebce6a0ef450cfff862f86015018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0d145d4a373af51e57d9e2f5f298bd7fec31b893a42b249cc5344ff9c065e8f09a040b15a58b2ac218f88903fe3915468a92639814644378efe279e35b1bf9b4b18c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x15", + "r" : "0xd145d4a373af51e57d9e2f5f298bd7fec31b893a42b249cc5344ff9c065e8f09", + "s" : "0x40b15a58b2ac218f88903fe3915468a92639814644378efe279e35b1bf9b4b18", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020580", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "d3f5a4bf348a88d9c2990edff7905cbc73d7d69ed9e5eed642e956428fde2d74", + "mixHash" : "6c41c52e60312b3b49dcdf819bbb5aa452093829829687688b85afdd050b923c", + "nonce" : "6115f947078b99b0", + "number" : "0x17", + "parentHash" : "e1eabcbf26c8fcef3e9d641de4f88a791cc874a1c785f6f1ef88e90a78b993ae", + "receiptTrie" : "7d4458033c0c57fe184c1df702e48a0fe8bfc950af3349b51a20f18966d2a942", + "stateRoot" : "b68187da60f4cbd4232a0ad89fd02b3a6c6ddff7b28756d63b4cb3036e0bab7c", + "timestamp" : "0x561bbf2c", + "transactionsTrie" : "5c82036b1d2026422bae2eff8fc9564cc2fd3e7e08c131ddc068dd53374d0763", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "23", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a0e1eabcbf26c8fcef3e9d641de4f88a791cc874a1c785f6f1ef88e90a78b993aea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b68187da60f4cbd4232a0ad89fd02b3a6c6ddff7b28756d63b4cb3036e0bab7ca05c82036b1d2026422bae2eff8fc9564cc2fd3e7e08c131ddc068dd53374d0763a07d4458033c0c57fe184c1df702e48a0fe8bfc950af3349b51a20f18966d2a942b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302058017832fefd882520884561bbf2c80a06c41c52e60312b3b49dcdf819bbb5aa452093829829687688b85afdd050b923c886115f947078b99b0f862f86016018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca04d8ad424545e52145ba47db288202f31acb94853663d6e9e601d2d7dac38c024a0058ad8a4d0f0b7d1f11d60d7af7be896fd3a02a06153207b4d8d86067ed29642c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x16", + "r" : "0x4d8ad424545e52145ba47db288202f31acb94853663d6e9e601d2d7dac38c024", + "s" : "0x058ad8a4d0f0b7d1f11d60d7af7be896fd3a02a06153207b4d8d86067ed29642", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0205c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "1063973e8f444a2fbe9888868b92fd6dc9a9cf663f6b588ee573b8a3fac4cdeb", + "mixHash" : "6d40eef2c31bcba35ea91b28ae485f30eea8a86221d65ebc90897024018f05c6", + "nonce" : "0fbb0b2641ee6b07", + "number" : "0x18", + "parentHash" : "d3f5a4bf348a88d9c2990edff7905cbc73d7d69ed9e5eed642e956428fde2d74", + "receiptTrie" : "f8b08f12f3f6f073117f49094daac37582dbd96f55bda17e6bf044cf9059963e", + "stateRoot" : "8db80121bc2b3cede977491f5c5694231b2a8ea9f2c3668b0f9254fd334ecf81", + "timestamp" : "0x561bbf2e", + "transactionsTrie" : "a6faf995dbe3cdf65e9c0cfd61f7df322e1c7415fd1e94e1e67e81d6448e741a", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "24", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a0d3f5a4bf348a88d9c2990edff7905cbc73d7d69ed9e5eed642e956428fde2d74a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08db80121bc2b3cede977491f5c5694231b2a8ea9f2c3668b0f9254fd334ecf81a0a6faf995dbe3cdf65e9c0cfd61f7df322e1c7415fd1e94e1e67e81d6448e741aa0f8b08f12f3f6f073117f49094daac37582dbd96f55bda17e6bf044cf9059963eb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830205c018832fefd882520884561bbf2e80a06d40eef2c31bcba35ea91b28ae485f30eea8a86221d65ebc90897024018f05c6880fbb0b2641ee6b07f862f86017018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0c35255e99566cc1749b15dea81acc2024fa69f2aa2dc6bf91599c3410fee2e73a063ccde1230a3953f481cf3b72eac3035d67d6a883b1922a32ab878217db33616c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x17", + "r" : "0xc35255e99566cc1749b15dea81acc2024fa69f2aa2dc6bf91599c3410fee2e73", + "s" : "0x63ccde1230a3953f481cf3b72eac3035d67d6a883b1922a32ab878217db33616", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020600", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "506138b60a8d10f6215a3fc0f3dfc7d0c32cadfde70494d8e1e65054bad9855a", + "mixHash" : "c6b266a06f7d187db5af2dd9e28e717f4c5f810563433a75f759e0d27a12d3d9", + "nonce" : "f3609b0f477bdb37", + "number" : "0x19", + "parentHash" : "1063973e8f444a2fbe9888868b92fd6dc9a9cf663f6b588ee573b8a3fac4cdeb", + "receiptTrie" : "ebc5678b370cb69e47dcc26f85eee6723c7aea9437fceff12afd3dfaa8be9d28", + "stateRoot" : "0d43902ff8e32f7707d5a78383abcc8baa0905838d83be0658864968998a091c", + "timestamp" : "0x561bbf2f", + "transactionsTrie" : "8b1f1721cd1abd96c64e1c32f48c864cfd75e47da4d6bda1fdbcd855785079ec", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "25", + "chainname" : "AA", + "rlp" : "0xf90261f901f9a01063973e8f444a2fbe9888868b92fd6dc9a9cf663f6b588ee573b8a3fac4cdeba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00d43902ff8e32f7707d5a78383abcc8baa0905838d83be0658864968998a091ca08b1f1721cd1abd96c64e1c32f48c864cfd75e47da4d6bda1fdbcd855785079eca0ebc5678b370cb69e47dcc26f85eee6723c7aea9437fceff12afd3dfaa8be9d28b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302060019832fefd882520884561bbf2f80a0c6b266a06f7d187db5af2dd9e28e717f4c5f810563433a75f759e0d27a12d3d988f3609b0f477bdb37f862f86018018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870b801ca0248786fe129cf24548d9878f1e9677c638d4d2f75f2fbbc63d1d5e4a4dd6fcd5a069e6bf25cded2a5dfba7cd172de4800011f6687e891c64da88dd34e737a01a62c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x18", + "r" : "0x248786fe129cf24548d9878f1e9677c638d4d2f75f2fbbc63d1d5e4a4dd6fcd5", + "s" : "0x69e6bf25cded2a5dfba7cd172de4800011f6687e891c64da88dd34e737a01a62", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0b" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "890e9caa912cdbaba6b253f9e8e7714cb4973f62395ac29c2eb50ff3f6fcc1b5", + "mixHash" : "de2284191804c02f508a2efcf0003eb401e60baf7ee0c78bd15ab379754660eb", + "nonce" : "7f8aedb1aee24bd0", + "number" : "0x01", + "parentHash" : "358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bd", + "receiptTrie" : "bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbb", + "stateRoot" : "1b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4", + "timestamp" : "0x561bbf31", + "transactionsTrie" : "89176230d5c4ac60168e999c7a9fbea712992e712c253d635601a9d625c640fa", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a0358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4a089176230d5c4ac60168e999c7a9fbea712992e712c253d635601a9d625c640faa0bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbbb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bbf3180a0de2284191804c02f508a2efcf0003eb401e60baf7ee0c78bd15ab379754660eb887f8aedb1aee24bd0f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca066995adf6b8ce265233fe0ef11b24f7571908674be85c347eed4359396cfa4b1a0458062325e034ea6722559f0153094069424c0d508b7b104f2635a52bfaaa532c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x66995adf6b8ce265233fe0ef11b24f7571908674be85c347eed4359396cfa4b1", + "s" : "0x458062325e034ea6722559f0153094069424c0d508b7b104f2635a52bfaaa532", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "b3e1541923ef243bc5e61a217ff7f647719e44298336682a4ae58b4cf151d7ef", + "mixHash" : "5eac92ac1b052a85aa2f1c9d0895d84e055bd6f014b2353668d3260e18b99362", + "nonce" : "4b3dbe8b50c0fcc0", + "number" : "0x02", + "parentHash" : "890e9caa912cdbaba6b253f9e8e7714cb4973f62395ac29c2eb50ff3f6fcc1b5", + "receiptTrie" : "7fa6b426f40ed9fbcfdf1491008649c83e02bd4648492ff92d79de72c15cd11a", + "stateRoot" : "7cefe422fd5c4adc434377bf4b7ae17c091cbe1c6fc687986debbec9c432994b", + "timestamp" : "0x561bbf33", + "transactionsTrie" : "ee25beffeb5eac6c784f998a43fa94ec0f14a51dd622cdc2053bdec158668f10", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a0890e9caa912cdbaba6b253f9e8e7714cb4973f62395ac29c2eb50ff3f6fcc1b5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07cefe422fd5c4adc434377bf4b7ae17c091cbe1c6fc687986debbec9c432994ba0ee25beffeb5eac6c784f998a43fa94ec0f14a51dd622cdc2053bdec158668f10a07fa6b426f40ed9fbcfdf1491008649c83e02bd4648492ff92d79de72c15cd11ab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bbf3380a05eac92ac1b052a85aa2f1c9d0895d84e055bd6f014b2353668d3260e18b99362884b3dbe8b50c0fcc0f862f86001018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0980634f5a00a7f661d51ea32359055d30a5733c6aa82419c735777a5b1ca433aa06aa3d1b409caa91c9c4c168ff135fa6c2d82f46ff73f045828eba348bf7f0fbec0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x980634f5a00a7f661d51ea32359055d30a5733c6aa82419c735777a5b1ca433a", + "s" : "0x6aa3d1b409caa91c9c4c168ff135fa6c2d82f46ff73f045828eba348bf7f0fbe", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "6f7377316198196c61e160f939261605eeb64274c368a5e6685cc96938ed8804", + "mixHash" : "bdea828efe3410fb080effd7720f08c0db4c970d158a5eb9a15253bbde3a1ba4", + "nonce" : "39686578d9421b10", + "number" : "0x03", + "parentHash" : "b3e1541923ef243bc5e61a217ff7f647719e44298336682a4ae58b4cf151d7ef", + "receiptTrie" : "546e386ac47458adaf92a8287ff45ba235f50258d511b64bab523d3154ac3d8c", + "stateRoot" : "e299c301437bb4db4ae024dc6cfad95a96c1370b8e246336997b9781f8d92598", + "timestamp" : "0x561bbf35", + "transactionsTrie" : "c49b79ff0d5d6d01c6647e54b273de59aee2a05dc5e4fd06f6c7752637cab353", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a0b3e1541923ef243bc5e61a217ff7f647719e44298336682a4ae58b4cf151d7efa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e299c301437bb4db4ae024dc6cfad95a96c1370b8e246336997b9781f8d92598a0c49b79ff0d5d6d01c6647e54b273de59aee2a05dc5e4fd06f6c7752637cab353a0546e386ac47458adaf92a8287ff45ba235f50258d511b64bab523d3154ac3d8cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bbf3580a0bdea828efe3410fb080effd7720f08c0db4c970d158a5eb9a15253bbde3a1ba48839686578d9421b10f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0276bcc58edef1b711670d795666908f912e27482081cd017313ba92b935a19c1a00e2dd822223a07eac2384486ef2cf68a7ae2817aa1e884cc6c2c4728e48eb2fbc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x276bcc58edef1b711670d795666908f912e27482081cd017313ba92b935a19c1", + "s" : "0x0e2dd822223a07eac2384486ef2cf68a7ae2817aa1e884cc6c2c4728e48eb2fb", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f886c5d6d8a55d152d2796e81f83ed98a17c3dc68f7c0793b9fef8e3ed6f64b6", + "mixHash" : "52badee3e834fcb256adc5a9b6c10f3019718ddd301a89e19b0953188c44d34a", + "nonce" : "268b4756f3678229", + "number" : "0x04", + "parentHash" : "6f7377316198196c61e160f939261605eeb64274c368a5e6685cc96938ed8804", + "receiptTrie" : "9b421e1a4feec6c2fe042920721e95d3e6402e8df644b731914497b6e28f2715", + "stateRoot" : "9195c6dc447656d95b794e74a3ea739502030d2cdd84ba911cd010f904be07bf", + "timestamp" : "0x561bbf39", + "transactionsTrie" : "1747033ae8b28f1e0ab563a95deb7aec0fc0bc6d26f200c536b0a8b386e4802d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a06f7377316198196c61e160f939261605eeb64274c368a5e6685cc96938ed8804a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a09195c6dc447656d95b794e74a3ea739502030d2cdd84ba911cd010f904be07bfa01747033ae8b28f1e0ab563a95deb7aec0fc0bc6d26f200c536b0a8b386e4802da09b421e1a4feec6c2fe042920721e95d3e6402e8df644b731914497b6e28f2715b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bbf3980a052badee3e834fcb256adc5a9b6c10f3019718ddd301a89e19b0953188c44d34a88268b4756f3678229f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0f3de61997e78562f49a99817d170c3c3061b953dac12464c4b78c778f8c46f30a06a2bd676f1b4d3bc9e3749907fe120acbb266cc61a064e81a6614398fd3f35cdc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0xf3de61997e78562f49a99817d170c3c3061b953dac12464c4b78c778f8c46f30", + "s" : "0x6a2bd676f1b4d3bc9e3749907fe120acbb266cc61a064e81a6614398fd3f35cd", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f36b06570eb2efa5a1a78a4c019399130c8c6ba40cf2eabd620111f7ce653204", + "mixHash" : "ca5ce4a47b53ca3513eef7913328e4f97a0f7a76a671cbe7aa7fc0a3a40b109f", + "nonce" : "db01d2be3063a12d", + "number" : "0x05", + "parentHash" : "f886c5d6d8a55d152d2796e81f83ed98a17c3dc68f7c0793b9fef8e3ed6f64b6", + "receiptTrie" : "94cddaec6242ef6d009419ffcaacba40ee18e5ef9860521dd014f929913558a0", + "stateRoot" : "17680524b3d899e448793fc6a0b66338dd4a48388b961f630251c40537596439", + "timestamp" : "0x561bbf3b", + "transactionsTrie" : "43fc7d2de0ca811ddc51ed5920389da581815ba28e3fee2336896f5fc2464e08", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "5", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a0f886c5d6d8a55d152d2796e81f83ed98a17c3dc68f7c0793b9fef8e3ed6f64b6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a017680524b3d899e448793fc6a0b66338dd4a48388b961f630251c40537596439a043fc7d2de0ca811ddc51ed5920389da581815ba28e3fee2336896f5fc2464e08a094cddaec6242ef6d009419ffcaacba40ee18e5ef9860521dd014f929913558a0b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bbf3b80a0ca5ce4a47b53ca3513eef7913328e4f97a0f7a76a671cbe7aa7fc0a3a40b109f88db01d2be3063a12df862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca0dafc491980deb11e0a1100f6dd35f677f425a2c2bea9cc4412e81ff1ca126d93a042f5a5e0453b6e5e1e73d78a3f73b41be1655611341e76f47ac0a7b163607108c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0xdafc491980deb11e0a1100f6dd35f677f425a2c2bea9cc4412e81ff1ca126d93", + "s" : "0x42f5a5e0453b6e5e1e73d78a3f73b41be1655611341e76f47ac0a7b163607108", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "8deb0e6c08e6043386059833bbabf2f520da3c9160e33350b4d361bbc32bade2", + "mixHash" : "1e59e0263d29afbfdaedeb85212a6f39216d373fe10a967a1c8c66b8a8e86097", + "nonce" : "b7b43c51b6468169", + "number" : "0x06", + "parentHash" : "f36b06570eb2efa5a1a78a4c019399130c8c6ba40cf2eabd620111f7ce653204", + "receiptTrie" : "65d6e44c64959abf819e4a49c5e40b9d386a0ecdeb4f27b07191ac8b6b691ddd", + "stateRoot" : "cc095dfb6ca19045041ac1370eda55c8b9b8b0a33bf0c69a4a14e892642c9ebf", + "timestamp" : "0x561bbf3d", + "transactionsTrie" : "e4251feb89a2eed50eece32ec4a5c66801a31a60496080848f667554ad6aa205", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a0f36b06570eb2efa5a1a78a4c019399130c8c6ba40cf2eabd620111f7ce653204a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cc095dfb6ca19045041ac1370eda55c8b9b8b0a33bf0c69a4a14e892642c9ebfa0e4251feb89a2eed50eece32ec4a5c66801a31a60496080848f667554ad6aa205a065d6e44c64959abf819e4a49c5e40b9d386a0ecdeb4f27b07191ac8b6b691dddb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882520884561bbf3d80a01e59e0263d29afbfdaedeb85212a6f39216d373fe10a967a1c8c66b8a8e8609788b7b43c51b6468169f862f86005018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca064b00b1d1a7cb10dd8efc1d6099e45bc21ebedf579b74577875c0d43d6d72147a03cb26f5ead597212c0d5ac9ea6a96aa296e423b70a3e809a3184962343066ce3c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0x64b00b1d1a7cb10dd8efc1d6099e45bc21ebedf579b74577875c0d43d6d72147", + "s" : "0x3cb26f5ead597212c0d5ac9ea6a96aa296e423b70a3e809a3184962343066ce3", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020180", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "cb7bad942758d93a0fa9f7e8514d50c47fe0a244cc6dc0ff319a21f44e8eaaf5", + "mixHash" : "aeaf3ab7b2ea3687546813e1e38bbc730dfcb28f18e07ed95a16c9b7c5a35950", + "nonce" : "5b39b04cc1b76996", + "number" : "0x07", + "parentHash" : "8deb0e6c08e6043386059833bbabf2f520da3c9160e33350b4d361bbc32bade2", + "receiptTrie" : "5a55fa0dc4646849377616de136d45dcb8e082298cb06ee1d72bb237d56630bd", + "stateRoot" : "1e2b960493fb71fe17752cef80f4ea50a60fa506d489bcfcb3164d5636381f6a", + "timestamp" : "0x561bbf3e", + "transactionsTrie" : "9f6bf37b155e34576d817e189ecc9c6733de0125cb9c135a5fd090000dee9e70", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "7", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a08deb0e6c08e6043386059833bbabf2f520da3c9160e33350b4d361bbc32bade2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01e2b960493fb71fe17752cef80f4ea50a60fa506d489bcfcb3164d5636381f6aa09f6bf37b155e34576d817e189ecc9c6733de0125cb9c135a5fd090000dee9e70a05a55fa0dc4646849377616de136d45dcb8e082298cb06ee1d72bb237d56630bdb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882520884561bbf3e80a0aeaf3ab7b2ea3687546813e1e38bbc730dfcb28f18e07ed95a16c9b7c5a35950885b39b04cc1b76996f862f86006018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca0ae2a9003527cc9e07ffe8546869d42b08651c749eedf771118a2922737bd5f18a06cd93e1ce90b136eab09cdbc7c4902c571ef71ea22f50c074fb37d9b2203b9efc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x06", + "r" : "0xae2a9003527cc9e07ffe8546869d42b08651c749eedf771118a2922737bd5f18", + "s" : "0x6cd93e1ce90b136eab09cdbc7c4902c571ef71ea22f50c074fb37d9b2203b9ef", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0201c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "93b615343e54f6ec379763aab05c36a70bf50856d28d7944042990485cd91ea0", + "mixHash" : "25105c76c3b18ec02a634c6cc995e594b9b8ee3c693246d573dad3bc448a9bd6", + "nonce" : "444f7633e9344752", + "number" : "0x08", + "parentHash" : "cb7bad942758d93a0fa9f7e8514d50c47fe0a244cc6dc0ff319a21f44e8eaaf5", + "receiptTrie" : "78b799cea4600a8f909c7f14c0399519c50bf08865e4567105c00e35c8abce15", + "stateRoot" : "5c8ba4df37b101064216bbc7ac9185e5673313ecc65e2cb2a1a92f8a11859e22", + "timestamp" : "0x561bbf40", + "transactionsTrie" : "e675b7ca28d389306c58d5b7594ad6beb105adc9c3105950ff2bc154b16a88e0", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "8", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a0cb7bad942758d93a0fa9f7e8514d50c47fe0a244cc6dc0ff319a21f44e8eaaf5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05c8ba4df37b101064216bbc7ac9185e5673313ecc65e2cb2a1a92f8a11859e22a0e675b7ca28d389306c58d5b7594ad6beb105adc9c3105950ff2bc154b16a88e0a078b799cea4600a8f909c7f14c0399519c50bf08865e4567105c00e35c8abce15b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd882520884561bbf4080a025105c76c3b18ec02a634c6cc995e594b9b8ee3c693246d573dad3bc448a9bd688444f7633e9344752f862f86007018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0cd1cf9401cb2a0cce2960822097244baa2a73807a51cab6bb6cae0f6a24ae623a06e38597d0268509547e39f81aba7eabee477fef65615e17ced4381fe65a29413c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x07", + "r" : "0xcd1cf9401cb2a0cce2960822097244baa2a73807a51cab6bb6cae0f6a24ae623", + "s" : "0x6e38597d0268509547e39f81aba7eabee477fef65615e17ced4381fe65a29413", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020200", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "c835fde3e488d0be43ab6f7192b1b7b6948c3b0afab499ed66df66146be5b0a8", + "mixHash" : "c5793b8b6ffd5c1afac3a3f72a9599849cbe8175571faa440d886cb94760ab6f", + "nonce" : "dea5f2232d52d296", + "number" : "0x09", + "parentHash" : "93b615343e54f6ec379763aab05c36a70bf50856d28d7944042990485cd91ea0", + "receiptTrie" : "ea2cccbdb29cbc098c6c509f40dec917af9371449e149f833533da1444787438", + "stateRoot" : "ff032ac169e9be7dc9d148d360b29a70d900a980aa755cdb96d8bfc5b5a4117c", + "timestamp" : "0x561bbf43", + "transactionsTrie" : "32b0c275b7e886816a6c6b2d46007fb6f25531e2f4ac06f8911e152e1ad94a06", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "9", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a093b615343e54f6ec379763aab05c36a70bf50856d28d7944042990485cd91ea0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ff032ac169e9be7dc9d148d360b29a70d900a980aa755cdb96d8bfc5b5a4117ca032b0c275b7e886816a6c6b2d46007fb6f25531e2f4ac06f8911e152e1ad94a06a0ea2cccbdb29cbc098c6c509f40dec917af9371449e149f833533da1444787438b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd882520884561bbf4380a0c5793b8b6ffd5c1afac3a3f72a9599849cbe8175571faa440d886cb94760ab6f88dea5f2232d52d296f862f86008018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba00c0715eb55dcc943028ebabbaeccffcdce08b71393f39df50028e1e9276f589aa00628df06f1e42168a5260d5cd4534bbdbd08a6e2dd585fe7969085354fd5cbcfc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x08", + "r" : "0x0c0715eb55dcc943028ebabbaeccffcdce08b71393f39df50028e1e9276f589a", + "s" : "0x0628df06f1e42168a5260d5cd4534bbdbd08a6e2dd585fe7969085354fd5cbcf", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020240", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "57d8af155ca85fadab7aadd6909f12c48eef53d35b0924b7929f5866d4b923fa", + "mixHash" : "087cd5b6ebe6f68f56017e7feef9d3e10b3598ea6e0284e050fc6fa9ff3b5c80", + "nonce" : "73065c01f2e62a81", + "number" : "0x0a", + "parentHash" : "c835fde3e488d0be43ab6f7192b1b7b6948c3b0afab499ed66df66146be5b0a8", + "receiptTrie" : "339b1bbf7aa48dbc87ae98567d3e98c9a1a45d709751c2bf2790476d4d940388", + "stateRoot" : "839fafa70fbbcb1501b29fd3e160ea323b033cd9b613033957f15d8e4c9049fb", + "timestamp" : "0x561bbf44", + "transactionsTrie" : "b398e037ae05747ff5b9daddc4e9842eb99a368bf0cc46e1d9bf64825a2157e6", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "10", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a0c835fde3e488d0be43ab6f7192b1b7b6948c3b0afab499ed66df66146be5b0a8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0839fafa70fbbcb1501b29fd3e160ea323b033cd9b613033957f15d8e4c9049fba0b398e037ae05747ff5b9daddc4e9842eb99a368bf0cc46e1d9bf64825a2157e6a0339b1bbf7aa48dbc87ae98567d3e98c9a1a45d709751c2bf2790476d4d940388b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd882520884561bbf4480a0087cd5b6ebe6f68f56017e7feef9d3e10b3598ea6e0284e050fc6fa9ff3b5c808873065c01f2e62a81f862f86009018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca0ae782d46f74af9f80575ac0a50be6a4572b09e8acd6a2c167c18eacfbd9d5933a007b4c086c2266287bb47f060873d20ebefc7bacdd432e11a9486f05671f2f802c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x09", + "r" : "0xae782d46f74af9f80575ac0a50be6a4572b09e8acd6a2c167c18eacfbd9d5933", + "s" : "0x07b4c086c2266287bb47f060873d20ebefc7bacdd432e11a9486f05671f2f802", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020280", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "e5efcf7285f11f7f27bb6e10b04b17bed88e8d73132c7a2ec7b79caf4ac5b1ba", + "mixHash" : "2c0b66fed67c75fda1d4d824fec54cc4c2e028a841b6ee0e7fc31a422d4695b9", + "nonce" : "6f6b0dcaaedf56a7", + "number" : "0x0b", + "parentHash" : "57d8af155ca85fadab7aadd6909f12c48eef53d35b0924b7929f5866d4b923fa", + "receiptTrie" : "e74da86782c317472c9f22dd81ef938110bdb198c34f05421c471f8d8a774b51", + "stateRoot" : "8d9142b3e9d2f58ad29126de63a340f2351b0f2a83b6e72c1a22859e836409a7", + "timestamp" : "0x561bbf46", + "transactionsTrie" : "2e5590cfa0948bd0852b11205141993957d73ec7d69d5d644e9a12c1abdafd05", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "11", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a057d8af155ca85fadab7aadd6909f12c48eef53d35b0924b7929f5866d4b923faa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08d9142b3e9d2f58ad29126de63a340f2351b0f2a83b6e72c1a22859e836409a7a02e5590cfa0948bd0852b11205141993957d73ec7d69d5d644e9a12c1abdafd05a0e74da86782c317472c9f22dd81ef938110bdb198c34f05421c471f8d8a774b51b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202800b832fefd882520884561bbf4680a02c0b66fed67c75fda1d4d824fec54cc4c2e028a841b6ee0e7fc31a422d4695b9886f6b0dcaaedf56a7f862f8600a018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba099fa43662c2229e857e3878a7cded819de676cfb811be28aa7814079d908f2c5a06054c0deea88ed554ddac674add908b2af45160f3f65b99ce853402b3f4883c8c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0a", + "r" : "0x99fa43662c2229e857e3878a7cded819de676cfb811be28aa7814079d908f2c5", + "s" : "0x6054c0deea88ed554ddac674add908b2af45160f3f65b99ce853402b3f4883c8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0202c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "6edb888c203bc3027f8fd19426316921f792864c2b371b438066f1e7be7cd992", + "mixHash" : "f9aa0e362aa5f269d4cc6b2060f0fb7b93d21b0ec092897d5cb2ba41d8852ad0", + "nonce" : "f5cc5c7704b3f56d", + "number" : "0x0c", + "parentHash" : "e5efcf7285f11f7f27bb6e10b04b17bed88e8d73132c7a2ec7b79caf4ac5b1ba", + "receiptTrie" : "8c896a3b944e3bb69493ccfc8e1bd4988018988dd29db332d2d2b95410a7e075", + "stateRoot" : "e93dbbfd3ff7905c3889e575eed1b46f8d67a84b6342cff5ec868995a1879608", + "timestamp" : "0x561bbf47", + "transactionsTrie" : "5b73d32aa4b7172b3064dee08c22dec4812648a8490418fdcf4e2fab98e6aa5b", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "12", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a0e5efcf7285f11f7f27bb6e10b04b17bed88e8d73132c7a2ec7b79caf4ac5b1baa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e93dbbfd3ff7905c3889e575eed1b46f8d67a84b6342cff5ec868995a1879608a05b73d32aa4b7172b3064dee08c22dec4812648a8490418fdcf4e2fab98e6aa5ba08c896a3b944e3bb69493ccfc8e1bd4988018988dd29db332d2d2b95410a7e075b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202c00c832fefd882520884561bbf4780a0f9aa0e362aa5f269d4cc6b2060f0fb7b93d21b0ec092897d5cb2ba41d8852ad088f5cc5c7704b3f56df862f8600b018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0ee5e234f538dc4117ebd96c6969cfc2496aeb3c8ad53e09c7c93b7c9f1edb578a071e5d89881c2532fc4c7a86205a13e088ec7d42a5a1536c6868657eef38ac370c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0b", + "r" : "0xee5e234f538dc4117ebd96c6969cfc2496aeb3c8ad53e09c7c93b7c9f1edb578", + "s" : "0x71e5d89881c2532fc4c7a86205a13e088ec7d42a5a1536c6868657eef38ac370", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020300", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "eaf0eec2903d0c2b4abb5e8dffd2e9b93a27c90c804cd9d7262881f557fef14f", + "mixHash" : "3732f79cc3217bdb166f7405537e8d04338c25fc93c3951036101a016df720b2", + "nonce" : "e7cbf30e37e3863d", + "number" : "0x0d", + "parentHash" : "6edb888c203bc3027f8fd19426316921f792864c2b371b438066f1e7be7cd992", + "receiptTrie" : "9b10073277b9619756d1477f9cb11c16ec624d0ea3a52820b919867eca991ee9", + "stateRoot" : "3e9e9f822b3754ee6338ec7692d2285645ee7fa78c171c07a39a44afc4f9b1c3", + "timestamp" : "0x561bbf49", + "transactionsTrie" : "f64ce2ea054addda1b7facc170287aa7797c3d0757b7f1b12dcf65dc5cb262d2", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "13", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a06edb888c203bc3027f8fd19426316921f792864c2b371b438066f1e7be7cd992a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a03e9e9f822b3754ee6338ec7692d2285645ee7fa78c171c07a39a44afc4f9b1c3a0f64ce2ea054addda1b7facc170287aa7797c3d0757b7f1b12dcf65dc5cb262d2a09b10073277b9619756d1477f9cb11c16ec624d0ea3a52820b919867eca991ee9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203000d832fefd882520884561bbf4980a03732f79cc3217bdb166f7405537e8d04338c25fc93c3951036101a016df720b288e7cbf30e37e3863df862f8600c018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0ccab735de9b12cd53c7cd182b07b725ec3ac3b93ddf66cbf5019780d0555469fa001f3cd01de38240c4dd6a55dada821b52e4a0b703c07ac4c0536d9e529bff067c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0c", + "r" : "0xccab735de9b12cd53c7cd182b07b725ec3ac3b93ddf66cbf5019780d0555469f", + "s" : "0x01f3cd01de38240c4dd6a55dada821b52e4a0b703c07ac4c0536d9e529bff067", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020340", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "62a37e5486a916ad099c53fc013b0b8b7e0770c5eb5144bc9fe4117eeb90beb8", + "mixHash" : "285dfff0a4185c0d750bd14a4d6fd4e65d09950a6e37088f29f5dc81bb8cb1e6", + "nonce" : "48ffadc6b82ad551", + "number" : "0x0e", + "parentHash" : "eaf0eec2903d0c2b4abb5e8dffd2e9b93a27c90c804cd9d7262881f557fef14f", + "receiptTrie" : "8a2af43583b83004562bb7c1dcb18788217efbb751c528bbc004b78465c0c2b6", + "stateRoot" : "6b6655432d4253991ee3aad77a0ee483b579cb3f3f16e06032af894348d7d744", + "timestamp" : "0x561bbf4b", + "transactionsTrie" : "0d8184e443e2a71eee3edd9df0358ef1ad4524a423b2f14e0a2195e943212431", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "14", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a0eaf0eec2903d0c2b4abb5e8dffd2e9b93a27c90c804cd9d7262881f557fef14fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a06b6655432d4253991ee3aad77a0ee483b579cb3f3f16e06032af894348d7d744a00d8184e443e2a71eee3edd9df0358ef1ad4524a423b2f14e0a2195e943212431a08a2af43583b83004562bb7c1dcb18788217efbb751c528bbc004b78465c0c2b6b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203400e832fefd882520884561bbf4b80a0285dfff0a4185c0d750bd14a4d6fd4e65d09950a6e37088f29f5dc81bb8cb1e68848ffadc6b82ad551f862f8600d018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca06018d1b319dc81ae1bef944e6f253ce887bcf9630ac725bcc237e44b157a556ea053a855c5ffd62f316cbeaa39287a45155ca812ac171aab55025d3132df67a4d6c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0d", + "r" : "0x6018d1b319dc81ae1bef944e6f253ce887bcf9630ac725bcc237e44b157a556e", + "s" : "0x53a855c5ffd62f316cbeaa39287a45155ca812ac171aab55025d3132df67a4d6", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020380", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "013c17fb794339e3d31c73aa7be16bbf728eef1488c9c2b84b552b8bf29ec641", + "mixHash" : "d3f8f6bb4a0d70a4133050fdeee60815ef50e1f5d21fe81c842469dee2850c19", + "nonce" : "4a3dfeeb29ca2210", + "number" : "0x0f", + "parentHash" : "62a37e5486a916ad099c53fc013b0b8b7e0770c5eb5144bc9fe4117eeb90beb8", + "receiptTrie" : "3dff23ec957ef61ccdceb4f7d61980f9f2c8f0cf38e1b13726dd6638c80862b3", + "stateRoot" : "17f9b68e15e133af101a73afe089d0acf5439c4f1687e434f49b34fc95e32884", + "timestamp" : "0x561bbf4e", + "transactionsTrie" : "ab603fa23c66cf02cba365cfbca0e922b2c94a759c912642b6cd77bb12922158", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "15", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a062a37e5486a916ad099c53fc013b0b8b7e0770c5eb5144bc9fe4117eeb90beb8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a017f9b68e15e133af101a73afe089d0acf5439c4f1687e434f49b34fc95e32884a0ab603fa23c66cf02cba365cfbca0e922b2c94a759c912642b6cd77bb12922158a03dff23ec957ef61ccdceb4f7d61980f9f2c8f0cf38e1b13726dd6638c80862b3b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203800f832fefd882520884561bbf4e80a0d3f8f6bb4a0d70a4133050fdeee60815ef50e1f5d21fe81c842469dee2850c19884a3dfeeb29ca2210f862f8600e018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba02256d59c49e81c2b4bea6ecffb5b455a268ab9c912cfe5f91e69dda1a4994a9ba01d3fab2e752f8fa96f74c839197bea850ba5d52201db4a9201aba01774cb0d20c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0e", + "r" : "0x2256d59c49e81c2b4bea6ecffb5b455a268ab9c912cfe5f91e69dda1a4994a9b", + "s" : "0x1d3fab2e752f8fa96f74c839197bea850ba5d52201db4a9201aba01774cb0d20", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0203c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "a3bdb858141ff2dff1df1954c934ab7a7b0a0cdbf8c055d142959a4440563243", + "mixHash" : "7ec0d2e858a03c1cf05650e1e286b575664c2f13713bb0e8531c926dbf038204", + "nonce" : "1614e89a1e79955f", + "number" : "0x10", + "parentHash" : "013c17fb794339e3d31c73aa7be16bbf728eef1488c9c2b84b552b8bf29ec641", + "receiptTrie" : "f5508ba396bd9950714328ff6e20bd9cbbdcf2dcdf1d8bb40576b57baf92c6ff", + "stateRoot" : "df8c0c9c4dbb3397127c7458c4c4ce7bf12883eee0c8c88f28e34605e589945c", + "timestamp" : "0x561bbf51", + "transactionsTrie" : "4c36838cbbac671e1fc958bd3419e57782c8d0209c660f68a187f49682c6c813", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "16", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a0013c17fb794339e3d31c73aa7be16bbf728eef1488c9c2b84b552b8bf29ec641a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0df8c0c9c4dbb3397127c7458c4c4ce7bf12883eee0c8c88f28e34605e589945ca04c36838cbbac671e1fc958bd3419e57782c8d0209c660f68a187f49682c6c813a0f5508ba396bd9950714328ff6e20bd9cbbdcf2dcdf1d8bb40576b57baf92c6ffb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203c010832fefd882520884561bbf5180a07ec0d2e858a03c1cf05650e1e286b575664c2f13713bb0e8531c926dbf038204881614e89a1e79955ff862f8600f018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca0a4a236541921c3bf6b36d2cd1dea2c84784b77464a77ce90d6333c081689d447a02d88dc33aa0f9b34b18c8c9d5e4e80b287714c2e6fb8bc1b1ed67b0093185e9bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0f", + "r" : "0xa4a236541921c3bf6b36d2cd1dea2c84784b77464a77ce90d6333c081689d447", + "s" : "0x2d88dc33aa0f9b34b18c8c9d5e4e80b287714c2e6fb8bc1b1ed67b0093185e9b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020400", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "217c48e07ee483d0989b48a8bf7d5b8ca7d5b2ce3b87767cc10bbf0a369ff7b5", + "mixHash" : "ad881607563c10ea1d742d969b9e862634faf735fb4fbf9e4b4dcfca6d9edd93", + "nonce" : "496e56c51b7bd205", + "number" : "0x11", + "parentHash" : "a3bdb858141ff2dff1df1954c934ab7a7b0a0cdbf8c055d142959a4440563243", + "receiptTrie" : "dda9371e981175ab26550e8709adee55a092ced98e4d9cc599aa3a0a1d75af3b", + "stateRoot" : "0951e14743bc07bf71defce5b250bbd22894b47ca7ca3dff8280bdcccb5e90b0", + "timestamp" : "0x561bbf52", + "transactionsTrie" : "70ed0dd5601fbcea519c185d7dbccf8a23d070e826b9a5863234bffde0755810", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "17", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a0a3bdb858141ff2dff1df1954c934ab7a7b0a0cdbf8c055d142959a4440563243a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00951e14743bc07bf71defce5b250bbd22894b47ca7ca3dff8280bdcccb5e90b0a070ed0dd5601fbcea519c185d7dbccf8a23d070e826b9a5863234bffde0755810a0dda9371e981175ab26550e8709adee55a092ced98e4d9cc599aa3a0a1d75af3bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302040011832fefd882520884561bbf5280a0ad881607563c10ea1d742d969b9e862634faf735fb4fbf9e4b4dcfca6d9edd9388496e56c51b7bd205f862f86010018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba03e5e3d2d83a0aeaca5aa36199f360f481219f66de6b1c50c72511bfb2f2a7119a0181c83e9744e3d8d1d08515377d5f436b881b4f906384b55f6627d2565471157c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x10", + "r" : "0x3e5e3d2d83a0aeaca5aa36199f360f481219f66de6b1c50c72511bfb2f2a7119", + "s" : "0x181c83e9744e3d8d1d08515377d5f436b881b4f906384b55f6627d2565471157", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020440", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "b16f5832e5d641d80fac1c79ca2da069408c1d42ae6825082238094076741c92", + "mixHash" : "25491b2f3c582445614c036b6a3cce9ec74b3884e76fbb7c5437dce06082a6d4", + "nonce" : "79fb1913e3411821", + "number" : "0x12", + "parentHash" : "217c48e07ee483d0989b48a8bf7d5b8ca7d5b2ce3b87767cc10bbf0a369ff7b5", + "receiptTrie" : "00450bfba92949bf13863e94b4757099da4c8c583caf9d793b28999830dca9f8", + "stateRoot" : "fae2ee21c3620d9ea455b83b9954ff0b6975e9e5b6dabb6ec2685aab64120959", + "timestamp" : "0x561bbf55", + "transactionsTrie" : "463dbf79c094bf7bb9d141bd1bd6d572e27e998e3d52b3ce107e8a663a2f31ac", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "18", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a0217c48e07ee483d0989b48a8bf7d5b8ca7d5b2ce3b87767cc10bbf0a369ff7b5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0fae2ee21c3620d9ea455b83b9954ff0b6975e9e5b6dabb6ec2685aab64120959a0463dbf79c094bf7bb9d141bd1bd6d572e27e998e3d52b3ce107e8a663a2f31aca000450bfba92949bf13863e94b4757099da4c8c583caf9d793b28999830dca9f8b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302044012832fefd882520884561bbf5580a025491b2f3c582445614c036b6a3cce9ec74b3884e76fbb7c5437dce06082a6d48879fb1913e3411821f862f86011018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba04e0f45053eb6912e49cc5fd3dce1ce33f9b20a26155c34d580fc059c037190eaa001bd5e5ad9ec32594a0894d0bc5de8525ed73a7769415fec418fb3d8c89d447fc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x11", + "r" : "0x4e0f45053eb6912e49cc5fd3dce1ce33f9b20a26155c34d580fc059c037190ea", + "s" : "0x01bd5e5ad9ec32594a0894d0bc5de8525ed73a7769415fec418fb3d8c89d447f", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020480", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "3418abed31712a35f6da34b35345d4da3693f56030e1ed3e9cc890969b982c9f", + "mixHash" : "721d7fe465db60b98ee852638076f95d5657eb82168f833ae954577e0b9ed9dc", + "nonce" : "3243fd4a6a647e8b", + "number" : "0x13", + "parentHash" : "b16f5832e5d641d80fac1c79ca2da069408c1d42ae6825082238094076741c92", + "receiptTrie" : "91b19af8e8768df44df03dd611ea8107d567600b80cc3b24a45bfc80787a6446", + "stateRoot" : "49a03e645d1c207076cbdfeb65c7f20b85d4ec500e9c5af7891f20b558567880", + "timestamp" : "0x561bbf56", + "transactionsTrie" : "8863887f05d59b293ec0db56c72647df94d4637c21f9382a12d7ad23db45a395", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "19", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a0b16f5832e5d641d80fac1c79ca2da069408c1d42ae6825082238094076741c92a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a049a03e645d1c207076cbdfeb65c7f20b85d4ec500e9c5af7891f20b558567880a08863887f05d59b293ec0db56c72647df94d4637c21f9382a12d7ad23db45a395a091b19af8e8768df44df03dd611ea8107d567600b80cc3b24a45bfc80787a6446b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302048013832fefd882520884561bbf5680a0721d7fe465db60b98ee852638076f95d5657eb82168f833ae954577e0b9ed9dc883243fd4a6a647e8bf862f86012018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0e5b519cf27dda89da2dafdbcb32e77bedd800a5fdc61e74d32c226c932c4946da0421ed33a37e84c4608005edb92fd8a58db78e86cd8a85ff77c3d5704f2249184c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x12", + "r" : "0xe5b519cf27dda89da2dafdbcb32e77bedd800a5fdc61e74d32c226c932c4946d", + "s" : "0x421ed33a37e84c4608005edb92fd8a58db78e86cd8a85ff77c3d5704f2249184", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0204c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "d8c73df76a8bfa422aa299f1017abcb541659b2f40b193faa7a5bc1f5a622774", + "mixHash" : "c74ecfc3215fd42cb79b87c7ab6b60d88ff2ef1853cc01ba12b8b2dbcdea51f0", + "nonce" : "a8c8947fb85cd095", + "number" : "0x14", + "parentHash" : "3418abed31712a35f6da34b35345d4da3693f56030e1ed3e9cc890969b982c9f", + "receiptTrie" : "c52f0f8f868a397773b4a945f9b9e345189902aad3b2f0240d65160cacf56d92", + "stateRoot" : "1659d63a65556ed5dc0fc234d01f62ad91ba978980ab1bbf139804b6858fca6d", + "timestamp" : "0x561bbf58", + "transactionsTrie" : "c5c196b35af61759148fce1e613eefdc17d0b3d8e2a8c055e1ac6cbe015a1ac2", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "20", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a03418abed31712a35f6da34b35345d4da3693f56030e1ed3e9cc890969b982c9fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01659d63a65556ed5dc0fc234d01f62ad91ba978980ab1bbf139804b6858fca6da0c5c196b35af61759148fce1e613eefdc17d0b3d8e2a8c055e1ac6cbe015a1ac2a0c52f0f8f868a397773b4a945f9b9e345189902aad3b2f0240d65160cacf56d92b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830204c014832fefd882520884561bbf5880a0c74ecfc3215fd42cb79b87c7ab6b60d88ff2ef1853cc01ba12b8b2dbcdea51f088a8c8947fb85cd095f862f86013018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba03f001199e788ac74a6cd5749b631b33348aeceda7c122aa19cd9560048fc6a89a0215cec631412851c758cd588f1c6590d97372232e39a203e7694f00cdb82c1b6c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x13", + "r" : "0x3f001199e788ac74a6cd5749b631b33348aeceda7c122aa19cd9560048fc6a89", + "s" : "0x215cec631412851c758cd588f1c6590d97372232e39a203e7694f00cdb82c1b6", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020500", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "043ddffabb9fc7f44b4f0620e0335a59c2dfb329ba66eed93d1a949e5b027f69", + "mixHash" : "79bb7fa27937c94931ca8b4706e12d678a8cccb8b819e5fe326021680359bae3", + "nonce" : "5e49dc9c97da86df", + "number" : "0x15", + "parentHash" : "d8c73df76a8bfa422aa299f1017abcb541659b2f40b193faa7a5bc1f5a622774", + "receiptTrie" : "185351a5a096e69165fdd9658627b918741d3e06d2d7a904a3c2bd8704224768", + "stateRoot" : "98874550deee52530b6020d20c740596775dc0108fbe44f8fca8b3a3576df928", + "timestamp" : "0x561bbf5a", + "transactionsTrie" : "c204c43d2a8dd01cc6510e6933029a6d2bea82ec89c2b201e5513774017dc444", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "21", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a0d8c73df76a8bfa422aa299f1017abcb541659b2f40b193faa7a5bc1f5a622774a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a098874550deee52530b6020d20c740596775dc0108fbe44f8fca8b3a3576df928a0c204c43d2a8dd01cc6510e6933029a6d2bea82ec89c2b201e5513774017dc444a0185351a5a096e69165fdd9658627b918741d3e06d2d7a904a3c2bd8704224768b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302050015832fefd882520884561bbf5a80a079bb7fa27937c94931ca8b4706e12d678a8cccb8b819e5fe326021680359bae3885e49dc9c97da86dff862f86014018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca09790cf3c15a92fa654cf909a47eb19c189325aa9367468f3ed24149c9f413517a033311b25fc05a104c02a2c314afbd9040308f83a97be4e9a56ea24da7728597bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x14", + "r" : "0x9790cf3c15a92fa654cf909a47eb19c189325aa9367468f3ed24149c9f413517", + "s" : "0x33311b25fc05a104c02a2c314afbd9040308f83a97be4e9a56ea24da7728597b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020540", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "88c448f446c06978a6560e071a055d4b952fae6cfa6b51261cb5d91f6c5dc386", + "mixHash" : "5223e1ed5605283eedf9e728a6f392796780cc037d8ad8ad1f0e04c028e19c1e", + "nonce" : "86e72c9bdeb63491", + "number" : "0x16", + "parentHash" : "043ddffabb9fc7f44b4f0620e0335a59c2dfb329ba66eed93d1a949e5b027f69", + "receiptTrie" : "fd6941b78497d941069eaab9f9ce3a225911000fe8c8e4ae9bd8c5e540c59c26", + "stateRoot" : "f4a30787d91fa8bb40a007a029c94564d719e4cec77088428dee0ab2458ead37", + "timestamp" : "0x561bbf5b", + "transactionsTrie" : "4403b5d3355ac7868529e0f487470b2e91e6d3b4f7981e9fc0824c109c0cb2ee", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "22", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a0043ddffabb9fc7f44b4f0620e0335a59c2dfb329ba66eed93d1a949e5b027f69a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f4a30787d91fa8bb40a007a029c94564d719e4cec77088428dee0ab2458ead37a04403b5d3355ac7868529e0f487470b2e91e6d3b4f7981e9fc0824c109c0cb2eea0fd6941b78497d941069eaab9f9ce3a225911000fe8c8e4ae9bd8c5e540c59c26b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302054016832fefd882520884561bbf5b80a05223e1ed5605283eedf9e728a6f392796780cc037d8ad8ad1f0e04c028e19c1e8886e72c9bdeb63491f862f86015018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca085495f9fa1799af76f4ee58809c223dc2966a3d2b319a6ac3d723377d12decc4a00e770d5ecf00a436ca91497f4942e5e6fb48c14aadf81c003a22074c9a8cf6b5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x15", + "r" : "0x85495f9fa1799af76f4ee58809c223dc2966a3d2b319a6ac3d723377d12decc4", + "s" : "0x0e770d5ecf00a436ca91497f4942e5e6fb48c14aadf81c003a22074c9a8cf6b5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020580", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "0c25a3d278d7b60f9846844af9383a996fd9c09f518989025f4dede05783350f", + "mixHash" : "2981711beb8e04718994a45acbfb676fe71b90ca148be75caa818cd91d4ab3d0", + "nonce" : "1442afbc89683cf8", + "number" : "0x17", + "parentHash" : "88c448f446c06978a6560e071a055d4b952fae6cfa6b51261cb5d91f6c5dc386", + "receiptTrie" : "57b6b1dcf58dc35cd1150d1b21c4cf64ad349d06b62e900d07eb3f822857dfa3", + "stateRoot" : "0df98c2493347eb6de6bd333ef57c69cea13643c8c28590f86f55ffc5a1a05a3", + "timestamp" : "0x561bbf5f", + "transactionsTrie" : "228353d9bf2624fb1d870baa6791be04ef132b467eab0269b5059dc78fa0bf96", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "23", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a088c448f446c06978a6560e071a055d4b952fae6cfa6b51261cb5d91f6c5dc386a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00df98c2493347eb6de6bd333ef57c69cea13643c8c28590f86f55ffc5a1a05a3a0228353d9bf2624fb1d870baa6791be04ef132b467eab0269b5059dc78fa0bf96a057b6b1dcf58dc35cd1150d1b21c4cf64ad349d06b62e900d07eb3f822857dfa3b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302058017832fefd882520884561bbf5f80a02981711beb8e04718994a45acbfb676fe71b90ca148be75caa818cd91d4ab3d0881442afbc89683cf8f862f86016018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0ed40c8a5290161fe5e76673afa3a37cff6d91c9bb88d3bf2e48a8502852a9ecca02bc03f3f9e2bf4eec99b2d09208f5b14ab4ff5e32ead615afbbe591b472fcbe4c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x16", + "r" : "0xed40c8a5290161fe5e76673afa3a37cff6d91c9bb88d3bf2e48a8502852a9ecc", + "s" : "0x2bc03f3f9e2bf4eec99b2d09208f5b14ab4ff5e32ead615afbbe591b472fcbe4", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0205c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "9ae1160d940223ae9814452610c3f99079d9279805b52ca7056fc64dab9753c0", + "mixHash" : "a3c593fb6cb5a2907b5a9f111e1082ff36529a4a7521078171dc8994fdcae2c1", + "nonce" : "675203a6a1bd4bcf", + "number" : "0x18", + "parentHash" : "0c25a3d278d7b60f9846844af9383a996fd9c09f518989025f4dede05783350f", + "receiptTrie" : "7dd52c9ac92684990ad96504b8aa775c82ed26552f91ce18d08287f84a6afc79", + "stateRoot" : "38e9f4ac22fcd2a42c89bbbc8d783d3a712ce64ca3f36e68d9e019f92a9542fe", + "timestamp" : "0x561bbf61", + "transactionsTrie" : "9011039dae549a2ff0d1b62ef7666d36978d1529a863c2b49cd60a3c43b7b4f8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "24", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a00c25a3d278d7b60f9846844af9383a996fd9c09f518989025f4dede05783350fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a038e9f4ac22fcd2a42c89bbbc8d783d3a712ce64ca3f36e68d9e019f92a9542fea09011039dae549a2ff0d1b62ef7666d36978d1529a863c2b49cd60a3c43b7b4f8a07dd52c9ac92684990ad96504b8aa775c82ed26552f91ce18d08287f84a6afc79b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830205c018832fefd882520884561bbf6180a0a3c593fb6cb5a2907b5a9f111e1082ff36529a4a7521078171dc8994fdcae2c188675203a6a1bd4bcff862f86017018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0dddd8e57d3cb5bd1808e29644e418f7181cf6f4d646945a36eb75a2bd2af8097a031b2ecf87fdae72809f621cd275dff31aab292427fe18a07880d464157be2d10c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x17", + "r" : "0xdddd8e57d3cb5bd1808e29644e418f7181cf6f4d646945a36eb75a2bd2af8097", + "s" : "0x31b2ecf87fdae72809f621cd275dff31aab292427fe18a07880d464157be2d10", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020600", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "907e2628bb5df63c3b4faa25848f36a2ce36ec5c3aeac64347f7e6c3b8b19ee2", + "mixHash" : "9a0b9c43db398bf065e4fce16345f6fda466c8d782a4b717e6b4d82eb40f6ee3", + "nonce" : "ef2f4addde1b2f00", + "number" : "0x19", + "parentHash" : "9ae1160d940223ae9814452610c3f99079d9279805b52ca7056fc64dab9753c0", + "receiptTrie" : "aad2666fbb0b5a2c52743c2f32752444d5a621d92c6f71b4e52077dde8e62b3d", + "stateRoot" : "5d0bc51c2abc805cc8895c3ce4d34c0d7423a9c0a87360622a6f0d20d8359b76", + "timestamp" : "0x561bbf63", + "transactionsTrie" : "35aa14d3d6b7813b92c6f2cb06775dea74026cf66ffe25b1d45dc90df9626ec3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "25", + "chainname" : "BB", + "rlp" : "0xf90261f901f9a09ae1160d940223ae9814452610c3f99079d9279805b52ca7056fc64dab9753c0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05d0bc51c2abc805cc8895c3ce4d34c0d7423a9c0a87360622a6f0d20d8359b76a035aa14d3d6b7813b92c6f2cb06775dea74026cf66ffe25b1d45dc90df9626ec3a0aad2666fbb0b5a2c52743c2f32752444d5a621d92c6f71b4e52077dde8e62b3db90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302060019832fefd882520884561bbf6380a09a0b9c43db398bf065e4fce16345f6fda466c8d782a4b717e6b4d82eb40f6ee388ef2f4addde1b2f00f862f86018018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8765801ba09d459952930f5f94f008d50af4db0dd2999c297fe7ddddf71ab461c24a590ec4a05d531cf7967d6196cca5b1b4fda7abdee70311456a91865b66cc6e3b5db59a2bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x18", + "r" : "0x9d459952930f5f94f008d50af4db0dd2999c297fe7ddddf71ab461c24a590ec4", + "s" : "0x5d531cf7967d6196cca5b1b4fda7abdee70311456a91865b66cc6e3b5db59a2b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x65" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "6a985b39cac4d857290d674e87fa99ec1abf1683daf08fc5460466d39ab65414", + "mixHash" : "00720cb1c653561731a0258ecb101b16d501a161894605cdd9aa14cfab64eaea", + "nonce" : "bca7ed3fc7057526", + "number" : "0x01", + "parentHash" : "358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bd", + "receiptTrie" : "7e8810b6679c2fb4a35a4cb2c857acdec17e1b274845847466e17e4618a12333", + "stateRoot" : "64b147da7f348a7b908f9691d764632a070d6083b42a19081596beb76bde9825", + "timestamp" : "0x561bbf67", + "transactionsTrie" : "2574dfc54462f4c2d9017b3ef2b389e0fa64aade0cdc42cac797f27bab9b427e", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a0358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a064b147da7f348a7b908f9691d764632a070d6083b42a19081596beb76bde9825a02574dfc54462f4c2d9017b3ef2b389e0fa64aade0cdc42cac797f27bab9b427ea07e8810b6679c2fb4a35a4cb2c857acdec17e1b274845847466e17e4618a12333b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bbf6780a000720cb1c653561731a0258ecb101b16d501a161894605cdd9aa14cfab64eaea88bca7ed3fc7057526f864f86280018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca07c76817e5b018f8e7c2c61773ca204a56a37a881cd13b73444dd43c58a623c2aa063355a29a46f232ada6ce9795c8ce04ccb3dde836369f5b54373b200f34aa466c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x7c76817e5b018f8e7c2c61773ca204a56a37a881cd13b73444dd43c58a623c2a", + "s" : "0x63355a29a46f232ada6ce9795c8ce04ccb3dde836369f5b54373b200f34aa466", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "28229e2545830686d2e82bdd7279a3f28b638bf4146eab5c2285414e962d607a", + "mixHash" : "9dd6d62ff619fa59e7234e4a0f1908f2885e08df7c09514eda26e7cf403da02b", + "nonce" : "019debcb06a85d32", + "number" : "0x02", + "parentHash" : "6a985b39cac4d857290d674e87fa99ec1abf1683daf08fc5460466d39ab65414", + "receiptTrie" : "0eebe5325d39ccaab5a280886b3faf1018cb464d19f1d10d8bfe790df06a7d3e", + "stateRoot" : "753ce439a3af7b3464d9d8696d4447d9aa34aa032abf439f7a0ca66f0689a069", + "timestamp" : "0x561bbf68", + "transactionsTrie" : "63982f66df5bc78afeb0b6e464d74ffdbd6002bf2be35ddcef62bdabc3897286", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a06a985b39cac4d857290d674e87fa99ec1abf1683daf08fc5460466d39ab65414a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0753ce439a3af7b3464d9d8696d4447d9aa34aa032abf439f7a0ca66f0689a069a063982f66df5bc78afeb0b6e464d74ffdbd6002bf2be35ddcef62bdabc3897286a00eebe5325d39ccaab5a280886b3faf1018cb464d19f1d10d8bfe790df06a7d3eb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bbf6880a09dd6d62ff619fa59e7234e4a0f1908f2885e08df7c09514eda26e7cf403da02b88019debcb06a85d32f864f86201018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca021d588468763a8039aab65fc130d08e11e58f947caa822986ff556196f83182ba03e5d76a800fc0025e78d9a0b44e7515230b6b15b36ec3697a3e74fe04b36bf15c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x21d588468763a8039aab65fc130d08e11e58f947caa822986ff556196f83182b", + "s" : "0x3e5d76a800fc0025e78d9a0b44e7515230b6b15b36ec3697a3e74fe04b36bf15", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "17e2186ecf30d418986fafbfdeab8a808a7027c416d9efcb63d744a32e439d27", + "mixHash" : "3e7babc6c8f8c0d14ee6f0f72b9e54bc4b9537e563f6ce419c8ee9d28c67cf06", + "nonce" : "765d722bda11806e", + "number" : "0x03", + "parentHash" : "28229e2545830686d2e82bdd7279a3f28b638bf4146eab5c2285414e962d607a", + "receiptTrie" : "5e4896d2ca61a941d960b442762206ddb1bde28f9a01b19dea6b5c88bd4dc377", + "stateRoot" : "29bd8543d5fe1f522badabba89bc4d997cb997ef2e0b21317e0ef0ad5df57a82", + "timestamp" : "0x561bbf6b", + "transactionsTrie" : "6383b235ef2035477263a5d8459733e2700db28e90dc1c828b3e1ac4516a565f", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a028229e2545830686d2e82bdd7279a3f28b638bf4146eab5c2285414e962d607aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a029bd8543d5fe1f522badabba89bc4d997cb997ef2e0b21317e0ef0ad5df57a82a06383b235ef2035477263a5d8459733e2700db28e90dc1c828b3e1ac4516a565fa05e4896d2ca61a941d960b442762206ddb1bde28f9a01b19dea6b5c88bd4dc377b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bbf6b80a03e7babc6c8f8c0d14ee6f0f72b9e54bc4b9537e563f6ce419c8ee9d28c67cf0688765d722bda11806ef864f86202018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba06a406c9db6d00df058a7a0cf44e6bbb3fd0dc1a42375f5874a6f9ee79dfc2d33a068a16f421613a6db4f48aeb51f1823b1d1935167101441c5163c0825f60d32d1c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x6a406c9db6d00df058a7a0cf44e6bbb3fd0dc1a42375f5874a6f9ee79dfc2d33", + "s" : "0x68a16f421613a6db4f48aeb51f1823b1d1935167101441c5163c0825f60d32d1", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "df5f7a9b6c4b03830957a8ccaa06438d542eb4605afde2fc2d56501cd2feddcc", + "mixHash" : "18582c34f0754fc9d0f0ef6d967fbc6cc4414b879c2d61f2f1025962da244172", + "nonce" : "6a12d1749a747fc4", + "number" : "0x04", + "parentHash" : "17e2186ecf30d418986fafbfdeab8a808a7027c416d9efcb63d744a32e439d27", + "receiptTrie" : "21f2fa4e150ba5ad8d759007b38194aee1d3c08796214d6b8ab06b74978e66ac", + "stateRoot" : "2fa405602b7f1f41f7ccdb2d9f0a90656b797ee8c1301e2973eee08dd3344bd8", + "timestamp" : "0x561bbf6e", + "transactionsTrie" : "7bf5f5f5d5e03c8a626ddaafc54669b4a2141302069c4ec0a3d8c8a07e653512", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a017e2186ecf30d418986fafbfdeab8a808a7027c416d9efcb63d744a32e439d27a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a02fa405602b7f1f41f7ccdb2d9f0a90656b797ee8c1301e2973eee08dd3344bd8a07bf5f5f5d5e03c8a626ddaafc54669b4a2141302069c4ec0a3d8c8a07e653512a021f2fa4e150ba5ad8d759007b38194aee1d3c08796214d6b8ab06b74978e66acb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bbf6e80a018582c34f0754fc9d0f0ef6d967fbc6cc4414b879c2d61f2f1025962da244172886a12d1749a747fc4f864f86203018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca0f89468364d038b348ede7e2cf022313138b408ec07d9c648f89d51ba73d63466a02f52d4e977921416022574d20408d57e995e6aaa6690995a7071ba621da2aa25c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0xf89468364d038b348ede7e2cf022313138b408ec07d9c648f89d51ba73d63466", + "s" : "0x2f52d4e977921416022574d20408d57e995e6aaa6690995a7071ba621da2aa25", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "b917381890eaf1de5f8e10460206a2ff2eed1bfd4551d01b4f795db0384f5e88", + "mixHash" : "97ce80f028f9d730e1bc79570c2aa831565dce6bca61410fd0f614eca74f270b", + "nonce" : "ee5f565c66254057", + "number" : "0x05", + "parentHash" : "df5f7a9b6c4b03830957a8ccaa06438d542eb4605afde2fc2d56501cd2feddcc", + "receiptTrie" : "d4a9762fe3b41aa50cd37486b394cd330a1e33c93c54987489de4ac04c289f68", + "stateRoot" : "5f61e64de74ffe8521a823be0e28cefd21ae98e4d4ae4d4043beebee751390e9", + "timestamp" : "0x561bbf70", + "transactionsTrie" : "4f943076ed6d0fe8a48a29a03827fd08ef201f68f7705dc0f266f46b35096a82", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "5", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a0df5f7a9b6c4b03830957a8ccaa06438d542eb4605afde2fc2d56501cd2feddcca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05f61e64de74ffe8521a823be0e28cefd21ae98e4d4ae4d4043beebee751390e9a04f943076ed6d0fe8a48a29a03827fd08ef201f68f7705dc0f266f46b35096a82a0d4a9762fe3b41aa50cd37486b394cd330a1e33c93c54987489de4ac04c289f68b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bbf7080a097ce80f028f9d730e1bc79570c2aa831565dce6bca61410fd0f614eca74f270b88ee5f565c66254057f864f86204018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba038f7697eaad439de7adb0a46a217846b63524ff9dd22f322fd902423ed4e9fc1a0702a8fa98029d52ad9f0e7756db8e2c8277f57e7ff356c4e12965cbed6603336c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0x38f7697eaad439de7adb0a46a217846b63524ff9dd22f322fd902423ed4e9fc1", + "s" : "0x702a8fa98029d52ad9f0e7756db8e2c8277f57e7ff356c4e12965cbed6603336", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "0d1f204cdbe33cb189e13bb3d5b98b7d9538fccd77bd5fe90eed4a0dcce0b6df", + "mixHash" : "50905f58e6f1fa2fca84d2832de203ff93c43c968f70f34882282e78dd8c0d72", + "nonce" : "dd35e617166432bf", + "number" : "0x06", + "parentHash" : "b917381890eaf1de5f8e10460206a2ff2eed1bfd4551d01b4f795db0384f5e88", + "receiptTrie" : "67fd88ba2e949b9e1fcb3f31db12f79756cb9907d6e44f61a64870f0b673df30", + "stateRoot" : "59b69d536feb0869c9910cd031b14317c66b683874f6c95028711c7f37fa7075", + "timestamp" : "0x561bbf71", + "transactionsTrie" : "7398169245666b33176c90a74b67896f7f8abea4b40bcbb23515baa1ae5da884", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a0b917381890eaf1de5f8e10460206a2ff2eed1bfd4551d01b4f795db0384f5e88a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a059b69d536feb0869c9910cd031b14317c66b683874f6c95028711c7f37fa7075a07398169245666b33176c90a74b67896f7f8abea4b40bcbb23515baa1ae5da884a067fd88ba2e949b9e1fcb3f31db12f79756cb9907d6e44f61a64870f0b673df30b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882520884561bbf7180a050905f58e6f1fa2fca84d2832de203ff93c43c968f70f34882282e78dd8c0d7288dd35e617166432bff864f86205018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca0c56d21b935548182582513c0ea834c0e8465e0ab6afd3f8ecaadf9b6f86df90ba04448927a2c68c5fb23ba817689ea20c8857790f77a5e92b58d9bb63a86d0afafc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0xc56d21b935548182582513c0ea834c0e8465e0ab6afd3f8ecaadf9b6f86df90b", + "s" : "0x4448927a2c68c5fb23ba817689ea20c8857790f77a5e92b58d9bb63a86d0afaf", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020180", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "2671d2b4ff98ef7946ab0712301562ccba34b068516a5deba06c6bac0aede3d0", + "mixHash" : "ad39e7af25cf1ca00fd09dedce1f74f26cc5e2e7e936d8e5ac3d8ec569beede3", + "nonce" : "630bf053478944ea", + "number" : "0x07", + "parentHash" : "0d1f204cdbe33cb189e13bb3d5b98b7d9538fccd77bd5fe90eed4a0dcce0b6df", + "receiptTrie" : "b57372ec048cf23e16e5a781fd41e946d7de3ea930fa3f9b92793e058ad3c9f1", + "stateRoot" : "242fc61ea8592beb88170d29e2aeb601412af318b810913ca2d3ef37649cc9e2", + "timestamp" : "0x561bbf73", + "transactionsTrie" : "a4a354cd3764deb80d6b6f53c1f8d21f81a7eadcd39fec4dd6eedaf9368a7bf5", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "7", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a00d1f204cdbe33cb189e13bb3d5b98b7d9538fccd77bd5fe90eed4a0dcce0b6dfa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0242fc61ea8592beb88170d29e2aeb601412af318b810913ca2d3ef37649cc9e2a0a4a354cd3764deb80d6b6f53c1f8d21f81a7eadcd39fec4dd6eedaf9368a7bf5a0b57372ec048cf23e16e5a781fd41e946d7de3ea930fa3f9b92793e058ad3c9f1b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882520884561bbf7380a0ad39e7af25cf1ca00fd09dedce1f74f26cc5e2e7e936d8e5ac3d8ec569beede388630bf053478944eaf864f86206018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca0c543939d3748cd055d4ec5625d5acc551fce704a5414ab94a87a5f0aad4c07f7a0250513e0c9d6ae68b732485c034d6c271fe68f3b9f6f8053e494d3611a3e28d7c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x06", + "r" : "0xc543939d3748cd055d4ec5625d5acc551fce704a5414ab94a87a5f0aad4c07f7", + "s" : "0x250513e0c9d6ae68b732485c034d6c271fe68f3b9f6f8053e494d3611a3e28d7", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0201c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f7fa7e690f0c2c5acc4c73fa8c725c35edd6b05f7b4c2df524bc44b623ed1b7b", + "mixHash" : "ab07b3f8e42f663c358439286bc3089f080bffc977b7d9eeb61de919d82baede", + "nonce" : "b280c29e8a67c691", + "number" : "0x08", + "parentHash" : "2671d2b4ff98ef7946ab0712301562ccba34b068516a5deba06c6bac0aede3d0", + "receiptTrie" : "7dfad130a7d0273aee6d478fa3fe6c9439ab82b81ed3fe001a203ae45a81e142", + "stateRoot" : "7393f73f38eb029a6540d1bd4357d6ffd1d91e1ba5559de5deb4f3b7382b73ce", + "timestamp" : "0x561bbf76", + "transactionsTrie" : "cc76d7ecafc8d0b991fe3e7ebb855046c0a26f69d22acbf5048b5ba673ebc5f2", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "8", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a02671d2b4ff98ef7946ab0712301562ccba34b068516a5deba06c6bac0aede3d0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07393f73f38eb029a6540d1bd4357d6ffd1d91e1ba5559de5deb4f3b7382b73cea0cc76d7ecafc8d0b991fe3e7ebb855046c0a26f69d22acbf5048b5ba673ebc5f2a07dfad130a7d0273aee6d478fa3fe6c9439ab82b81ed3fe001a203ae45a81e142b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd882520884561bbf7680a0ab07b3f8e42f663c358439286bc3089f080bffc977b7d9eeb61de919d82baede88b280c29e8a67c691f864f86207018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba0f352b51bd7f09a31e7db39dc03668c417ade24f06838cf575b9a2eea05c149d9a01464dcf669ca806a16bbcfb79fd90c2b84322d46d8122e7376fd085c8fd33af9c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x07", + "r" : "0xf352b51bd7f09a31e7db39dc03668c417ade24f06838cf575b9a2eea05c149d9", + "s" : "0x1464dcf669ca806a16bbcfb79fd90c2b84322d46d8122e7376fd085c8fd33af9", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020200", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "a220c8592708df4327ea85806fa3d113efba961d5127643d185b8fbb3aeffd95", + "mixHash" : "a61bb3854b1dc3eb7d16ca0ce7253fbddf7f09c599e85312fa354457b4e866ff", + "nonce" : "f643e0bcafd9b5b4", + "number" : "0x09", + "parentHash" : "f7fa7e690f0c2c5acc4c73fa8c725c35edd6b05f7b4c2df524bc44b623ed1b7b", + "receiptTrie" : "91e451b0ab7543f0cfb721277bf6e6f35d84da01464dce1318fe49d4b010d56f", + "stateRoot" : "3147d14767eb9e771470e2e243a7ebdf8cc98c5c83965d83d5937b5780043628", + "timestamp" : "0x561bbf77", + "transactionsTrie" : "ead40f807418abfa7ec8d4de091d96a15ac228a4532555c8efb0cb6889fee1da", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "9", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a0f7fa7e690f0c2c5acc4c73fa8c725c35edd6b05f7b4c2df524bc44b623ed1b7ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a03147d14767eb9e771470e2e243a7ebdf8cc98c5c83965d83d5937b5780043628a0ead40f807418abfa7ec8d4de091d96a15ac228a4532555c8efb0cb6889fee1daa091e451b0ab7543f0cfb721277bf6e6f35d84da01464dce1318fe49d4b010d56fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd882520884561bbf7780a0a61bb3854b1dc3eb7d16ca0ce7253fbddf7f09c599e85312fa354457b4e866ff88f643e0bcafd9b5b4f864f86208018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba03e36f57f83215822e9e654da5c13c9f67e399b6eb418624ce11a9779f1bd2ab6a03e1af47a333eccd19f4acafce859e185fba3a05356774277a5c74fa8f2d06a95c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x08", + "r" : "0x3e36f57f83215822e9e654da5c13c9f67e399b6eb418624ce11a9779f1bd2ab6", + "s" : "0x3e1af47a333eccd19f4acafce859e185fba3a05356774277a5c74fa8f2d06a95", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020240", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "7408f8df53b17316477b933688efd2b8d8eb5d2561337dbb3d5e7b7d934f2fed", + "mixHash" : "92bb672a5508eb18f6864a5df6fcbd83961312f0cdea63332bda7bb408231dd7", + "nonce" : "102d0ed01e9b1d63", + "number" : "0x0a", + "parentHash" : "a220c8592708df4327ea85806fa3d113efba961d5127643d185b8fbb3aeffd95", + "receiptTrie" : "4c358df09e2f19e91e8c400a3a1660ac29ae7c14e869e67f8f28bacc8837bdf0", + "stateRoot" : "74e8cafeb7e498b0596fb7d6c23ca4158e67a0570dba43833becf94baa53f88c", + "timestamp" : "0x561bbf79", + "transactionsTrie" : "be421f5ce9516c65b10e7a7b40ebf127f8a5d497660adfd626ed0ba243f09b0d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "10", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a0a220c8592708df4327ea85806fa3d113efba961d5127643d185b8fbb3aeffd95a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a074e8cafeb7e498b0596fb7d6c23ca4158e67a0570dba43833becf94baa53f88ca0be421f5ce9516c65b10e7a7b40ebf127f8a5d497660adfd626ed0ba243f09b0da04c358df09e2f19e91e8c400a3a1660ac29ae7c14e869e67f8f28bacc8837bdf0b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd882520884561bbf7980a092bb672a5508eb18f6864a5df6fcbd83961312f0cdea63332bda7bb408231dd788102d0ed01e9b1d63f864f86209018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba0392fedd9f10e7757c614650438d8990d133f26955ea4bc4b2060e21601c10f94a00e26019a5329eefd31833e854a73dbab301caed315aa84e91febc807900563e2c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x09", + "r" : "0x392fedd9f10e7757c614650438d8990d133f26955ea4bc4b2060e21601c10f94", + "s" : "0x0e26019a5329eefd31833e854a73dbab301caed315aa84e91febc807900563e2", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020280", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "8b56f53b6406e2d753bc0a92ad3c50805c57778782efbb896e106cc79103f688", + "mixHash" : "811883df4e2013a717cc95c43bb340feb5afb8df6a083fc856059479b82ced4c", + "nonce" : "e09de3cc725d0a73", + "number" : "0x0b", + "parentHash" : "7408f8df53b17316477b933688efd2b8d8eb5d2561337dbb3d5e7b7d934f2fed", + "receiptTrie" : "d0efd844000483a62c558d97be38d9c2e5cf8c2eb87ba6950ffa4d6b06a44e53", + "stateRoot" : "bea16f21f95f56833fabf1b68ce140823a9110d517ed86dbdc5921e11aab11df", + "timestamp" : "0x561bbf7a", + "transactionsTrie" : "81974b38c0381e3801372cf1592a02c972ee7018eaf75c415b0cbbf039b0ad0a", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "11", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a07408f8df53b17316477b933688efd2b8d8eb5d2561337dbb3d5e7b7d934f2feda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0bea16f21f95f56833fabf1b68ce140823a9110d517ed86dbdc5921e11aab11dfa081974b38c0381e3801372cf1592a02c972ee7018eaf75c415b0cbbf039b0ad0aa0d0efd844000483a62c558d97be38d9c2e5cf8c2eb87ba6950ffa4d6b06a44e53b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202800b832fefd882520884561bbf7a80a0811883df4e2013a717cc95c43bb340feb5afb8df6a083fc856059479b82ced4c88e09de3cc725d0a73f864f8620a018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba0d995ed2190893154ddcf005c185602a6745eeab526abad3090efeb0ce418dfd2a02131a9230c5c2a827b6b92a01aa75120468b94f4269e70c34f9f89063cf29bcec0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0a", + "r" : "0xd995ed2190893154ddcf005c185602a6745eeab526abad3090efeb0ce418dfd2", + "s" : "0x2131a9230c5c2a827b6b92a01aa75120468b94f4269e70c34f9f89063cf29bce", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0202c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "c17ff7e484615d404b35a17ffaf62eccef650e0f243cace875a524c405625d3a", + "mixHash" : "1f40e0b74f0589ca04f4ce072e5f61bddd7147a7b00878dfc4d61782ce6f2694", + "nonce" : "8e1e51dc3d4d38d9", + "number" : "0x0c", + "parentHash" : "8b56f53b6406e2d753bc0a92ad3c50805c57778782efbb896e106cc79103f688", + "receiptTrie" : "539477926f10186f66fa0c96648b3c92fdab5cf702a06e47f119d87fb09196e0", + "stateRoot" : "4b0d1de39b627bb647d8f5756b2b2890db3eb19b4a7fd3c2bc370017bda1ca33", + "timestamp" : "0x561bbf7d", + "transactionsTrie" : "e376b8ca1fa2eb15c8460212be7cd1f295a6dbdb2f47b7b0d7fa9d6e2fc42057", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "12", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a08b56f53b6406e2d753bc0a92ad3c50805c57778782efbb896e106cc79103f688a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04b0d1de39b627bb647d8f5756b2b2890db3eb19b4a7fd3c2bc370017bda1ca33a0e376b8ca1fa2eb15c8460212be7cd1f295a6dbdb2f47b7b0d7fa9d6e2fc42057a0539477926f10186f66fa0c96648b3c92fdab5cf702a06e47f119d87fb09196e0b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202c00c832fefd882520884561bbf7d80a01f40e0b74f0589ca04f4ce072e5f61bddd7147a7b00878dfc4d61782ce6f2694888e1e51dc3d4d38d9f864f8620b018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba061f6acf066a31b5a9b0c74baf0de71d022f337c170fc465a827d6c50326e3e9ea018ec6b70fb2261c8d1f5364c2394f0003dd91fadffad7cd15b2171f163a86943c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0b", + "r" : "0x61f6acf066a31b5a9b0c74baf0de71d022f337c170fc465a827d6c50326e3e9e", + "s" : "0x18ec6b70fb2261c8d1f5364c2394f0003dd91fadffad7cd15b2171f163a86943", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020300", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "3291cb3102e54dc28772709b0792fd9281ac8ea06530123d4d07c01fafda09c9", + "mixHash" : "f93d253354413b354d09e67a8f25cfa3451397ee81683f016d9fc6e8db99c319", + "nonce" : "a33156815445f2e3", + "number" : "0x0d", + "parentHash" : "c17ff7e484615d404b35a17ffaf62eccef650e0f243cace875a524c405625d3a", + "receiptTrie" : "088a93c47534042e24ab2e76714e17977a96d9b1f637f258d0e35b0951a6f750", + "stateRoot" : "ed04d02d78dd39e90edc88a837aebc8792b007fea6e6d1f021e278f8a8e212e0", + "timestamp" : "0x561bbf7f", + "transactionsTrie" : "2d0a2fcb99128ea291fb5e3062ae3cc7f50b674ca6b8951a032e57fe7b2d1c13", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "13", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a0c17ff7e484615d404b35a17ffaf62eccef650e0f243cace875a524c405625d3aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ed04d02d78dd39e90edc88a837aebc8792b007fea6e6d1f021e278f8a8e212e0a02d0a2fcb99128ea291fb5e3062ae3cc7f50b674ca6b8951a032e57fe7b2d1c13a0088a93c47534042e24ab2e76714e17977a96d9b1f637f258d0e35b0951a6f750b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203000d832fefd882520884561bbf7f80a0f93d253354413b354d09e67a8f25cfa3451397ee81683f016d9fc6e8db99c31988a33156815445f2e3f864f8620c018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba00f3bf11cc91cf881b6970470ea1af35b8eb715940f96849144f1dc412c5226caa07e01475262623f1d12223594d55a594fcafcf1a99f85dc9e98279bdcf0a60afcc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0c", + "r" : "0x0f3bf11cc91cf881b6970470ea1af35b8eb715940f96849144f1dc412c5226ca", + "s" : "0x7e01475262623f1d12223594d55a594fcafcf1a99f85dc9e98279bdcf0a60afc", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020340", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "dce264a9df642e6a796a6e8cd8e2c7095b1e11507afbde69ec5a6033e1957cb8", + "mixHash" : "6090fc3e719df6fa89f7a1fe7fe54bf2f860629c09207e80de3dc51510e350bb", + "nonce" : "bb92171bb680f27d", + "number" : "0x0e", + "parentHash" : "3291cb3102e54dc28772709b0792fd9281ac8ea06530123d4d07c01fafda09c9", + "receiptTrie" : "ac36f87ee33d163ad6a087b0d356a92a52508af4d1ffcc88e65fae4b2e16f91e", + "stateRoot" : "06cadf60d12c2f1cc07ca1cfa842514de128a1e90bd5a1550e87df648f39a5ea", + "timestamp" : "0x561bbf82", + "transactionsTrie" : "a5a7a6a5447c297869cf971766b0d9787b3780ff96368bfe377a8be84abf81c3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "14", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a03291cb3102e54dc28772709b0792fd9281ac8ea06530123d4d07c01fafda09c9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a006cadf60d12c2f1cc07ca1cfa842514de128a1e90bd5a1550e87df648f39a5eaa0a5a7a6a5447c297869cf971766b0d9787b3780ff96368bfe377a8be84abf81c3a0ac36f87ee33d163ad6a087b0d356a92a52508af4d1ffcc88e65fae4b2e16f91eb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203400e832fefd882520884561bbf8280a06090fc3e719df6fa89f7a1fe7fe54bf2f860629c09207e80de3dc51510e350bb88bb92171bb680f27df864f8620d018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba0c2499b0f3d953410de9b16142a5b526ef94ddcde82d1b375092633744791afb2a074acd0342762143f3b2a177949f42911dfe678bffe4ebb1977063a9bef84c962c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0d", + "r" : "0xc2499b0f3d953410de9b16142a5b526ef94ddcde82d1b375092633744791afb2", + "s" : "0x74acd0342762143f3b2a177949f42911dfe678bffe4ebb1977063a9bef84c962", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020380", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "1efbd04803062d1b5750b5ace3eee96878af7cd4b2418911ce7c5b8ac81984c9", + "mixHash" : "8ce4ece218a6bec9360cff9d75ff27a9b11732da939d581e5681e4501bec35b9", + "nonce" : "1e91b0a72c59ed06", + "number" : "0x0f", + "parentHash" : "dce264a9df642e6a796a6e8cd8e2c7095b1e11507afbde69ec5a6033e1957cb8", + "receiptTrie" : "77d82d42a3ef447a16d44394fee9a91b569a74d46a1dde68c15bcdbf20787932", + "stateRoot" : "d53066c17733513128814b02404eec2f821daf83e2b596fd394e507edd58305a", + "timestamp" : "0x561bbf84", + "transactionsTrie" : "7af9fcc1ad229256b5d5ed29f171a5a0ee6ced9e05371a3b77f511a86150872f", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "15", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a0dce264a9df642e6a796a6e8cd8e2c7095b1e11507afbde69ec5a6033e1957cb8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d53066c17733513128814b02404eec2f821daf83e2b596fd394e507edd58305aa07af9fcc1ad229256b5d5ed29f171a5a0ee6ced9e05371a3b77f511a86150872fa077d82d42a3ef447a16d44394fee9a91b569a74d46a1dde68c15bcdbf20787932b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203800f832fefd882520884561bbf8480a08ce4ece218a6bec9360cff9d75ff27a9b11732da939d581e5681e4501bec35b9881e91b0a72c59ed06f864f8620e018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca01f708fe16715feb102b05178f6b46662e14e17a6743cf60fbe4551255f785d01a07079365cd3716754d6346cc95ac2f1ccb6a4328cfcfc1fef52a5c08fc2111c92c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0e", + "r" : "0x1f708fe16715feb102b05178f6b46662e14e17a6743cf60fbe4551255f785d01", + "s" : "0x7079365cd3716754d6346cc95ac2f1ccb6a4328cfcfc1fef52a5c08fc2111c92", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0203c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "36e6265c37187619ea2bb993482c67e7e2e05666f8a50e42df49c444f69751cf", + "mixHash" : "481676a65004b989575d63e33834b02609b1b5c382784587f08d2f7e384347b0", + "nonce" : "668dc95f5842c3c2", + "number" : "0x10", + "parentHash" : "1efbd04803062d1b5750b5ace3eee96878af7cd4b2418911ce7c5b8ac81984c9", + "receiptTrie" : "39fe1b72def672f3d55305289d27bdd6561756e2d8875574221d4685f9425a85", + "stateRoot" : "0fc3633209046293fd2dd5c16b23159d5b43a0a006ded65f49bdd199eb8f1918", + "timestamp" : "0x561bbf87", + "transactionsTrie" : "b36d4b1149130f8a5eac46bac74e4d58420b10f338c4ad143576a0ad50d3da09", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "16", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a01efbd04803062d1b5750b5ace3eee96878af7cd4b2418911ce7c5b8ac81984c9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00fc3633209046293fd2dd5c16b23159d5b43a0a006ded65f49bdd199eb8f1918a0b36d4b1149130f8a5eac46bac74e4d58420b10f338c4ad143576a0ad50d3da09a039fe1b72def672f3d55305289d27bdd6561756e2d8875574221d4685f9425a85b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203c010832fefd882520884561bbf8780a0481676a65004b989575d63e33834b02609b1b5c382784587f08d2f7e384347b088668dc95f5842c3c2f864f8620f018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba004fc85f1e37b6decb0371decc04815e0361b8a8f0b681508f2550198810589dba032408728e64f3e476518ba0b7b5a0a1a856b1ffae5b865ed7b217ee3e8ce1152c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0f", + "r" : "0x04fc85f1e37b6decb0371decc04815e0361b8a8f0b681508f2550198810589db", + "s" : "0x32408728e64f3e476518ba0b7b5a0a1a856b1ffae5b865ed7b217ee3e8ce1152", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020400", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "499c931f23e19ca3a49956441a9ae03aecebab6be47a2bbf9f3c42586de60e7c", + "mixHash" : "7c7dda0ca2ed1e8a6fe610ea346da490177efc221e440123e06ed3b925363976", + "nonce" : "10f1fd523a7630fd", + "number" : "0x11", + "parentHash" : "36e6265c37187619ea2bb993482c67e7e2e05666f8a50e42df49c444f69751cf", + "receiptTrie" : "3d4b5bda3707ac04b5d1a87fa9dff194d3a4db1dac1b545b0eddda3eb7a180fa", + "stateRoot" : "6ab4e5135443bdeafb5c1493f893a288b0592de53ce3d33cd98c14a241863a32", + "timestamp" : "0x561bbf89", + "transactionsTrie" : "5f4e7459f0dfdd78325ea52895ac830c2542b3d4fb402458309bd38cb3aef538", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "17", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a036e6265c37187619ea2bb993482c67e7e2e05666f8a50e42df49c444f69751cfa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a06ab4e5135443bdeafb5c1493f893a288b0592de53ce3d33cd98c14a241863a32a05f4e7459f0dfdd78325ea52895ac830c2542b3d4fb402458309bd38cb3aef538a03d4b5bda3707ac04b5d1a87fa9dff194d3a4db1dac1b545b0eddda3eb7a180fab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302040011832fefd882520884561bbf8980a07c7dda0ca2ed1e8a6fe610ea346da490177efc221e440123e06ed3b9253639768810f1fd523a7630fdf864f86210018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca037a3d7fd95be0dd2c7f38cb3813fe0759dda2d19620b53172becdfd35a8dec2da02a0cabfee4aadab72ca4ae539f5d799def81e377be0f2a89c3fdabc95fa59cc0c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x10", + "r" : "0x37a3d7fd95be0dd2c7f38cb3813fe0759dda2d19620b53172becdfd35a8dec2d", + "s" : "0x2a0cabfee4aadab72ca4ae539f5d799def81e377be0f2a89c3fdabc95fa59cc0", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020440", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "ef9591815d267c0d9ca7e570fa3eb65385ddcfe1395b20134207a067d527a618", + "mixHash" : "c0e2e3d56574e6f1f0adf400f5c1acb6d199a76c38022ebcac7d00050d3ab279", + "nonce" : "b60a28370cdac6a4", + "number" : "0x12", + "parentHash" : "499c931f23e19ca3a49956441a9ae03aecebab6be47a2bbf9f3c42586de60e7c", + "receiptTrie" : "5e6aafb74743372da636b264ddced5d7ccbed9d3da71b260eb88b70763079687", + "stateRoot" : "12b86b9d737f0dabcd2d7593e449e78d4d15c7bddaee9527a7a8ffb7b35270b7", + "timestamp" : "0x561bbf8c", + "transactionsTrie" : "b17e90310acf52c4e6dccd7f55cb0c54fc42371d983a8198c49dab6d0e1f3279", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "18", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a0499c931f23e19ca3a49956441a9ae03aecebab6be47a2bbf9f3c42586de60e7ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a012b86b9d737f0dabcd2d7593e449e78d4d15c7bddaee9527a7a8ffb7b35270b7a0b17e90310acf52c4e6dccd7f55cb0c54fc42371d983a8198c49dab6d0e1f3279a05e6aafb74743372da636b264ddced5d7ccbed9d3da71b260eb88b70763079687b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302044012832fefd882520884561bbf8c80a0c0e2e3d56574e6f1f0adf400f5c1acb6d199a76c38022ebcac7d00050d3ab27988b60a28370cdac6a4f864f86211018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca0c305eca65a067c6fbf0ee6e52c8cebcbedbfb88d19640f3f0ed5fe53b0d43144a061a43f631eefdd37207e362c41891a9cec87b44eb9c3a1055177ffd66d0dc39fc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x11", + "r" : "0xc305eca65a067c6fbf0ee6e52c8cebcbedbfb88d19640f3f0ed5fe53b0d43144", + "s" : "0x61a43f631eefdd37207e362c41891a9cec87b44eb9c3a1055177ffd66d0dc39f", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020480", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "36a3d2e472b1a9a9fbccef93584979a8f64b7d01d9b07908c9785a7d528b4854", + "mixHash" : "83fa57afd18bdb09c8c22bd563d361cad9a62c2f78628be42b44d7c6cce7bbf5", + "nonce" : "4bccca87cf6cf897", + "number" : "0x13", + "parentHash" : "ef9591815d267c0d9ca7e570fa3eb65385ddcfe1395b20134207a067d527a618", + "receiptTrie" : "1c5a893a2f521bbf40f7bf6fb0e42a9e0e09759dd938004fa420375027eb0b13", + "stateRoot" : "570302b6728b3a7c5541796a9645cc90a21c671bab6804f3dbee4b151e14f3cf", + "timestamp" : "0x561bbf8e", + "transactionsTrie" : "be0dbc00ba8c852824d161243dacf049014cf0b29cbe4b0b9df059ab06a24a46", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "19", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a0ef9591815d267c0d9ca7e570fa3eb65385ddcfe1395b20134207a067d527a618a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0570302b6728b3a7c5541796a9645cc90a21c671bab6804f3dbee4b151e14f3cfa0be0dbc00ba8c852824d161243dacf049014cf0b29cbe4b0b9df059ab06a24a46a01c5a893a2f521bbf40f7bf6fb0e42a9e0e09759dd938004fa420375027eb0b13b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302048013832fefd882520884561bbf8e80a083fa57afd18bdb09c8c22bd563d361cad9a62c2f78628be42b44d7c6cce7bbf5884bccca87cf6cf897f864f86212018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca07afcb8c884d7594e77e748779c39e8d2758024b2f1b1cff212be7370bc71e770a04a2d9d98985c258d77072494eca4694a979f15d89cab15d35a7b9ee0dc76ce94c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x12", + "r" : "0x7afcb8c884d7594e77e748779c39e8d2758024b2f1b1cff212be7370bc71e770", + "s" : "0x4a2d9d98985c258d77072494eca4694a979f15d89cab15d35a7b9ee0dc76ce94", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0204c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "5e9fa9295e82e83e3b4260b856caa9d927e91b7af04636a252889e54de88e848", + "mixHash" : "e41c6fcee122c36aca551cd7466e713e7bb538f25a3366e1599153a2e726c9e7", + "nonce" : "ca9ba98bf6b63b93", + "number" : "0x14", + "parentHash" : "36a3d2e472b1a9a9fbccef93584979a8f64b7d01d9b07908c9785a7d528b4854", + "receiptTrie" : "c0b49b47b708a827537442d0904f01d7f80f09aa223c00a583923e840e0dac71", + "stateRoot" : "f32a007f02867a6a9899ef346523a59c0d95b8bda857eb5df8d461e0e5feacae", + "timestamp" : "0x561bbf91", + "transactionsTrie" : "132f51015f79c3b255c8f7cd2e716baacf97e98ee6312623adaf79409984b890", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "20", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a036a3d2e472b1a9a9fbccef93584979a8f64b7d01d9b07908c9785a7d528b4854a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f32a007f02867a6a9899ef346523a59c0d95b8bda857eb5df8d461e0e5feacaea0132f51015f79c3b255c8f7cd2e716baacf97e98ee6312623adaf79409984b890a0c0b49b47b708a827537442d0904f01d7f80f09aa223c00a583923e840e0dac71b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830204c014832fefd882520884561bbf9180a0e41c6fcee122c36aca551cd7466e713e7bb538f25a3366e1599153a2e726c9e788ca9ba98bf6b63b93f864f86213018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba0438c18fc31211419f55760a7d96654e87c43dd69c7bf02b7625a511f260fc459a051cd332f7fbf3e881453f0ad541813ed5c09cda1825d8eb9d61fa8a5806458d3c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x13", + "r" : "0x438c18fc31211419f55760a7d96654e87c43dd69c7bf02b7625a511f260fc459", + "s" : "0x51cd332f7fbf3e881453f0ad541813ed5c09cda1825d8eb9d61fa8a5806458d3", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020500", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "3b76945e0a9888931b035dacc7961a3ae99802af0ab24d85f8222a9809616b1b", + "mixHash" : "0f81297fc965dce305ec0a42562f28057320e3fd46dbd0da36d875353026b92e", + "nonce" : "6acd78696c190dd7", + "number" : "0x15", + "parentHash" : "5e9fa9295e82e83e3b4260b856caa9d927e91b7af04636a252889e54de88e848", + "receiptTrie" : "4a3cc99d45b6b2578799c85f77d86ed47031a2adc9c7d3397e92609cf61710fa", + "stateRoot" : "698bc6963f1f7ba56e2398d9793a4ae2a91c5cfbef3fabbfc26e24b9bc883f96", + "timestamp" : "0x561bbf93", + "transactionsTrie" : "792d08e3bb08ff21b0dea907c6a73ddb694bb6336683270682b5b68ac8ed9fdb", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "21", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a05e9fa9295e82e83e3b4260b856caa9d927e91b7af04636a252889e54de88e848a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0698bc6963f1f7ba56e2398d9793a4ae2a91c5cfbef3fabbfc26e24b9bc883f96a0792d08e3bb08ff21b0dea907c6a73ddb694bb6336683270682b5b68ac8ed9fdba04a3cc99d45b6b2578799c85f77d86ed47031a2adc9c7d3397e92609cf61710fab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302050015832fefd882520884561bbf9380a00f81297fc965dce305ec0a42562f28057320e3fd46dbd0da36d875353026b92e886acd78696c190dd7f864f86214018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba0b49cca4168e3fe1fef997c199ae60ac69b9a56af7e625135c96386a9c4ab6287a04dd0eb4fbb54b4b75e333dcc724ecde68021b191a478e799c5f27559c3278c3dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x14", + "r" : "0xb49cca4168e3fe1fef997c199ae60ac69b9a56af7e625135c96386a9c4ab6287", + "s" : "0x4dd0eb4fbb54b4b75e333dcc724ecde68021b191a478e799c5f27559c3278c3d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020540", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "846eb60eb84d72c20f0f77991ad4724cae4ab8393fcb0ca30318249cef88edc5", + "mixHash" : "24ea83e656ded73f02319d95ac15336d1e5abe639140ea8c826b0363c5376051", + "nonce" : "d2b72a8609d4c1d7", + "number" : "0x16", + "parentHash" : "3b76945e0a9888931b035dacc7961a3ae99802af0ab24d85f8222a9809616b1b", + "receiptTrie" : "82dace2b5d5d9199663872f5d0803da14b8c82b2a8ef5ceb1ff2c23525631d20", + "stateRoot" : "478eddbd8a4d2270b6956633e52d1bd386d65601b60d74941301e3c66438b88a", + "timestamp" : "0x561bbf94", + "transactionsTrie" : "1bff8cc1773ecfcb2aff2b23e1452302dda27b7f8355ce70d8e1a71fd195745e", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "22", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a03b76945e0a9888931b035dacc7961a3ae99802af0ab24d85f8222a9809616b1ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0478eddbd8a4d2270b6956633e52d1bd386d65601b60d74941301e3c66438b88aa01bff8cc1773ecfcb2aff2b23e1452302dda27b7f8355ce70d8e1a71fd195745ea082dace2b5d5d9199663872f5d0803da14b8c82b2a8ef5ceb1ff2c23525631d20b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302054016832fefd882520884561bbf9480a024ea83e656ded73f02319d95ac15336d1e5abe639140ea8c826b0363c537605188d2b72a8609d4c1d7f864f86215018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca030db92031e03d3380564b7ec44cb8df9498c5d6ca41214e941aa6bcb57d08d50a037129acc3f14635953e6f2817cb8bde6b07689e0d321c4b5e8e9e71f4df307b6c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x15", + "r" : "0x30db92031e03d3380564b7ec44cb8df9498c5d6ca41214e941aa6bcb57d08d50", + "s" : "0x37129acc3f14635953e6f2817cb8bde6b07689e0d321c4b5e8e9e71f4df307b6", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020580", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "accc2355c6d4e48472fcb0dd1384347cf70e92777d9173054dc302747e02df14", + "mixHash" : "4763959ccb817dfb7da88296205d5033321d2fea91e278cdd6f7e05a05aa94c3", + "nonce" : "d74af4d8803c4c35", + "number" : "0x17", + "parentHash" : "846eb60eb84d72c20f0f77991ad4724cae4ab8393fcb0ca30318249cef88edc5", + "receiptTrie" : "0eac1ced5fd5497ceab5c80a155538954d67c63cc233c6854606df233a2ddce6", + "stateRoot" : "5b4b3b8fb0dd5d43dcb4ba8b9fdce9b98fa6af27dc83c9034e729edc771ff979", + "timestamp" : "0x561bbf98", + "transactionsTrie" : "efa97a7ea4fa11ae4391ce4615348c0e127b625f870ef64bd06aec742bd402ef", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "23", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a0846eb60eb84d72c20f0f77991ad4724cae4ab8393fcb0ca30318249cef88edc5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05b4b3b8fb0dd5d43dcb4ba8b9fdce9b98fa6af27dc83c9034e729edc771ff979a0efa97a7ea4fa11ae4391ce4615348c0e127b625f870ef64bd06aec742bd402efa00eac1ced5fd5497ceab5c80a155538954d67c63cc233c6854606df233a2ddce6b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302058017832fefd882520884561bbf9880a04763959ccb817dfb7da88296205d5033321d2fea91e278cdd6f7e05a05aa94c388d74af4d8803c4c35f864f86216018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ca0610d5473b4e8d91c08ef3520e10b2328e0eb0ac60397b4f3095f139ded98681fa047e9aefea7eb450671231c2cda14cbbbd3cf1e4398ab71c5c1ae633d72b0a7e6c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x16", + "r" : "0x610d5473b4e8d91c08ef3520e10b2328e0eb0ac60397b4f3095f139ded98681f", + "s" : "0x47e9aefea7eb450671231c2cda14cbbbd3cf1e4398ab71c5c1ae633d72b0a7e6", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0205c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "93a9702e25a8a8157daa4033a0f70e4ff676bb2b227862716450dcaf4229bed7", + "mixHash" : "c33f0c94ce4650dd2a5985d5e76e5fa56b233dc8753845aa122a5800bd8794dd", + "nonce" : "8f0c909cf6d30c41", + "number" : "0x18", + "parentHash" : "accc2355c6d4e48472fcb0dd1384347cf70e92777d9173054dc302747e02df14", + "receiptTrie" : "b9d911b0876da3ed48f7caf51ec843e046742c4f2af53bcd4d0e91c9626854b4", + "stateRoot" : "d4f28697f8d021c109800291fa76ec47eaf64575cdda0d7756f631d166763533", + "timestamp" : "0x561bbf9a", + "transactionsTrie" : "e4e7bf7e7cd8dd36a82df3eaecdc5b3d6b8afcafa87a1b78252678c7ea17cb33", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "24", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a0accc2355c6d4e48472fcb0dd1384347cf70e92777d9173054dc302747e02df14a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d4f28697f8d021c109800291fa76ec47eaf64575cdda0d7756f631d166763533a0e4e7bf7e7cd8dd36a82df3eaecdc5b3d6b8afcafa87a1b78252678c7ea17cb33a0b9d911b0876da3ed48f7caf51ec843e046742c4f2af53bcd4d0e91c9626854b4b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830205c018832fefd882520884561bbf9a80a0c33f0c94ce4650dd2a5985d5e76e5fa56b233dc8753845aa122a5800bd8794dd888f0c909cf6d30c41f864f86217018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba0ae3f2ab2182d0fa25e847416469d0b06ccc019b04f0bc09d490d6cb60c0d0bb2a007a2fa97ba49937d7e7f774998ff9e15bface1cd9f07fab453fc41269a27e031c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x17", + "r" : "0xae3f2ab2182d0fa25e847416469d0b06ccc019b04f0bc09d490d6cb60c0d0bb2", + "s" : "0x07a2fa97ba49937d7e7f774998ff9e15bface1cd9f07fab453fc41269a27e031", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020600", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "b93eba209ecc5b206511b1ef0469231ce576fe68adb69516d2bc523872e30d95", + "mixHash" : "69442587cec8f38c3fc1a2a17b7243923e18d07b4b87bebb502acc1c3306bc00", + "nonce" : "7f4025a53d808b7c", + "number" : "0x19", + "parentHash" : "93a9702e25a8a8157daa4033a0f70e4ff676bb2b227862716450dcaf4229bed7", + "receiptTrie" : "90c5ed094ee099082a8a36ed36cd39d68af3363c647faa00a8f12531174b4f6f", + "stateRoot" : "22817962172c42096fe4f3c69d8d86f4ef122d7322e9c6f4b41f729725284319", + "timestamp" : "0x561bbf9d", + "transactionsTrie" : "703e57675d4e85a2ac4241eb83a77dfbc7f4625defc6c155a93054f225b2e158", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "25", + "chainname" : "CC", + "rlp" : "0xf90263f901f9a093a9702e25a8a8157daa4033a0f70e4ff676bb2b227862716450dcaf4229bed7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a022817962172c42096fe4f3c69d8d86f4ef122d7322e9c6f4b41f729725284319a0703e57675d4e85a2ac4241eb83a77dfbc7f4625defc6c155a93054f225b2e158a090c5ed094ee099082a8a36ed36cd39d68af3363c647faa00a8f12531174b4f6fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302060019832fefd882520884561bbf9d80a069442587cec8f38c3fc1a2a17b7243923e18d07b4b87bebb502acc1c3306bc00887f4025a53d808b7cf864f86218018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d878203e9801ba01fd0249dddc866e9774cab09e9b98e3d2ad53c220344bebac48dd0b7030c18caa07873cf2734a26fa90f761d5d49352ba26fba85407697ee202862a13c3235fc3ec0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x18", + "r" : "0x1fd0249dddc866e9774cab09e9b98e3d2ad53c220344bebac48dd0b7030c18ca", + "s" : "0x7873cf2734a26fa90f761d5d49352ba26fba85407697ee202862a13c3235fc3e", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e9" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "ef8478b48f03232a3c4e504fec7561d71e986fd16b2af1bbf5c4ddd44a71a704", + "mixHash" : "468a75c8640f8c6693aba8128afe14670750988d0f46a52fc22af31a1e236ea3", + "nonce" : "cc4a7424ffa563fc", + "number" : "0x01", + "parentHash" : "358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bd", + "receiptTrie" : "6aa1e44f24b69e6f3c398ed2be6eee2d8b7b57480aa2a8a9085e77d2d3d06a55", + "stateRoot" : "4325a011e3c2f9f72c35f60ca7f9915004f68c3357694aad4848bfe625c4622f", + "timestamp" : "0x561bbfa1", + "transactionsTrie" : "517131da8d5dbdce45a2a393ea59f742e9411a12431070cfe60400536d26faa9", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a0358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04325a011e3c2f9f72c35f60ca7f9915004f68c3357694aad4848bfe625c4622fa0517131da8d5dbdce45a2a393ea59f742e9411a12431070cfe60400536d26faa9a06aa1e44f24b69e6f3c398ed2be6eee2d8b7b57480aa2a8a9085e77d2d3d06a55b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bbfa180a0468a75c8640f8c6693aba8128afe14670750988d0f46a52fc22af31a1e236ea388cc4a7424ffa563fcf864f86280018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba0875b81c32db08fc17fb8917235d69b3959aeeea4e8d827d1a34a5d79aad74ad3a05abf22636cb905d225c7e65065f2f00db0810d9fca77fd6aadc6832de2dc06c6c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x875b81c32db08fc17fb8917235d69b3959aeeea4e8d827d1a34a5d79aad74ad3", + "s" : "0x5abf22636cb905d225c7e65065f2f00db0810d9fca77fd6aadc6832de2dc06c6", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "e11de6e0c967556266e90027fac53ef3b77477571226149a93c77ebf443d9c93", + "mixHash" : "54d1d3d447a7e46beae8671701dae98dbe7b18d8e501bad4029dcc2e84d8df94", + "nonce" : "0caf95752845b564", + "number" : "0x02", + "parentHash" : "ef8478b48f03232a3c4e504fec7561d71e986fd16b2af1bbf5c4ddd44a71a704", + "receiptTrie" : "ff12306239527e2507f40989c979fafbc3b8a95e2ac9d87d26e0f10fafa1da7c", + "stateRoot" : "0912289a247a213bb1fd68c3d4ad6f1c61b60ec553ef1e1fd12a3354a720cd5e", + "timestamp" : "0x561bbfa3", + "transactionsTrie" : "7a23a1b4789d236eb3edfe4709fbf0269fdc22bd08fa48799c6c9f7b0dc2fc42", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a0ef8478b48f03232a3c4e504fec7561d71e986fd16b2af1bbf5c4ddd44a71a704a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00912289a247a213bb1fd68c3d4ad6f1c61b60ec553ef1e1fd12a3354a720cd5ea07a23a1b4789d236eb3edfe4709fbf0269fdc22bd08fa48799c6c9f7b0dc2fc42a0ff12306239527e2507f40989c979fafbc3b8a95e2ac9d87d26e0f10fafa1da7cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bbfa380a054d1d3d447a7e46beae8671701dae98dbe7b18d8e501bad4029dcc2e84d8df94880caf95752845b564f864f86201018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba03751f7e63119f172bc7c7ce417c4f3570eb29a06103cdff0d5d23e537bcb6f01a0637f26bd0f382eae584404294dc9ff61c154e81696781601e791fd7e95717b2dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x3751f7e63119f172bc7c7ce417c4f3570eb29a06103cdff0d5d23e537bcb6f01", + "s" : "0x637f26bd0f382eae584404294dc9ff61c154e81696781601e791fd7e95717b2d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "d14b1003b971d6557ad6dc983ce4f5564a80f346bd67283f824f8edd22947df9", + "mixHash" : "559dcb8ce27d083a22f3da650a653e1207d3db01098cc8b86146af4593b7d1bf", + "nonce" : "82def7f84ce7eb37", + "number" : "0x03", + "parentHash" : "e11de6e0c967556266e90027fac53ef3b77477571226149a93c77ebf443d9c93", + "receiptTrie" : "079a220f268e9c199c166ecdf5cb527dee36b0b3929c01eb304698fff245fffc", + "stateRoot" : "349b5c0b55ab5a61277407ca809181275555465df79c71c5545751f7dee5438e", + "timestamp" : "0x561bbfa5", + "transactionsTrie" : "7273938d4695b5d9facfde4118ecf2262b6e4117051420c80b30aebc6ae6bca1", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a0e11de6e0c967556266e90027fac53ef3b77477571226149a93c77ebf443d9c93a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0349b5c0b55ab5a61277407ca809181275555465df79c71c5545751f7dee5438ea07273938d4695b5d9facfde4118ecf2262b6e4117051420c80b30aebc6ae6bca1a0079a220f268e9c199c166ecdf5cb527dee36b0b3929c01eb304698fff245fffcb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bbfa580a0559dcb8ce27d083a22f3da650a653e1207d3db01098cc8b86146af4593b7d1bf8882def7f84ce7eb37f864f86202018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0ccb891c1476a75413e034afd5865278640a0b5e8d24d09b8847bc93ed4901ba8a05b3b420affac6aee7b809aadf4c03c09073ba5f59826e587ea1f631d41e2a23bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0xccb891c1476a75413e034afd5865278640a0b5e8d24d09b8847bc93ed4901ba8", + "s" : "0x5b3b420affac6aee7b809aadf4c03c09073ba5f59826e587ea1f631d41e2a23b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "75da76eb313925a1dfc3a04b59118fe1335e554f7928769633c9889cdf016fd7", + "mixHash" : "97d66cfb3f8a67248b109af634e6c545b1d79266a617e5ea761a6198dcaf6631", + "nonce" : "850cebb912eb8ec1", + "number" : "0x04", + "parentHash" : "d14b1003b971d6557ad6dc983ce4f5564a80f346bd67283f824f8edd22947df9", + "receiptTrie" : "ea9bac70a18fc6caefc21d334803e07061307f51623ba0bceb5edb3bad7e9bc7", + "stateRoot" : "c1648028171f796636eab026e0744c2928f01604fc79c6fd9759e2e6b6518711", + "timestamp" : "0x561bbfa7", + "transactionsTrie" : "f414248719c341aee8a75df4004631133864eea91d9d8fd6b5109d475790f769", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a0d14b1003b971d6557ad6dc983ce4f5564a80f346bd67283f824f8edd22947df9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c1648028171f796636eab026e0744c2928f01604fc79c6fd9759e2e6b6518711a0f414248719c341aee8a75df4004631133864eea91d9d8fd6b5109d475790f769a0ea9bac70a18fc6caefc21d334803e07061307f51623ba0bceb5edb3bad7e9bc7b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bbfa780a097d66cfb3f8a67248b109af634e6c545b1d79266a617e5ea761a6198dcaf663188850cebb912eb8ec1f864f86203018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca06567ef72829bf84de45fb4ded8e5c6092c8ae4440e3da10a9564d60e62d26be2a039963c5253d34fc0f380daec19537a356ccb1dc4096b6c2f79ec4aa38850995cc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0x6567ef72829bf84de45fb4ded8e5c6092c8ae4440e3da10a9564d60e62d26be2", + "s" : "0x39963c5253d34fc0f380daec19537a356ccb1dc4096b6c2f79ec4aa38850995c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "9cfe5fe9b0b236f29687d6d6a789d92e1b9a78309f2c70db08e05c14420b13e5", + "mixHash" : "7f86bb0343a03985bc3fdae5cb76d70a65c7b425f4616fea13b326212c766e00", + "nonce" : "51faf5cbbd91d0a3", + "number" : "0x05", + "parentHash" : "75da76eb313925a1dfc3a04b59118fe1335e554f7928769633c9889cdf016fd7", + "receiptTrie" : "21f214604286d1d6cc387295903b26fb2e4d875ac396d31e8faff84bc1079386", + "stateRoot" : "a3f107f7c3dd6378c79c7efd45175c05f59c8ce9054b998a86212bfd3505cec7", + "timestamp" : "0x561bbfaa", + "transactionsTrie" : "a23e1975a13f7acc887e242cc0c6b0a0bbcc32d01783f8ee8e5f7dd068fad2d0", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "5", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a075da76eb313925a1dfc3a04b59118fe1335e554f7928769633c9889cdf016fd7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a3f107f7c3dd6378c79c7efd45175c05f59c8ce9054b998a86212bfd3505cec7a0a23e1975a13f7acc887e242cc0c6b0a0bbcc32d01783f8ee8e5f7dd068fad2d0a021f214604286d1d6cc387295903b26fb2e4d875ac396d31e8faff84bc1079386b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bbfaa80a07f86bb0343a03985bc3fdae5cb76d70a65c7b425f4616fea13b326212c766e008851faf5cbbd91d0a3f864f86204018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca059210f61dcf97fc8672fb232a4fd5a32e04a5ba4f08ee37c283cef5d57316bb9a05df5a1834a3daa586d48f50b4b3c319e77457eaac4897e591b42be1c48221fd5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0x59210f61dcf97fc8672fb232a4fd5a32e04a5ba4f08ee37c283cef5d57316bb9", + "s" : "0x5df5a1834a3daa586d48f50b4b3c319e77457eaac4897e591b42be1c48221fd5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "898833cbd2d78d12babb4af789be79a78e85c8367f110c291a18fcbf1c01ff4e", + "mixHash" : "25c8c6c2ec201d919c5c259cda8a4dcfe9be2d70b8af05dd2bc9852ac2b775d4", + "nonce" : "957eb1ab7ced548a", + "number" : "0x06", + "parentHash" : "9cfe5fe9b0b236f29687d6d6a789d92e1b9a78309f2c70db08e05c14420b13e5", + "receiptTrie" : "46995ec66ede60c732df3ddd184d897fc8994e72643dc7b024d5ef520e170def", + "stateRoot" : "7076712f646cb5ad6676ebca9dbfee179e4b0b5c35a9a153be4e2a5fb6864200", + "timestamp" : "0x561bbfab", + "transactionsTrie" : "e39aa720f7afda75d2f96a9a69be087ac66010cb23c34ff07ee8272f7705fb27", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a09cfe5fe9b0b236f29687d6d6a789d92e1b9a78309f2c70db08e05c14420b13e5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07076712f646cb5ad6676ebca9dbfee179e4b0b5c35a9a153be4e2a5fb6864200a0e39aa720f7afda75d2f96a9a69be087ac66010cb23c34ff07ee8272f7705fb27a046995ec66ede60c732df3ddd184d897fc8994e72643dc7b024d5ef520e170defb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882520884561bbfab80a025c8c6c2ec201d919c5c259cda8a4dcfe9be2d70b8af05dd2bc9852ac2b775d488957eb1ab7ced548af864f86205018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba08487a021a6ebd89e54bb97d54b2f62871ba65ae363267663ecc31bd91b6c0b81a056f0ae3898a0d9598fa3c84e17e61d48080fc5c5a76c3aa420a8e39c04e3cfa5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0x8487a021a6ebd89e54bb97d54b2f62871ba65ae363267663ecc31bd91b6c0b81", + "s" : "0x56f0ae3898a0d9598fa3c84e17e61d48080fc5c5a76c3aa420a8e39c04e3cfa5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020180", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "88b0095c85c46e89873fe5688367550f5b9124b22b9f0ffe81e934cac42cae6b", + "mixHash" : "44dbd5815cda22857bbdb9c34367d78c586e4522ac5d49c3e0f4830865f1fe1c", + "nonce" : "3b52c4fd442b3472", + "number" : "0x07", + "parentHash" : "898833cbd2d78d12babb4af789be79a78e85c8367f110c291a18fcbf1c01ff4e", + "receiptTrie" : "3320480c88a502c58c70d38d5fec7bcf1b02ba3fc30350dec9da9dc542c6f685", + "stateRoot" : "8eb9a7a83802e7e4494f5f1fc09477acfda5792020116a8bc746a899bb936d48", + "timestamp" : "0x561bbfad", + "transactionsTrie" : "53796c83ec191274702f254a1ee977424308bacc6b05bb2fef7ca2dadb816a42", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "7", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a0898833cbd2d78d12babb4af789be79a78e85c8367f110c291a18fcbf1c01ff4ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08eb9a7a83802e7e4494f5f1fc09477acfda5792020116a8bc746a899bb936d48a053796c83ec191274702f254a1ee977424308bacc6b05bb2fef7ca2dadb816a42a03320480c88a502c58c70d38d5fec7bcf1b02ba3fc30350dec9da9dc542c6f685b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882520884561bbfad80a044dbd5815cda22857bbdb9c34367d78c586e4522ac5d49c3e0f4830865f1fe1c883b52c4fd442b3472f864f86206018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0aaa981bfd2b105f76a0aef7e117ea047b01d6bb153d8729c8c9b9e89f2ec9681a049cd356a9d6641414a0b343030817f7cdb903f229484f0cd89b67164834e7000c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x06", + "r" : "0xaaa981bfd2b105f76a0aef7e117ea047b01d6bb153d8729c8c9b9e89f2ec9681", + "s" : "0x49cd356a9d6641414a0b343030817f7cdb903f229484f0cd89b67164834e7000", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0201c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "d31713bc8b61fb0bcf5999fcd86bfd93b05ea7a23937786bcfb807d7c044e902", + "mixHash" : "7de690417dbebc56868442cee39218e9bc085e0117cc12ce395ea51e4978e01e", + "nonce" : "9489086326b23864", + "number" : "0x08", + "parentHash" : "88b0095c85c46e89873fe5688367550f5b9124b22b9f0ffe81e934cac42cae6b", + "receiptTrie" : "62a54f0235cce8297a84dee2ceb88f305a9e20ee18cbb065e558c3a1d06184a0", + "stateRoot" : "cec44de1ec4cc6fb93fcff8defaa67aafe63308bcd83000608051584418fb1b0", + "timestamp" : "0x561bbfb0", + "transactionsTrie" : "88692a381e7fa4e989486fe33f3b62e79b59486c1352fbbbcbabb87eda76c9d3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "8", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a088b0095c85c46e89873fe5688367550f5b9124b22b9f0ffe81e934cac42cae6ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cec44de1ec4cc6fb93fcff8defaa67aafe63308bcd83000608051584418fb1b0a088692a381e7fa4e989486fe33f3b62e79b59486c1352fbbbcbabb87eda76c9d3a062a54f0235cce8297a84dee2ceb88f305a9e20ee18cbb065e558c3a1d06184a0b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd882520884561bbfb080a07de690417dbebc56868442cee39218e9bc085e0117cc12ce395ea51e4978e01e889489086326b23864f864f86207018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca085c3b66d064a06c9bfe05b9ebda4a55c205a84c58fdbf4a30c2b05c78bbd760fa00a2841e5e2ffbc9fa31bce28cd5f401095353c6ffeda50cc5f2aca8bd95d0efbc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x07", + "r" : "0x85c3b66d064a06c9bfe05b9ebda4a55c205a84c58fdbf4a30c2b05c78bbd760f", + "s" : "0x0a2841e5e2ffbc9fa31bce28cd5f401095353c6ffeda50cc5f2aca8bd95d0efb", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020200", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "0b6425f09ff03c381d521f4c7df0eba4d00216674bf04832111b95f2f98b7c91", + "mixHash" : "8e40b44af16aa82785d97aabed5812bb28096d32891b331aa5f64ef528357f56", + "nonce" : "60746bea82f60e2d", + "number" : "0x09", + "parentHash" : "d31713bc8b61fb0bcf5999fcd86bfd93b05ea7a23937786bcfb807d7c044e902", + "receiptTrie" : "6106f4521ccfbd1bcd193ef63c1e08bd5c29154e9ade3af77095586fc419539a", + "stateRoot" : "289e44b10542f49476c317abea6a098d334b275285c3e5e36f67f6f99b6e7422", + "timestamp" : "0x561bbfb3", + "transactionsTrie" : "d37467009fd0adf0a115dcf071d1db09207fd65b6e983ebf7a1d9e8c6a59ccc7", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "9", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a0d31713bc8b61fb0bcf5999fcd86bfd93b05ea7a23937786bcfb807d7c044e902a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0289e44b10542f49476c317abea6a098d334b275285c3e5e36f67f6f99b6e7422a0d37467009fd0adf0a115dcf071d1db09207fd65b6e983ebf7a1d9e8c6a59ccc7a06106f4521ccfbd1bcd193ef63c1e08bd5c29154e9ade3af77095586fc419539ab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd882520884561bbfb380a08e40b44af16aa82785d97aabed5812bb28096d32891b331aa5f64ef528357f568860746bea82f60e2df864f86208018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba06478c93f03fbd85df39ad8d5ecb068d7b3937fe79e4f9992b32c4d40ad58bcdfa010c92feed75a4e892ac0ece29c0a30ad71716b09fbda7c88c08474d445c4ea1dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x08", + "r" : "0x6478c93f03fbd85df39ad8d5ecb068d7b3937fe79e4f9992b32c4d40ad58bcdf", + "s" : "0x10c92feed75a4e892ac0ece29c0a30ad71716b09fbda7c88c08474d445c4ea1d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020240", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "54555a89b73d53be82079deff7ec6777a881ee9a2558ac369b8f6aaee97b27f6", + "mixHash" : "b28db32b554bcaaf0296afe451ed0dd7707132c77d259dcc24832fbaba50ace6", + "nonce" : "992ccbcc0370a0a0", + "number" : "0x0a", + "parentHash" : "0b6425f09ff03c381d521f4c7df0eba4d00216674bf04832111b95f2f98b7c91", + "receiptTrie" : "36ad16e1f3254ca91ff9bc829285719dfd7814cb4eaa8e71c2b958a811501e23", + "stateRoot" : "1494c9102ed5926f348eba68bffe0a60e1085bf9e6ce6b2aa11081fc7960440e", + "timestamp" : "0x561bbfb5", + "transactionsTrie" : "2b9d255b7f1a01db4f4bdb506a75e6664eee8cd7e386e26b295199e0e3283e62", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "10", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a00b6425f09ff03c381d521f4c7df0eba4d00216674bf04832111b95f2f98b7c91a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01494c9102ed5926f348eba68bffe0a60e1085bf9e6ce6b2aa11081fc7960440ea02b9d255b7f1a01db4f4bdb506a75e6664eee8cd7e386e26b295199e0e3283e62a036ad16e1f3254ca91ff9bc829285719dfd7814cb4eaa8e71c2b958a811501e23b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd882520884561bbfb580a0b28db32b554bcaaf0296afe451ed0dd7707132c77d259dcc24832fbaba50ace688992ccbcc0370a0a0f864f86209018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0ca81f73cf818521d6a8a43d1d3b3295215a6a6384d90234ca6d4aa954197cb05a0129533bc15c142eef56462ad9f4cd5ff6ca27605f4ba8ff7c5d411e9b1026616c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x09", + "r" : "0xca81f73cf818521d6a8a43d1d3b3295215a6a6384d90234ca6d4aa954197cb05", + "s" : "0x129533bc15c142eef56462ad9f4cd5ff6ca27605f4ba8ff7c5d411e9b1026616", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020280", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "e153abedb5bf892e593d2901a0486962296e5f86c26458978c25c9f272c50977", + "mixHash" : "395aca83399964e7670717a4d741362c5ee33ef4989a2106f2da56f026869359", + "nonce" : "7e4ebac94b4fa187", + "number" : "0x0b", + "parentHash" : "54555a89b73d53be82079deff7ec6777a881ee9a2558ac369b8f6aaee97b27f6", + "receiptTrie" : "9235fea55d5308ff7644b60cc51958887857269d9de07850f67201904a4cd46b", + "stateRoot" : "7d3cd9ad2b0a3cd7c8ee7e58f57ba7389e327ecec28b95175d90974d1623c4df", + "timestamp" : "0x561bbfb7", + "transactionsTrie" : "f1b7b7abd402152a29d6e004340908584c3c14d92e56a32727dcbb10e240877e", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "11", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a054555a89b73d53be82079deff7ec6777a881ee9a2558ac369b8f6aaee97b27f6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07d3cd9ad2b0a3cd7c8ee7e58f57ba7389e327ecec28b95175d90974d1623c4dfa0f1b7b7abd402152a29d6e004340908584c3c14d92e56a32727dcbb10e240877ea09235fea55d5308ff7644b60cc51958887857269d9de07850f67201904a4cd46bb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202800b832fefd882520884561bbfb780a0395aca83399964e7670717a4d741362c5ee33ef4989a2106f2da56f026869359887e4ebac94b4fa187f864f8620a018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0acaae457cabd616f95715626604f30e7c469de1d857dbe84478388e1475c9ceda02128dc98cf34b26da3456703fc7d164a303994b1901f1239b9b1f22af173cebfc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0a", + "r" : "0xacaae457cabd616f95715626604f30e7c469de1d857dbe84478388e1475c9ced", + "s" : "0x2128dc98cf34b26da3456703fc7d164a303994b1901f1239b9b1f22af173cebf", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0202c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "1ccf3228fb471b0d09b87d6b22cbb54b9cd0513567df70bb80926b4e70a7953f", + "mixHash" : "a0c38202a8ce8c76ceb7959c2e13d124c3df276a8fcadd3a6fa68a8bc0a0eb63", + "nonce" : "afadec8cac57e4c1", + "number" : "0x0c", + "parentHash" : "e153abedb5bf892e593d2901a0486962296e5f86c26458978c25c9f272c50977", + "receiptTrie" : "20fa2703a9e14d6122f88997c9506f5e66e140238942e9ded272a1f44d0c0aa4", + "stateRoot" : "5a8920280e8e856b48f2db2a9059e774ffe18934efa013bb213b4e12e3568bbf", + "timestamp" : "0x561bbfb8", + "transactionsTrie" : "a52f2cbd44312747b15f70c57ad232ec3d8a29df8cd16fb53c813ed6bb037192", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "12", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a0e153abedb5bf892e593d2901a0486962296e5f86c26458978c25c9f272c50977a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05a8920280e8e856b48f2db2a9059e774ffe18934efa013bb213b4e12e3568bbfa0a52f2cbd44312747b15f70c57ad232ec3d8a29df8cd16fb53c813ed6bb037192a020fa2703a9e14d6122f88997c9506f5e66e140238942e9ded272a1f44d0c0aa4b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202c00c832fefd882520884561bbfb880a0a0c38202a8ce8c76ceb7959c2e13d124c3df276a8fcadd3a6fa68a8bc0a0eb6388afadec8cac57e4c1f864f8620b018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0c3827f5f94441a7d22bff4b343924a3d09260569eb869fa9553e96147f7ff74fa04aa947c879a1edb1f097e2a218a03bb4363fc636de7b95ae4d2f26b12daf6ec3c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0b", + "r" : "0xc3827f5f94441a7d22bff4b343924a3d09260569eb869fa9553e96147f7ff74f", + "s" : "0x4aa947c879a1edb1f097e2a218a03bb4363fc636de7b95ae4d2f26b12daf6ec3", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020300", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "325002456d501a83f0ede536e86029da2e85f1040240a1fffeb801b17ade29c1", + "mixHash" : "97e82a8222245118f19522491a7ae8ac5a74e71e34d644217ac636690ab23141", + "nonce" : "7d87d830e5235632", + "number" : "0x0d", + "parentHash" : "1ccf3228fb471b0d09b87d6b22cbb54b9cd0513567df70bb80926b4e70a7953f", + "receiptTrie" : "b41d41f5dc9e2413bd2f35364185160690e61769cb708b0cb6e45f53d787eb76", + "stateRoot" : "317df0709ef7091dbc7d3153637230fc312fb271263be43a2627aaea12ddf70f", + "timestamp" : "0x561bbfba", + "transactionsTrie" : "c260a4ed42e2d514563cb63ce50ac6505b671301637d65fdf64c5d20622e087d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "13", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a01ccf3228fb471b0d09b87d6b22cbb54b9cd0513567df70bb80926b4e70a7953fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0317df0709ef7091dbc7d3153637230fc312fb271263be43a2627aaea12ddf70fa0c260a4ed42e2d514563cb63ce50ac6505b671301637d65fdf64c5d20622e087da0b41d41f5dc9e2413bd2f35364185160690e61769cb708b0cb6e45f53d787eb76b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203000d832fefd882520884561bbfba80a097e82a8222245118f19522491a7ae8ac5a74e71e34d644217ac636690ab23141887d87d830e5235632f864f8620c018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba07a1cc897dd2a447c3ad5ab0a84a7d2a8e9ad57741f4060a06d2bf540542a92e6a075ffcaf435338dbccce9d21991b7f25c159ca77eb7f3f68d29d253e28a020793c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0c", + "r" : "0x7a1cc897dd2a447c3ad5ab0a84a7d2a8e9ad57741f4060a06d2bf540542a92e6", + "s" : "0x75ffcaf435338dbccce9d21991b7f25c159ca77eb7f3f68d29d253e28a020793", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020340", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "5a1941b0f8e336339b37b9be2f6c956314a993fc359f896677f5da4de47b3c23", + "mixHash" : "8325dfb60fd2603e421de1a49afccddf7829508ef24e9ede40361b697efd0950", + "nonce" : "b9f87fa9ff70bab8", + "number" : "0x0e", + "parentHash" : "325002456d501a83f0ede536e86029da2e85f1040240a1fffeb801b17ade29c1", + "receiptTrie" : "006727b25df8d39e7c61d09aab209ed3d1f8f2934b750f5c26aa9662551f2572", + "stateRoot" : "35581d70ac97d713e3cc0aa9071a5e525b148f16fda113a3dfd04e2a986079a5", + "timestamp" : "0x561bbfbd", + "transactionsTrie" : "888abace6d2ea2dcad9f49d363b0585b27b75f361b87efb664d723ec6ecf2e66", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "14", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a0325002456d501a83f0ede536e86029da2e85f1040240a1fffeb801b17ade29c1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a035581d70ac97d713e3cc0aa9071a5e525b148f16fda113a3dfd04e2a986079a5a0888abace6d2ea2dcad9f49d363b0585b27b75f361b87efb664d723ec6ecf2e66a0006727b25df8d39e7c61d09aab209ed3d1f8f2934b750f5c26aa9662551f2572b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203400e832fefd882520884561bbfbd80a08325dfb60fd2603e421de1a49afccddf7829508ef24e9ede40361b697efd095088b9f87fa9ff70bab8f864f8620d018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca019f27620e69b8e8d19737252da03fa55d8e9faa6bf0e6ddc880ce9b0b501792ca009ebd6b3f1f0ae667e213ddcca21bc017af26d7e11c5475c8268171b3a0cfb8fc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0d", + "r" : "0x19f27620e69b8e8d19737252da03fa55d8e9faa6bf0e6ddc880ce9b0b501792c", + "s" : "0x09ebd6b3f1f0ae667e213ddcca21bc017af26d7e11c5475c8268171b3a0cfb8f", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020380", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "c6f00973a0b6eb70dfd7ce753c497f228162f07f71e98af1cd4cca1869d08a9f", + "mixHash" : "92301f937ddb524dad87be5d6f3845679b5e8fe6531eb98c47eb3c08eb7bdf3b", + "nonce" : "be7abe53785718bc", + "number" : "0x0f", + "parentHash" : "5a1941b0f8e336339b37b9be2f6c956314a993fc359f896677f5da4de47b3c23", + "receiptTrie" : "6628b2fb8a7108b258d4b4f0c2c3e161e4c6b384cfe220152da80e60cf50e9d8", + "stateRoot" : "df9c525bc69611f930e330cdf69ff6621f0d1260c0ce8925555964d93f700a4f", + "timestamp" : "0x561bbfbf", + "transactionsTrie" : "28ca66586b4bce4652aa9d251232930949ed4117a95f2748419119b973eb6190", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "15", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a05a1941b0f8e336339b37b9be2f6c956314a993fc359f896677f5da4de47b3c23a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0df9c525bc69611f930e330cdf69ff6621f0d1260c0ce8925555964d93f700a4fa028ca66586b4bce4652aa9d251232930949ed4117a95f2748419119b973eb6190a06628b2fb8a7108b258d4b4f0c2c3e161e4c6b384cfe220152da80e60cf50e9d8b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203800f832fefd882520884561bbfbf80a092301f937ddb524dad87be5d6f3845679b5e8fe6531eb98c47eb3c08eb7bdf3b88be7abe53785718bcf864f8620e018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0a991f498c34e3d89aeba3e5e6d61ed0ce9cf406c367709bb19b7608a79beff9da01aaff10adf9a63ff9afae06daa9923d4d95c45fdf5526d0bb1b54227528f0519c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0e", + "r" : "0xa991f498c34e3d89aeba3e5e6d61ed0ce9cf406c367709bb19b7608a79beff9d", + "s" : "0x1aaff10adf9a63ff9afae06daa9923d4d95c45fdf5526d0bb1b54227528f0519", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0203c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "8477df70555e209c20b3c11def3a91a3f44b6b2f276caa0edb8d61f9104a1e88", + "mixHash" : "4b41dd3fe974bcf4d858cfcd19e521eb19282649124aeb7c2c934560634be583", + "nonce" : "6a220257f2dc1f8a", + "number" : "0x10", + "parentHash" : "c6f00973a0b6eb70dfd7ce753c497f228162f07f71e98af1cd4cca1869d08a9f", + "receiptTrie" : "57da65d874f02ec5a7926ced87773db132d4c8deb793673c5aabcdcfc1aeaa72", + "stateRoot" : "b2e9b83bdfecc41b8d39c2e890ff9893d4048529078f009184e6648779eedcdb", + "timestamp" : "0x561bbfc1", + "transactionsTrie" : "4442c5a84e6423ff1d3649ed5e62b30261d8cef49fa86a7db74b0f7971516141", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "16", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a0c6f00973a0b6eb70dfd7ce753c497f228162f07f71e98af1cd4cca1869d08a9fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b2e9b83bdfecc41b8d39c2e890ff9893d4048529078f009184e6648779eedcdba04442c5a84e6423ff1d3649ed5e62b30261d8cef49fa86a7db74b0f7971516141a057da65d874f02ec5a7926ced87773db132d4c8deb793673c5aabcdcfc1aeaa72b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203c010832fefd882520884561bbfc180a04b41dd3fe974bcf4d858cfcd19e521eb19282649124aeb7c2c934560634be583886a220257f2dc1f8af864f8620f018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba093b45ffb4e937a80a79bf4158446776877ff38e3943ba1f1236bedbeaba27734a01fcb18293dd2e2b9389fa610911570b22471a37e86bf767761740e6e8338a20bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0f", + "r" : "0x93b45ffb4e937a80a79bf4158446776877ff38e3943ba1f1236bedbeaba27734", + "s" : "0x1fcb18293dd2e2b9389fa610911570b22471a37e86bf767761740e6e8338a20b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020400", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "ce610420fd40878d579e890b0d0afcfc90af71d53a004e36676821258ed7aaa3", + "mixHash" : "bcc3b3609ede09664ecc5995f72aeb244432adb96043d8065167eb4c9992262c", + "nonce" : "28f76bd2f84f99c3", + "number" : "0x11", + "parentHash" : "8477df70555e209c20b3c11def3a91a3f44b6b2f276caa0edb8d61f9104a1e88", + "receiptTrie" : "e37d38e6746ae7e6a6a80245f9858750ac8a4e4ae00f1675ac4723ec69905949", + "stateRoot" : "a2cd811c2f388b13673c43563a616b1b4fd91feef8cd352dbfa0dc016465d3db", + "timestamp" : "0x561bbfc2", + "transactionsTrie" : "7d02c4833de5fd04d27269884fb08094d64b201e0971e11b8ac16050ccc84247", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "17", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a08477df70555e209c20b3c11def3a91a3f44b6b2f276caa0edb8d61f9104a1e88a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a2cd811c2f388b13673c43563a616b1b4fd91feef8cd352dbfa0dc016465d3dba07d02c4833de5fd04d27269884fb08094d64b201e0971e11b8ac16050ccc84247a0e37d38e6746ae7e6a6a80245f9858750ac8a4e4ae00f1675ac4723ec69905949b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302040011832fefd882520884561bbfc280a0bcc3b3609ede09664ecc5995f72aeb244432adb96043d8065167eb4c9992262c8828f76bd2f84f99c3f864f86210018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca02471e07e498a2f1b174d55f6da0f50f507078a0222a9bb8f7a0973eb887ee7e4a0705ff26cac70f04e6bd8644237f2b52b8c4403f97a29b6872a821e7c62105d61c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x10", + "r" : "0x2471e07e498a2f1b174d55f6da0f50f507078a0222a9bb8f7a0973eb887ee7e4", + "s" : "0x705ff26cac70f04e6bd8644237f2b52b8c4403f97a29b6872a821e7c62105d61", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020440", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "ad141f5f3202c7fe6935d8b39a31f3109b6ebb321e852bb203424fd5af9e5054", + "mixHash" : "e3f3bc58af3df699bdcadf6b86c42da43a6dd85561350f3b2c842e82d22c2213", + "nonce" : "10df967a4dc619de", + "number" : "0x12", + "parentHash" : "ce610420fd40878d579e890b0d0afcfc90af71d53a004e36676821258ed7aaa3", + "receiptTrie" : "a30a77e85b7dcc77c08848691a367e57a0a11333697fb33ec03dcdc3660da48c", + "stateRoot" : "d6544eaa6ccb1faec8a8f8a4a0fa5fa997c2e22dce6ee595c3476bf89508c19f", + "timestamp" : "0x561bbfc4", + "transactionsTrie" : "da6fb9530ace55ca75d3d050dd7297b5114e808930e5f9f8469d64c1f5372f25", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "18", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a0ce610420fd40878d579e890b0d0afcfc90af71d53a004e36676821258ed7aaa3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d6544eaa6ccb1faec8a8f8a4a0fa5fa997c2e22dce6ee595c3476bf89508c19fa0da6fb9530ace55ca75d3d050dd7297b5114e808930e5f9f8469d64c1f5372f25a0a30a77e85b7dcc77c08848691a367e57a0a11333697fb33ec03dcdc3660da48cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302044012832fefd882520884561bbfc480a0e3f3bc58af3df699bdcadf6b86c42da43a6dd85561350f3b2c842e82d22c22138810df967a4dc619def864f86211018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca05514a0dfb3047746866a77bac4b5b63543fe5d329420e151afd59ccfe5560e5fa04a30f3bd0e2f5dffd60bbdb4e85e764a27f24f1c5250d6fef0ead227e06d1fb9c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x11", + "r" : "0x5514a0dfb3047746866a77bac4b5b63543fe5d329420e151afd59ccfe5560e5f", + "s" : "0x4a30f3bd0e2f5dffd60bbdb4e85e764a27f24f1c5250d6fef0ead227e06d1fb9", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020480", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "567297df185d86aa76e9d56cad952fc4b087ebd3ac16ebc447957964063003b4", + "mixHash" : "9783de04cec137d865f0d5c98af51ad415ce864f18f676911d4f66ba04bd3b99", + "nonce" : "69d8d28e15474112", + "number" : "0x13", + "parentHash" : "ad141f5f3202c7fe6935d8b39a31f3109b6ebb321e852bb203424fd5af9e5054", + "receiptTrie" : "eac158fad516432aa1c1de8b951cd2789dd6f21a1538e0ca213aac4ba7b60b94", + "stateRoot" : "46139e6da579185ae8edc8a336c548c69a78935ed452ac094fb067b52d151fc5", + "timestamp" : "0x561bbfc6", + "transactionsTrie" : "2c63ff1f073a6daa140f61a24227262ca6ef7e4a092449444fb220e91d5ca0a3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "19", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a0ad141f5f3202c7fe6935d8b39a31f3109b6ebb321e852bb203424fd5af9e5054a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a046139e6da579185ae8edc8a336c548c69a78935ed452ac094fb067b52d151fc5a02c63ff1f073a6daa140f61a24227262ca6ef7e4a092449444fb220e91d5ca0a3a0eac158fad516432aa1c1de8b951cd2789dd6f21a1538e0ca213aac4ba7b60b94b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302048013832fefd882520884561bbfc680a09783de04cec137d865f0d5c98af51ad415ce864f18f676911d4f66ba04bd3b998869d8d28e15474112f864f86212018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0b6854e26314681db056dbf99d9502a1acc3f29b6e533afbb340b9b64a342b0fba057d6237667f478e87862bcb902aed157e0efb39ebd9ac3a92d4f3a29726529b5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x12", + "r" : "0xb6854e26314681db056dbf99d9502a1acc3f29b6e533afbb340b9b64a342b0fb", + "s" : "0x57d6237667f478e87862bcb902aed157e0efb39ebd9ac3a92d4f3a29726529b5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0204c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "201dc3afa3b4bc2c5ea04bab32827936dd8cdeaac923f516d5298dfec87c119a", + "mixHash" : "6800a8eb4f27438f1dfe59aeacd148672148a70c51edf77271d44eae172e9cf0", + "nonce" : "15328d2e0a0a2c50", + "number" : "0x14", + "parentHash" : "567297df185d86aa76e9d56cad952fc4b087ebd3ac16ebc447957964063003b4", + "receiptTrie" : "873c7e66b781338d642def9920c795c7d0a2e71f329c9c95330dcb058e110c0a", + "stateRoot" : "697078ac4b73a28f1a6e8bab905e204676b0e0a3d7e3a5060aff1d57faa2f716", + "timestamp" : "0x561bbfcb", + "transactionsTrie" : "0fa0b5ae1009bf92e5b8e37abdcdcaf8f720096bc2989f2995f5a09f9fbf7ed8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "20", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a0567297df185d86aa76e9d56cad952fc4b087ebd3ac16ebc447957964063003b4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0697078ac4b73a28f1a6e8bab905e204676b0e0a3d7e3a5060aff1d57faa2f716a00fa0b5ae1009bf92e5b8e37abdcdcaf8f720096bc2989f2995f5a09f9fbf7ed8a0873c7e66b781338d642def9920c795c7d0a2e71f329c9c95330dcb058e110c0ab9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830204c014832fefd882520884561bbfcb80a06800a8eb4f27438f1dfe59aeacd148672148a70c51edf77271d44eae172e9cf08815328d2e0a0a2c50f864f86213018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba090a0a14f57f9a58f6b7bc6896aaa6fe31c6963a12e77586134fa167fb260aa88a03cc022425a21f3f88452b79fe24db60257ecc2ba40322eb528fb263491c9f092c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x13", + "r" : "0x90a0a14f57f9a58f6b7bc6896aaa6fe31c6963a12e77586134fa167fb260aa88", + "s" : "0x3cc022425a21f3f88452b79fe24db60257ecc2ba40322eb528fb263491c9f092", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020500", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "6e7788267828d5f2ec4dc22c5d068e806f6d9737b11f8bf0d9c04e53a3eb399b", + "mixHash" : "1e6c8236876f4316effda7a7a9f3dcd7d48a9df876f84c07d093e8f562164131", + "nonce" : "8b4968ccb888186d", + "number" : "0x15", + "parentHash" : "201dc3afa3b4bc2c5ea04bab32827936dd8cdeaac923f516d5298dfec87c119a", + "receiptTrie" : "d2d959e25fda18851cd73ad65e60c912caa5c9f7a30dd04dc76b6f1a6728da6c", + "stateRoot" : "90bc46ca204aa68f57e57617194c4996ac69727fe5629a2fd811d65e631844d6", + "timestamp" : "0x561bbfcd", + "transactionsTrie" : "5a2b4add2a566391dc24c042f83e1d5bc78dab5c306a5cccfd066096553bee67", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "21", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a0201dc3afa3b4bc2c5ea04bab32827936dd8cdeaac923f516d5298dfec87c119aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a090bc46ca204aa68f57e57617194c4996ac69727fe5629a2fd811d65e631844d6a05a2b4add2a566391dc24c042f83e1d5bc78dab5c306a5cccfd066096553bee67a0d2d959e25fda18851cd73ad65e60c912caa5c9f7a30dd04dc76b6f1a6728da6cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302050015832fefd882520884561bbfcd80a01e6c8236876f4316effda7a7a9f3dcd7d48a9df876f84c07d093e8f562164131888b4968ccb888186df864f86214018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba01e23e65a978e67928d2f04e676b6cc49d18870f47980b131ca02fc1fb9c50611a0014dc79a923af6f69c233cafd606718dd50e24d5fbda9d35587a684dc5e14628c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x14", + "r" : "0x1e23e65a978e67928d2f04e676b6cc49d18870f47980b131ca02fc1fb9c50611", + "s" : "0x014dc79a923af6f69c233cafd606718dd50e24d5fbda9d35587a684dc5e14628", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020540", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "651434fd10acfb43267d8c17be3ac8ea8c72f77263a66cfc37633e68b003a16c", + "mixHash" : "413dfd5eea7ad2ce19dccdf790c4b8b2d0fb1bd908856146517963dce5ef6539", + "nonce" : "d88ff7f3280bad0a", + "number" : "0x16", + "parentHash" : "6e7788267828d5f2ec4dc22c5d068e806f6d9737b11f8bf0d9c04e53a3eb399b", + "receiptTrie" : "ab38dca9e4f0a47549ed36cb978320225dddef9f76713d848134079b66c57ee4", + "stateRoot" : "6e51d9b39cf72798a674c10fb74eba2cc53bea60ee8c319069887e58ba35a031", + "timestamp" : "0x561bbfcf", + "transactionsTrie" : "7501f1d112c55b54919cf6af439708f2f010bdb4357516ca3646292f3ea4bfd8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "22", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a06e7788267828d5f2ec4dc22c5d068e806f6d9737b11f8bf0d9c04e53a3eb399ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a06e51d9b39cf72798a674c10fb74eba2cc53bea60ee8c319069887e58ba35a031a07501f1d112c55b54919cf6af439708f2f010bdb4357516ca3646292f3ea4bfd8a0ab38dca9e4f0a47549ed36cb978320225dddef9f76713d848134079b66c57ee4b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302054016832fefd882520884561bbfcf80a0413dfd5eea7ad2ce19dccdf790c4b8b2d0fb1bd908856146517963dce5ef653988d88ff7f3280bad0af864f86215018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca08393c27e8b1658ba9d0de41553a1f40c8d7054daf6258f17d188f525e37fabc4a006321e9df3cd7d02479a9db54eb764a27e5c78cc9f34899ff223efaad9a0b126c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x15", + "r" : "0x8393c27e8b1658ba9d0de41553a1f40c8d7054daf6258f17d188f525e37fabc4", + "s" : "0x06321e9df3cd7d02479a9db54eb764a27e5c78cc9f34899ff223efaad9a0b126", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020580", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "4e457ecb6bc798a2aa6693a7c4420924b98e077bf6a9fbd82527a0c79d63bd21", + "mixHash" : "b8dade49f05ef3f24dd073b6989491e2a8f4a5e7223981dcb8641ebba1286d2d", + "nonce" : "a5abcd1e6406c09d", + "number" : "0x17", + "parentHash" : "651434fd10acfb43267d8c17be3ac8ea8c72f77263a66cfc37633e68b003a16c", + "receiptTrie" : "95890ec65ef7e006e341431331330b6cfc9293d87f854eb908ebf9919fc93253", + "stateRoot" : "8ecc351b000c38ff0e3adf5a8383fbe5a6c80524ef8e0ead95fe3b4d34e71f08", + "timestamp" : "0x561bbfd2", + "transactionsTrie" : "bfd282d92b8e564ad1ff263f6ae03b93a069f10f00d3e723a296800a757f1ff3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "23", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a0651434fd10acfb43267d8c17be3ac8ea8c72f77263a66cfc37633e68b003a16ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08ecc351b000c38ff0e3adf5a8383fbe5a6c80524ef8e0ead95fe3b4d34e71f08a0bfd282d92b8e564ad1ff263f6ae03b93a069f10f00d3e723a296800a757f1ff3a095890ec65ef7e006e341431331330b6cfc9293d87f854eb908ebf9919fc93253b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302058017832fefd882520884561bbfd280a0b8dade49f05ef3f24dd073b6989491e2a8f4a5e7223981dcb8641ebba1286d2d88a5abcd1e6406c09df864f86216018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba0cfb1ca5f71db91c77be594c61534914f492061474bd1e580cc8e1595f4b20043a078b4cfed0c7ec633a6442ac76748146ecfe8e76702840373150104c31c8535a9c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x16", + "r" : "0xcfb1ca5f71db91c77be594c61534914f492061474bd1e580cc8e1595f4b20043", + "s" : "0x78b4cfed0c7ec633a6442ac76748146ecfe8e76702840373150104c31c8535a9", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0205c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "465a948e4bd4cb8b298b675362960fa71e03f176ebf0d150f98e4862388d9b68", + "mixHash" : "71860ba4d0d6c3047551f06ab067d6036a6a20d4ff0e816c35c892b9c3958771", + "nonce" : "c879cc4cad5b4980", + "number" : "0x18", + "parentHash" : "4e457ecb6bc798a2aa6693a7c4420924b98e077bf6a9fbd82527a0c79d63bd21", + "receiptTrie" : "9d8083550c7f882bd5de852c8b7158b1ce7514561a87fd86505b185ebfdd1666", + "stateRoot" : "15cc51eeac2abff97b7ebebc17fd16493d4f88930bfd47193276539c24ffe02e", + "timestamp" : "0x561bbfd7", + "transactionsTrie" : "26cce381fef66f447739c2d22bdd85038f492bbcb8095cd8ebc03cdfbbf12f06", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "24", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a04e457ecb6bc798a2aa6693a7c4420924b98e077bf6a9fbd82527a0c79d63bd21a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a015cc51eeac2abff97b7ebebc17fd16493d4f88930bfd47193276539c24ffe02ea026cce381fef66f447739c2d22bdd85038f492bbcb8095cd8ebc03cdfbbf12f06a09d8083550c7f882bd5de852c8b7158b1ce7514561a87fd86505b185ebfdd1666b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830205c018832fefd882520884561bbfd780a071860ba4d0d6c3047551f06ab067d6036a6a20d4ff0e816c35c892b9c395877188c879cc4cad5b4980f864f86217018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca03f77a5cf014af7e1b4a2fddeb245325e5c704e79613ac5762ef0edddf1e37424a024e43a44c6251ea8cc538fc3eb367ad3118bb94ba6ed62dd67a82f319effd397c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x17", + "r" : "0x3f77a5cf014af7e1b4a2fddeb245325e5c704e79613ac5762ef0edddf1e37424", + "s" : "0x24e43a44c6251ea8cc538fc3eb367ad3118bb94ba6ed62dd67a82f319effd397", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020600", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "567e50df8f37d3ec657ce13134b18d249de13013f416e34e0b0b252b79b8eec6", + "mixHash" : "6bb50e6e743f4b05dc5dccf167a3b9fd471a498b4d24a495197111bacae22621", + "nonce" : "b8ab83b6359d2507", + "number" : "0x19", + "parentHash" : "465a948e4bd4cb8b298b675362960fa71e03f176ebf0d150f98e4862388d9b68", + "receiptTrie" : "87cc7174f3de8f21824c90eef37c49e0dc8d83608b7937c845c3ecda608c4154", + "stateRoot" : "7d4cb6c9ac4b610d7c8c527b5f451a1e15e3334e68e47c63e1000553f289f4fd", + "timestamp" : "0x561bbfda", + "transactionsTrie" : "862388af200d7be36579403449220d237a249b6e95a43f38f7570b4294b0b1aa", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "25", + "chainname" : "DD", + "rlp" : "0xf90263f901f9a0465a948e4bd4cb8b298b675362960fa71e03f176ebf0d150f98e4862388d9b68a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07d4cb6c9ac4b610d7c8c527b5f451a1e15e3334e68e47c63e1000553f289f4fda0862388af200d7be36579403449220d237a249b6e95a43f38f7570b4294b0b1aaa087cc7174f3de8f21824c90eef37c49e0dc8d83608b7937c845c3ecda608c4154b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302060019832fefd882520884561bbfda80a06bb50e6e743f4b05dc5dccf167a3b9fd471a498b4d24a495197111bacae2262188b8ab83b6359d2507f864f86218018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822711801ca08cab7fb4eae082a55ed7d4556a0b44b6141365f38fe81373ee061d6d332c92e9a04a473a526e17a3ae326ff556ea2a177d8a6596a0b1e90b08cec3d3ab10f9486cc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x18", + "r" : "0x8cab7fb4eae082a55ed7d4556a0b44b6141365f38fe81373ee061d6d332c92e9", + "s" : "0x4a473a526e17a3ae326ff556ea2a177d8a6596a0b1e90b08cec3d3ab10f9486c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2711" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "3d63e7917bd248ff8a6014dbefe6dede426751a28a5683445e6c1bbaed6a9365", + "mixHash" : "3c802555500e64a6aa2b7d5a9fff17099e6aa06d7e5e8fa1aeaa05beefc5e9b3", + "nonce" : "5913edbe56f0bba5", + "number" : "0x01", + "parentHash" : "358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bd", + "receiptTrie" : "6aa1e44f24b69e6f3c398ed2be6eee2d8b7b57480aa2a8a9085e77d2d3d06a55", + "stateRoot" : "4325a011e3c2f9f72c35f60ca7f9915004f68c3357694aad4848bfe625c4622f", + "timestamp" : "0x561bbfdc", + "transactionsTrie" : "517131da8d5dbdce45a2a393ea59f742e9411a12431070cfe60400536d26faa9", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "E", + "rlp" : "0xf90263f901f9a0358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04325a011e3c2f9f72c35f60ca7f9915004f68c3357694aad4848bfe625c4622fa0517131da8d5dbdce45a2a393ea59f742e9411a12431070cfe60400536d26faa9a06aa1e44f24b69e6f3c398ed2be6eee2d8b7b57480aa2a8a9085e77d2d3d06a55b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bbfdc80a03c802555500e64a6aa2b7d5a9fff17099e6aa06d7e5e8fa1aeaa05beefc5e9b3885913edbe56f0bba5f864f86280018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba0875b81c32db08fc17fb8917235d69b3959aeeea4e8d827d1a34a5d79aad74ad3a05abf22636cb905d225c7e65065f2f00db0810d9fca77fd6aadc6832de2dc06c6c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x875b81c32db08fc17fb8917235d69b3959aeeea4e8d827d1a34a5d79aad74ad3", + "s" : "0x5abf22636cb905d225c7e65065f2f00db0810d9fca77fd6aadc6832de2dc06c6", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "36cb786520b7a75b8455aeae6fa3a5130655f1c568cfef93782c12f773ce04c0", + "mixHash" : "d9853dc959bff487c295ed6baf5c259ce716793d7bf37b7ce34ba622effd1833", + "nonce" : "08a55939942d368f", + "number" : "0x02", + "parentHash" : "3d63e7917bd248ff8a6014dbefe6dede426751a28a5683445e6c1bbaed6a9365", + "receiptTrie" : "ff12306239527e2507f40989c979fafbc3b8a95e2ac9d87d26e0f10fafa1da7c", + "stateRoot" : "0912289a247a213bb1fd68c3d4ad6f1c61b60ec553ef1e1fd12a3354a720cd5e", + "timestamp" : "0x561bbfde", + "transactionsTrie" : "7a23a1b4789d236eb3edfe4709fbf0269fdc22bd08fa48799c6c9f7b0dc2fc42", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "E", + "rlp" : "0xf90263f901f9a03d63e7917bd248ff8a6014dbefe6dede426751a28a5683445e6c1bbaed6a9365a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00912289a247a213bb1fd68c3d4ad6f1c61b60ec553ef1e1fd12a3354a720cd5ea07a23a1b4789d236eb3edfe4709fbf0269fdc22bd08fa48799c6c9f7b0dc2fc42a0ff12306239527e2507f40989c979fafbc3b8a95e2ac9d87d26e0f10fafa1da7cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bbfde80a0d9853dc959bff487c295ed6baf5c259ce716793d7bf37b7ce34ba622effd18338808a55939942d368ff864f86201018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba03751f7e63119f172bc7c7ce417c4f3570eb29a06103cdff0d5d23e537bcb6f01a0637f26bd0f382eae584404294dc9ff61c154e81696781601e791fd7e95717b2dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x3751f7e63119f172bc7c7ce417c4f3570eb29a06103cdff0d5d23e537bcb6f01", + "s" : "0x637f26bd0f382eae584404294dc9ff61c154e81696781601e791fd7e95717b2d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "82a53c0fba7c21fdc03038e9070de66feed76fa110a9194fbd96e2df69b42a98", + "mixHash" : "d212ea567ac51efc69a7c56d72022f7d197559f4eaedccebdf504ab099bfad82", + "nonce" : "81fd83c885631280", + "number" : "0x03", + "parentHash" : "36cb786520b7a75b8455aeae6fa3a5130655f1c568cfef93782c12f773ce04c0", + "receiptTrie" : "079a220f268e9c199c166ecdf5cb527dee36b0b3929c01eb304698fff245fffc", + "stateRoot" : "349b5c0b55ab5a61277407ca809181275555465df79c71c5545751f7dee5438e", + "timestamp" : "0x561bbfe1", + "transactionsTrie" : "7273938d4695b5d9facfde4118ecf2262b6e4117051420c80b30aebc6ae6bca1", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "E", + "rlp" : "0xf90263f901f9a036cb786520b7a75b8455aeae6fa3a5130655f1c568cfef93782c12f773ce04c0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0349b5c0b55ab5a61277407ca809181275555465df79c71c5545751f7dee5438ea07273938d4695b5d9facfde4118ecf2262b6e4117051420c80b30aebc6ae6bca1a0079a220f268e9c199c166ecdf5cb527dee36b0b3929c01eb304698fff245fffcb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bbfe180a0d212ea567ac51efc69a7c56d72022f7d197559f4eaedccebdf504ab099bfad828881fd83c885631280f864f86202018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0ccb891c1476a75413e034afd5865278640a0b5e8d24d09b8847bc93ed4901ba8a05b3b420affac6aee7b809aadf4c03c09073ba5f59826e587ea1f631d41e2a23bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0xccb891c1476a75413e034afd5865278640a0b5e8d24d09b8847bc93ed4901ba8", + "s" : "0x5b3b420affac6aee7b809aadf4c03c09073ba5f59826e587ea1f631d41e2a23b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "5aa27a1b79fd18493f7043bac06eb73c121cf8146edfb85cd424952a66bd32fd", + "mixHash" : "160633fc8481af82c805935df7569b4bda8ae0a414b004e27f41ff66f1b9b988", + "nonce" : "f33eb0042e9f532f", + "number" : "0x04", + "parentHash" : "82a53c0fba7c21fdc03038e9070de66feed76fa110a9194fbd96e2df69b42a98", + "receiptTrie" : "ea9bac70a18fc6caefc21d334803e07061307f51623ba0bceb5edb3bad7e9bc7", + "stateRoot" : "c1648028171f796636eab026e0744c2928f01604fc79c6fd9759e2e6b6518711", + "timestamp" : "0x561bbfe3", + "transactionsTrie" : "f414248719c341aee8a75df4004631133864eea91d9d8fd6b5109d475790f769", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "chainname" : "E", + "rlp" : "0xf90263f901f9a082a53c0fba7c21fdc03038e9070de66feed76fa110a9194fbd96e2df69b42a98a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c1648028171f796636eab026e0744c2928f01604fc79c6fd9759e2e6b6518711a0f414248719c341aee8a75df4004631133864eea91d9d8fd6b5109d475790f769a0ea9bac70a18fc6caefc21d334803e07061307f51623ba0bceb5edb3bad7e9bc7b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bbfe380a0160633fc8481af82c805935df7569b4bda8ae0a414b004e27f41ff66f1b9b98888f33eb0042e9f532ff864f86203018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca06567ef72829bf84de45fb4ded8e5c6092c8ae4440e3da10a9564d60e62d26be2a039963c5253d34fc0f380daec19537a356ccb1dc4096b6c2f79ec4aa38850995cc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0x6567ef72829bf84de45fb4ded8e5c6092c8ae4440e3da10a9564d60e62d26be2", + "s" : "0x39963c5253d34fc0f380daec19537a356ccb1dc4096b6c2f79ec4aa38850995c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "edf3a4eb672e988d8d1efaa60a8f7f172b02dd997b28961d42a80dbc259e592b", + "mixHash" : "d1ed562b66547a9228a4fef4ccd8d73a23d533daae0fcc2854be3a7b898911c5", + "nonce" : "27e9bbd9148977b1", + "number" : "0x05", + "parentHash" : "5aa27a1b79fd18493f7043bac06eb73c121cf8146edfb85cd424952a66bd32fd", + "receiptTrie" : "21f214604286d1d6cc387295903b26fb2e4d875ac396d31e8faff84bc1079386", + "stateRoot" : "a3f107f7c3dd6378c79c7efd45175c05f59c8ce9054b998a86212bfd3505cec7", + "timestamp" : "0x561bbfe6", + "transactionsTrie" : "a23e1975a13f7acc887e242cc0c6b0a0bbcc32d01783f8ee8e5f7dd068fad2d0", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "5", + "chainname" : "E", + "rlp" : "0xf90263f901f9a05aa27a1b79fd18493f7043bac06eb73c121cf8146edfb85cd424952a66bd32fda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a3f107f7c3dd6378c79c7efd45175c05f59c8ce9054b998a86212bfd3505cec7a0a23e1975a13f7acc887e242cc0c6b0a0bbcc32d01783f8ee8e5f7dd068fad2d0a021f214604286d1d6cc387295903b26fb2e4d875ac396d31e8faff84bc1079386b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bbfe680a0d1ed562b66547a9228a4fef4ccd8d73a23d533daae0fcc2854be3a7b898911c58827e9bbd9148977b1f864f86204018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca059210f61dcf97fc8672fb232a4fd5a32e04a5ba4f08ee37c283cef5d57316bb9a05df5a1834a3daa586d48f50b4b3c319e77457eaac4897e591b42be1c48221fd5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0x59210f61dcf97fc8672fb232a4fd5a32e04a5ba4f08ee37c283cef5d57316bb9", + "s" : "0x5df5a1834a3daa586d48f50b4b3c319e77457eaac4897e591b42be1c48221fd5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "7ab5767b7e1d2f017817c4d10701f002248b28ee8fa43822e6adef2c0d7a4f65", + "mixHash" : "93a1773da723718fca4e610abfee5da0b8f8e29b8ef719812690e7dda88b30dd", + "nonce" : "5388e1e6b89c7c3d", + "number" : "0x06", + "parentHash" : "edf3a4eb672e988d8d1efaa60a8f7f172b02dd997b28961d42a80dbc259e592b", + "receiptTrie" : "46995ec66ede60c732df3ddd184d897fc8994e72643dc7b024d5ef520e170def", + "stateRoot" : "7076712f646cb5ad6676ebca9dbfee179e4b0b5c35a9a153be4e2a5fb6864200", + "timestamp" : "0x561bbfe9", + "transactionsTrie" : "e39aa720f7afda75d2f96a9a69be087ac66010cb23c34ff07ee8272f7705fb27", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "chainname" : "E", + "rlp" : "0xf90263f901f9a0edf3a4eb672e988d8d1efaa60a8f7f172b02dd997b28961d42a80dbc259e592ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07076712f646cb5ad6676ebca9dbfee179e4b0b5c35a9a153be4e2a5fb6864200a0e39aa720f7afda75d2f96a9a69be087ac66010cb23c34ff07ee8272f7705fb27a046995ec66ede60c732df3ddd184d897fc8994e72643dc7b024d5ef520e170defb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882520884561bbfe980a093a1773da723718fca4e610abfee5da0b8f8e29b8ef719812690e7dda88b30dd885388e1e6b89c7c3df864f86205018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba08487a021a6ebd89e54bb97d54b2f62871ba65ae363267663ecc31bd91b6c0b81a056f0ae3898a0d9598fa3c84e17e61d48080fc5c5a76c3aa420a8e39c04e3cfa5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0x8487a021a6ebd89e54bb97d54b2f62871ba65ae363267663ecc31bd91b6c0b81", + "s" : "0x56f0ae3898a0d9598fa3c84e17e61d48080fc5c5a76c3aa420a8e39c04e3cfa5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020180", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "a8356c1bfff6c4d8bc04f13c0f9307af4b97f5016d255ad9feba299f8d78c01c", + "mixHash" : "b60b2cbc2ce8d8cf3c44d490b095afbc3ff2c84a3150448cf79803b5b52621c4", + "nonce" : "18365108a38a299f", + "number" : "0x07", + "parentHash" : "7ab5767b7e1d2f017817c4d10701f002248b28ee8fa43822e6adef2c0d7a4f65", + "receiptTrie" : "3320480c88a502c58c70d38d5fec7bcf1b02ba3fc30350dec9da9dc542c6f685", + "stateRoot" : "8eb9a7a83802e7e4494f5f1fc09477acfda5792020116a8bc746a899bb936d48", + "timestamp" : "0x561bbfeb", + "transactionsTrie" : "53796c83ec191274702f254a1ee977424308bacc6b05bb2fef7ca2dadb816a42", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "7", + "chainname" : "E", + "rlp" : "0xf90263f901f9a07ab5767b7e1d2f017817c4d10701f002248b28ee8fa43822e6adef2c0d7a4f65a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08eb9a7a83802e7e4494f5f1fc09477acfda5792020116a8bc746a899bb936d48a053796c83ec191274702f254a1ee977424308bacc6b05bb2fef7ca2dadb816a42a03320480c88a502c58c70d38d5fec7bcf1b02ba3fc30350dec9da9dc542c6f685b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882520884561bbfeb80a0b60b2cbc2ce8d8cf3c44d490b095afbc3ff2c84a3150448cf79803b5b52621c48818365108a38a299ff864f86206018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0aaa981bfd2b105f76a0aef7e117ea047b01d6bb153d8729c8c9b9e89f2ec9681a049cd356a9d6641414a0b343030817f7cdb903f229484f0cd89b67164834e7000c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x06", + "r" : "0xaaa981bfd2b105f76a0aef7e117ea047b01d6bb153d8729c8c9b9e89f2ec9681", + "s" : "0x49cd356a9d6641414a0b343030817f7cdb903f229484f0cd89b67164834e7000", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0201c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "03f32413d8bcb3131f35c2faaa42d5cf0e9e7ac878c8dc30c8dd97e25617bacf", + "mixHash" : "eca9343027b0e5e3857eff651a07a713a7e8add02194e68c9fdc5fea5f72eef0", + "nonce" : "8f9c01a4c9fb2b85", + "number" : "0x08", + "parentHash" : "a8356c1bfff6c4d8bc04f13c0f9307af4b97f5016d255ad9feba299f8d78c01c", + "receiptTrie" : "62a54f0235cce8297a84dee2ceb88f305a9e20ee18cbb065e558c3a1d06184a0", + "stateRoot" : "cec44de1ec4cc6fb93fcff8defaa67aafe63308bcd83000608051584418fb1b0", + "timestamp" : "0x561bbfee", + "transactionsTrie" : "88692a381e7fa4e989486fe33f3b62e79b59486c1352fbbbcbabb87eda76c9d3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "8", + "chainname" : "E", + "rlp" : "0xf90263f901f9a0a8356c1bfff6c4d8bc04f13c0f9307af4b97f5016d255ad9feba299f8d78c01ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cec44de1ec4cc6fb93fcff8defaa67aafe63308bcd83000608051584418fb1b0a088692a381e7fa4e989486fe33f3b62e79b59486c1352fbbbcbabb87eda76c9d3a062a54f0235cce8297a84dee2ceb88f305a9e20ee18cbb065e558c3a1d06184a0b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd882520884561bbfee80a0eca9343027b0e5e3857eff651a07a713a7e8add02194e68c9fdc5fea5f72eef0888f9c01a4c9fb2b85f864f86207018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca085c3b66d064a06c9bfe05b9ebda4a55c205a84c58fdbf4a30c2b05c78bbd760fa00a2841e5e2ffbc9fa31bce28cd5f401095353c6ffeda50cc5f2aca8bd95d0efbc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x07", + "r" : "0x85c3b66d064a06c9bfe05b9ebda4a55c205a84c58fdbf4a30c2b05c78bbd760f", + "s" : "0x0a2841e5e2ffbc9fa31bce28cd5f401095353c6ffeda50cc5f2aca8bd95d0efb", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020200", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "94263b6535d280d575fdf62885637d40a77d4c17ff15456ad37fb3f8afd7a41b", + "mixHash" : "264ed2deef03ed8b21257e7d79075cd23c7e22f384ec69ac8ecf3d439d8aa8f2", + "nonce" : "0a7cad2c5905366f", + "number" : "0x09", + "parentHash" : "03f32413d8bcb3131f35c2faaa42d5cf0e9e7ac878c8dc30c8dd97e25617bacf", + "receiptTrie" : "6106f4521ccfbd1bcd193ef63c1e08bd5c29154e9ade3af77095586fc419539a", + "stateRoot" : "289e44b10542f49476c317abea6a098d334b275285c3e5e36f67f6f99b6e7422", + "timestamp" : "0x561bbff0", + "transactionsTrie" : "d37467009fd0adf0a115dcf071d1db09207fd65b6e983ebf7a1d9e8c6a59ccc7", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "9", + "chainname" : "E", + "rlp" : "0xf90263f901f9a003f32413d8bcb3131f35c2faaa42d5cf0e9e7ac878c8dc30c8dd97e25617bacfa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0289e44b10542f49476c317abea6a098d334b275285c3e5e36f67f6f99b6e7422a0d37467009fd0adf0a115dcf071d1db09207fd65b6e983ebf7a1d9e8c6a59ccc7a06106f4521ccfbd1bcd193ef63c1e08bd5c29154e9ade3af77095586fc419539ab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd882520884561bbff080a0264ed2deef03ed8b21257e7d79075cd23c7e22f384ec69ac8ecf3d439d8aa8f2880a7cad2c5905366ff864f86208018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba06478c93f03fbd85df39ad8d5ecb068d7b3937fe79e4f9992b32c4d40ad58bcdfa010c92feed75a4e892ac0ece29c0a30ad71716b09fbda7c88c08474d445c4ea1dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x08", + "r" : "0x6478c93f03fbd85df39ad8d5ecb068d7b3937fe79e4f9992b32c4d40ad58bcdf", + "s" : "0x10c92feed75a4e892ac0ece29c0a30ad71716b09fbda7c88c08474d445c4ea1d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020240", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "0fcbb972091f593f383109634bc28c12b4ebd9cd8ea007891185949168a32af3", + "mixHash" : "07c9d8887a026bbfb2dcca505d655ebf05345e69aba3b02aafc5015c7da8167f", + "nonce" : "63f7343a9dbeacdf", + "number" : "0x0a", + "parentHash" : "94263b6535d280d575fdf62885637d40a77d4c17ff15456ad37fb3f8afd7a41b", + "receiptTrie" : "36ad16e1f3254ca91ff9bc829285719dfd7814cb4eaa8e71c2b958a811501e23", + "stateRoot" : "1494c9102ed5926f348eba68bffe0a60e1085bf9e6ce6b2aa11081fc7960440e", + "timestamp" : "0x561bbff2", + "transactionsTrie" : "2b9d255b7f1a01db4f4bdb506a75e6664eee8cd7e386e26b295199e0e3283e62", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "10", + "chainname" : "E", + "rlp" : "0xf90263f901f9a094263b6535d280d575fdf62885637d40a77d4c17ff15456ad37fb3f8afd7a41ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01494c9102ed5926f348eba68bffe0a60e1085bf9e6ce6b2aa11081fc7960440ea02b9d255b7f1a01db4f4bdb506a75e6664eee8cd7e386e26b295199e0e3283e62a036ad16e1f3254ca91ff9bc829285719dfd7814cb4eaa8e71c2b958a811501e23b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd882520884561bbff280a007c9d8887a026bbfb2dcca505d655ebf05345e69aba3b02aafc5015c7da8167f8863f7343a9dbeacdff864f86209018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0ca81f73cf818521d6a8a43d1d3b3295215a6a6384d90234ca6d4aa954197cb05a0129533bc15c142eef56462ad9f4cd5ff6ca27605f4ba8ff7c5d411e9b1026616c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x09", + "r" : "0xca81f73cf818521d6a8a43d1d3b3295215a6a6384d90234ca6d4aa954197cb05", + "s" : "0x129533bc15c142eef56462ad9f4cd5ff6ca27605f4ba8ff7c5d411e9b1026616", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020280", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "51fd34ebf116843edd7bf0b478fdbe0d15f8425a4bbe11b940aa4b5edd90578e", + "mixHash" : "a61865f9d649c5f870f1118530413f8e2d214cb84dcf5295b8625237f0204868", + "nonce" : "5e85a6b6ed4f943b", + "number" : "0x0b", + "parentHash" : "0fcbb972091f593f383109634bc28c12b4ebd9cd8ea007891185949168a32af3", + "receiptTrie" : "9235fea55d5308ff7644b60cc51958887857269d9de07850f67201904a4cd46b", + "stateRoot" : "7d3cd9ad2b0a3cd7c8ee7e58f57ba7389e327ecec28b95175d90974d1623c4df", + "timestamp" : "0x561bbff6", + "transactionsTrie" : "f1b7b7abd402152a29d6e004340908584c3c14d92e56a32727dcbb10e240877e", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "11", + "chainname" : "E", + "rlp" : "0xf90263f901f9a00fcbb972091f593f383109634bc28c12b4ebd9cd8ea007891185949168a32af3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07d3cd9ad2b0a3cd7c8ee7e58f57ba7389e327ecec28b95175d90974d1623c4dfa0f1b7b7abd402152a29d6e004340908584c3c14d92e56a32727dcbb10e240877ea09235fea55d5308ff7644b60cc51958887857269d9de07850f67201904a4cd46bb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202800b832fefd882520884561bbff680a0a61865f9d649c5f870f1118530413f8e2d214cb84dcf5295b8625237f0204868885e85a6b6ed4f943bf864f8620a018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0acaae457cabd616f95715626604f30e7c469de1d857dbe84478388e1475c9ceda02128dc98cf34b26da3456703fc7d164a303994b1901f1239b9b1f22af173cebfc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0a", + "r" : "0xacaae457cabd616f95715626604f30e7c469de1d857dbe84478388e1475c9ced", + "s" : "0x2128dc98cf34b26da3456703fc7d164a303994b1901f1239b9b1f22af173cebf", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0202c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "8102b087b34d55a28079ed0cbe83a7dc1a9f2bf5f37f3732bf8b488960747372", + "mixHash" : "da41cac8d0faa5830ad6e1fde941d78dee3492126ddd7013723191ddacde1853", + "nonce" : "0ac10084e3b80293", + "number" : "0x0c", + "parentHash" : "51fd34ebf116843edd7bf0b478fdbe0d15f8425a4bbe11b940aa4b5edd90578e", + "receiptTrie" : "20fa2703a9e14d6122f88997c9506f5e66e140238942e9ded272a1f44d0c0aa4", + "stateRoot" : "5a8920280e8e856b48f2db2a9059e774ffe18934efa013bb213b4e12e3568bbf", + "timestamp" : "0x561bbff8", + "transactionsTrie" : "a52f2cbd44312747b15f70c57ad232ec3d8a29df8cd16fb53c813ed6bb037192", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "12", + "chainname" : "E", + "rlp" : "0xf90263f901f9a051fd34ebf116843edd7bf0b478fdbe0d15f8425a4bbe11b940aa4b5edd90578ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05a8920280e8e856b48f2db2a9059e774ffe18934efa013bb213b4e12e3568bbfa0a52f2cbd44312747b15f70c57ad232ec3d8a29df8cd16fb53c813ed6bb037192a020fa2703a9e14d6122f88997c9506f5e66e140238942e9ded272a1f44d0c0aa4b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202c00c832fefd882520884561bbff880a0da41cac8d0faa5830ad6e1fde941d78dee3492126ddd7013723191ddacde1853880ac10084e3b80293f864f8620b018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0c3827f5f94441a7d22bff4b343924a3d09260569eb869fa9553e96147f7ff74fa04aa947c879a1edb1f097e2a218a03bb4363fc636de7b95ae4d2f26b12daf6ec3c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0b", + "r" : "0xc3827f5f94441a7d22bff4b343924a3d09260569eb869fa9553e96147f7ff74f", + "s" : "0x4aa947c879a1edb1f097e2a218a03bb4363fc636de7b95ae4d2f26b12daf6ec3", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020300", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f148cff607eed4f3f434072cee45bee50259f0690d792be80449d3517fde3f11", + "mixHash" : "aafae19069ccbe78766f2c4f6591bd7974a5238d0960c2abbe4812b4c02f1e85", + "nonce" : "dd21eaaed4b5d926", + "number" : "0x0d", + "parentHash" : "8102b087b34d55a28079ed0cbe83a7dc1a9f2bf5f37f3732bf8b488960747372", + "receiptTrie" : "b41d41f5dc9e2413bd2f35364185160690e61769cb708b0cb6e45f53d787eb76", + "stateRoot" : "317df0709ef7091dbc7d3153637230fc312fb271263be43a2627aaea12ddf70f", + "timestamp" : "0x561bbffb", + "transactionsTrie" : "c260a4ed42e2d514563cb63ce50ac6505b671301637d65fdf64c5d20622e087d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "13", + "chainname" : "E", + "rlp" : "0xf90263f901f9a08102b087b34d55a28079ed0cbe83a7dc1a9f2bf5f37f3732bf8b488960747372a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0317df0709ef7091dbc7d3153637230fc312fb271263be43a2627aaea12ddf70fa0c260a4ed42e2d514563cb63ce50ac6505b671301637d65fdf64c5d20622e087da0b41d41f5dc9e2413bd2f35364185160690e61769cb708b0cb6e45f53d787eb76b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203000d832fefd882520884561bbffb80a0aafae19069ccbe78766f2c4f6591bd7974a5238d0960c2abbe4812b4c02f1e8588dd21eaaed4b5d926f864f8620c018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba07a1cc897dd2a447c3ad5ab0a84a7d2a8e9ad57741f4060a06d2bf540542a92e6a075ffcaf435338dbccce9d21991b7f25c159ca77eb7f3f68d29d253e28a020793c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0c", + "r" : "0x7a1cc897dd2a447c3ad5ab0a84a7d2a8e9ad57741f4060a06d2bf540542a92e6", + "s" : "0x75ffcaf435338dbccce9d21991b7f25c159ca77eb7f3f68d29d253e28a020793", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020340", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "e1567045f84486da17538320ee1f9f7248fdb0fd555e06b469b0cf92d872054b", + "mixHash" : "119ba886da386c574720ad582b02ba7a537a212c6187cb8d931306e12dc366b1", + "nonce" : "5a5a74aaaa69f432", + "number" : "0x0e", + "parentHash" : "f148cff607eed4f3f434072cee45bee50259f0690d792be80449d3517fde3f11", + "receiptTrie" : "006727b25df8d39e7c61d09aab209ed3d1f8f2934b750f5c26aa9662551f2572", + "stateRoot" : "35581d70ac97d713e3cc0aa9071a5e525b148f16fda113a3dfd04e2a986079a5", + "timestamp" : "0x561bbffd", + "transactionsTrie" : "888abace6d2ea2dcad9f49d363b0585b27b75f361b87efb664d723ec6ecf2e66", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "14", + "chainname" : "E", + "rlp" : "0xf90263f901f9a0f148cff607eed4f3f434072cee45bee50259f0690d792be80449d3517fde3f11a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a035581d70ac97d713e3cc0aa9071a5e525b148f16fda113a3dfd04e2a986079a5a0888abace6d2ea2dcad9f49d363b0585b27b75f361b87efb664d723ec6ecf2e66a0006727b25df8d39e7c61d09aab209ed3d1f8f2934b750f5c26aa9662551f2572b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203400e832fefd882520884561bbffd80a0119ba886da386c574720ad582b02ba7a537a212c6187cb8d931306e12dc366b1885a5a74aaaa69f432f864f8620d018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca019f27620e69b8e8d19737252da03fa55d8e9faa6bf0e6ddc880ce9b0b501792ca009ebd6b3f1f0ae667e213ddcca21bc017af26d7e11c5475c8268171b3a0cfb8fc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0d", + "r" : "0x19f27620e69b8e8d19737252da03fa55d8e9faa6bf0e6ddc880ce9b0b501792c", + "s" : "0x09ebd6b3f1f0ae667e213ddcca21bc017af26d7e11c5475c8268171b3a0cfb8f", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020380", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "dea868dcf2f93fc4a52d3eb19e852dcc9dc4926dd4676f4e35fe92846247618c", + "mixHash" : "ab188e3dfb6f892bf5f9d40b4307c7d43753b24ecdde0fd8fbfcc0d69ad27590", + "nonce" : "728d3c5fd73a8f06", + "number" : "0x0f", + "parentHash" : "e1567045f84486da17538320ee1f9f7248fdb0fd555e06b469b0cf92d872054b", + "receiptTrie" : "6628b2fb8a7108b258d4b4f0c2c3e161e4c6b384cfe220152da80e60cf50e9d8", + "stateRoot" : "df9c525bc69611f930e330cdf69ff6621f0d1260c0ce8925555964d93f700a4f", + "timestamp" : "0x561bbffe", + "transactionsTrie" : "28ca66586b4bce4652aa9d251232930949ed4117a95f2748419119b973eb6190", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "15", + "chainname" : "E", + "rlp" : "0xf90263f901f9a0e1567045f84486da17538320ee1f9f7248fdb0fd555e06b469b0cf92d872054ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0df9c525bc69611f930e330cdf69ff6621f0d1260c0ce8925555964d93f700a4fa028ca66586b4bce4652aa9d251232930949ed4117a95f2748419119b973eb6190a06628b2fb8a7108b258d4b4f0c2c3e161e4c6b384cfe220152da80e60cf50e9d8b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203800f832fefd882520884561bbffe80a0ab188e3dfb6f892bf5f9d40b4307c7d43753b24ecdde0fd8fbfcc0d69ad2759088728d3c5fd73a8f06f864f8620e018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0a991f498c34e3d89aeba3e5e6d61ed0ce9cf406c367709bb19b7608a79beff9da01aaff10adf9a63ff9afae06daa9923d4d95c45fdf5526d0bb1b54227528f0519c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0e", + "r" : "0xa991f498c34e3d89aeba3e5e6d61ed0ce9cf406c367709bb19b7608a79beff9d", + "s" : "0x1aaff10adf9a63ff9afae06daa9923d4d95c45fdf5526d0bb1b54227528f0519", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0203c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "c1c8e7031c125780abafdc1c752e4d732a7971ec824a23af66936103f6a7b6b1", + "mixHash" : "e702bfcf253290d520ce96324167a184f7bb4b78c62b010128584310aed88f33", + "nonce" : "9b3bad630e032261", + "number" : "0x10", + "parentHash" : "dea868dcf2f93fc4a52d3eb19e852dcc9dc4926dd4676f4e35fe92846247618c", + "receiptTrie" : "57da65d874f02ec5a7926ced87773db132d4c8deb793673c5aabcdcfc1aeaa72", + "stateRoot" : "b2e9b83bdfecc41b8d39c2e890ff9893d4048529078f009184e6648779eedcdb", + "timestamp" : "0x561bc000", + "transactionsTrie" : "4442c5a84e6423ff1d3649ed5e62b30261d8cef49fa86a7db74b0f7971516141", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "16", + "chainname" : "E", + "rlp" : "0xf90263f901f9a0dea868dcf2f93fc4a52d3eb19e852dcc9dc4926dd4676f4e35fe92846247618ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b2e9b83bdfecc41b8d39c2e890ff9893d4048529078f009184e6648779eedcdba04442c5a84e6423ff1d3649ed5e62b30261d8cef49fa86a7db74b0f7971516141a057da65d874f02ec5a7926ced87773db132d4c8deb793673c5aabcdcfc1aeaa72b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203c010832fefd882520884561bc00080a0e702bfcf253290d520ce96324167a184f7bb4b78c62b010128584310aed88f33889b3bad630e032261f864f8620f018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba093b45ffb4e937a80a79bf4158446776877ff38e3943ba1f1236bedbeaba27734a01fcb18293dd2e2b9389fa610911570b22471a37e86bf767761740e6e8338a20bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0f", + "r" : "0x93b45ffb4e937a80a79bf4158446776877ff38e3943ba1f1236bedbeaba27734", + "s" : "0x1fcb18293dd2e2b9389fa610911570b22471a37e86bf767761740e6e8338a20b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020400", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "09d736dc8d64ca7f99918f446fbb1429c92db8c8d2f2ceba85463dd3c86246d9", + "mixHash" : "05311c519f154d3caaf98f84f067c82af3a640289c6247b756c6881b8957b23f", + "nonce" : "55bf396d5e9f6049", + "number" : "0x11", + "parentHash" : "c1c8e7031c125780abafdc1c752e4d732a7971ec824a23af66936103f6a7b6b1", + "receiptTrie" : "e37d38e6746ae7e6a6a80245f9858750ac8a4e4ae00f1675ac4723ec69905949", + "stateRoot" : "a2cd811c2f388b13673c43563a616b1b4fd91feef8cd352dbfa0dc016465d3db", + "timestamp" : "0x561bc003", + "transactionsTrie" : "7d02c4833de5fd04d27269884fb08094d64b201e0971e11b8ac16050ccc84247", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "17", + "chainname" : "E", + "rlp" : "0xf90263f901f9a0c1c8e7031c125780abafdc1c752e4d732a7971ec824a23af66936103f6a7b6b1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a2cd811c2f388b13673c43563a616b1b4fd91feef8cd352dbfa0dc016465d3dba07d02c4833de5fd04d27269884fb08094d64b201e0971e11b8ac16050ccc84247a0e37d38e6746ae7e6a6a80245f9858750ac8a4e4ae00f1675ac4723ec69905949b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302040011832fefd882520884561bc00380a005311c519f154d3caaf98f84f067c82af3a640289c6247b756c6881b8957b23f8855bf396d5e9f6049f864f86210018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca02471e07e498a2f1b174d55f6da0f50f507078a0222a9bb8f7a0973eb887ee7e4a0705ff26cac70f04e6bd8644237f2b52b8c4403f97a29b6872a821e7c62105d61c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x10", + "r" : "0x2471e07e498a2f1b174d55f6da0f50f507078a0222a9bb8f7a0973eb887ee7e4", + "s" : "0x705ff26cac70f04e6bd8644237f2b52b8c4403f97a29b6872a821e7c62105d61", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020440", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "8487d539897df718d05a092b8e7f68a1f6ba0068732a4d4603bdfe911b0a05ac", + "mixHash" : "668a411e5898803db508a5191e1e2bb7df39d1f7ef769d6a64c7d1fa4c834424", + "nonce" : "e369b133a9fa967b", + "number" : "0x12", + "parentHash" : "09d736dc8d64ca7f99918f446fbb1429c92db8c8d2f2ceba85463dd3c86246d9", + "receiptTrie" : "a30a77e85b7dcc77c08848691a367e57a0a11333697fb33ec03dcdc3660da48c", + "stateRoot" : "d6544eaa6ccb1faec8a8f8a4a0fa5fa997c2e22dce6ee595c3476bf89508c19f", + "timestamp" : "0x561bc005", + "transactionsTrie" : "da6fb9530ace55ca75d3d050dd7297b5114e808930e5f9f8469d64c1f5372f25", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "18", + "chainname" : "E", + "rlp" : "0xf90263f901f9a009d736dc8d64ca7f99918f446fbb1429c92db8c8d2f2ceba85463dd3c86246d9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d6544eaa6ccb1faec8a8f8a4a0fa5fa997c2e22dce6ee595c3476bf89508c19fa0da6fb9530ace55ca75d3d050dd7297b5114e808930e5f9f8469d64c1f5372f25a0a30a77e85b7dcc77c08848691a367e57a0a11333697fb33ec03dcdc3660da48cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302044012832fefd882520884561bc00580a0668a411e5898803db508a5191e1e2bb7df39d1f7ef769d6a64c7d1fa4c83442488e369b133a9fa967bf864f86211018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca05514a0dfb3047746866a77bac4b5b63543fe5d329420e151afd59ccfe5560e5fa04a30f3bd0e2f5dffd60bbdb4e85e764a27f24f1c5250d6fef0ead227e06d1fb9c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x11", + "r" : "0x5514a0dfb3047746866a77bac4b5b63543fe5d329420e151afd59ccfe5560e5f", + "s" : "0x4a30f3bd0e2f5dffd60bbdb4e85e764a27f24f1c5250d6fef0ead227e06d1fb9", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020480", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "b7e2dd649d777c2879f2aeed09a23fda5e32af139003faa919732bb0daa28ea1", + "mixHash" : "e68dd5a5ac39397bea73458bf02cbf7d99d771c38c179ef365716aea336f59b0", + "nonce" : "572c8c00a336b872", + "number" : "0x13", + "parentHash" : "8487d539897df718d05a092b8e7f68a1f6ba0068732a4d4603bdfe911b0a05ac", + "receiptTrie" : "eac158fad516432aa1c1de8b951cd2789dd6f21a1538e0ca213aac4ba7b60b94", + "stateRoot" : "46139e6da579185ae8edc8a336c548c69a78935ed452ac094fb067b52d151fc5", + "timestamp" : "0x561bc006", + "transactionsTrie" : "2c63ff1f073a6daa140f61a24227262ca6ef7e4a092449444fb220e91d5ca0a3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "19", + "chainname" : "E", + "rlp" : "0xf90263f901f9a08487d539897df718d05a092b8e7f68a1f6ba0068732a4d4603bdfe911b0a05aca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a046139e6da579185ae8edc8a336c548c69a78935ed452ac094fb067b52d151fc5a02c63ff1f073a6daa140f61a24227262ca6ef7e4a092449444fb220e91d5ca0a3a0eac158fad516432aa1c1de8b951cd2789dd6f21a1538e0ca213aac4ba7b60b94b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302048013832fefd882520884561bc00680a0e68dd5a5ac39397bea73458bf02cbf7d99d771c38c179ef365716aea336f59b088572c8c00a336b872f864f86212018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0b6854e26314681db056dbf99d9502a1acc3f29b6e533afbb340b9b64a342b0fba057d6237667f478e87862bcb902aed157e0efb39ebd9ac3a92d4f3a29726529b5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x12", + "r" : "0xb6854e26314681db056dbf99d9502a1acc3f29b6e533afbb340b9b64a342b0fb", + "s" : "0x57d6237667f478e87862bcb902aed157e0efb39ebd9ac3a92d4f3a29726529b5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0204c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "c09d264e11f5381c3fdebba6089f12b9818587f39fa139dcf11bdd419c2e88d5", + "mixHash" : "9c76347ed5e26fe1102c3b65d4562342f5f42b42f592a9f7c5a25b3fbbbbe706", + "nonce" : "19659d5dd165e1c0", + "number" : "0x14", + "parentHash" : "b7e2dd649d777c2879f2aeed09a23fda5e32af139003faa919732bb0daa28ea1", + "receiptTrie" : "873c7e66b781338d642def9920c795c7d0a2e71f329c9c95330dcb058e110c0a", + "stateRoot" : "697078ac4b73a28f1a6e8bab905e204676b0e0a3d7e3a5060aff1d57faa2f716", + "timestamp" : "0x561bc009", + "transactionsTrie" : "0fa0b5ae1009bf92e5b8e37abdcdcaf8f720096bc2989f2995f5a09f9fbf7ed8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "20", + "chainname" : "E", + "rlp" : "0xf90263f901f9a0b7e2dd649d777c2879f2aeed09a23fda5e32af139003faa919732bb0daa28ea1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0697078ac4b73a28f1a6e8bab905e204676b0e0a3d7e3a5060aff1d57faa2f716a00fa0b5ae1009bf92e5b8e37abdcdcaf8f720096bc2989f2995f5a09f9fbf7ed8a0873c7e66b781338d642def9920c795c7d0a2e71f329c9c95330dcb058e110c0ab9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830204c014832fefd882520884561bc00980a09c76347ed5e26fe1102c3b65d4562342f5f42b42f592a9f7c5a25b3fbbbbe7068819659d5dd165e1c0f864f86213018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba090a0a14f57f9a58f6b7bc6896aaa6fe31c6963a12e77586134fa167fb260aa88a03cc022425a21f3f88452b79fe24db60257ecc2ba40322eb528fb263491c9f092c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x13", + "r" : "0x90a0a14f57f9a58f6b7bc6896aaa6fe31c6963a12e77586134fa167fb260aa88", + "s" : "0x3cc022425a21f3f88452b79fe24db60257ecc2ba40322eb528fb263491c9f092", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020500", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "1d2b6d5e0eea33763a58385248de75b13ed780f7b51dc04af57d5f5326cd0015", + "mixHash" : "4989eae2760d0ad2e32a55dddcc46f89efc76e19022f33aa46bbeaf3e270e585", + "nonce" : "9ff001a1b6baae54", + "number" : "0x15", + "parentHash" : "c09d264e11f5381c3fdebba6089f12b9818587f39fa139dcf11bdd419c2e88d5", + "receiptTrie" : "d2d959e25fda18851cd73ad65e60c912caa5c9f7a30dd04dc76b6f1a6728da6c", + "stateRoot" : "90bc46ca204aa68f57e57617194c4996ac69727fe5629a2fd811d65e631844d6", + "timestamp" : "0x561bc00b", + "transactionsTrie" : "5a2b4add2a566391dc24c042f83e1d5bc78dab5c306a5cccfd066096553bee67", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "21", + "chainname" : "E", + "rlp" : "0xf90263f901f9a0c09d264e11f5381c3fdebba6089f12b9818587f39fa139dcf11bdd419c2e88d5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a090bc46ca204aa68f57e57617194c4996ac69727fe5629a2fd811d65e631844d6a05a2b4add2a566391dc24c042f83e1d5bc78dab5c306a5cccfd066096553bee67a0d2d959e25fda18851cd73ad65e60c912caa5c9f7a30dd04dc76b6f1a6728da6cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302050015832fefd882520884561bc00b80a04989eae2760d0ad2e32a55dddcc46f89efc76e19022f33aa46bbeaf3e270e585889ff001a1b6baae54f864f86214018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba01e23e65a978e67928d2f04e676b6cc49d18870f47980b131ca02fc1fb9c50611a0014dc79a923af6f69c233cafd606718dd50e24d5fbda9d35587a684dc5e14628c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x14", + "r" : "0x1e23e65a978e67928d2f04e676b6cc49d18870f47980b131ca02fc1fb9c50611", + "s" : "0x014dc79a923af6f69c233cafd606718dd50e24d5fbda9d35587a684dc5e14628", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020540", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "09f0359dfc9d2c5b6006d02d9e09d0b2096825dd07b096ed1f54c242dc768880", + "mixHash" : "ae280af4cf2a94b29611f3e6f577bbf2c11c38f2ed01576bab8af0845dca547e", + "nonce" : "5bc6b912905698a9", + "number" : "0x16", + "parentHash" : "1d2b6d5e0eea33763a58385248de75b13ed780f7b51dc04af57d5f5326cd0015", + "receiptTrie" : "ab38dca9e4f0a47549ed36cb978320225dddef9f76713d848134079b66c57ee4", + "stateRoot" : "6e51d9b39cf72798a674c10fb74eba2cc53bea60ee8c319069887e58ba35a031", + "timestamp" : "0x561bc00e", + "transactionsTrie" : "7501f1d112c55b54919cf6af439708f2f010bdb4357516ca3646292f3ea4bfd8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "22", + "chainname" : "E", + "rlp" : "0xf90263f901f9a01d2b6d5e0eea33763a58385248de75b13ed780f7b51dc04af57d5f5326cd0015a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a06e51d9b39cf72798a674c10fb74eba2cc53bea60ee8c319069887e58ba35a031a07501f1d112c55b54919cf6af439708f2f010bdb4357516ca3646292f3ea4bfd8a0ab38dca9e4f0a47549ed36cb978320225dddef9f76713d848134079b66c57ee4b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302054016832fefd882520884561bc00e80a0ae280af4cf2a94b29611f3e6f577bbf2c11c38f2ed01576bab8af0845dca547e885bc6b912905698a9f864f86215018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca08393c27e8b1658ba9d0de41553a1f40c8d7054daf6258f17d188f525e37fabc4a006321e9df3cd7d02479a9db54eb764a27e5c78cc9f34899ff223efaad9a0b126c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x15", + "r" : "0x8393c27e8b1658ba9d0de41553a1f40c8d7054daf6258f17d188f525e37fabc4", + "s" : "0x06321e9df3cd7d02479a9db54eb764a27e5c78cc9f34899ff223efaad9a0b126", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020580", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f840cc483be93f5001e131ce41e74e141b73b1417d9549f763d22460fb5cff4b", + "mixHash" : "099ddf4fbcdf32aec7557b30f6ff3170d00db5dd1961290e7a2f218f7f765125", + "nonce" : "4e2139d4bf98850f", + "number" : "0x17", + "parentHash" : "09f0359dfc9d2c5b6006d02d9e09d0b2096825dd07b096ed1f54c242dc768880", + "receiptTrie" : "95890ec65ef7e006e341431331330b6cfc9293d87f854eb908ebf9919fc93253", + "stateRoot" : "8ecc351b000c38ff0e3adf5a8383fbe5a6c80524ef8e0ead95fe3b4d34e71f08", + "timestamp" : "0x561bc010", + "transactionsTrie" : "bfd282d92b8e564ad1ff263f6ae03b93a069f10f00d3e723a296800a757f1ff3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "23", + "chainname" : "E", + "rlp" : "0xf90263f901f9a009f0359dfc9d2c5b6006d02d9e09d0b2096825dd07b096ed1f54c242dc768880a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08ecc351b000c38ff0e3adf5a8383fbe5a6c80524ef8e0ead95fe3b4d34e71f08a0bfd282d92b8e564ad1ff263f6ae03b93a069f10f00d3e723a296800a757f1ff3a095890ec65ef7e006e341431331330b6cfc9293d87f854eb908ebf9919fc93253b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302058017832fefd882520884561bc01080a0099ddf4fbcdf32aec7557b30f6ff3170d00db5dd1961290e7a2f218f7f765125884e2139d4bf98850ff864f86216018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba0cfb1ca5f71db91c77be594c61534914f492061474bd1e580cc8e1595f4b20043a078b4cfed0c7ec633a6442ac76748146ecfe8e76702840373150104c31c8535a9c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x16", + "r" : "0xcfb1ca5f71db91c77be594c61534914f492061474bd1e580cc8e1595f4b20043", + "s" : "0x78b4cfed0c7ec633a6442ac76748146ecfe8e76702840373150104c31c8535a9", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0205c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "45d68ca378ea174e4e3e0e1429cc5972cc101c796a8a98088c319b38325d0877", + "mixHash" : "4931875e984910540624567874cafc25ae46037bc08301658419bceadec4d478", + "nonce" : "1e6aa82e9e60aa09", + "number" : "0x18", + "parentHash" : "f840cc483be93f5001e131ce41e74e141b73b1417d9549f763d22460fb5cff4b", + "receiptTrie" : "9d8083550c7f882bd5de852c8b7158b1ce7514561a87fd86505b185ebfdd1666", + "stateRoot" : "15cc51eeac2abff97b7ebebc17fd16493d4f88930bfd47193276539c24ffe02e", + "timestamp" : "0x561bc012", + "transactionsTrie" : "26cce381fef66f447739c2d22bdd85038f492bbcb8095cd8ebc03cdfbbf12f06", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "24", + "chainname" : "E", + "rlp" : "0xf90263f901f9a0f840cc483be93f5001e131ce41e74e141b73b1417d9549f763d22460fb5cff4ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a015cc51eeac2abff97b7ebebc17fd16493d4f88930bfd47193276539c24ffe02ea026cce381fef66f447739c2d22bdd85038f492bbcb8095cd8ebc03cdfbbf12f06a09d8083550c7f882bd5de852c8b7158b1ce7514561a87fd86505b185ebfdd1666b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830205c018832fefd882520884561bc01280a04931875e984910540624567874cafc25ae46037bc08301658419bceadec4d478881e6aa82e9e60aa09f864f86217018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca03f77a5cf014af7e1b4a2fddeb245325e5c704e79613ac5762ef0edddf1e37424a024e43a44c6251ea8cc538fc3eb367ad3118bb94ba6ed62dd67a82f319effd397c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x17", + "r" : "0x3f77a5cf014af7e1b4a2fddeb245325e5c704e79613ac5762ef0edddf1e37424", + "s" : "0x24e43a44c6251ea8cc538fc3eb367ad3118bb94ba6ed62dd67a82f319effd397", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020600", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "169b63575cf32f4454c52799c73eec5a3ad8410c9fe7de24246f5bf1dba71896", + "mixHash" : "1c91367d5ca4d8ac2f29b6f71376c4070935279bd17d9e6649851ca4525794ee", + "nonce" : "121098750a0afaba", + "number" : "0x19", + "parentHash" : "45d68ca378ea174e4e3e0e1429cc5972cc101c796a8a98088c319b38325d0877", + "receiptTrie" : "eb7887eaa499dde42171f751592624b7d413bde1fcfd53c7347f8eb24cbb9197", + "stateRoot" : "5744f3e2cdb791415a8b86d8738a1c11226adcf634910108290029fae6346304", + "timestamp" : "0x561bc013", + "transactionsTrie" : "c66c63f770e19629d90a454895087c4ba3253f40cadce99ab0aef71074b378b8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "25", + "chainname" : "E", + "rlp" : "0xf90263f901f9a045d68ca378ea174e4e3e0e1429cc5972cc101c796a8a98088c319b38325d0877a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05744f3e2cdb791415a8b86d8738a1c11226adcf634910108290029fae6346304a0c66c63f770e19629d90a454895087c4ba3253f40cadce99ab0aef71074b378b8a0eb7887eaa499dde42171f751592624b7d413bde1fcfd53c7347f8eb24cbb9197b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302060019832fefd882520884561bc01380a01c91367d5ca4d8ac2f29b6f71376c4070935279bd17d9e6649851ca4525794ee88121098750a0afabaf864f86218018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822712801ca0b2bd80d152d23c7a70cb9a7561c975ce52c45a43534fdb9b19226e943bd1af84a062e0d267a22b88c64f848c5ccc725fb0d25c83e0c3cea19da824ac143df3cb1cc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x18", + "r" : "0xb2bd80d152d23c7a70cb9a7561c975ce52c45a43534fdb9b19226e943bd1af84", + "s" : "0x62e0d267a22b88c64f848c5ccc725fb0d25c83e0c3cea19da824ac143df3cb1c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2712" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "15e9939e5ffefbde90f29d7b1da91205aca6532da0ccb4f63244cad39373054c", + "mixHash" : "04324f81f96f6219d7813ffa1597886a0b965f83b5d27950e1daf5cd60c0e03d", + "nonce" : "c5374d1f57c881c7", + "number" : "0x01", + "parentHash" : "358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bd", + "receiptTrie" : "6aa1e44f24b69e6f3c398ed2be6eee2d8b7b57480aa2a8a9085e77d2d3d06a55", + "stateRoot" : "4325a011e3c2f9f72c35f60ca7f9915004f68c3357694aad4848bfe625c4622f", + "timestamp" : "0x561bc015", + "transactionsTrie" : "517131da8d5dbdce45a2a393ea59f742e9411a12431070cfe60400536d26faa9", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "F", + "rlp" : "0xf90263f901f9a0358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04325a011e3c2f9f72c35f60ca7f9915004f68c3357694aad4848bfe625c4622fa0517131da8d5dbdce45a2a393ea59f742e9411a12431070cfe60400536d26faa9a06aa1e44f24b69e6f3c398ed2be6eee2d8b7b57480aa2a8a9085e77d2d3d06a55b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc01580a004324f81f96f6219d7813ffa1597886a0b965f83b5d27950e1daf5cd60c0e03d88c5374d1f57c881c7f864f86280018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba0875b81c32db08fc17fb8917235d69b3959aeeea4e8d827d1a34a5d79aad74ad3a05abf22636cb905d225c7e65065f2f00db0810d9fca77fd6aadc6832de2dc06c6c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x875b81c32db08fc17fb8917235d69b3959aeeea4e8d827d1a34a5d79aad74ad3", + "s" : "0x5abf22636cb905d225c7e65065f2f00db0810d9fca77fd6aadc6832de2dc06c6", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "1e2545789d73bebc384884e7ce4eae4ad9605eb8d391ba47ead824a21ab0c023", + "mixHash" : "294b9093cecbd981c897d1b667acb751085670961b6fd739910da9bf7573620f", + "nonce" : "30609e16bc6b352e", + "number" : "0x02", + "parentHash" : "15e9939e5ffefbde90f29d7b1da91205aca6532da0ccb4f63244cad39373054c", + "receiptTrie" : "ff12306239527e2507f40989c979fafbc3b8a95e2ac9d87d26e0f10fafa1da7c", + "stateRoot" : "0912289a247a213bb1fd68c3d4ad6f1c61b60ec553ef1e1fd12a3354a720cd5e", + "timestamp" : "0x561bc017", + "transactionsTrie" : "7a23a1b4789d236eb3edfe4709fbf0269fdc22bd08fa48799c6c9f7b0dc2fc42", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "F", + "rlp" : "0xf90263f901f9a015e9939e5ffefbde90f29d7b1da91205aca6532da0ccb4f63244cad39373054ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00912289a247a213bb1fd68c3d4ad6f1c61b60ec553ef1e1fd12a3354a720cd5ea07a23a1b4789d236eb3edfe4709fbf0269fdc22bd08fa48799c6c9f7b0dc2fc42a0ff12306239527e2507f40989c979fafbc3b8a95e2ac9d87d26e0f10fafa1da7cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc01780a0294b9093cecbd981c897d1b667acb751085670961b6fd739910da9bf7573620f8830609e16bc6b352ef864f86201018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba03751f7e63119f172bc7c7ce417c4f3570eb29a06103cdff0d5d23e537bcb6f01a0637f26bd0f382eae584404294dc9ff61c154e81696781601e791fd7e95717b2dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x3751f7e63119f172bc7c7ce417c4f3570eb29a06103cdff0d5d23e537bcb6f01", + "s" : "0x637f26bd0f382eae584404294dc9ff61c154e81696781601e791fd7e95717b2d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "3410ff758ef92c35995e2006e07a4eeef8c93aadf3c8ca6eead49b3b3142b1af", + "mixHash" : "f996f97ddb6f01bcfff322a83c57413d0bd65e33d70375ef0b308712086b27c4", + "nonce" : "9cc1710b8f10ac02", + "number" : "0x03", + "parentHash" : "1e2545789d73bebc384884e7ce4eae4ad9605eb8d391ba47ead824a21ab0c023", + "receiptTrie" : "079a220f268e9c199c166ecdf5cb527dee36b0b3929c01eb304698fff245fffc", + "stateRoot" : "349b5c0b55ab5a61277407ca809181275555465df79c71c5545751f7dee5438e", + "timestamp" : "0x561bc018", + "transactionsTrie" : "7273938d4695b5d9facfde4118ecf2262b6e4117051420c80b30aebc6ae6bca1", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "F", + "rlp" : "0xf90263f901f9a01e2545789d73bebc384884e7ce4eae4ad9605eb8d391ba47ead824a21ab0c023a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0349b5c0b55ab5a61277407ca809181275555465df79c71c5545751f7dee5438ea07273938d4695b5d9facfde4118ecf2262b6e4117051420c80b30aebc6ae6bca1a0079a220f268e9c199c166ecdf5cb527dee36b0b3929c01eb304698fff245fffcb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc01880a0f996f97ddb6f01bcfff322a83c57413d0bd65e33d70375ef0b308712086b27c4889cc1710b8f10ac02f864f86202018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0ccb891c1476a75413e034afd5865278640a0b5e8d24d09b8847bc93ed4901ba8a05b3b420affac6aee7b809aadf4c03c09073ba5f59826e587ea1f631d41e2a23bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0xccb891c1476a75413e034afd5865278640a0b5e8d24d09b8847bc93ed4901ba8", + "s" : "0x5b3b420affac6aee7b809aadf4c03c09073ba5f59826e587ea1f631d41e2a23b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f0928054c8f6f4cad2439c3b381479a2da86dfede1eba7c52bd27df9708e31a9", + "mixHash" : "f55eb4f620aa6e2177a9ba7951bd72b4602d8f51b5281b8a3891045e95671d4b", + "nonce" : "4e040c777bbcc583", + "number" : "0x04", + "parentHash" : "3410ff758ef92c35995e2006e07a4eeef8c93aadf3c8ca6eead49b3b3142b1af", + "receiptTrie" : "ea9bac70a18fc6caefc21d334803e07061307f51623ba0bceb5edb3bad7e9bc7", + "stateRoot" : "c1648028171f796636eab026e0744c2928f01604fc79c6fd9759e2e6b6518711", + "timestamp" : "0x561bc01a", + "transactionsTrie" : "f414248719c341aee8a75df4004631133864eea91d9d8fd6b5109d475790f769", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "chainname" : "F", + "rlp" : "0xf90263f901f9a03410ff758ef92c35995e2006e07a4eeef8c93aadf3c8ca6eead49b3b3142b1afa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c1648028171f796636eab026e0744c2928f01604fc79c6fd9759e2e6b6518711a0f414248719c341aee8a75df4004631133864eea91d9d8fd6b5109d475790f769a0ea9bac70a18fc6caefc21d334803e07061307f51623ba0bceb5edb3bad7e9bc7b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc01a80a0f55eb4f620aa6e2177a9ba7951bd72b4602d8f51b5281b8a3891045e95671d4b884e040c777bbcc583f864f86203018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca06567ef72829bf84de45fb4ded8e5c6092c8ae4440e3da10a9564d60e62d26be2a039963c5253d34fc0f380daec19537a356ccb1dc4096b6c2f79ec4aa38850995cc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0x6567ef72829bf84de45fb4ded8e5c6092c8ae4440e3da10a9564d60e62d26be2", + "s" : "0x39963c5253d34fc0f380daec19537a356ccb1dc4096b6c2f79ec4aa38850995c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "947876d160a11130734a25ca09850e99422f782e6bc50af58682003c995632bb", + "mixHash" : "1c113bec44402419b00a377d04123facd79a5cc06f2b2919b56c4e43ba3d2f8c", + "nonce" : "79e16543f4089894", + "number" : "0x05", + "parentHash" : "f0928054c8f6f4cad2439c3b381479a2da86dfede1eba7c52bd27df9708e31a9", + "receiptTrie" : "21f214604286d1d6cc387295903b26fb2e4d875ac396d31e8faff84bc1079386", + "stateRoot" : "a3f107f7c3dd6378c79c7efd45175c05f59c8ce9054b998a86212bfd3505cec7", + "timestamp" : "0x561bc01d", + "transactionsTrie" : "a23e1975a13f7acc887e242cc0c6b0a0bbcc32d01783f8ee8e5f7dd068fad2d0", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "5", + "chainname" : "F", + "rlp" : "0xf90263f901f9a0f0928054c8f6f4cad2439c3b381479a2da86dfede1eba7c52bd27df9708e31a9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a3f107f7c3dd6378c79c7efd45175c05f59c8ce9054b998a86212bfd3505cec7a0a23e1975a13f7acc887e242cc0c6b0a0bbcc32d01783f8ee8e5f7dd068fad2d0a021f214604286d1d6cc387295903b26fb2e4d875ac396d31e8faff84bc1079386b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bc01d80a01c113bec44402419b00a377d04123facd79a5cc06f2b2919b56c4e43ba3d2f8c8879e16543f4089894f864f86204018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca059210f61dcf97fc8672fb232a4fd5a32e04a5ba4f08ee37c283cef5d57316bb9a05df5a1834a3daa586d48f50b4b3c319e77457eaac4897e591b42be1c48221fd5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0x59210f61dcf97fc8672fb232a4fd5a32e04a5ba4f08ee37c283cef5d57316bb9", + "s" : "0x5df5a1834a3daa586d48f50b4b3c319e77457eaac4897e591b42be1c48221fd5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "dbfa7031dc04f1858f415571e72bf6ece336faf723d807a21f26ff1039473857", + "mixHash" : "5ee63ab1555a905445af9a263eaba7e29c173345f3973d01cfdf6e1897996f64", + "nonce" : "87d9819a1b1c2df6", + "number" : "0x06", + "parentHash" : "947876d160a11130734a25ca09850e99422f782e6bc50af58682003c995632bb", + "receiptTrie" : "46995ec66ede60c732df3ddd184d897fc8994e72643dc7b024d5ef520e170def", + "stateRoot" : "7076712f646cb5ad6676ebca9dbfee179e4b0b5c35a9a153be4e2a5fb6864200", + "timestamp" : "0x561bc020", + "transactionsTrie" : "e39aa720f7afda75d2f96a9a69be087ac66010cb23c34ff07ee8272f7705fb27", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "chainname" : "F", + "rlp" : "0xf90263f901f9a0947876d160a11130734a25ca09850e99422f782e6bc50af58682003c995632bba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07076712f646cb5ad6676ebca9dbfee179e4b0b5c35a9a153be4e2a5fb6864200a0e39aa720f7afda75d2f96a9a69be087ac66010cb23c34ff07ee8272f7705fb27a046995ec66ede60c732df3ddd184d897fc8994e72643dc7b024d5ef520e170defb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882520884561bc02080a05ee63ab1555a905445af9a263eaba7e29c173345f3973d01cfdf6e1897996f648887d9819a1b1c2df6f864f86205018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba08487a021a6ebd89e54bb97d54b2f62871ba65ae363267663ecc31bd91b6c0b81a056f0ae3898a0d9598fa3c84e17e61d48080fc5c5a76c3aa420a8e39c04e3cfa5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0x8487a021a6ebd89e54bb97d54b2f62871ba65ae363267663ecc31bd91b6c0b81", + "s" : "0x56f0ae3898a0d9598fa3c84e17e61d48080fc5c5a76c3aa420a8e39c04e3cfa5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020180", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "3c112348e4ad160d88f00a02e7388cc56d57fdf06f0d86549462dec804e8332f", + "mixHash" : "9178f1667cb856c59b342e071cf16037e2f6c94a77cd78768ee06a8c2fafe6c9", + "nonce" : "3b089f6ab2b43133", + "number" : "0x07", + "parentHash" : "dbfa7031dc04f1858f415571e72bf6ece336faf723d807a21f26ff1039473857", + "receiptTrie" : "3320480c88a502c58c70d38d5fec7bcf1b02ba3fc30350dec9da9dc542c6f685", + "stateRoot" : "8eb9a7a83802e7e4494f5f1fc09477acfda5792020116a8bc746a899bb936d48", + "timestamp" : "0x561bc022", + "transactionsTrie" : "53796c83ec191274702f254a1ee977424308bacc6b05bb2fef7ca2dadb816a42", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "7", + "chainname" : "F", + "rlp" : "0xf90263f901f9a0dbfa7031dc04f1858f415571e72bf6ece336faf723d807a21f26ff1039473857a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08eb9a7a83802e7e4494f5f1fc09477acfda5792020116a8bc746a899bb936d48a053796c83ec191274702f254a1ee977424308bacc6b05bb2fef7ca2dadb816a42a03320480c88a502c58c70d38d5fec7bcf1b02ba3fc30350dec9da9dc542c6f685b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882520884561bc02280a09178f1667cb856c59b342e071cf16037e2f6c94a77cd78768ee06a8c2fafe6c9883b089f6ab2b43133f864f86206018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0aaa981bfd2b105f76a0aef7e117ea047b01d6bb153d8729c8c9b9e89f2ec9681a049cd356a9d6641414a0b343030817f7cdb903f229484f0cd89b67164834e7000c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x06", + "r" : "0xaaa981bfd2b105f76a0aef7e117ea047b01d6bb153d8729c8c9b9e89f2ec9681", + "s" : "0x49cd356a9d6641414a0b343030817f7cdb903f229484f0cd89b67164834e7000", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0201c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "29874878c6c625fd5faf50fd4efaf7bb87a741f8c06fa4b5cf5c3680b6e484f2", + "mixHash" : "6838aa92285743bdc76837f51cd3b66417b0b99953944fa7adef8bd834a2b9e1", + "nonce" : "a2bc60a012e7c385", + "number" : "0x08", + "parentHash" : "3c112348e4ad160d88f00a02e7388cc56d57fdf06f0d86549462dec804e8332f", + "receiptTrie" : "62a54f0235cce8297a84dee2ceb88f305a9e20ee18cbb065e558c3a1d06184a0", + "stateRoot" : "cec44de1ec4cc6fb93fcff8defaa67aafe63308bcd83000608051584418fb1b0", + "timestamp" : "0x561bc024", + "transactionsTrie" : "88692a381e7fa4e989486fe33f3b62e79b59486c1352fbbbcbabb87eda76c9d3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "8", + "chainname" : "F", + "rlp" : "0xf90263f901f9a03c112348e4ad160d88f00a02e7388cc56d57fdf06f0d86549462dec804e8332fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cec44de1ec4cc6fb93fcff8defaa67aafe63308bcd83000608051584418fb1b0a088692a381e7fa4e989486fe33f3b62e79b59486c1352fbbbcbabb87eda76c9d3a062a54f0235cce8297a84dee2ceb88f305a9e20ee18cbb065e558c3a1d06184a0b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd882520884561bc02480a06838aa92285743bdc76837f51cd3b66417b0b99953944fa7adef8bd834a2b9e188a2bc60a012e7c385f864f86207018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca085c3b66d064a06c9bfe05b9ebda4a55c205a84c58fdbf4a30c2b05c78bbd760fa00a2841e5e2ffbc9fa31bce28cd5f401095353c6ffeda50cc5f2aca8bd95d0efbc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x07", + "r" : "0x85c3b66d064a06c9bfe05b9ebda4a55c205a84c58fdbf4a30c2b05c78bbd760f", + "s" : "0x0a2841e5e2ffbc9fa31bce28cd5f401095353c6ffeda50cc5f2aca8bd95d0efb", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020200", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "5de248d602207b69705d352f27bbf55546485eee6f32deb4ce4fbe2895a80412", + "mixHash" : "06d359c408a41f1a9b931d0b435854e3f27440f17f4f1dce7bbd3899b5a603dc", + "nonce" : "dfedf7e9f7307bdc", + "number" : "0x09", + "parentHash" : "29874878c6c625fd5faf50fd4efaf7bb87a741f8c06fa4b5cf5c3680b6e484f2", + "receiptTrie" : "6106f4521ccfbd1bcd193ef63c1e08bd5c29154e9ade3af77095586fc419539a", + "stateRoot" : "289e44b10542f49476c317abea6a098d334b275285c3e5e36f67f6f99b6e7422", + "timestamp" : "0x561bc028", + "transactionsTrie" : "d37467009fd0adf0a115dcf071d1db09207fd65b6e983ebf7a1d9e8c6a59ccc7", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "9", + "chainname" : "F", + "rlp" : "0xf90263f901f9a029874878c6c625fd5faf50fd4efaf7bb87a741f8c06fa4b5cf5c3680b6e484f2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0289e44b10542f49476c317abea6a098d334b275285c3e5e36f67f6f99b6e7422a0d37467009fd0adf0a115dcf071d1db09207fd65b6e983ebf7a1d9e8c6a59ccc7a06106f4521ccfbd1bcd193ef63c1e08bd5c29154e9ade3af77095586fc419539ab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd882520884561bc02880a006d359c408a41f1a9b931d0b435854e3f27440f17f4f1dce7bbd3899b5a603dc88dfedf7e9f7307bdcf864f86208018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba06478c93f03fbd85df39ad8d5ecb068d7b3937fe79e4f9992b32c4d40ad58bcdfa010c92feed75a4e892ac0ece29c0a30ad71716b09fbda7c88c08474d445c4ea1dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x08", + "r" : "0x6478c93f03fbd85df39ad8d5ecb068d7b3937fe79e4f9992b32c4d40ad58bcdf", + "s" : "0x10c92feed75a4e892ac0ece29c0a30ad71716b09fbda7c88c08474d445c4ea1d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020240", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "247be3390dc6058bd944026df5bfc316f5042cf8907264ec79d95c9a1b5d212a", + "mixHash" : "d422ceb6cd7df14129a4ce5df1ee86e75d6f5bef8296c59cf1c57f132b6fc77a", + "nonce" : "114c14f4c8f5d392", + "number" : "0x0a", + "parentHash" : "5de248d602207b69705d352f27bbf55546485eee6f32deb4ce4fbe2895a80412", + "receiptTrie" : "36ad16e1f3254ca91ff9bc829285719dfd7814cb4eaa8e71c2b958a811501e23", + "stateRoot" : "1494c9102ed5926f348eba68bffe0a60e1085bf9e6ce6b2aa11081fc7960440e", + "timestamp" : "0x561bc02c", + "transactionsTrie" : "2b9d255b7f1a01db4f4bdb506a75e6664eee8cd7e386e26b295199e0e3283e62", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "10", + "chainname" : "F", + "rlp" : "0xf90263f901f9a05de248d602207b69705d352f27bbf55546485eee6f32deb4ce4fbe2895a80412a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01494c9102ed5926f348eba68bffe0a60e1085bf9e6ce6b2aa11081fc7960440ea02b9d255b7f1a01db4f4bdb506a75e6664eee8cd7e386e26b295199e0e3283e62a036ad16e1f3254ca91ff9bc829285719dfd7814cb4eaa8e71c2b958a811501e23b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd882520884561bc02c80a0d422ceb6cd7df14129a4ce5df1ee86e75d6f5bef8296c59cf1c57f132b6fc77a88114c14f4c8f5d392f864f86209018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0ca81f73cf818521d6a8a43d1d3b3295215a6a6384d90234ca6d4aa954197cb05a0129533bc15c142eef56462ad9f4cd5ff6ca27605f4ba8ff7c5d411e9b1026616c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x09", + "r" : "0xca81f73cf818521d6a8a43d1d3b3295215a6a6384d90234ca6d4aa954197cb05", + "s" : "0x129533bc15c142eef56462ad9f4cd5ff6ca27605f4ba8ff7c5d411e9b1026616", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020280", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "cb7795e294629addde11a1ae718cfebcebcaf93da8a76ba4a890495ef2e917ca", + "mixHash" : "de1ca3283d6764c5a815cdec6eeb30ba4226754f6bc8564160110694d0c164e1", + "nonce" : "19c4c97de4e34814", + "number" : "0x0b", + "parentHash" : "247be3390dc6058bd944026df5bfc316f5042cf8907264ec79d95c9a1b5d212a", + "receiptTrie" : "9235fea55d5308ff7644b60cc51958887857269d9de07850f67201904a4cd46b", + "stateRoot" : "7d3cd9ad2b0a3cd7c8ee7e58f57ba7389e327ecec28b95175d90974d1623c4df", + "timestamp" : "0x561bc02d", + "transactionsTrie" : "f1b7b7abd402152a29d6e004340908584c3c14d92e56a32727dcbb10e240877e", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "11", + "chainname" : "F", + "rlp" : "0xf90263f901f9a0247be3390dc6058bd944026df5bfc316f5042cf8907264ec79d95c9a1b5d212aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07d3cd9ad2b0a3cd7c8ee7e58f57ba7389e327ecec28b95175d90974d1623c4dfa0f1b7b7abd402152a29d6e004340908584c3c14d92e56a32727dcbb10e240877ea09235fea55d5308ff7644b60cc51958887857269d9de07850f67201904a4cd46bb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202800b832fefd882520884561bc02d80a0de1ca3283d6764c5a815cdec6eeb30ba4226754f6bc8564160110694d0c164e18819c4c97de4e34814f864f8620a018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0acaae457cabd616f95715626604f30e7c469de1d857dbe84478388e1475c9ceda02128dc98cf34b26da3456703fc7d164a303994b1901f1239b9b1f22af173cebfc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0a", + "r" : "0xacaae457cabd616f95715626604f30e7c469de1d857dbe84478388e1475c9ced", + "s" : "0x2128dc98cf34b26da3456703fc7d164a303994b1901f1239b9b1f22af173cebf", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0202c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "bff52ff92193f80d5d2f7b5b224f0ea9185d06ccb5f29d296571776ed4aea032", + "mixHash" : "dcbcb3033e4b256a2f210cf7d2c3dc7b24d2b1d88cce659d12f2a72dad556d62", + "nonce" : "7ed148c631334a5b", + "number" : "0x0c", + "parentHash" : "cb7795e294629addde11a1ae718cfebcebcaf93da8a76ba4a890495ef2e917ca", + "receiptTrie" : "20fa2703a9e14d6122f88997c9506f5e66e140238942e9ded272a1f44d0c0aa4", + "stateRoot" : "5a8920280e8e856b48f2db2a9059e774ffe18934efa013bb213b4e12e3568bbf", + "timestamp" : "0x561bc02f", + "transactionsTrie" : "a52f2cbd44312747b15f70c57ad232ec3d8a29df8cd16fb53c813ed6bb037192", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "12", + "chainname" : "F", + "rlp" : "0xf90263f901f9a0cb7795e294629addde11a1ae718cfebcebcaf93da8a76ba4a890495ef2e917caa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05a8920280e8e856b48f2db2a9059e774ffe18934efa013bb213b4e12e3568bbfa0a52f2cbd44312747b15f70c57ad232ec3d8a29df8cd16fb53c813ed6bb037192a020fa2703a9e14d6122f88997c9506f5e66e140238942e9ded272a1f44d0c0aa4b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202c00c832fefd882520884561bc02f80a0dcbcb3033e4b256a2f210cf7d2c3dc7b24d2b1d88cce659d12f2a72dad556d62887ed148c631334a5bf864f8620b018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0c3827f5f94441a7d22bff4b343924a3d09260569eb869fa9553e96147f7ff74fa04aa947c879a1edb1f097e2a218a03bb4363fc636de7b95ae4d2f26b12daf6ec3c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0b", + "r" : "0xc3827f5f94441a7d22bff4b343924a3d09260569eb869fa9553e96147f7ff74f", + "s" : "0x4aa947c879a1edb1f097e2a218a03bb4363fc636de7b95ae4d2f26b12daf6ec3", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020300", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "19122e37475415938a0ca043bf26693310f2710a42ccf66863ee83fc80fcef08", + "mixHash" : "0711a9346d7582c18e1dc88c43ce012a6e83e18a9c0649da8a85d8914c1bfab7", + "nonce" : "f6a935cc3505f4fb", + "number" : "0x0d", + "parentHash" : "bff52ff92193f80d5d2f7b5b224f0ea9185d06ccb5f29d296571776ed4aea032", + "receiptTrie" : "b41d41f5dc9e2413bd2f35364185160690e61769cb708b0cb6e45f53d787eb76", + "stateRoot" : "317df0709ef7091dbc7d3153637230fc312fb271263be43a2627aaea12ddf70f", + "timestamp" : "0x561bc030", + "transactionsTrie" : "c260a4ed42e2d514563cb63ce50ac6505b671301637d65fdf64c5d20622e087d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "13", + "chainname" : "F", + "rlp" : "0xf90263f901f9a0bff52ff92193f80d5d2f7b5b224f0ea9185d06ccb5f29d296571776ed4aea032a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0317df0709ef7091dbc7d3153637230fc312fb271263be43a2627aaea12ddf70fa0c260a4ed42e2d514563cb63ce50ac6505b671301637d65fdf64c5d20622e087da0b41d41f5dc9e2413bd2f35364185160690e61769cb708b0cb6e45f53d787eb76b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203000d832fefd882520884561bc03080a00711a9346d7582c18e1dc88c43ce012a6e83e18a9c0649da8a85d8914c1bfab788f6a935cc3505f4fbf864f8620c018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba07a1cc897dd2a447c3ad5ab0a84a7d2a8e9ad57741f4060a06d2bf540542a92e6a075ffcaf435338dbccce9d21991b7f25c159ca77eb7f3f68d29d253e28a020793c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0c", + "r" : "0x7a1cc897dd2a447c3ad5ab0a84a7d2a8e9ad57741f4060a06d2bf540542a92e6", + "s" : "0x75ffcaf435338dbccce9d21991b7f25c159ca77eb7f3f68d29d253e28a020793", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020340", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "954de61726cef1335313840d13199465e024816e7a982d18b00e80bfa06cefa1", + "mixHash" : "04a1ff19b8800508af268be99816d305832d664dc0696e8a09405af2a9966f06", + "nonce" : "4794a330948ec86a", + "number" : "0x0e", + "parentHash" : "19122e37475415938a0ca043bf26693310f2710a42ccf66863ee83fc80fcef08", + "receiptTrie" : "006727b25df8d39e7c61d09aab209ed3d1f8f2934b750f5c26aa9662551f2572", + "stateRoot" : "35581d70ac97d713e3cc0aa9071a5e525b148f16fda113a3dfd04e2a986079a5", + "timestamp" : "0x561bc032", + "transactionsTrie" : "888abace6d2ea2dcad9f49d363b0585b27b75f361b87efb664d723ec6ecf2e66", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "14", + "chainname" : "F", + "rlp" : "0xf90263f901f9a019122e37475415938a0ca043bf26693310f2710a42ccf66863ee83fc80fcef08a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a035581d70ac97d713e3cc0aa9071a5e525b148f16fda113a3dfd04e2a986079a5a0888abace6d2ea2dcad9f49d363b0585b27b75f361b87efb664d723ec6ecf2e66a0006727b25df8d39e7c61d09aab209ed3d1f8f2934b750f5c26aa9662551f2572b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203400e832fefd882520884561bc03280a004a1ff19b8800508af268be99816d305832d664dc0696e8a09405af2a9966f06884794a330948ec86af864f8620d018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca019f27620e69b8e8d19737252da03fa55d8e9faa6bf0e6ddc880ce9b0b501792ca009ebd6b3f1f0ae667e213ddcca21bc017af26d7e11c5475c8268171b3a0cfb8fc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0d", + "r" : "0x19f27620e69b8e8d19737252da03fa55d8e9faa6bf0e6ddc880ce9b0b501792c", + "s" : "0x09ebd6b3f1f0ae667e213ddcca21bc017af26d7e11c5475c8268171b3a0cfb8f", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020380", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "e1011fdd7255bbf8ee69ad9a39259b439b24bc6d32a69d543c2f007f1ef38923", + "mixHash" : "5950620ad55782dea29ef4a2c3fd18f59750d1c890eece8cd1cc2c6051537332", + "nonce" : "ccf80b83442ac738", + "number" : "0x0f", + "parentHash" : "954de61726cef1335313840d13199465e024816e7a982d18b00e80bfa06cefa1", + "receiptTrie" : "6628b2fb8a7108b258d4b4f0c2c3e161e4c6b384cfe220152da80e60cf50e9d8", + "stateRoot" : "df9c525bc69611f930e330cdf69ff6621f0d1260c0ce8925555964d93f700a4f", + "timestamp" : "0x561bc035", + "transactionsTrie" : "28ca66586b4bce4652aa9d251232930949ed4117a95f2748419119b973eb6190", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "15", + "chainname" : "F", + "rlp" : "0xf90263f901f9a0954de61726cef1335313840d13199465e024816e7a982d18b00e80bfa06cefa1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0df9c525bc69611f930e330cdf69ff6621f0d1260c0ce8925555964d93f700a4fa028ca66586b4bce4652aa9d251232930949ed4117a95f2748419119b973eb6190a06628b2fb8a7108b258d4b4f0c2c3e161e4c6b384cfe220152da80e60cf50e9d8b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203800f832fefd882520884561bc03580a05950620ad55782dea29ef4a2c3fd18f59750d1c890eece8cd1cc2c605153733288ccf80b83442ac738f864f8620e018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0a991f498c34e3d89aeba3e5e6d61ed0ce9cf406c367709bb19b7608a79beff9da01aaff10adf9a63ff9afae06daa9923d4d95c45fdf5526d0bb1b54227528f0519c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0e", + "r" : "0xa991f498c34e3d89aeba3e5e6d61ed0ce9cf406c367709bb19b7608a79beff9d", + "s" : "0x1aaff10adf9a63ff9afae06daa9923d4d95c45fdf5526d0bb1b54227528f0519", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0203c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "6954917282cfe82e20cdbba1f4c9c149adb8214844f6f5fe35aa748240f5807a", + "mixHash" : "acd674ca45080ad09c4572a197a13b2d4984fc93e98b9045abd30a358d0f8176", + "nonce" : "1b23bb619f768334", + "number" : "0x10", + "parentHash" : "e1011fdd7255bbf8ee69ad9a39259b439b24bc6d32a69d543c2f007f1ef38923", + "receiptTrie" : "57da65d874f02ec5a7926ced87773db132d4c8deb793673c5aabcdcfc1aeaa72", + "stateRoot" : "b2e9b83bdfecc41b8d39c2e890ff9893d4048529078f009184e6648779eedcdb", + "timestamp" : "0x561bc036", + "transactionsTrie" : "4442c5a84e6423ff1d3649ed5e62b30261d8cef49fa86a7db74b0f7971516141", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "16", + "chainname" : "F", + "rlp" : "0xf90263f901f9a0e1011fdd7255bbf8ee69ad9a39259b439b24bc6d32a69d543c2f007f1ef38923a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b2e9b83bdfecc41b8d39c2e890ff9893d4048529078f009184e6648779eedcdba04442c5a84e6423ff1d3649ed5e62b30261d8cef49fa86a7db74b0f7971516141a057da65d874f02ec5a7926ced87773db132d4c8deb793673c5aabcdcfc1aeaa72b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203c010832fefd882520884561bc03680a0acd674ca45080ad09c4572a197a13b2d4984fc93e98b9045abd30a358d0f8176881b23bb619f768334f864f8620f018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba093b45ffb4e937a80a79bf4158446776877ff38e3943ba1f1236bedbeaba27734a01fcb18293dd2e2b9389fa610911570b22471a37e86bf767761740e6e8338a20bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0f", + "r" : "0x93b45ffb4e937a80a79bf4158446776877ff38e3943ba1f1236bedbeaba27734", + "s" : "0x1fcb18293dd2e2b9389fa610911570b22471a37e86bf767761740e6e8338a20b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020400", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "aeb79451ca00e7dad1cc54194e9ae754675558051c8273e0813d62dae0b4fadc", + "mixHash" : "bdab78831787a1a79c9af81151678afe5a11fe67acca1d9117503343d749fcb2", + "nonce" : "5663c5cf6efe87b4", + "number" : "0x11", + "parentHash" : "6954917282cfe82e20cdbba1f4c9c149adb8214844f6f5fe35aa748240f5807a", + "receiptTrie" : "e37d38e6746ae7e6a6a80245f9858750ac8a4e4ae00f1675ac4723ec69905949", + "stateRoot" : "a2cd811c2f388b13673c43563a616b1b4fd91feef8cd352dbfa0dc016465d3db", + "timestamp" : "0x561bc038", + "transactionsTrie" : "7d02c4833de5fd04d27269884fb08094d64b201e0971e11b8ac16050ccc84247", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "17", + "chainname" : "F", + "rlp" : "0xf90263f901f9a06954917282cfe82e20cdbba1f4c9c149adb8214844f6f5fe35aa748240f5807aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a2cd811c2f388b13673c43563a616b1b4fd91feef8cd352dbfa0dc016465d3dba07d02c4833de5fd04d27269884fb08094d64b201e0971e11b8ac16050ccc84247a0e37d38e6746ae7e6a6a80245f9858750ac8a4e4ae00f1675ac4723ec69905949b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302040011832fefd882520884561bc03880a0bdab78831787a1a79c9af81151678afe5a11fe67acca1d9117503343d749fcb2885663c5cf6efe87b4f864f86210018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca02471e07e498a2f1b174d55f6da0f50f507078a0222a9bb8f7a0973eb887ee7e4a0705ff26cac70f04e6bd8644237f2b52b8c4403f97a29b6872a821e7c62105d61c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x10", + "r" : "0x2471e07e498a2f1b174d55f6da0f50f507078a0222a9bb8f7a0973eb887ee7e4", + "s" : "0x705ff26cac70f04e6bd8644237f2b52b8c4403f97a29b6872a821e7c62105d61", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020440", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "857b587bf32d4fc6b3950a742d2b5e8679ab899afffec7bbfe51581a44fe73d2", + "mixHash" : "8052752e13c451f0bb980a0c0efb0a17557df60a0a1575c35ad09fdbf8325878", + "nonce" : "fee456182f7f65fe", + "number" : "0x12", + "parentHash" : "aeb79451ca00e7dad1cc54194e9ae754675558051c8273e0813d62dae0b4fadc", + "receiptTrie" : "a30a77e85b7dcc77c08848691a367e57a0a11333697fb33ec03dcdc3660da48c", + "stateRoot" : "d6544eaa6ccb1faec8a8f8a4a0fa5fa997c2e22dce6ee595c3476bf89508c19f", + "timestamp" : "0x561bc03b", + "transactionsTrie" : "da6fb9530ace55ca75d3d050dd7297b5114e808930e5f9f8469d64c1f5372f25", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "18", + "chainname" : "F", + "rlp" : "0xf90263f901f9a0aeb79451ca00e7dad1cc54194e9ae754675558051c8273e0813d62dae0b4fadca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d6544eaa6ccb1faec8a8f8a4a0fa5fa997c2e22dce6ee595c3476bf89508c19fa0da6fb9530ace55ca75d3d050dd7297b5114e808930e5f9f8469d64c1f5372f25a0a30a77e85b7dcc77c08848691a367e57a0a11333697fb33ec03dcdc3660da48cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302044012832fefd882520884561bc03b80a08052752e13c451f0bb980a0c0efb0a17557df60a0a1575c35ad09fdbf832587888fee456182f7f65fef864f86211018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca05514a0dfb3047746866a77bac4b5b63543fe5d329420e151afd59ccfe5560e5fa04a30f3bd0e2f5dffd60bbdb4e85e764a27f24f1c5250d6fef0ead227e06d1fb9c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x11", + "r" : "0x5514a0dfb3047746866a77bac4b5b63543fe5d329420e151afd59ccfe5560e5f", + "s" : "0x4a30f3bd0e2f5dffd60bbdb4e85e764a27f24f1c5250d6fef0ead227e06d1fb9", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020480", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "8e8434a6a5de5208554f9f22b7c67c3deb871a04625a210d66e03590e291eccc", + "mixHash" : "6fb75cb820f9baa0f29e461199c0f02f6d4848f40da622c93077ad0df3a8f24a", + "nonce" : "943b48b5b6331724", + "number" : "0x13", + "parentHash" : "857b587bf32d4fc6b3950a742d2b5e8679ab899afffec7bbfe51581a44fe73d2", + "receiptTrie" : "eac158fad516432aa1c1de8b951cd2789dd6f21a1538e0ca213aac4ba7b60b94", + "stateRoot" : "46139e6da579185ae8edc8a336c548c69a78935ed452ac094fb067b52d151fc5", + "timestamp" : "0x561bc03d", + "transactionsTrie" : "2c63ff1f073a6daa140f61a24227262ca6ef7e4a092449444fb220e91d5ca0a3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "19", + "chainname" : "F", + "rlp" : "0xf90263f901f9a0857b587bf32d4fc6b3950a742d2b5e8679ab899afffec7bbfe51581a44fe73d2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a046139e6da579185ae8edc8a336c548c69a78935ed452ac094fb067b52d151fc5a02c63ff1f073a6daa140f61a24227262ca6ef7e4a092449444fb220e91d5ca0a3a0eac158fad516432aa1c1de8b951cd2789dd6f21a1538e0ca213aac4ba7b60b94b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302048013832fefd882520884561bc03d80a06fb75cb820f9baa0f29e461199c0f02f6d4848f40da622c93077ad0df3a8f24a88943b48b5b6331724f864f86212018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0b6854e26314681db056dbf99d9502a1acc3f29b6e533afbb340b9b64a342b0fba057d6237667f478e87862bcb902aed157e0efb39ebd9ac3a92d4f3a29726529b5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x12", + "r" : "0xb6854e26314681db056dbf99d9502a1acc3f29b6e533afbb340b9b64a342b0fb", + "s" : "0x57d6237667f478e87862bcb902aed157e0efb39ebd9ac3a92d4f3a29726529b5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0204c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "957b73f71102882eedd82c5def2a0a9aa6459eac294d06352b8031f674db9691", + "mixHash" : "77f3154e861d2767476209f79ca62cb5f9c50e04159c252fb7718a94b73bc867", + "nonce" : "8d84fef45e7e7afa", + "number" : "0x14", + "parentHash" : "8e8434a6a5de5208554f9f22b7c67c3deb871a04625a210d66e03590e291eccc", + "receiptTrie" : "873c7e66b781338d642def9920c795c7d0a2e71f329c9c95330dcb058e110c0a", + "stateRoot" : "697078ac4b73a28f1a6e8bab905e204676b0e0a3d7e3a5060aff1d57faa2f716", + "timestamp" : "0x561bc03f", + "transactionsTrie" : "0fa0b5ae1009bf92e5b8e37abdcdcaf8f720096bc2989f2995f5a09f9fbf7ed8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "20", + "chainname" : "F", + "rlp" : "0xf90263f901f9a08e8434a6a5de5208554f9f22b7c67c3deb871a04625a210d66e03590e291eccca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0697078ac4b73a28f1a6e8bab905e204676b0e0a3d7e3a5060aff1d57faa2f716a00fa0b5ae1009bf92e5b8e37abdcdcaf8f720096bc2989f2995f5a09f9fbf7ed8a0873c7e66b781338d642def9920c795c7d0a2e71f329c9c95330dcb058e110c0ab9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830204c014832fefd882520884561bc03f80a077f3154e861d2767476209f79ca62cb5f9c50e04159c252fb7718a94b73bc867888d84fef45e7e7afaf864f86213018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba090a0a14f57f9a58f6b7bc6896aaa6fe31c6963a12e77586134fa167fb260aa88a03cc022425a21f3f88452b79fe24db60257ecc2ba40322eb528fb263491c9f092c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x13", + "r" : "0x90a0a14f57f9a58f6b7bc6896aaa6fe31c6963a12e77586134fa167fb260aa88", + "s" : "0x3cc022425a21f3f88452b79fe24db60257ecc2ba40322eb528fb263491c9f092", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020500", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "a17c66eaf108c8ccf9c3a21b561ce5c5887e16c3e9f2ceefcc57eb688ebe7279", + "mixHash" : "c0436e9a033b103efdad4c1f2d6ecd4b8b62f7e93e5e14c52b9a0c7e993b587b", + "nonce" : "0900b4626fed7e2f", + "number" : "0x15", + "parentHash" : "957b73f71102882eedd82c5def2a0a9aa6459eac294d06352b8031f674db9691", + "receiptTrie" : "d2d959e25fda18851cd73ad65e60c912caa5c9f7a30dd04dc76b6f1a6728da6c", + "stateRoot" : "90bc46ca204aa68f57e57617194c4996ac69727fe5629a2fd811d65e631844d6", + "timestamp" : "0x561bc041", + "transactionsTrie" : "5a2b4add2a566391dc24c042f83e1d5bc78dab5c306a5cccfd066096553bee67", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "21", + "chainname" : "F", + "rlp" : "0xf90263f901f9a0957b73f71102882eedd82c5def2a0a9aa6459eac294d06352b8031f674db9691a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a090bc46ca204aa68f57e57617194c4996ac69727fe5629a2fd811d65e631844d6a05a2b4add2a566391dc24c042f83e1d5bc78dab5c306a5cccfd066096553bee67a0d2d959e25fda18851cd73ad65e60c912caa5c9f7a30dd04dc76b6f1a6728da6cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302050015832fefd882520884561bc04180a0c0436e9a033b103efdad4c1f2d6ecd4b8b62f7e93e5e14c52b9a0c7e993b587b880900b4626fed7e2ff864f86214018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba01e23e65a978e67928d2f04e676b6cc49d18870f47980b131ca02fc1fb9c50611a0014dc79a923af6f69c233cafd606718dd50e24d5fbda9d35587a684dc5e14628c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x14", + "r" : "0x1e23e65a978e67928d2f04e676b6cc49d18870f47980b131ca02fc1fb9c50611", + "s" : "0x014dc79a923af6f69c233cafd606718dd50e24d5fbda9d35587a684dc5e14628", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020540", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f337162f4468e46a6d8be6545a6946f65af9c1647e010dbc3d32b42a4bb891c4", + "mixHash" : "638633f579cf073974aca40dff323c13976ed49d835f2ab6e3e84aeec84536b2", + "nonce" : "e088b0486efe385a", + "number" : "0x16", + "parentHash" : "a17c66eaf108c8ccf9c3a21b561ce5c5887e16c3e9f2ceefcc57eb688ebe7279", + "receiptTrie" : "ab38dca9e4f0a47549ed36cb978320225dddef9f76713d848134079b66c57ee4", + "stateRoot" : "6e51d9b39cf72798a674c10fb74eba2cc53bea60ee8c319069887e58ba35a031", + "timestamp" : "0x561bc042", + "transactionsTrie" : "7501f1d112c55b54919cf6af439708f2f010bdb4357516ca3646292f3ea4bfd8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "22", + "chainname" : "F", + "rlp" : "0xf90263f901f9a0a17c66eaf108c8ccf9c3a21b561ce5c5887e16c3e9f2ceefcc57eb688ebe7279a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a06e51d9b39cf72798a674c10fb74eba2cc53bea60ee8c319069887e58ba35a031a07501f1d112c55b54919cf6af439708f2f010bdb4357516ca3646292f3ea4bfd8a0ab38dca9e4f0a47549ed36cb978320225dddef9f76713d848134079b66c57ee4b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302054016832fefd882520884561bc04280a0638633f579cf073974aca40dff323c13976ed49d835f2ab6e3e84aeec84536b288e088b0486efe385af864f86215018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca08393c27e8b1658ba9d0de41553a1f40c8d7054daf6258f17d188f525e37fabc4a006321e9df3cd7d02479a9db54eb764a27e5c78cc9f34899ff223efaad9a0b126c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x15", + "r" : "0x8393c27e8b1658ba9d0de41553a1f40c8d7054daf6258f17d188f525e37fabc4", + "s" : "0x06321e9df3cd7d02479a9db54eb764a27e5c78cc9f34899ff223efaad9a0b126", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020580", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "6969cc57298fb27227d30ce61b49c47f034efa0a56bdd9fab045dc9369ac1a2f", + "mixHash" : "362e3adc287babe5c3f4ec374777dd6b0a6a32033713bba1fc6d2ec64becc3cd", + "nonce" : "9be319f71aee15b4", + "number" : "0x17", + "parentHash" : "f337162f4468e46a6d8be6545a6946f65af9c1647e010dbc3d32b42a4bb891c4", + "receiptTrie" : "95890ec65ef7e006e341431331330b6cfc9293d87f854eb908ebf9919fc93253", + "stateRoot" : "8ecc351b000c38ff0e3adf5a8383fbe5a6c80524ef8e0ead95fe3b4d34e71f08", + "timestamp" : "0x561bc044", + "transactionsTrie" : "bfd282d92b8e564ad1ff263f6ae03b93a069f10f00d3e723a296800a757f1ff3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "23", + "chainname" : "F", + "rlp" : "0xf90263f901f9a0f337162f4468e46a6d8be6545a6946f65af9c1647e010dbc3d32b42a4bb891c4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08ecc351b000c38ff0e3adf5a8383fbe5a6c80524ef8e0ead95fe3b4d34e71f08a0bfd282d92b8e564ad1ff263f6ae03b93a069f10f00d3e723a296800a757f1ff3a095890ec65ef7e006e341431331330b6cfc9293d87f854eb908ebf9919fc93253b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302058017832fefd882520884561bc04480a0362e3adc287babe5c3f4ec374777dd6b0a6a32033713bba1fc6d2ec64becc3cd889be319f71aee15b4f864f86216018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba0cfb1ca5f71db91c77be594c61534914f492061474bd1e580cc8e1595f4b20043a078b4cfed0c7ec633a6442ac76748146ecfe8e76702840373150104c31c8535a9c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x16", + "r" : "0xcfb1ca5f71db91c77be594c61534914f492061474bd1e580cc8e1595f4b20043", + "s" : "0x78b4cfed0c7ec633a6442ac76748146ecfe8e76702840373150104c31c8535a9", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0205c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "2695d07b33a8fd5f415f29a405baaeec8dda2d9f56564c622914a94c5951e504", + "mixHash" : "9afb86d0411792529601b3a6e10f73b2fe9d1a496bd286529d527155a1987c5c", + "nonce" : "0d2cc3f5f6c1d3f2", + "number" : "0x18", + "parentHash" : "6969cc57298fb27227d30ce61b49c47f034efa0a56bdd9fab045dc9369ac1a2f", + "receiptTrie" : "9d8083550c7f882bd5de852c8b7158b1ce7514561a87fd86505b185ebfdd1666", + "stateRoot" : "15cc51eeac2abff97b7ebebc17fd16493d4f88930bfd47193276539c24ffe02e", + "timestamp" : "0x561bc046", + "transactionsTrie" : "26cce381fef66f447739c2d22bdd85038f492bbcb8095cd8ebc03cdfbbf12f06", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "24", + "chainname" : "F", + "rlp" : "0xf90263f901f9a06969cc57298fb27227d30ce61b49c47f034efa0a56bdd9fab045dc9369ac1a2fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a015cc51eeac2abff97b7ebebc17fd16493d4f88930bfd47193276539c24ffe02ea026cce381fef66f447739c2d22bdd85038f492bbcb8095cd8ebc03cdfbbf12f06a09d8083550c7f882bd5de852c8b7158b1ce7514561a87fd86505b185ebfdd1666b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830205c018832fefd882520884561bc04680a09afb86d0411792529601b3a6e10f73b2fe9d1a496bd286529d527155a1987c5c880d2cc3f5f6c1d3f2f864f86217018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca03f77a5cf014af7e1b4a2fddeb245325e5c704e79613ac5762ef0edddf1e37424a024e43a44c6251ea8cc538fc3eb367ad3118bb94ba6ed62dd67a82f319effd397c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x17", + "r" : "0x3f77a5cf014af7e1b4a2fddeb245325e5c704e79613ac5762ef0edddf1e37424", + "s" : "0x24e43a44c6251ea8cc538fc3eb367ad3118bb94ba6ed62dd67a82f319effd397", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020600", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "d548022f53257b85e7bd015a96ff8297256cba07b7131b52bcbf759e4b99c352", + "mixHash" : "daff76b7dcc38c9b94eb23c37836bd64733210faf58fc3f4a8318f342d4d3086", + "nonce" : "ac4d244b9c77b897", + "number" : "0x19", + "parentHash" : "2695d07b33a8fd5f415f29a405baaeec8dda2d9f56564c622914a94c5951e504", + "receiptTrie" : "5bc675a378629a419c602eb92663be9481f45dd4613791c51dd68a6ccf7bf5e0", + "stateRoot" : "4e4c369608520ad03327274240e113c7c945ad818ce53eda7f6204a06ee6043d", + "timestamp" : "0x561bc048", + "transactionsTrie" : "560dd676973d0ed7beaa46ba96af672cddfef8fa86dd19cf55daa36efe527e4b", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "25", + "chainname" : "F", + "rlp" : "0xf90263f901f9a02695d07b33a8fd5f415f29a405baaeec8dda2d9f56564c622914a94c5951e504a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04e4c369608520ad03327274240e113c7c945ad818ce53eda7f6204a06ee6043da0560dd676973d0ed7beaa46ba96af672cddfef8fa86dd19cf55daa36efe527e4ba05bc675a378629a419c602eb92663be9481f45dd4613791c51dd68a6ccf7bf5e0b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302060019832fefd882520884561bc04880a0daff76b7dcc38c9b94eb23c37836bd64733210faf58fc3f4a8318f342d4d308688ac4d244b9c77b897f864f86218018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822713801ba04040107455f494981319d720a2972600d6086e6a652a404ede437662217ab883a011657fbd69f138bdd230e57c3b447a18b89ace89dec250c8e5e3e3d4c548d725c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x18", + "r" : "0x4040107455f494981319d720a2972600d6086e6a652a404ede437662217ab883", + "s" : "0x11657fbd69f138bdd230e57c3b447a18b89ace89dec250c8e5e3e3d4c548d725", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2713" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "348eba4513cfbe193a37d9707b290ca89a272db74876e26c2486f3471cf51ad2", + "mixHash" : "fb0ea5cecd541b6a4ac96ab219113f14166d4c9defe35fb5976d9478ba5ab181", + "nonce" : "a9a434e2efcc9cb2", + "number" : "0x01", + "parentHash" : "358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bd", + "receiptTrie" : "6aa1e44f24b69e6f3c398ed2be6eee2d8b7b57480aa2a8a9085e77d2d3d06a55", + "stateRoot" : "4325a011e3c2f9f72c35f60ca7f9915004f68c3357694aad4848bfe625c4622f", + "timestamp" : "0x561bc04d", + "transactionsTrie" : "517131da8d5dbdce45a2a393ea59f742e9411a12431070cfe60400536d26faa9", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "G", + "rlp" : "0xf90263f901f9a0358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04325a011e3c2f9f72c35f60ca7f9915004f68c3357694aad4848bfe625c4622fa0517131da8d5dbdce45a2a393ea59f742e9411a12431070cfe60400536d26faa9a06aa1e44f24b69e6f3c398ed2be6eee2d8b7b57480aa2a8a9085e77d2d3d06a55b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc04d80a0fb0ea5cecd541b6a4ac96ab219113f14166d4c9defe35fb5976d9478ba5ab18188a9a434e2efcc9cb2f864f86280018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba0875b81c32db08fc17fb8917235d69b3959aeeea4e8d827d1a34a5d79aad74ad3a05abf22636cb905d225c7e65065f2f00db0810d9fca77fd6aadc6832de2dc06c6c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x875b81c32db08fc17fb8917235d69b3959aeeea4e8d827d1a34a5d79aad74ad3", + "s" : "0x5abf22636cb905d225c7e65065f2f00db0810d9fca77fd6aadc6832de2dc06c6", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "6657fe485fcd6f2b049bd4db7ed1111aafc40ab632ccbdc99763df519d266787", + "mixHash" : "ffd18c25205f9d916ec169de148965d937c98168ff3acdec9296d48a899770d5", + "nonce" : "24fde6f261c304cd", + "number" : "0x02", + "parentHash" : "348eba4513cfbe193a37d9707b290ca89a272db74876e26c2486f3471cf51ad2", + "receiptTrie" : "ff12306239527e2507f40989c979fafbc3b8a95e2ac9d87d26e0f10fafa1da7c", + "stateRoot" : "0912289a247a213bb1fd68c3d4ad6f1c61b60ec553ef1e1fd12a3354a720cd5e", + "timestamp" : "0x561bc04f", + "transactionsTrie" : "7a23a1b4789d236eb3edfe4709fbf0269fdc22bd08fa48799c6c9f7b0dc2fc42", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "G", + "rlp" : "0xf90263f901f9a0348eba4513cfbe193a37d9707b290ca89a272db74876e26c2486f3471cf51ad2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00912289a247a213bb1fd68c3d4ad6f1c61b60ec553ef1e1fd12a3354a720cd5ea07a23a1b4789d236eb3edfe4709fbf0269fdc22bd08fa48799c6c9f7b0dc2fc42a0ff12306239527e2507f40989c979fafbc3b8a95e2ac9d87d26e0f10fafa1da7cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc04f80a0ffd18c25205f9d916ec169de148965d937c98168ff3acdec9296d48a899770d58824fde6f261c304cdf864f86201018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba03751f7e63119f172bc7c7ce417c4f3570eb29a06103cdff0d5d23e537bcb6f01a0637f26bd0f382eae584404294dc9ff61c154e81696781601e791fd7e95717b2dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x3751f7e63119f172bc7c7ce417c4f3570eb29a06103cdff0d5d23e537bcb6f01", + "s" : "0x637f26bd0f382eae584404294dc9ff61c154e81696781601e791fd7e95717b2d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "26f183dee51df1ba62b01b40945c5e4a5b339b3b8f092c269f099e8964c7ec11", + "mixHash" : "e933c4225537e7e7f8ff6ed051eb387fb97e3948b6ee4ed62cb0f711220bda45", + "nonce" : "ea76f6e844853961", + "number" : "0x03", + "parentHash" : "6657fe485fcd6f2b049bd4db7ed1111aafc40ab632ccbdc99763df519d266787", + "receiptTrie" : "079a220f268e9c199c166ecdf5cb527dee36b0b3929c01eb304698fff245fffc", + "stateRoot" : "349b5c0b55ab5a61277407ca809181275555465df79c71c5545751f7dee5438e", + "timestamp" : "0x561bc050", + "transactionsTrie" : "7273938d4695b5d9facfde4118ecf2262b6e4117051420c80b30aebc6ae6bca1", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "G", + "rlp" : "0xf90263f901f9a06657fe485fcd6f2b049bd4db7ed1111aafc40ab632ccbdc99763df519d266787a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0349b5c0b55ab5a61277407ca809181275555465df79c71c5545751f7dee5438ea07273938d4695b5d9facfde4118ecf2262b6e4117051420c80b30aebc6ae6bca1a0079a220f268e9c199c166ecdf5cb527dee36b0b3929c01eb304698fff245fffcb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc05080a0e933c4225537e7e7f8ff6ed051eb387fb97e3948b6ee4ed62cb0f711220bda4588ea76f6e844853961f864f86202018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0ccb891c1476a75413e034afd5865278640a0b5e8d24d09b8847bc93ed4901ba8a05b3b420affac6aee7b809aadf4c03c09073ba5f59826e587ea1f631d41e2a23bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0xccb891c1476a75413e034afd5865278640a0b5e8d24d09b8847bc93ed4901ba8", + "s" : "0x5b3b420affac6aee7b809aadf4c03c09073ba5f59826e587ea1f631d41e2a23b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "4f5b6e8559ec75513f5ea3cbfe49a70b18eea6617ab478388261baa6bac239a8", + "mixHash" : "b7e515eb3f80723c338600f1b4d846f15b6d4bd2a8f77acf23259c761dcf913d", + "nonce" : "5e887befc65247ab", + "number" : "0x04", + "parentHash" : "26f183dee51df1ba62b01b40945c5e4a5b339b3b8f092c269f099e8964c7ec11", + "receiptTrie" : "ea9bac70a18fc6caefc21d334803e07061307f51623ba0bceb5edb3bad7e9bc7", + "stateRoot" : "c1648028171f796636eab026e0744c2928f01604fc79c6fd9759e2e6b6518711", + "timestamp" : "0x561bc054", + "transactionsTrie" : "f414248719c341aee8a75df4004631133864eea91d9d8fd6b5109d475790f769", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "chainname" : "G", + "rlp" : "0xf90263f901f9a026f183dee51df1ba62b01b40945c5e4a5b339b3b8f092c269f099e8964c7ec11a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c1648028171f796636eab026e0744c2928f01604fc79c6fd9759e2e6b6518711a0f414248719c341aee8a75df4004631133864eea91d9d8fd6b5109d475790f769a0ea9bac70a18fc6caefc21d334803e07061307f51623ba0bceb5edb3bad7e9bc7b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc05480a0b7e515eb3f80723c338600f1b4d846f15b6d4bd2a8f77acf23259c761dcf913d885e887befc65247abf864f86203018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca06567ef72829bf84de45fb4ded8e5c6092c8ae4440e3da10a9564d60e62d26be2a039963c5253d34fc0f380daec19537a356ccb1dc4096b6c2f79ec4aa38850995cc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0x6567ef72829bf84de45fb4ded8e5c6092c8ae4440e3da10a9564d60e62d26be2", + "s" : "0x39963c5253d34fc0f380daec19537a356ccb1dc4096b6c2f79ec4aa38850995c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "2b3018cafdd119867028d92152d94bf00466eb81e5dd4d43ef641ad1fdc1929b", + "mixHash" : "9a81dfac859537ec57fac6d127d9ecd73ab1463726e25c258d1123c2eefcc421", + "nonce" : "92c1c05eece79c43", + "number" : "0x05", + "parentHash" : "4f5b6e8559ec75513f5ea3cbfe49a70b18eea6617ab478388261baa6bac239a8", + "receiptTrie" : "21f214604286d1d6cc387295903b26fb2e4d875ac396d31e8faff84bc1079386", + "stateRoot" : "a3f107f7c3dd6378c79c7efd45175c05f59c8ce9054b998a86212bfd3505cec7", + "timestamp" : "0x561bc057", + "transactionsTrie" : "a23e1975a13f7acc887e242cc0c6b0a0bbcc32d01783f8ee8e5f7dd068fad2d0", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "5", + "chainname" : "G", + "rlp" : "0xf90263f901f9a04f5b6e8559ec75513f5ea3cbfe49a70b18eea6617ab478388261baa6bac239a8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a3f107f7c3dd6378c79c7efd45175c05f59c8ce9054b998a86212bfd3505cec7a0a23e1975a13f7acc887e242cc0c6b0a0bbcc32d01783f8ee8e5f7dd068fad2d0a021f214604286d1d6cc387295903b26fb2e4d875ac396d31e8faff84bc1079386b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bc05780a09a81dfac859537ec57fac6d127d9ecd73ab1463726e25c258d1123c2eefcc4218892c1c05eece79c43f864f86204018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca059210f61dcf97fc8672fb232a4fd5a32e04a5ba4f08ee37c283cef5d57316bb9a05df5a1834a3daa586d48f50b4b3c319e77457eaac4897e591b42be1c48221fd5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0x59210f61dcf97fc8672fb232a4fd5a32e04a5ba4f08ee37c283cef5d57316bb9", + "s" : "0x5df5a1834a3daa586d48f50b4b3c319e77457eaac4897e591b42be1c48221fd5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "672715bed48487508eccd395b1107209ac69e5709c318a7b592e41ecc14b9a75", + "mixHash" : "c6be6209c9e308feb75908c801bc653621487c6bbed648334f9cba95769730e0", + "nonce" : "e302dd4e3b7beeea", + "number" : "0x06", + "parentHash" : "2b3018cafdd119867028d92152d94bf00466eb81e5dd4d43ef641ad1fdc1929b", + "receiptTrie" : "46995ec66ede60c732df3ddd184d897fc8994e72643dc7b024d5ef520e170def", + "stateRoot" : "7076712f646cb5ad6676ebca9dbfee179e4b0b5c35a9a153be4e2a5fb6864200", + "timestamp" : "0x561bc059", + "transactionsTrie" : "e39aa720f7afda75d2f96a9a69be087ac66010cb23c34ff07ee8272f7705fb27", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "chainname" : "G", + "rlp" : "0xf90263f901f9a02b3018cafdd119867028d92152d94bf00466eb81e5dd4d43ef641ad1fdc1929ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07076712f646cb5ad6676ebca9dbfee179e4b0b5c35a9a153be4e2a5fb6864200a0e39aa720f7afda75d2f96a9a69be087ac66010cb23c34ff07ee8272f7705fb27a046995ec66ede60c732df3ddd184d897fc8994e72643dc7b024d5ef520e170defb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882520884561bc05980a0c6be6209c9e308feb75908c801bc653621487c6bbed648334f9cba95769730e088e302dd4e3b7beeeaf864f86205018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba08487a021a6ebd89e54bb97d54b2f62871ba65ae363267663ecc31bd91b6c0b81a056f0ae3898a0d9598fa3c84e17e61d48080fc5c5a76c3aa420a8e39c04e3cfa5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0x8487a021a6ebd89e54bb97d54b2f62871ba65ae363267663ecc31bd91b6c0b81", + "s" : "0x56f0ae3898a0d9598fa3c84e17e61d48080fc5c5a76c3aa420a8e39c04e3cfa5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020180", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f447ad4dbe4a41aa300db7135ba8521dffa9d0d2ac029a9e8fe9d53c1217b3e0", + "mixHash" : "6fb0fd42229bd0ac3c9e5514729c874e12f9f456d9d851ff9099317da1b93f71", + "nonce" : "24980bd3a2a217d5", + "number" : "0x07", + "parentHash" : "672715bed48487508eccd395b1107209ac69e5709c318a7b592e41ecc14b9a75", + "receiptTrie" : "3320480c88a502c58c70d38d5fec7bcf1b02ba3fc30350dec9da9dc542c6f685", + "stateRoot" : "8eb9a7a83802e7e4494f5f1fc09477acfda5792020116a8bc746a899bb936d48", + "timestamp" : "0x561bc05b", + "transactionsTrie" : "53796c83ec191274702f254a1ee977424308bacc6b05bb2fef7ca2dadb816a42", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "7", + "chainname" : "G", + "rlp" : "0xf90263f901f9a0672715bed48487508eccd395b1107209ac69e5709c318a7b592e41ecc14b9a75a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08eb9a7a83802e7e4494f5f1fc09477acfda5792020116a8bc746a899bb936d48a053796c83ec191274702f254a1ee977424308bacc6b05bb2fef7ca2dadb816a42a03320480c88a502c58c70d38d5fec7bcf1b02ba3fc30350dec9da9dc542c6f685b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882520884561bc05b80a06fb0fd42229bd0ac3c9e5514729c874e12f9f456d9d851ff9099317da1b93f718824980bd3a2a217d5f864f86206018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0aaa981bfd2b105f76a0aef7e117ea047b01d6bb153d8729c8c9b9e89f2ec9681a049cd356a9d6641414a0b343030817f7cdb903f229484f0cd89b67164834e7000c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x06", + "r" : "0xaaa981bfd2b105f76a0aef7e117ea047b01d6bb153d8729c8c9b9e89f2ec9681", + "s" : "0x49cd356a9d6641414a0b343030817f7cdb903f229484f0cd89b67164834e7000", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0201c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "b3723849bcc561b815dd65095999659114a5201fee8eb3ad490859876c57e763", + "mixHash" : "54e3fbf2ca0574eac39f9af614c336b116a67af361b69796995f215269c86150", + "nonce" : "fa307932bf3e16d1", + "number" : "0x08", + "parentHash" : "f447ad4dbe4a41aa300db7135ba8521dffa9d0d2ac029a9e8fe9d53c1217b3e0", + "receiptTrie" : "62a54f0235cce8297a84dee2ceb88f305a9e20ee18cbb065e558c3a1d06184a0", + "stateRoot" : "cec44de1ec4cc6fb93fcff8defaa67aafe63308bcd83000608051584418fb1b0", + "timestamp" : "0x561bc05d", + "transactionsTrie" : "88692a381e7fa4e989486fe33f3b62e79b59486c1352fbbbcbabb87eda76c9d3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "8", + "chainname" : "G", + "rlp" : "0xf90263f901f9a0f447ad4dbe4a41aa300db7135ba8521dffa9d0d2ac029a9e8fe9d53c1217b3e0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cec44de1ec4cc6fb93fcff8defaa67aafe63308bcd83000608051584418fb1b0a088692a381e7fa4e989486fe33f3b62e79b59486c1352fbbbcbabb87eda76c9d3a062a54f0235cce8297a84dee2ceb88f305a9e20ee18cbb065e558c3a1d06184a0b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd882520884561bc05d80a054e3fbf2ca0574eac39f9af614c336b116a67af361b69796995f215269c8615088fa307932bf3e16d1f864f86207018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca085c3b66d064a06c9bfe05b9ebda4a55c205a84c58fdbf4a30c2b05c78bbd760fa00a2841e5e2ffbc9fa31bce28cd5f401095353c6ffeda50cc5f2aca8bd95d0efbc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x07", + "r" : "0x85c3b66d064a06c9bfe05b9ebda4a55c205a84c58fdbf4a30c2b05c78bbd760f", + "s" : "0x0a2841e5e2ffbc9fa31bce28cd5f401095353c6ffeda50cc5f2aca8bd95d0efb", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020200", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "c1fd81dfcc88d0d139839ee405e8568582fda8dc672ec0fe314c837584235bb7", + "mixHash" : "8df2db3cf7573503e6e6354444c5978c9dfda659d5819af2cb54e446453ee377", + "nonce" : "4e25ea0265e836a6", + "number" : "0x09", + "parentHash" : "b3723849bcc561b815dd65095999659114a5201fee8eb3ad490859876c57e763", + "receiptTrie" : "6106f4521ccfbd1bcd193ef63c1e08bd5c29154e9ade3af77095586fc419539a", + "stateRoot" : "289e44b10542f49476c317abea6a098d334b275285c3e5e36f67f6f99b6e7422", + "timestamp" : "0x561bc060", + "transactionsTrie" : "d37467009fd0adf0a115dcf071d1db09207fd65b6e983ebf7a1d9e8c6a59ccc7", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "9", + "chainname" : "G", + "rlp" : "0xf90263f901f9a0b3723849bcc561b815dd65095999659114a5201fee8eb3ad490859876c57e763a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0289e44b10542f49476c317abea6a098d334b275285c3e5e36f67f6f99b6e7422a0d37467009fd0adf0a115dcf071d1db09207fd65b6e983ebf7a1d9e8c6a59ccc7a06106f4521ccfbd1bcd193ef63c1e08bd5c29154e9ade3af77095586fc419539ab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd882520884561bc06080a08df2db3cf7573503e6e6354444c5978c9dfda659d5819af2cb54e446453ee377884e25ea0265e836a6f864f86208018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba06478c93f03fbd85df39ad8d5ecb068d7b3937fe79e4f9992b32c4d40ad58bcdfa010c92feed75a4e892ac0ece29c0a30ad71716b09fbda7c88c08474d445c4ea1dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x08", + "r" : "0x6478c93f03fbd85df39ad8d5ecb068d7b3937fe79e4f9992b32c4d40ad58bcdf", + "s" : "0x10c92feed75a4e892ac0ece29c0a30ad71716b09fbda7c88c08474d445c4ea1d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020240", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "af32bcc05d6eba189aa7cd275e7024f726a44dd05846bdbfba20e5108c285ec7", + "mixHash" : "4949389f9ea95ed2adbf0a3b21e22acf63a6d44246aed49bc6177a8f80a7a726", + "nonce" : "4600bdf9fe1bc05d", + "number" : "0x0a", + "parentHash" : "c1fd81dfcc88d0d139839ee405e8568582fda8dc672ec0fe314c837584235bb7", + "receiptTrie" : "36ad16e1f3254ca91ff9bc829285719dfd7814cb4eaa8e71c2b958a811501e23", + "stateRoot" : "1494c9102ed5926f348eba68bffe0a60e1085bf9e6ce6b2aa11081fc7960440e", + "timestamp" : "0x561bc062", + "transactionsTrie" : "2b9d255b7f1a01db4f4bdb506a75e6664eee8cd7e386e26b295199e0e3283e62", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "10", + "chainname" : "G", + "rlp" : "0xf90263f901f9a0c1fd81dfcc88d0d139839ee405e8568582fda8dc672ec0fe314c837584235bb7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01494c9102ed5926f348eba68bffe0a60e1085bf9e6ce6b2aa11081fc7960440ea02b9d255b7f1a01db4f4bdb506a75e6664eee8cd7e386e26b295199e0e3283e62a036ad16e1f3254ca91ff9bc829285719dfd7814cb4eaa8e71c2b958a811501e23b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd882520884561bc06280a04949389f9ea95ed2adbf0a3b21e22acf63a6d44246aed49bc6177a8f80a7a726884600bdf9fe1bc05df864f86209018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0ca81f73cf818521d6a8a43d1d3b3295215a6a6384d90234ca6d4aa954197cb05a0129533bc15c142eef56462ad9f4cd5ff6ca27605f4ba8ff7c5d411e9b1026616c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x09", + "r" : "0xca81f73cf818521d6a8a43d1d3b3295215a6a6384d90234ca6d4aa954197cb05", + "s" : "0x129533bc15c142eef56462ad9f4cd5ff6ca27605f4ba8ff7c5d411e9b1026616", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020280", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f8a9074de77dcf3151382e9b436a9c3f5229c26c45eded5605e34acebc00a579", + "mixHash" : "3aa627efe15146d7e3b9ac54fb7af501b8a7d6beac931b9c36f150869ad0bbf1", + "nonce" : "4093ab2017c8d605", + "number" : "0x0b", + "parentHash" : "af32bcc05d6eba189aa7cd275e7024f726a44dd05846bdbfba20e5108c285ec7", + "receiptTrie" : "9235fea55d5308ff7644b60cc51958887857269d9de07850f67201904a4cd46b", + "stateRoot" : "7d3cd9ad2b0a3cd7c8ee7e58f57ba7389e327ecec28b95175d90974d1623c4df", + "timestamp" : "0x561bc066", + "transactionsTrie" : "f1b7b7abd402152a29d6e004340908584c3c14d92e56a32727dcbb10e240877e", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "11", + "chainname" : "G", + "rlp" : "0xf90263f901f9a0af32bcc05d6eba189aa7cd275e7024f726a44dd05846bdbfba20e5108c285ec7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07d3cd9ad2b0a3cd7c8ee7e58f57ba7389e327ecec28b95175d90974d1623c4dfa0f1b7b7abd402152a29d6e004340908584c3c14d92e56a32727dcbb10e240877ea09235fea55d5308ff7644b60cc51958887857269d9de07850f67201904a4cd46bb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202800b832fefd882520884561bc06680a03aa627efe15146d7e3b9ac54fb7af501b8a7d6beac931b9c36f150869ad0bbf1884093ab2017c8d605f864f8620a018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0acaae457cabd616f95715626604f30e7c469de1d857dbe84478388e1475c9ceda02128dc98cf34b26da3456703fc7d164a303994b1901f1239b9b1f22af173cebfc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0a", + "r" : "0xacaae457cabd616f95715626604f30e7c469de1d857dbe84478388e1475c9ced", + "s" : "0x2128dc98cf34b26da3456703fc7d164a303994b1901f1239b9b1f22af173cebf", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0202c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "c7145d88f6b7dd34dc74a076357abdc428b7b7ac213835f9be6aebd130815a7d", + "mixHash" : "54eb454d08b13aee210acdccce37d416fcda1169f5b8e18bdbcdb319bb18db3a", + "nonce" : "b5347724d15d0f33", + "number" : "0x0c", + "parentHash" : "f8a9074de77dcf3151382e9b436a9c3f5229c26c45eded5605e34acebc00a579", + "receiptTrie" : "20fa2703a9e14d6122f88997c9506f5e66e140238942e9ded272a1f44d0c0aa4", + "stateRoot" : "5a8920280e8e856b48f2db2a9059e774ffe18934efa013bb213b4e12e3568bbf", + "timestamp" : "0x561bc069", + "transactionsTrie" : "a52f2cbd44312747b15f70c57ad232ec3d8a29df8cd16fb53c813ed6bb037192", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "12", + "chainname" : "G", + "rlp" : "0xf90263f901f9a0f8a9074de77dcf3151382e9b436a9c3f5229c26c45eded5605e34acebc00a579a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05a8920280e8e856b48f2db2a9059e774ffe18934efa013bb213b4e12e3568bbfa0a52f2cbd44312747b15f70c57ad232ec3d8a29df8cd16fb53c813ed6bb037192a020fa2703a9e14d6122f88997c9506f5e66e140238942e9ded272a1f44d0c0aa4b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202c00c832fefd882520884561bc06980a054eb454d08b13aee210acdccce37d416fcda1169f5b8e18bdbcdb319bb18db3a88b5347724d15d0f33f864f8620b018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0c3827f5f94441a7d22bff4b343924a3d09260569eb869fa9553e96147f7ff74fa04aa947c879a1edb1f097e2a218a03bb4363fc636de7b95ae4d2f26b12daf6ec3c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0b", + "r" : "0xc3827f5f94441a7d22bff4b343924a3d09260569eb869fa9553e96147f7ff74f", + "s" : "0x4aa947c879a1edb1f097e2a218a03bb4363fc636de7b95ae4d2f26b12daf6ec3", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020300", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "d4aec390ceb23c76c25f9abc6d32fdb5e6e982070797364d2a425d0cb91f4328", + "mixHash" : "505d91528de9c081b61ad6e2d5d7203cff365e31f0503181ef1f72405751f1f3", + "nonce" : "924ed0fc3e5cd021", + "number" : "0x0d", + "parentHash" : "c7145d88f6b7dd34dc74a076357abdc428b7b7ac213835f9be6aebd130815a7d", + "receiptTrie" : "b41d41f5dc9e2413bd2f35364185160690e61769cb708b0cb6e45f53d787eb76", + "stateRoot" : "317df0709ef7091dbc7d3153637230fc312fb271263be43a2627aaea12ddf70f", + "timestamp" : "0x561bc06b", + "transactionsTrie" : "c260a4ed42e2d514563cb63ce50ac6505b671301637d65fdf64c5d20622e087d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "13", + "chainname" : "G", + "rlp" : "0xf90263f901f9a0c7145d88f6b7dd34dc74a076357abdc428b7b7ac213835f9be6aebd130815a7da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0317df0709ef7091dbc7d3153637230fc312fb271263be43a2627aaea12ddf70fa0c260a4ed42e2d514563cb63ce50ac6505b671301637d65fdf64c5d20622e087da0b41d41f5dc9e2413bd2f35364185160690e61769cb708b0cb6e45f53d787eb76b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203000d832fefd882520884561bc06b80a0505d91528de9c081b61ad6e2d5d7203cff365e31f0503181ef1f72405751f1f388924ed0fc3e5cd021f864f8620c018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba07a1cc897dd2a447c3ad5ab0a84a7d2a8e9ad57741f4060a06d2bf540542a92e6a075ffcaf435338dbccce9d21991b7f25c159ca77eb7f3f68d29d253e28a020793c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0c", + "r" : "0x7a1cc897dd2a447c3ad5ab0a84a7d2a8e9ad57741f4060a06d2bf540542a92e6", + "s" : "0x75ffcaf435338dbccce9d21991b7f25c159ca77eb7f3f68d29d253e28a020793", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020340", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "a29f69e1155f8cff448a9d8f2771d3bb12a596f4e1af1709f76d643feb8ace7f", + "mixHash" : "11d1ce4ac6617f295db520c5e000df91d04a0af6cb76600a967e4c38bcb4cfed", + "nonce" : "7fb48c36adc87357", + "number" : "0x0e", + "parentHash" : "d4aec390ceb23c76c25f9abc6d32fdb5e6e982070797364d2a425d0cb91f4328", + "receiptTrie" : "006727b25df8d39e7c61d09aab209ed3d1f8f2934b750f5c26aa9662551f2572", + "stateRoot" : "35581d70ac97d713e3cc0aa9071a5e525b148f16fda113a3dfd04e2a986079a5", + "timestamp" : "0x561bc06d", + "transactionsTrie" : "888abace6d2ea2dcad9f49d363b0585b27b75f361b87efb664d723ec6ecf2e66", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "14", + "chainname" : "G", + "rlp" : "0xf90263f901f9a0d4aec390ceb23c76c25f9abc6d32fdb5e6e982070797364d2a425d0cb91f4328a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a035581d70ac97d713e3cc0aa9071a5e525b148f16fda113a3dfd04e2a986079a5a0888abace6d2ea2dcad9f49d363b0585b27b75f361b87efb664d723ec6ecf2e66a0006727b25df8d39e7c61d09aab209ed3d1f8f2934b750f5c26aa9662551f2572b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203400e832fefd882520884561bc06d80a011d1ce4ac6617f295db520c5e000df91d04a0af6cb76600a967e4c38bcb4cfed887fb48c36adc87357f864f8620d018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca019f27620e69b8e8d19737252da03fa55d8e9faa6bf0e6ddc880ce9b0b501792ca009ebd6b3f1f0ae667e213ddcca21bc017af26d7e11c5475c8268171b3a0cfb8fc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0d", + "r" : "0x19f27620e69b8e8d19737252da03fa55d8e9faa6bf0e6ddc880ce9b0b501792c", + "s" : "0x09ebd6b3f1f0ae667e213ddcca21bc017af26d7e11c5475c8268171b3a0cfb8f", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020380", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f574f751cf77ed192f82b92fe025d124532bf628012d1618982e7658d8aa17df", + "mixHash" : "5028e70e5d9ad7b58282144fc318141a7d6a9decb6213e47bf1cb52f7cdb8030", + "nonce" : "c33cc2d702f5f7c8", + "number" : "0x0f", + "parentHash" : "a29f69e1155f8cff448a9d8f2771d3bb12a596f4e1af1709f76d643feb8ace7f", + "receiptTrie" : "6628b2fb8a7108b258d4b4f0c2c3e161e4c6b384cfe220152da80e60cf50e9d8", + "stateRoot" : "df9c525bc69611f930e330cdf69ff6621f0d1260c0ce8925555964d93f700a4f", + "timestamp" : "0x561bc06f", + "transactionsTrie" : "28ca66586b4bce4652aa9d251232930949ed4117a95f2748419119b973eb6190", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "15", + "chainname" : "G", + "rlp" : "0xf90263f901f9a0a29f69e1155f8cff448a9d8f2771d3bb12a596f4e1af1709f76d643feb8ace7fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0df9c525bc69611f930e330cdf69ff6621f0d1260c0ce8925555964d93f700a4fa028ca66586b4bce4652aa9d251232930949ed4117a95f2748419119b973eb6190a06628b2fb8a7108b258d4b4f0c2c3e161e4c6b384cfe220152da80e60cf50e9d8b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203800f832fefd882520884561bc06f80a05028e70e5d9ad7b58282144fc318141a7d6a9decb6213e47bf1cb52f7cdb803088c33cc2d702f5f7c8f864f8620e018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0a991f498c34e3d89aeba3e5e6d61ed0ce9cf406c367709bb19b7608a79beff9da01aaff10adf9a63ff9afae06daa9923d4d95c45fdf5526d0bb1b54227528f0519c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0e", + "r" : "0xa991f498c34e3d89aeba3e5e6d61ed0ce9cf406c367709bb19b7608a79beff9d", + "s" : "0x1aaff10adf9a63ff9afae06daa9923d4d95c45fdf5526d0bb1b54227528f0519", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0203c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "72b1e08467ec2d13ffb1fbc9bc2b86def504b522e80ba325ad14b97b85f2ef6b", + "mixHash" : "fb4e78e2ead234d9befd0d2c9b5ed62942e552d4df52fd0ac4ee330a235aff08", + "nonce" : "88dbec5ae64d944c", + "number" : "0x10", + "parentHash" : "f574f751cf77ed192f82b92fe025d124532bf628012d1618982e7658d8aa17df", + "receiptTrie" : "57da65d874f02ec5a7926ced87773db132d4c8deb793673c5aabcdcfc1aeaa72", + "stateRoot" : "b2e9b83bdfecc41b8d39c2e890ff9893d4048529078f009184e6648779eedcdb", + "timestamp" : "0x561bc072", + "transactionsTrie" : "4442c5a84e6423ff1d3649ed5e62b30261d8cef49fa86a7db74b0f7971516141", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "16", + "chainname" : "G", + "rlp" : "0xf90263f901f9a0f574f751cf77ed192f82b92fe025d124532bf628012d1618982e7658d8aa17dfa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b2e9b83bdfecc41b8d39c2e890ff9893d4048529078f009184e6648779eedcdba04442c5a84e6423ff1d3649ed5e62b30261d8cef49fa86a7db74b0f7971516141a057da65d874f02ec5a7926ced87773db132d4c8deb793673c5aabcdcfc1aeaa72b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203c010832fefd882520884561bc07280a0fb4e78e2ead234d9befd0d2c9b5ed62942e552d4df52fd0ac4ee330a235aff088888dbec5ae64d944cf864f8620f018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba093b45ffb4e937a80a79bf4158446776877ff38e3943ba1f1236bedbeaba27734a01fcb18293dd2e2b9389fa610911570b22471a37e86bf767761740e6e8338a20bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0f", + "r" : "0x93b45ffb4e937a80a79bf4158446776877ff38e3943ba1f1236bedbeaba27734", + "s" : "0x1fcb18293dd2e2b9389fa610911570b22471a37e86bf767761740e6e8338a20b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020400", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "6ad1c3a25a23c88ef12d1fb040daf863df5db75135a23efcec967d897f9e3998", + "mixHash" : "cef490d40799ea3181671fb9f8d96d8d475a9407baaeaae5fe4091f52b7061ec", + "nonce" : "cb64201b452d15a1", + "number" : "0x11", + "parentHash" : "72b1e08467ec2d13ffb1fbc9bc2b86def504b522e80ba325ad14b97b85f2ef6b", + "receiptTrie" : "e37d38e6746ae7e6a6a80245f9858750ac8a4e4ae00f1675ac4723ec69905949", + "stateRoot" : "a2cd811c2f388b13673c43563a616b1b4fd91feef8cd352dbfa0dc016465d3db", + "timestamp" : "0x561bc074", + "transactionsTrie" : "7d02c4833de5fd04d27269884fb08094d64b201e0971e11b8ac16050ccc84247", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "17", + "chainname" : "G", + "rlp" : "0xf90263f901f9a072b1e08467ec2d13ffb1fbc9bc2b86def504b522e80ba325ad14b97b85f2ef6ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a2cd811c2f388b13673c43563a616b1b4fd91feef8cd352dbfa0dc016465d3dba07d02c4833de5fd04d27269884fb08094d64b201e0971e11b8ac16050ccc84247a0e37d38e6746ae7e6a6a80245f9858750ac8a4e4ae00f1675ac4723ec69905949b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302040011832fefd882520884561bc07480a0cef490d40799ea3181671fb9f8d96d8d475a9407baaeaae5fe4091f52b7061ec88cb64201b452d15a1f864f86210018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca02471e07e498a2f1b174d55f6da0f50f507078a0222a9bb8f7a0973eb887ee7e4a0705ff26cac70f04e6bd8644237f2b52b8c4403f97a29b6872a821e7c62105d61c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x10", + "r" : "0x2471e07e498a2f1b174d55f6da0f50f507078a0222a9bb8f7a0973eb887ee7e4", + "s" : "0x705ff26cac70f04e6bd8644237f2b52b8c4403f97a29b6872a821e7c62105d61", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020440", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "4f8c8af8ba1c1a89a2962dde397d0b2b4be3430ab91a4bf3af9d3db5baf13751", + "mixHash" : "8560f2ce6938ceb4289bf10bae692523b48c45fa799fe6720f63472587522d95", + "nonce" : "bdd5c22bcf5d0ccf", + "number" : "0x12", + "parentHash" : "6ad1c3a25a23c88ef12d1fb040daf863df5db75135a23efcec967d897f9e3998", + "receiptTrie" : "a30a77e85b7dcc77c08848691a367e57a0a11333697fb33ec03dcdc3660da48c", + "stateRoot" : "d6544eaa6ccb1faec8a8f8a4a0fa5fa997c2e22dce6ee595c3476bf89508c19f", + "timestamp" : "0x561bc076", + "transactionsTrie" : "da6fb9530ace55ca75d3d050dd7297b5114e808930e5f9f8469d64c1f5372f25", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "18", + "chainname" : "G", + "rlp" : "0xf90263f901f9a06ad1c3a25a23c88ef12d1fb040daf863df5db75135a23efcec967d897f9e3998a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d6544eaa6ccb1faec8a8f8a4a0fa5fa997c2e22dce6ee595c3476bf89508c19fa0da6fb9530ace55ca75d3d050dd7297b5114e808930e5f9f8469d64c1f5372f25a0a30a77e85b7dcc77c08848691a367e57a0a11333697fb33ec03dcdc3660da48cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302044012832fefd882520884561bc07680a08560f2ce6938ceb4289bf10bae692523b48c45fa799fe6720f63472587522d9588bdd5c22bcf5d0ccff864f86211018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca05514a0dfb3047746866a77bac4b5b63543fe5d329420e151afd59ccfe5560e5fa04a30f3bd0e2f5dffd60bbdb4e85e764a27f24f1c5250d6fef0ead227e06d1fb9c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x11", + "r" : "0x5514a0dfb3047746866a77bac4b5b63543fe5d329420e151afd59ccfe5560e5f", + "s" : "0x4a30f3bd0e2f5dffd60bbdb4e85e764a27f24f1c5250d6fef0ead227e06d1fb9", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020480", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "6fa719794f3b78818c6c225c6f7ceea41c6688ab47622e0293ab9fb168da8c41", + "mixHash" : "c28df9313b313b9f8e7b01daea94e8abc7fb873f28b61b18c1a9593de78b63a9", + "nonce" : "6b8da708585b8b32", + "number" : "0x13", + "parentHash" : "4f8c8af8ba1c1a89a2962dde397d0b2b4be3430ab91a4bf3af9d3db5baf13751", + "receiptTrie" : "eac158fad516432aa1c1de8b951cd2789dd6f21a1538e0ca213aac4ba7b60b94", + "stateRoot" : "46139e6da579185ae8edc8a336c548c69a78935ed452ac094fb067b52d151fc5", + "timestamp" : "0x561bc07a", + "transactionsTrie" : "2c63ff1f073a6daa140f61a24227262ca6ef7e4a092449444fb220e91d5ca0a3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "19", + "chainname" : "G", + "rlp" : "0xf90263f901f9a04f8c8af8ba1c1a89a2962dde397d0b2b4be3430ab91a4bf3af9d3db5baf13751a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a046139e6da579185ae8edc8a336c548c69a78935ed452ac094fb067b52d151fc5a02c63ff1f073a6daa140f61a24227262ca6ef7e4a092449444fb220e91d5ca0a3a0eac158fad516432aa1c1de8b951cd2789dd6f21a1538e0ca213aac4ba7b60b94b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302048013832fefd882520884561bc07a80a0c28df9313b313b9f8e7b01daea94e8abc7fb873f28b61b18c1a9593de78b63a9886b8da708585b8b32f864f86212018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0b6854e26314681db056dbf99d9502a1acc3f29b6e533afbb340b9b64a342b0fba057d6237667f478e87862bcb902aed157e0efb39ebd9ac3a92d4f3a29726529b5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x12", + "r" : "0xb6854e26314681db056dbf99d9502a1acc3f29b6e533afbb340b9b64a342b0fb", + "s" : "0x57d6237667f478e87862bcb902aed157e0efb39ebd9ac3a92d4f3a29726529b5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0204c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "5992e4c30e96eb05df17e9adb19aa56415166f1dbf916ccf2289a889de537484", + "mixHash" : "93812cde81aae9f6c89277c83b1c0612f04c69ac64b9a1eb39aa7e55a2de6954", + "nonce" : "ad386a48a6ee67a7", + "number" : "0x14", + "parentHash" : "6fa719794f3b78818c6c225c6f7ceea41c6688ab47622e0293ab9fb168da8c41", + "receiptTrie" : "873c7e66b781338d642def9920c795c7d0a2e71f329c9c95330dcb058e110c0a", + "stateRoot" : "697078ac4b73a28f1a6e8bab905e204676b0e0a3d7e3a5060aff1d57faa2f716", + "timestamp" : "0x561bc07c", + "transactionsTrie" : "0fa0b5ae1009bf92e5b8e37abdcdcaf8f720096bc2989f2995f5a09f9fbf7ed8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "20", + "chainname" : "G", + "rlp" : "0xf90263f901f9a06fa719794f3b78818c6c225c6f7ceea41c6688ab47622e0293ab9fb168da8c41a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0697078ac4b73a28f1a6e8bab905e204676b0e0a3d7e3a5060aff1d57faa2f716a00fa0b5ae1009bf92e5b8e37abdcdcaf8f720096bc2989f2995f5a09f9fbf7ed8a0873c7e66b781338d642def9920c795c7d0a2e71f329c9c95330dcb058e110c0ab9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830204c014832fefd882520884561bc07c80a093812cde81aae9f6c89277c83b1c0612f04c69ac64b9a1eb39aa7e55a2de695488ad386a48a6ee67a7f864f86213018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba090a0a14f57f9a58f6b7bc6896aaa6fe31c6963a12e77586134fa167fb260aa88a03cc022425a21f3f88452b79fe24db60257ecc2ba40322eb528fb263491c9f092c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x13", + "r" : "0x90a0a14f57f9a58f6b7bc6896aaa6fe31c6963a12e77586134fa167fb260aa88", + "s" : "0x3cc022425a21f3f88452b79fe24db60257ecc2ba40322eb528fb263491c9f092", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020500", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "9d06fca570bbab54a2cc8fec254d11e323fb64b3f2251e4e24f4248acd3c3d19", + "mixHash" : "277ffa07067f0c0e6e695a011ae1ecd2e27d8ac62a1ffde70ccec763fb1b1482", + "nonce" : "30133a513d990503", + "number" : "0x15", + "parentHash" : "5992e4c30e96eb05df17e9adb19aa56415166f1dbf916ccf2289a889de537484", + "receiptTrie" : "d2d959e25fda18851cd73ad65e60c912caa5c9f7a30dd04dc76b6f1a6728da6c", + "stateRoot" : "90bc46ca204aa68f57e57617194c4996ac69727fe5629a2fd811d65e631844d6", + "timestamp" : "0x561bc07e", + "transactionsTrie" : "5a2b4add2a566391dc24c042f83e1d5bc78dab5c306a5cccfd066096553bee67", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "21", + "chainname" : "G", + "rlp" : "0xf90263f901f9a05992e4c30e96eb05df17e9adb19aa56415166f1dbf916ccf2289a889de537484a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a090bc46ca204aa68f57e57617194c4996ac69727fe5629a2fd811d65e631844d6a05a2b4add2a566391dc24c042f83e1d5bc78dab5c306a5cccfd066096553bee67a0d2d959e25fda18851cd73ad65e60c912caa5c9f7a30dd04dc76b6f1a6728da6cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302050015832fefd882520884561bc07e80a0277ffa07067f0c0e6e695a011ae1ecd2e27d8ac62a1ffde70ccec763fb1b14828830133a513d990503f864f86214018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba01e23e65a978e67928d2f04e676b6cc49d18870f47980b131ca02fc1fb9c50611a0014dc79a923af6f69c233cafd606718dd50e24d5fbda9d35587a684dc5e14628c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x14", + "r" : "0x1e23e65a978e67928d2f04e676b6cc49d18870f47980b131ca02fc1fb9c50611", + "s" : "0x014dc79a923af6f69c233cafd606718dd50e24d5fbda9d35587a684dc5e14628", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020540", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "39aec81bf97759ddc4d8b30cfa2d593c90714c410d98ea75ba5b64b14620465b", + "mixHash" : "962178ddc8a0c2ca4891e4cacfee12d3971c91b026c535ad997f768a7ec363f5", + "nonce" : "6e543f76f2d08b7c", + "number" : "0x16", + "parentHash" : "9d06fca570bbab54a2cc8fec254d11e323fb64b3f2251e4e24f4248acd3c3d19", + "receiptTrie" : "ab38dca9e4f0a47549ed36cb978320225dddef9f76713d848134079b66c57ee4", + "stateRoot" : "6e51d9b39cf72798a674c10fb74eba2cc53bea60ee8c319069887e58ba35a031", + "timestamp" : "0x561bc080", + "transactionsTrie" : "7501f1d112c55b54919cf6af439708f2f010bdb4357516ca3646292f3ea4bfd8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "22", + "chainname" : "G", + "rlp" : "0xf90263f901f9a09d06fca570bbab54a2cc8fec254d11e323fb64b3f2251e4e24f4248acd3c3d19a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a06e51d9b39cf72798a674c10fb74eba2cc53bea60ee8c319069887e58ba35a031a07501f1d112c55b54919cf6af439708f2f010bdb4357516ca3646292f3ea4bfd8a0ab38dca9e4f0a47549ed36cb978320225dddef9f76713d848134079b66c57ee4b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302054016832fefd882520884561bc08080a0962178ddc8a0c2ca4891e4cacfee12d3971c91b026c535ad997f768a7ec363f5886e543f76f2d08b7cf864f86215018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca08393c27e8b1658ba9d0de41553a1f40c8d7054daf6258f17d188f525e37fabc4a006321e9df3cd7d02479a9db54eb764a27e5c78cc9f34899ff223efaad9a0b126c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x15", + "r" : "0x8393c27e8b1658ba9d0de41553a1f40c8d7054daf6258f17d188f525e37fabc4", + "s" : "0x06321e9df3cd7d02479a9db54eb764a27e5c78cc9f34899ff223efaad9a0b126", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020580", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "881deae35f08d8ade808fe91369583b7c45d9596b9a1a3bda59fa269592da5fd", + "mixHash" : "4f14eb6d9e290aa150dd7f4cd15c579e0c20d6e8a11a78190eaf14b135ce80ff", + "nonce" : "bf1602d269d39594", + "number" : "0x17", + "parentHash" : "39aec81bf97759ddc4d8b30cfa2d593c90714c410d98ea75ba5b64b14620465b", + "receiptTrie" : "95890ec65ef7e006e341431331330b6cfc9293d87f854eb908ebf9919fc93253", + "stateRoot" : "8ecc351b000c38ff0e3adf5a8383fbe5a6c80524ef8e0ead95fe3b4d34e71f08", + "timestamp" : "0x561bc082", + "transactionsTrie" : "bfd282d92b8e564ad1ff263f6ae03b93a069f10f00d3e723a296800a757f1ff3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "23", + "chainname" : "G", + "rlp" : "0xf90263f901f9a039aec81bf97759ddc4d8b30cfa2d593c90714c410d98ea75ba5b64b14620465ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08ecc351b000c38ff0e3adf5a8383fbe5a6c80524ef8e0ead95fe3b4d34e71f08a0bfd282d92b8e564ad1ff263f6ae03b93a069f10f00d3e723a296800a757f1ff3a095890ec65ef7e006e341431331330b6cfc9293d87f854eb908ebf9919fc93253b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302058017832fefd882520884561bc08280a04f14eb6d9e290aa150dd7f4cd15c579e0c20d6e8a11a78190eaf14b135ce80ff88bf1602d269d39594f864f86216018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba0cfb1ca5f71db91c77be594c61534914f492061474bd1e580cc8e1595f4b20043a078b4cfed0c7ec633a6442ac76748146ecfe8e76702840373150104c31c8535a9c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x16", + "r" : "0xcfb1ca5f71db91c77be594c61534914f492061474bd1e580cc8e1595f4b20043", + "s" : "0x78b4cfed0c7ec633a6442ac76748146ecfe8e76702840373150104c31c8535a9", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0205c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "d6abcc17d2a624e3914f8da879ad4a0c54f6be3f5b01246b0c6e620d3b7988a0", + "mixHash" : "18683d25a09effa60e7c9a890872ac6adfe766b47d243e1f335e2e64ec0f89df", + "nonce" : "1b201f4cd46f1051", + "number" : "0x18", + "parentHash" : "881deae35f08d8ade808fe91369583b7c45d9596b9a1a3bda59fa269592da5fd", + "receiptTrie" : "9d8083550c7f882bd5de852c8b7158b1ce7514561a87fd86505b185ebfdd1666", + "stateRoot" : "15cc51eeac2abff97b7ebebc17fd16493d4f88930bfd47193276539c24ffe02e", + "timestamp" : "0x561bc083", + "transactionsTrie" : "26cce381fef66f447739c2d22bdd85038f492bbcb8095cd8ebc03cdfbbf12f06", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "24", + "chainname" : "G", + "rlp" : "0xf90263f901f9a0881deae35f08d8ade808fe91369583b7c45d9596b9a1a3bda59fa269592da5fda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a015cc51eeac2abff97b7ebebc17fd16493d4f88930bfd47193276539c24ffe02ea026cce381fef66f447739c2d22bdd85038f492bbcb8095cd8ebc03cdfbbf12f06a09d8083550c7f882bd5de852c8b7158b1ce7514561a87fd86505b185ebfdd1666b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830205c018832fefd882520884561bc08380a018683d25a09effa60e7c9a890872ac6adfe766b47d243e1f335e2e64ec0f89df881b201f4cd46f1051f864f86217018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca03f77a5cf014af7e1b4a2fddeb245325e5c704e79613ac5762ef0edddf1e37424a024e43a44c6251ea8cc538fc3eb367ad3118bb94ba6ed62dd67a82f319effd397c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x17", + "r" : "0x3f77a5cf014af7e1b4a2fddeb245325e5c704e79613ac5762ef0edddf1e37424", + "s" : "0x24e43a44c6251ea8cc538fc3eb367ad3118bb94ba6ed62dd67a82f319effd397", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020600", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "b5ec62d7a3d9490e9b6d9efe76123f5d14530885103d9e05e120b6512b78c199", + "mixHash" : "15dcc00e161c9649bc317306a49b5012c2d00fdf6e1a7ffc5e70fa89c64e109b", + "nonce" : "2eff0430b9909533", + "number" : "0x19", + "parentHash" : "d6abcc17d2a624e3914f8da879ad4a0c54f6be3f5b01246b0c6e620d3b7988a0", + "receiptTrie" : "d2b023cc7271898bd83b120c8faeac88cb22edb182b9a09eb1280d538c6d6959", + "stateRoot" : "b73e9074f8a8371fcc5e9336ff327f695c6b1a12e5e0d0f91bbd157203fe1d01", + "timestamp" : "0x561bc085", + "transactionsTrie" : "70afb6a409b9a1e41356f4bdaeae18cd0a315cb8a66b6a816b8d4e4321b9f673", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "25", + "chainname" : "G", + "rlp" : "0xf90263f901f9a0d6abcc17d2a624e3914f8da879ad4a0c54f6be3f5b01246b0c6e620d3b7988a0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b73e9074f8a8371fcc5e9336ff327f695c6b1a12e5e0d0f91bbd157203fe1d01a070afb6a409b9a1e41356f4bdaeae18cd0a315cb8a66b6a816b8d4e4321b9f673a0d2b023cc7271898bd83b120c8faeac88cb22edb182b9a09eb1280d538c6d6959b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302060019832fefd882520884561bc08580a015dcc00e161c9649bc317306a49b5012c2d00fdf6e1a7ffc5e70fa89c64e109b882eff0430b9909533f864f86218018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8782271c801ba0284985a979b5d700d0401f3b2e823ee3a814bae6cbdecf680da4e13f00a592cea0260f519c963c0fb132ee864355070a518f5b666a59291d01d41f4fdf280b165cc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x18", + "r" : "0x284985a979b5d700d0401f3b2e823ee3a814bae6cbdecf680da4e13f00a592ce", + "s" : "0x260f519c963c0fb132ee864355070a518f5b666a59291d01d41f4fdf280b165c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x271c" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "430c0922b4b80c906e6d3b3cc729d152ac78d44282df76175553a2de7d8bedc8", + "mixHash" : "de40c611d69bcdb439467989d0920ad3786b0369adeefe807b69faa54deb89b3", + "nonce" : "2570c5156d272949", + "number" : "0x01", + "parentHash" : "358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bd", + "receiptTrie" : "6aa1e44f24b69e6f3c398ed2be6eee2d8b7b57480aa2a8a9085e77d2d3d06a55", + "stateRoot" : "4325a011e3c2f9f72c35f60ca7f9915004f68c3357694aad4848bfe625c4622f", + "timestamp" : "0x561bc088", + "transactionsTrie" : "517131da8d5dbdce45a2a393ea59f742e9411a12431070cfe60400536d26faa9", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04325a011e3c2f9f72c35f60ca7f9915004f68c3357694aad4848bfe625c4622fa0517131da8d5dbdce45a2a393ea59f742e9411a12431070cfe60400536d26faa9a06aa1e44f24b69e6f3c398ed2be6eee2d8b7b57480aa2a8a9085e77d2d3d06a55b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc08880a0de40c611d69bcdb439467989d0920ad3786b0369adeefe807b69faa54deb89b3882570c5156d272949f864f86280018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba0875b81c32db08fc17fb8917235d69b3959aeeea4e8d827d1a34a5d79aad74ad3a05abf22636cb905d225c7e65065f2f00db0810d9fca77fd6aadc6832de2dc06c6c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x875b81c32db08fc17fb8917235d69b3959aeeea4e8d827d1a34a5d79aad74ad3", + "s" : "0x5abf22636cb905d225c7e65065f2f00db0810d9fca77fd6aadc6832de2dc06c6", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "39f9b9f148fb1cd42b5664b7aac2cffa8bfb87d6c58e601e9f4bb5e7ca09136c", + "mixHash" : "a9efa2b575d5766b460ec7fd08aa925539e8ea34f451088e1ea13bb45133c22e", + "nonce" : "5e145cfbe7f80d1d", + "number" : "0x02", + "parentHash" : "430c0922b4b80c906e6d3b3cc729d152ac78d44282df76175553a2de7d8bedc8", + "receiptTrie" : "ff12306239527e2507f40989c979fafbc3b8a95e2ac9d87d26e0f10fafa1da7c", + "stateRoot" : "0912289a247a213bb1fd68c3d4ad6f1c61b60ec553ef1e1fd12a3354a720cd5e", + "timestamp" : "0x561bc08b", + "transactionsTrie" : "7a23a1b4789d236eb3edfe4709fbf0269fdc22bd08fa48799c6c9f7b0dc2fc42", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0430c0922b4b80c906e6d3b3cc729d152ac78d44282df76175553a2de7d8bedc8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00912289a247a213bb1fd68c3d4ad6f1c61b60ec553ef1e1fd12a3354a720cd5ea07a23a1b4789d236eb3edfe4709fbf0269fdc22bd08fa48799c6c9f7b0dc2fc42a0ff12306239527e2507f40989c979fafbc3b8a95e2ac9d87d26e0f10fafa1da7cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc08b80a0a9efa2b575d5766b460ec7fd08aa925539e8ea34f451088e1ea13bb45133c22e885e145cfbe7f80d1df864f86201018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba03751f7e63119f172bc7c7ce417c4f3570eb29a06103cdff0d5d23e537bcb6f01a0637f26bd0f382eae584404294dc9ff61c154e81696781601e791fd7e95717b2dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x3751f7e63119f172bc7c7ce417c4f3570eb29a06103cdff0d5d23e537bcb6f01", + "s" : "0x637f26bd0f382eae584404294dc9ff61c154e81696781601e791fd7e95717b2d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "507e118bea20c7fcd095e7a380e809fd5ce319a762d58a45b0a53918da53400e", + "mixHash" : "631c3395ac275b996ba4ef165d87352cabc804ef8ab28086b6b962337897f5fc", + "nonce" : "457a43d6268d731a", + "number" : "0x03", + "parentHash" : "39f9b9f148fb1cd42b5664b7aac2cffa8bfb87d6c58e601e9f4bb5e7ca09136c", + "receiptTrie" : "079a220f268e9c199c166ecdf5cb527dee36b0b3929c01eb304698fff245fffc", + "stateRoot" : "349b5c0b55ab5a61277407ca809181275555465df79c71c5545751f7dee5438e", + "timestamp" : "0x561bc08e", + "transactionsTrie" : "7273938d4695b5d9facfde4118ecf2262b6e4117051420c80b30aebc6ae6bca1", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "H", + "rlp" : "0xf90263f901f9a039f9b9f148fb1cd42b5664b7aac2cffa8bfb87d6c58e601e9f4bb5e7ca09136ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0349b5c0b55ab5a61277407ca809181275555465df79c71c5545751f7dee5438ea07273938d4695b5d9facfde4118ecf2262b6e4117051420c80b30aebc6ae6bca1a0079a220f268e9c199c166ecdf5cb527dee36b0b3929c01eb304698fff245fffcb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc08e80a0631c3395ac275b996ba4ef165d87352cabc804ef8ab28086b6b962337897f5fc88457a43d6268d731af864f86202018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0ccb891c1476a75413e034afd5865278640a0b5e8d24d09b8847bc93ed4901ba8a05b3b420affac6aee7b809aadf4c03c09073ba5f59826e587ea1f631d41e2a23bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0xccb891c1476a75413e034afd5865278640a0b5e8d24d09b8847bc93ed4901ba8", + "s" : "0x5b3b420affac6aee7b809aadf4c03c09073ba5f59826e587ea1f631d41e2a23b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "eb198565e19534939bdf25dc05fc3593bde27fb544a47b69e6a122309b0e9561", + "mixHash" : "6521a4cab445712e1706da93beb45ca5b2c3a494bcc5dd43f29971957effc71d", + "nonce" : "505902809bd9fdfc", + "number" : "0x04", + "parentHash" : "507e118bea20c7fcd095e7a380e809fd5ce319a762d58a45b0a53918da53400e", + "receiptTrie" : "ea9bac70a18fc6caefc21d334803e07061307f51623ba0bceb5edb3bad7e9bc7", + "stateRoot" : "c1648028171f796636eab026e0744c2928f01604fc79c6fd9759e2e6b6518711", + "timestamp" : "0x561bc090", + "transactionsTrie" : "f414248719c341aee8a75df4004631133864eea91d9d8fd6b5109d475790f769", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0507e118bea20c7fcd095e7a380e809fd5ce319a762d58a45b0a53918da53400ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c1648028171f796636eab026e0744c2928f01604fc79c6fd9759e2e6b6518711a0f414248719c341aee8a75df4004631133864eea91d9d8fd6b5109d475790f769a0ea9bac70a18fc6caefc21d334803e07061307f51623ba0bceb5edb3bad7e9bc7b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc09080a06521a4cab445712e1706da93beb45ca5b2c3a494bcc5dd43f29971957effc71d88505902809bd9fdfcf864f86203018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca06567ef72829bf84de45fb4ded8e5c6092c8ae4440e3da10a9564d60e62d26be2a039963c5253d34fc0f380daec19537a356ccb1dc4096b6c2f79ec4aa38850995cc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0x6567ef72829bf84de45fb4ded8e5c6092c8ae4440e3da10a9564d60e62d26be2", + "s" : "0x39963c5253d34fc0f380daec19537a356ccb1dc4096b6c2f79ec4aa38850995c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "33430e06dce625079f267bacf947b53b359b91a0d091d84b08f5442b5a11ba17", + "mixHash" : "3adae12018e7f88207bc22ce7028258f9d35eaa2d44ebfa45a62a940e74d98a1", + "nonce" : "8a168adcd04033f5", + "number" : "0x05", + "parentHash" : "eb198565e19534939bdf25dc05fc3593bde27fb544a47b69e6a122309b0e9561", + "receiptTrie" : "21f214604286d1d6cc387295903b26fb2e4d875ac396d31e8faff84bc1079386", + "stateRoot" : "a3f107f7c3dd6378c79c7efd45175c05f59c8ce9054b998a86212bfd3505cec7", + "timestamp" : "0x561bc093", + "transactionsTrie" : "a23e1975a13f7acc887e242cc0c6b0a0bbcc32d01783f8ee8e5f7dd068fad2d0", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "5", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0eb198565e19534939bdf25dc05fc3593bde27fb544a47b69e6a122309b0e9561a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a3f107f7c3dd6378c79c7efd45175c05f59c8ce9054b998a86212bfd3505cec7a0a23e1975a13f7acc887e242cc0c6b0a0bbcc32d01783f8ee8e5f7dd068fad2d0a021f214604286d1d6cc387295903b26fb2e4d875ac396d31e8faff84bc1079386b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bc09380a03adae12018e7f88207bc22ce7028258f9d35eaa2d44ebfa45a62a940e74d98a1888a168adcd04033f5f864f86204018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca059210f61dcf97fc8672fb232a4fd5a32e04a5ba4f08ee37c283cef5d57316bb9a05df5a1834a3daa586d48f50b4b3c319e77457eaac4897e591b42be1c48221fd5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0x59210f61dcf97fc8672fb232a4fd5a32e04a5ba4f08ee37c283cef5d57316bb9", + "s" : "0x5df5a1834a3daa586d48f50b4b3c319e77457eaac4897e591b42be1c48221fd5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "ee53f0dc9d92e541347f559abcad86ed4f40cccf17d01637dcd9a95e890e83ba", + "mixHash" : "793fcb5c7fd2072b325d1a0457b0ddfa34f7d39233c170c8f7cec6b73a5f4e2f", + "nonce" : "0670562bd0697bb0", + "number" : "0x06", + "parentHash" : "33430e06dce625079f267bacf947b53b359b91a0d091d84b08f5442b5a11ba17", + "receiptTrie" : "46995ec66ede60c732df3ddd184d897fc8994e72643dc7b024d5ef520e170def", + "stateRoot" : "7076712f646cb5ad6676ebca9dbfee179e4b0b5c35a9a153be4e2a5fb6864200", + "timestamp" : "0x561bc097", + "transactionsTrie" : "e39aa720f7afda75d2f96a9a69be087ac66010cb23c34ff07ee8272f7705fb27", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "chainname" : "H", + "rlp" : "0xf90263f901f9a033430e06dce625079f267bacf947b53b359b91a0d091d84b08f5442b5a11ba17a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07076712f646cb5ad6676ebca9dbfee179e4b0b5c35a9a153be4e2a5fb6864200a0e39aa720f7afda75d2f96a9a69be087ac66010cb23c34ff07ee8272f7705fb27a046995ec66ede60c732df3ddd184d897fc8994e72643dc7b024d5ef520e170defb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882520884561bc09780a0793fcb5c7fd2072b325d1a0457b0ddfa34f7d39233c170c8f7cec6b73a5f4e2f880670562bd0697bb0f864f86205018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba08487a021a6ebd89e54bb97d54b2f62871ba65ae363267663ecc31bd91b6c0b81a056f0ae3898a0d9598fa3c84e17e61d48080fc5c5a76c3aa420a8e39c04e3cfa5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0x8487a021a6ebd89e54bb97d54b2f62871ba65ae363267663ecc31bd91b6c0b81", + "s" : "0x56f0ae3898a0d9598fa3c84e17e61d48080fc5c5a76c3aa420a8e39c04e3cfa5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020180", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f0ef88d6a3472c989438764c1b9c94b18df7c8cbaf5c7397c48b2cf34774a041", + "mixHash" : "fced17b813548b8cb9b84bac2ba7496d1558d83f601a1c8d9b63914a1af2450c", + "nonce" : "bf011652be237007", + "number" : "0x07", + "parentHash" : "ee53f0dc9d92e541347f559abcad86ed4f40cccf17d01637dcd9a95e890e83ba", + "receiptTrie" : "3320480c88a502c58c70d38d5fec7bcf1b02ba3fc30350dec9da9dc542c6f685", + "stateRoot" : "8eb9a7a83802e7e4494f5f1fc09477acfda5792020116a8bc746a899bb936d48", + "timestamp" : "0x561bc098", + "transactionsTrie" : "53796c83ec191274702f254a1ee977424308bacc6b05bb2fef7ca2dadb816a42", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "7", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0ee53f0dc9d92e541347f559abcad86ed4f40cccf17d01637dcd9a95e890e83baa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08eb9a7a83802e7e4494f5f1fc09477acfda5792020116a8bc746a899bb936d48a053796c83ec191274702f254a1ee977424308bacc6b05bb2fef7ca2dadb816a42a03320480c88a502c58c70d38d5fec7bcf1b02ba3fc30350dec9da9dc542c6f685b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882520884561bc09880a0fced17b813548b8cb9b84bac2ba7496d1558d83f601a1c8d9b63914a1af2450c88bf011652be237007f864f86206018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0aaa981bfd2b105f76a0aef7e117ea047b01d6bb153d8729c8c9b9e89f2ec9681a049cd356a9d6641414a0b343030817f7cdb903f229484f0cd89b67164834e7000c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x06", + "r" : "0xaaa981bfd2b105f76a0aef7e117ea047b01d6bb153d8729c8c9b9e89f2ec9681", + "s" : "0x49cd356a9d6641414a0b343030817f7cdb903f229484f0cd89b67164834e7000", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0201c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "eafecffa56d152755fd26bd2d4301912beb6b0e3c9a6a62bc16786d4c2487de9", + "mixHash" : "4402e85723e04172514f2bd094b7bee304629ac6338605bbcc65611fe664eae7", + "nonce" : "5fdc2d83027bc354", + "number" : "0x08", + "parentHash" : "f0ef88d6a3472c989438764c1b9c94b18df7c8cbaf5c7397c48b2cf34774a041", + "receiptTrie" : "62a54f0235cce8297a84dee2ceb88f305a9e20ee18cbb065e558c3a1d06184a0", + "stateRoot" : "cec44de1ec4cc6fb93fcff8defaa67aafe63308bcd83000608051584418fb1b0", + "timestamp" : "0x561bc09c", + "transactionsTrie" : "88692a381e7fa4e989486fe33f3b62e79b59486c1352fbbbcbabb87eda76c9d3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "8", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0f0ef88d6a3472c989438764c1b9c94b18df7c8cbaf5c7397c48b2cf34774a041a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cec44de1ec4cc6fb93fcff8defaa67aafe63308bcd83000608051584418fb1b0a088692a381e7fa4e989486fe33f3b62e79b59486c1352fbbbcbabb87eda76c9d3a062a54f0235cce8297a84dee2ceb88f305a9e20ee18cbb065e558c3a1d06184a0b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd882520884561bc09c80a04402e85723e04172514f2bd094b7bee304629ac6338605bbcc65611fe664eae7885fdc2d83027bc354f864f86207018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca085c3b66d064a06c9bfe05b9ebda4a55c205a84c58fdbf4a30c2b05c78bbd760fa00a2841e5e2ffbc9fa31bce28cd5f401095353c6ffeda50cc5f2aca8bd95d0efbc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x07", + "r" : "0x85c3b66d064a06c9bfe05b9ebda4a55c205a84c58fdbf4a30c2b05c78bbd760f", + "s" : "0x0a2841e5e2ffbc9fa31bce28cd5f401095353c6ffeda50cc5f2aca8bd95d0efb", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020200", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "586c168f87098ad314cf013a1e795040b7d82cca75288d6460e6cc86cd00875a", + "mixHash" : "aaeac4c02e8bfa4946d071e2f0942c752311881400c40413c4af3899c2cae9d2", + "nonce" : "4c601811c05beb60", + "number" : "0x09", + "parentHash" : "eafecffa56d152755fd26bd2d4301912beb6b0e3c9a6a62bc16786d4c2487de9", + "receiptTrie" : "6106f4521ccfbd1bcd193ef63c1e08bd5c29154e9ade3af77095586fc419539a", + "stateRoot" : "289e44b10542f49476c317abea6a098d334b275285c3e5e36f67f6f99b6e7422", + "timestamp" : "0x561bc09d", + "transactionsTrie" : "d37467009fd0adf0a115dcf071d1db09207fd65b6e983ebf7a1d9e8c6a59ccc7", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "9", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0eafecffa56d152755fd26bd2d4301912beb6b0e3c9a6a62bc16786d4c2487de9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0289e44b10542f49476c317abea6a098d334b275285c3e5e36f67f6f99b6e7422a0d37467009fd0adf0a115dcf071d1db09207fd65b6e983ebf7a1d9e8c6a59ccc7a06106f4521ccfbd1bcd193ef63c1e08bd5c29154e9ade3af77095586fc419539ab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd882520884561bc09d80a0aaeac4c02e8bfa4946d071e2f0942c752311881400c40413c4af3899c2cae9d2884c601811c05beb60f864f86208018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba06478c93f03fbd85df39ad8d5ecb068d7b3937fe79e4f9992b32c4d40ad58bcdfa010c92feed75a4e892ac0ece29c0a30ad71716b09fbda7c88c08474d445c4ea1dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x08", + "r" : "0x6478c93f03fbd85df39ad8d5ecb068d7b3937fe79e4f9992b32c4d40ad58bcdf", + "s" : "0x10c92feed75a4e892ac0ece29c0a30ad71716b09fbda7c88c08474d445c4ea1d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020240", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "fd4333b3f33f1b4a141e360b3297169d06284a1ccebbd5b55a7a5c7b946dd848", + "mixHash" : "5a54d2b6ff0ca347347bcac8115eeb3d1143bbb01f29559b5ed4dee67eb0edc7", + "nonce" : "a8ed37dc7b9bd123", + "number" : "0x0a", + "parentHash" : "586c168f87098ad314cf013a1e795040b7d82cca75288d6460e6cc86cd00875a", + "receiptTrie" : "36ad16e1f3254ca91ff9bc829285719dfd7814cb4eaa8e71c2b958a811501e23", + "stateRoot" : "1494c9102ed5926f348eba68bffe0a60e1085bf9e6ce6b2aa11081fc7960440e", + "timestamp" : "0x561bc09f", + "transactionsTrie" : "2b9d255b7f1a01db4f4bdb506a75e6664eee8cd7e386e26b295199e0e3283e62", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "10", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0586c168f87098ad314cf013a1e795040b7d82cca75288d6460e6cc86cd00875aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01494c9102ed5926f348eba68bffe0a60e1085bf9e6ce6b2aa11081fc7960440ea02b9d255b7f1a01db4f4bdb506a75e6664eee8cd7e386e26b295199e0e3283e62a036ad16e1f3254ca91ff9bc829285719dfd7814cb4eaa8e71c2b958a811501e23b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd882520884561bc09f80a05a54d2b6ff0ca347347bcac8115eeb3d1143bbb01f29559b5ed4dee67eb0edc788a8ed37dc7b9bd123f864f86209018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0ca81f73cf818521d6a8a43d1d3b3295215a6a6384d90234ca6d4aa954197cb05a0129533bc15c142eef56462ad9f4cd5ff6ca27605f4ba8ff7c5d411e9b1026616c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x09", + "r" : "0xca81f73cf818521d6a8a43d1d3b3295215a6a6384d90234ca6d4aa954197cb05", + "s" : "0x129533bc15c142eef56462ad9f4cd5ff6ca27605f4ba8ff7c5d411e9b1026616", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020280", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "98c632409778efd786bd9e1e6e65957761ded364d207ee2c8802ad52c29d4121", + "mixHash" : "892c10c58ab5a7621cd5e87ffc48b8710cdda44b81da042a1ca6ed619879e3a4", + "nonce" : "f3bc15abf7d9069f", + "number" : "0x0b", + "parentHash" : "fd4333b3f33f1b4a141e360b3297169d06284a1ccebbd5b55a7a5c7b946dd848", + "receiptTrie" : "9235fea55d5308ff7644b60cc51958887857269d9de07850f67201904a4cd46b", + "stateRoot" : "7d3cd9ad2b0a3cd7c8ee7e58f57ba7389e327ecec28b95175d90974d1623c4df", + "timestamp" : "0x561bc0a1", + "transactionsTrie" : "f1b7b7abd402152a29d6e004340908584c3c14d92e56a32727dcbb10e240877e", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "11", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0fd4333b3f33f1b4a141e360b3297169d06284a1ccebbd5b55a7a5c7b946dd848a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07d3cd9ad2b0a3cd7c8ee7e58f57ba7389e327ecec28b95175d90974d1623c4dfa0f1b7b7abd402152a29d6e004340908584c3c14d92e56a32727dcbb10e240877ea09235fea55d5308ff7644b60cc51958887857269d9de07850f67201904a4cd46bb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202800b832fefd882520884561bc0a180a0892c10c58ab5a7621cd5e87ffc48b8710cdda44b81da042a1ca6ed619879e3a488f3bc15abf7d9069ff864f8620a018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0acaae457cabd616f95715626604f30e7c469de1d857dbe84478388e1475c9ceda02128dc98cf34b26da3456703fc7d164a303994b1901f1239b9b1f22af173cebfc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0a", + "r" : "0xacaae457cabd616f95715626604f30e7c469de1d857dbe84478388e1475c9ced", + "s" : "0x2128dc98cf34b26da3456703fc7d164a303994b1901f1239b9b1f22af173cebf", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0202c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "2ead651293f6e75b32f94b6907aa7c467b5be33c535de1d9e67a1c55fb05c51c", + "mixHash" : "f684b1da278b165dcea7b9cda62b20b05ba8f783c656d09f8007e71bb2259915", + "nonce" : "a38ff39e55de1ba2", + "number" : "0x0c", + "parentHash" : "98c632409778efd786bd9e1e6e65957761ded364d207ee2c8802ad52c29d4121", + "receiptTrie" : "20fa2703a9e14d6122f88997c9506f5e66e140238942e9ded272a1f44d0c0aa4", + "stateRoot" : "5a8920280e8e856b48f2db2a9059e774ffe18934efa013bb213b4e12e3568bbf", + "timestamp" : "0x561bc0a2", + "transactionsTrie" : "a52f2cbd44312747b15f70c57ad232ec3d8a29df8cd16fb53c813ed6bb037192", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "12", + "chainname" : "H", + "rlp" : "0xf90263f901f9a098c632409778efd786bd9e1e6e65957761ded364d207ee2c8802ad52c29d4121a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05a8920280e8e856b48f2db2a9059e774ffe18934efa013bb213b4e12e3568bbfa0a52f2cbd44312747b15f70c57ad232ec3d8a29df8cd16fb53c813ed6bb037192a020fa2703a9e14d6122f88997c9506f5e66e140238942e9ded272a1f44d0c0aa4b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202c00c832fefd882520884561bc0a280a0f684b1da278b165dcea7b9cda62b20b05ba8f783c656d09f8007e71bb225991588a38ff39e55de1ba2f864f8620b018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0c3827f5f94441a7d22bff4b343924a3d09260569eb869fa9553e96147f7ff74fa04aa947c879a1edb1f097e2a218a03bb4363fc636de7b95ae4d2f26b12daf6ec3c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0b", + "r" : "0xc3827f5f94441a7d22bff4b343924a3d09260569eb869fa9553e96147f7ff74f", + "s" : "0x4aa947c879a1edb1f097e2a218a03bb4363fc636de7b95ae4d2f26b12daf6ec3", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020300", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "cd972ae94298a2050fca5f3c00cef38745d8488a2c5936473969160fff20d42a", + "mixHash" : "461df152f6f95a8c78843112902823ed24ca9c57be0a4aeb88b25cb4c96f5180", + "nonce" : "4755be56ada44c36", + "number" : "0x0d", + "parentHash" : "2ead651293f6e75b32f94b6907aa7c467b5be33c535de1d9e67a1c55fb05c51c", + "receiptTrie" : "b41d41f5dc9e2413bd2f35364185160690e61769cb708b0cb6e45f53d787eb76", + "stateRoot" : "317df0709ef7091dbc7d3153637230fc312fb271263be43a2627aaea12ddf70f", + "timestamp" : "0x561bc0a6", + "transactionsTrie" : "c260a4ed42e2d514563cb63ce50ac6505b671301637d65fdf64c5d20622e087d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "13", + "chainname" : "H", + "rlp" : "0xf90263f901f9a02ead651293f6e75b32f94b6907aa7c467b5be33c535de1d9e67a1c55fb05c51ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0317df0709ef7091dbc7d3153637230fc312fb271263be43a2627aaea12ddf70fa0c260a4ed42e2d514563cb63ce50ac6505b671301637d65fdf64c5d20622e087da0b41d41f5dc9e2413bd2f35364185160690e61769cb708b0cb6e45f53d787eb76b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203000d832fefd882520884561bc0a680a0461df152f6f95a8c78843112902823ed24ca9c57be0a4aeb88b25cb4c96f5180884755be56ada44c36f864f8620c018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba07a1cc897dd2a447c3ad5ab0a84a7d2a8e9ad57741f4060a06d2bf540542a92e6a075ffcaf435338dbccce9d21991b7f25c159ca77eb7f3f68d29d253e28a020793c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0c", + "r" : "0x7a1cc897dd2a447c3ad5ab0a84a7d2a8e9ad57741f4060a06d2bf540542a92e6", + "s" : "0x75ffcaf435338dbccce9d21991b7f25c159ca77eb7f3f68d29d253e28a020793", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020340", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f7c842fd3f442864a5ce1e6476ea4da60bb521e794122cb0d8035dbaf3b4df66", + "mixHash" : "1058afabc54c50630f9d8f5bd3177088552f87deffacec90111dccfa5e87569a", + "nonce" : "6c7327201caa4098", + "number" : "0x0e", + "parentHash" : "cd972ae94298a2050fca5f3c00cef38745d8488a2c5936473969160fff20d42a", + "receiptTrie" : "006727b25df8d39e7c61d09aab209ed3d1f8f2934b750f5c26aa9662551f2572", + "stateRoot" : "35581d70ac97d713e3cc0aa9071a5e525b148f16fda113a3dfd04e2a986079a5", + "timestamp" : "0x561bc0a8", + "transactionsTrie" : "888abace6d2ea2dcad9f49d363b0585b27b75f361b87efb664d723ec6ecf2e66", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "14", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0cd972ae94298a2050fca5f3c00cef38745d8488a2c5936473969160fff20d42aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a035581d70ac97d713e3cc0aa9071a5e525b148f16fda113a3dfd04e2a986079a5a0888abace6d2ea2dcad9f49d363b0585b27b75f361b87efb664d723ec6ecf2e66a0006727b25df8d39e7c61d09aab209ed3d1f8f2934b750f5c26aa9662551f2572b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203400e832fefd882520884561bc0a880a01058afabc54c50630f9d8f5bd3177088552f87deffacec90111dccfa5e87569a886c7327201caa4098f864f8620d018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca019f27620e69b8e8d19737252da03fa55d8e9faa6bf0e6ddc880ce9b0b501792ca009ebd6b3f1f0ae667e213ddcca21bc017af26d7e11c5475c8268171b3a0cfb8fc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0d", + "r" : "0x19f27620e69b8e8d19737252da03fa55d8e9faa6bf0e6ddc880ce9b0b501792c", + "s" : "0x09ebd6b3f1f0ae667e213ddcca21bc017af26d7e11c5475c8268171b3a0cfb8f", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020380", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "a6a8a81e7c04e9f9b281b0cab57a06bd15950425413aa079cf8f411478eafa99", + "mixHash" : "59a9496613fc0d78e00da58649635f02caef85bb94b3379b3e5956dec0d49ef2", + "nonce" : "053449020f44e506", + "number" : "0x0f", + "parentHash" : "f7c842fd3f442864a5ce1e6476ea4da60bb521e794122cb0d8035dbaf3b4df66", + "receiptTrie" : "6628b2fb8a7108b258d4b4f0c2c3e161e4c6b384cfe220152da80e60cf50e9d8", + "stateRoot" : "df9c525bc69611f930e330cdf69ff6621f0d1260c0ce8925555964d93f700a4f", + "timestamp" : "0x561bc0aa", + "transactionsTrie" : "28ca66586b4bce4652aa9d251232930949ed4117a95f2748419119b973eb6190", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "15", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0f7c842fd3f442864a5ce1e6476ea4da60bb521e794122cb0d8035dbaf3b4df66a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0df9c525bc69611f930e330cdf69ff6621f0d1260c0ce8925555964d93f700a4fa028ca66586b4bce4652aa9d251232930949ed4117a95f2748419119b973eb6190a06628b2fb8a7108b258d4b4f0c2c3e161e4c6b384cfe220152da80e60cf50e9d8b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203800f832fefd882520884561bc0aa80a059a9496613fc0d78e00da58649635f02caef85bb94b3379b3e5956dec0d49ef288053449020f44e506f864f8620e018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0a991f498c34e3d89aeba3e5e6d61ed0ce9cf406c367709bb19b7608a79beff9da01aaff10adf9a63ff9afae06daa9923d4d95c45fdf5526d0bb1b54227528f0519c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0e", + "r" : "0xa991f498c34e3d89aeba3e5e6d61ed0ce9cf406c367709bb19b7608a79beff9d", + "s" : "0x1aaff10adf9a63ff9afae06daa9923d4d95c45fdf5526d0bb1b54227528f0519", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0203c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "d00afae2978a0ad68f0f37edd7660914c7c8a99c582e044a82531a7f15e5af2f", + "mixHash" : "7c32d238af7a5dd1970e86faeff70b584474fa23a7c214086a462e532bb7de94", + "nonce" : "1cf106ad78f8127e", + "number" : "0x10", + "parentHash" : "a6a8a81e7c04e9f9b281b0cab57a06bd15950425413aa079cf8f411478eafa99", + "receiptTrie" : "57da65d874f02ec5a7926ced87773db132d4c8deb793673c5aabcdcfc1aeaa72", + "stateRoot" : "b2e9b83bdfecc41b8d39c2e890ff9893d4048529078f009184e6648779eedcdb", + "timestamp" : "0x561bc0ab", + "transactionsTrie" : "4442c5a84e6423ff1d3649ed5e62b30261d8cef49fa86a7db74b0f7971516141", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "16", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0a6a8a81e7c04e9f9b281b0cab57a06bd15950425413aa079cf8f411478eafa99a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b2e9b83bdfecc41b8d39c2e890ff9893d4048529078f009184e6648779eedcdba04442c5a84e6423ff1d3649ed5e62b30261d8cef49fa86a7db74b0f7971516141a057da65d874f02ec5a7926ced87773db132d4c8deb793673c5aabcdcfc1aeaa72b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203c010832fefd882520884561bc0ab80a07c32d238af7a5dd1970e86faeff70b584474fa23a7c214086a462e532bb7de94881cf106ad78f8127ef864f8620f018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba093b45ffb4e937a80a79bf4158446776877ff38e3943ba1f1236bedbeaba27734a01fcb18293dd2e2b9389fa610911570b22471a37e86bf767761740e6e8338a20bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x0f", + "r" : "0x93b45ffb4e937a80a79bf4158446776877ff38e3943ba1f1236bedbeaba27734", + "s" : "0x1fcb18293dd2e2b9389fa610911570b22471a37e86bf767761740e6e8338a20b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020400", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f86e614b773bc9f76dfc3ba3d023f93c54af1505bcca26966298741f89764e72", + "mixHash" : "2be517b2506ab3458d9db208f46bc3d7a35561e228b4b1293860d3305fac0932", + "nonce" : "c5e355cee2e0cf00", + "number" : "0x11", + "parentHash" : "d00afae2978a0ad68f0f37edd7660914c7c8a99c582e044a82531a7f15e5af2f", + "receiptTrie" : "e37d38e6746ae7e6a6a80245f9858750ac8a4e4ae00f1675ac4723ec69905949", + "stateRoot" : "a2cd811c2f388b13673c43563a616b1b4fd91feef8cd352dbfa0dc016465d3db", + "timestamp" : "0x561bc0ae", + "transactionsTrie" : "7d02c4833de5fd04d27269884fb08094d64b201e0971e11b8ac16050ccc84247", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "17", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0d00afae2978a0ad68f0f37edd7660914c7c8a99c582e044a82531a7f15e5af2fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a2cd811c2f388b13673c43563a616b1b4fd91feef8cd352dbfa0dc016465d3dba07d02c4833de5fd04d27269884fb08094d64b201e0971e11b8ac16050ccc84247a0e37d38e6746ae7e6a6a80245f9858750ac8a4e4ae00f1675ac4723ec69905949b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302040011832fefd882520884561bc0ae80a02be517b2506ab3458d9db208f46bc3d7a35561e228b4b1293860d3305fac093288c5e355cee2e0cf00f864f86210018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca02471e07e498a2f1b174d55f6da0f50f507078a0222a9bb8f7a0973eb887ee7e4a0705ff26cac70f04e6bd8644237f2b52b8c4403f97a29b6872a821e7c62105d61c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x10", + "r" : "0x2471e07e498a2f1b174d55f6da0f50f507078a0222a9bb8f7a0973eb887ee7e4", + "s" : "0x705ff26cac70f04e6bd8644237f2b52b8c4403f97a29b6872a821e7c62105d61", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020440", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "576f2f0bfc7db8c9025f5224ddaf715764268b57dc6a707f00bae7b01cc9858e", + "mixHash" : "b140e9729ecb54b13f2bb25302f61249335a08c1c17f8ab1fb5af29b23aed5c6", + "nonce" : "ee749162baa99f1a", + "number" : "0x12", + "parentHash" : "f86e614b773bc9f76dfc3ba3d023f93c54af1505bcca26966298741f89764e72", + "receiptTrie" : "a30a77e85b7dcc77c08848691a367e57a0a11333697fb33ec03dcdc3660da48c", + "stateRoot" : "d6544eaa6ccb1faec8a8f8a4a0fa5fa997c2e22dce6ee595c3476bf89508c19f", + "timestamp" : "0x561bc0b0", + "transactionsTrie" : "da6fb9530ace55ca75d3d050dd7297b5114e808930e5f9f8469d64c1f5372f25", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "18", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0f86e614b773bc9f76dfc3ba3d023f93c54af1505bcca26966298741f89764e72a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d6544eaa6ccb1faec8a8f8a4a0fa5fa997c2e22dce6ee595c3476bf89508c19fa0da6fb9530ace55ca75d3d050dd7297b5114e808930e5f9f8469d64c1f5372f25a0a30a77e85b7dcc77c08848691a367e57a0a11333697fb33ec03dcdc3660da48cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302044012832fefd882520884561bc0b080a0b140e9729ecb54b13f2bb25302f61249335a08c1c17f8ab1fb5af29b23aed5c688ee749162baa99f1af864f86211018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca05514a0dfb3047746866a77bac4b5b63543fe5d329420e151afd59ccfe5560e5fa04a30f3bd0e2f5dffd60bbdb4e85e764a27f24f1c5250d6fef0ead227e06d1fb9c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x11", + "r" : "0x5514a0dfb3047746866a77bac4b5b63543fe5d329420e151afd59ccfe5560e5f", + "s" : "0x4a30f3bd0e2f5dffd60bbdb4e85e764a27f24f1c5250d6fef0ead227e06d1fb9", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020480", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "de58457dc6613ecaeb945c537226893454bdd31f33bc485bed2c7c677b91ad67", + "mixHash" : "79762a0c09f0e3c1a04fe207978c6a2b91caf7e2b1404616a6111986fb403d9f", + "nonce" : "bf9a7d176d75fe01", + "number" : "0x13", + "parentHash" : "576f2f0bfc7db8c9025f5224ddaf715764268b57dc6a707f00bae7b01cc9858e", + "receiptTrie" : "eac158fad516432aa1c1de8b951cd2789dd6f21a1538e0ca213aac4ba7b60b94", + "stateRoot" : "46139e6da579185ae8edc8a336c548c69a78935ed452ac094fb067b52d151fc5", + "timestamp" : "0x561bc0b1", + "transactionsTrie" : "2c63ff1f073a6daa140f61a24227262ca6ef7e4a092449444fb220e91d5ca0a3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "19", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0576f2f0bfc7db8c9025f5224ddaf715764268b57dc6a707f00bae7b01cc9858ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a046139e6da579185ae8edc8a336c548c69a78935ed452ac094fb067b52d151fc5a02c63ff1f073a6daa140f61a24227262ca6ef7e4a092449444fb220e91d5ca0a3a0eac158fad516432aa1c1de8b951cd2789dd6f21a1538e0ca213aac4ba7b60b94b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302048013832fefd882520884561bc0b180a079762a0c09f0e3c1a04fe207978c6a2b91caf7e2b1404616a6111986fb403d9f88bf9a7d176d75fe01f864f86212018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca0b6854e26314681db056dbf99d9502a1acc3f29b6e533afbb340b9b64a342b0fba057d6237667f478e87862bcb902aed157e0efb39ebd9ac3a92d4f3a29726529b5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x12", + "r" : "0xb6854e26314681db056dbf99d9502a1acc3f29b6e533afbb340b9b64a342b0fb", + "s" : "0x57d6237667f478e87862bcb902aed157e0efb39ebd9ac3a92d4f3a29726529b5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0204c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "14af59d1eb1cc909ac7d3346994ec178ebc1de1fa0d82b237194420ff875c9a8", + "mixHash" : "1d0ee4a6043814e1e2f79a436a1645ae33743fb57156f3f83dbd12e4938a92bf", + "nonce" : "b5b8ea3159518385", + "number" : "0x14", + "parentHash" : "de58457dc6613ecaeb945c537226893454bdd31f33bc485bed2c7c677b91ad67", + "receiptTrie" : "873c7e66b781338d642def9920c795c7d0a2e71f329c9c95330dcb058e110c0a", + "stateRoot" : "697078ac4b73a28f1a6e8bab905e204676b0e0a3d7e3a5060aff1d57faa2f716", + "timestamp" : "0x561bc0b5", + "transactionsTrie" : "0fa0b5ae1009bf92e5b8e37abdcdcaf8f720096bc2989f2995f5a09f9fbf7ed8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "20", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0de58457dc6613ecaeb945c537226893454bdd31f33bc485bed2c7c677b91ad67a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0697078ac4b73a28f1a6e8bab905e204676b0e0a3d7e3a5060aff1d57faa2f716a00fa0b5ae1009bf92e5b8e37abdcdcaf8f720096bc2989f2995f5a09f9fbf7ed8a0873c7e66b781338d642def9920c795c7d0a2e71f329c9c95330dcb058e110c0ab9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830204c014832fefd882520884561bc0b580a01d0ee4a6043814e1e2f79a436a1645ae33743fb57156f3f83dbd12e4938a92bf88b5b8ea3159518385f864f86213018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba090a0a14f57f9a58f6b7bc6896aaa6fe31c6963a12e77586134fa167fb260aa88a03cc022425a21f3f88452b79fe24db60257ecc2ba40322eb528fb263491c9f092c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x13", + "r" : "0x90a0a14f57f9a58f6b7bc6896aaa6fe31c6963a12e77586134fa167fb260aa88", + "s" : "0x3cc022425a21f3f88452b79fe24db60257ecc2ba40322eb528fb263491c9f092", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020500", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "e9213f530de8d35fab58f10c987b0005db678bcfe7d71728907395cf4cacbda5", + "mixHash" : "a0925b66b202b8fb3585fc5b60e12d4b5d5ef9f6f0078ac9d0493ede2f488692", + "nonce" : "6a43c3f33d9da4c3", + "number" : "0x15", + "parentHash" : "14af59d1eb1cc909ac7d3346994ec178ebc1de1fa0d82b237194420ff875c9a8", + "receiptTrie" : "d2d959e25fda18851cd73ad65e60c912caa5c9f7a30dd04dc76b6f1a6728da6c", + "stateRoot" : "90bc46ca204aa68f57e57617194c4996ac69727fe5629a2fd811d65e631844d6", + "timestamp" : "0x561bc0b8", + "transactionsTrie" : "5a2b4add2a566391dc24c042f83e1d5bc78dab5c306a5cccfd066096553bee67", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "21", + "chainname" : "H", + "rlp" : "0xf90263f901f9a014af59d1eb1cc909ac7d3346994ec178ebc1de1fa0d82b237194420ff875c9a8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a090bc46ca204aa68f57e57617194c4996ac69727fe5629a2fd811d65e631844d6a05a2b4add2a566391dc24c042f83e1d5bc78dab5c306a5cccfd066096553bee67a0d2d959e25fda18851cd73ad65e60c912caa5c9f7a30dd04dc76b6f1a6728da6cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302050015832fefd882520884561bc0b880a0a0925b66b202b8fb3585fc5b60e12d4b5d5ef9f6f0078ac9d0493ede2f488692886a43c3f33d9da4c3f864f86214018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba01e23e65a978e67928d2f04e676b6cc49d18870f47980b131ca02fc1fb9c50611a0014dc79a923af6f69c233cafd606718dd50e24d5fbda9d35587a684dc5e14628c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x14", + "r" : "0x1e23e65a978e67928d2f04e676b6cc49d18870f47980b131ca02fc1fb9c50611", + "s" : "0x014dc79a923af6f69c233cafd606718dd50e24d5fbda9d35587a684dc5e14628", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020540", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "543da5ef727f6ffa4d66165f4e9c3b6bdfb0d44e4cb7a0aa28a3f91ca37c085b", + "mixHash" : "dc293fdb000a3c582696b6a6616a3ef73158a7c1ca2d7c7dec191971b84b3cbd", + "nonce" : "f28642763d8114a4", + "number" : "0x16", + "parentHash" : "e9213f530de8d35fab58f10c987b0005db678bcfe7d71728907395cf4cacbda5", + "receiptTrie" : "ab38dca9e4f0a47549ed36cb978320225dddef9f76713d848134079b66c57ee4", + "stateRoot" : "6e51d9b39cf72798a674c10fb74eba2cc53bea60ee8c319069887e58ba35a031", + "timestamp" : "0x561bc0ba", + "transactionsTrie" : "7501f1d112c55b54919cf6af439708f2f010bdb4357516ca3646292f3ea4bfd8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "22", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0e9213f530de8d35fab58f10c987b0005db678bcfe7d71728907395cf4cacbda5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a06e51d9b39cf72798a674c10fb74eba2cc53bea60ee8c319069887e58ba35a031a07501f1d112c55b54919cf6af439708f2f010bdb4357516ca3646292f3ea4bfd8a0ab38dca9e4f0a47549ed36cb978320225dddef9f76713d848134079b66c57ee4b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302054016832fefd882520884561bc0ba80a0dc293fdb000a3c582696b6a6616a3ef73158a7c1ca2d7c7dec191971b84b3cbd88f28642763d8114a4f864f86215018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca08393c27e8b1658ba9d0de41553a1f40c8d7054daf6258f17d188f525e37fabc4a006321e9df3cd7d02479a9db54eb764a27e5c78cc9f34899ff223efaad9a0b126c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x15", + "r" : "0x8393c27e8b1658ba9d0de41553a1f40c8d7054daf6258f17d188f525e37fabc4", + "s" : "0x06321e9df3cd7d02479a9db54eb764a27e5c78cc9f34899ff223efaad9a0b126", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020580", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "b1a598a777de68d79833483bd2ab98be17f13a0988ef00ebf5659f25aecae1bc", + "mixHash" : "8c3b63d913e735d8e7e645f4ec7afcb785d169f337bcbac6b3dceb809496b852", + "nonce" : "2439b37add6a611f", + "number" : "0x17", + "parentHash" : "543da5ef727f6ffa4d66165f4e9c3b6bdfb0d44e4cb7a0aa28a3f91ca37c085b", + "receiptTrie" : "95890ec65ef7e006e341431331330b6cfc9293d87f854eb908ebf9919fc93253", + "stateRoot" : "8ecc351b000c38ff0e3adf5a8383fbe5a6c80524ef8e0ead95fe3b4d34e71f08", + "timestamp" : "0x561bc0bb", + "transactionsTrie" : "bfd282d92b8e564ad1ff263f6ae03b93a069f10f00d3e723a296800a757f1ff3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "23", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0543da5ef727f6ffa4d66165f4e9c3b6bdfb0d44e4cb7a0aa28a3f91ca37c085ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08ecc351b000c38ff0e3adf5a8383fbe5a6c80524ef8e0ead95fe3b4d34e71f08a0bfd282d92b8e564ad1ff263f6ae03b93a069f10f00d3e723a296800a757f1ff3a095890ec65ef7e006e341431331330b6cfc9293d87f854eb908ebf9919fc93253b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302058017832fefd882520884561bc0bb80a08c3b63d913e735d8e7e645f4ec7afcb785d169f337bcbac6b3dceb809496b852882439b37add6a611ff864f86216018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ba0cfb1ca5f71db91c77be594c61534914f492061474bd1e580cc8e1595f4b20043a078b4cfed0c7ec633a6442ac76748146ecfe8e76702840373150104c31c8535a9c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x16", + "r" : "0xcfb1ca5f71db91c77be594c61534914f492061474bd1e580cc8e1595f4b20043", + "s" : "0x78b4cfed0c7ec633a6442ac76748146ecfe8e76702840373150104c31c8535a9", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0205c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "d839cc4a1dacf58105759cd69ccde66ac86c19d0f2e7da7a97baef0ab63a8b74", + "mixHash" : "080b1a1a3620fbcdd8e1b0a45a709c6e8d082a18afd1df35d82fd6585bd56add", + "nonce" : "b441dd6b992148d2", + "number" : "0x18", + "parentHash" : "b1a598a777de68d79833483bd2ab98be17f13a0988ef00ebf5659f25aecae1bc", + "receiptTrie" : "9d8083550c7f882bd5de852c8b7158b1ce7514561a87fd86505b185ebfdd1666", + "stateRoot" : "15cc51eeac2abff97b7ebebc17fd16493d4f88930bfd47193276539c24ffe02e", + "timestamp" : "0x561bc0bd", + "transactionsTrie" : "26cce381fef66f447739c2d22bdd85038f492bbcb8095cd8ebc03cdfbbf12f06", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "24", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0b1a598a777de68d79833483bd2ab98be17f13a0988ef00ebf5659f25aecae1bca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a015cc51eeac2abff97b7ebebc17fd16493d4f88930bfd47193276539c24ffe02ea026cce381fef66f447739c2d22bdd85038f492bbcb8095cd8ebc03cdfbbf12f06a09d8083550c7f882bd5de852c8b7158b1ce7514561a87fd86505b185ebfdd1666b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830205c018832fefd882520884561bc0bd80a0080b1a1a3620fbcdd8e1b0a45a709c6e8d082a18afd1df35d82fd6585bd56add88b441dd6b992148d2f864f86217018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87822710801ca03f77a5cf014af7e1b4a2fddeb245325e5c704e79613ac5762ef0edddf1e37424a024e43a44c6251ea8cc538fc3eb367ad3118bb94ba6ed62dd67a82f319effd397c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x17", + "r" : "0x3f77a5cf014af7e1b4a2fddeb245325e5c704e79613ac5762ef0edddf1e37424", + "s" : "0x24e43a44c6251ea8cc538fc3eb367ad3118bb94ba6ed62dd67a82f319effd397", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x2710" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020600", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "8f77cfd76ee7bfa4660e90c01cea623cf6fd5e5623d092931f5e8f34d7cb95d5", + "mixHash" : "b6f5090f8888b2cb7f3b8dbb1080fe5591be631d3998a147d181a46850db3d62", + "nonce" : "df1eccd53b927303", + "number" : "0x19", + "parentHash" : "d839cc4a1dacf58105759cd69ccde66ac86c19d0f2e7da7a97baef0ab63a8b74", + "receiptTrie" : "b5197f323f1f89f19ab3bd9372ce3be20d06c987ad3b0388870f0e0abd288bbf", + "stateRoot" : "3ee1d91466adfac5d14d060c95cac56ce729e1ec3e70f899e77f249f06f9aade", + "timestamp" : "0x561bc0be", + "transactionsTrie" : "24e60aa6a1ad556c59a8dac0bf2d97d9743c5a3bffbe6160ac0ee9992df43bde", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "25", + "chainname" : "H", + "rlp" : "0xf90263f901f9a0d839cc4a1dacf58105759cd69ccde66ac86c19d0f2e7da7a97baef0ab63a8b74a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a03ee1d91466adfac5d14d060c95cac56ce729e1ec3e70f899e77f249f06f9aadea024e60aa6a1ad556c59a8dac0bf2d97d9743c5a3bffbe6160ac0ee9992df43bdea0b5197f323f1f89f19ab3bd9372ce3be20d06c987ad3b0388870f0e0abd288bbfb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302060019832fefd882520884561bc0be80a0b6f5090f8888b2cb7f3b8dbb1080fe5591be631d3998a147d181a46850db3d6288df1eccd53b927303f864f86218018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8782271f801ba00916083718ea4e92da4e0dc6971d1364a7f18587dcc7f74b4a19fb02f278a8a1a06424cdff242c14dbbde8b6722940f5002bc91e41a433002fc1a7152b55033297c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x18", + "r" : "0x0916083718ea4e92da4e0dc6971d1364a7f18587dcc7f74b4a19fb02f278a8a1", + "s" : "0x6424cdff242c14dbbde8b6722940f5002bc91e41a433002fc1a7152b55033297", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x271f" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0205c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "6e90a45ea236f9b9f75553760a1639ac57cd2f75ad622de1c629edc3a9631c55", + "mixHash" : "de8417fd968b5db0924efe3111e742b6e09920f5aed2f8b5d446eff3505bd773", + "nonce" : "e040c6acc5731482", + "number" : "0x1a", + "parentHash" : "1bc62a131f3471bfea7b51e6ddc850b3bb434f53b39bf2c342330501c7b4ec9d", + "receiptTrie" : "b11cbc95bdec8561d81387a92082d0f60522d96090a1eeaec9be112d53b1eb49", + "stateRoot" : "01fb580557c6ea7aa0392c0be8f0ad9637a664901ab1ea28a0118165bd0ef009", + "timestamp" : "0x561bc0c0", + "transactionsTrie" : "b5e4200011b10900133d73e53ff2a1fe2e85c1fcef254253089de2683f37961d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "26", + "chainname" : "A", + "rlp" : "0xf90261f901f9a01bc62a131f3471bfea7b51e6ddc850b3bb434f53b39bf2c342330501c7b4ec9da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a001fb580557c6ea7aa0392c0be8f0ad9637a664901ab1ea28a0118165bd0ef009a0b5e4200011b10900133d73e53ff2a1fe2e85c1fcef254253089de2683f37961da0b11cbc95bdec8561d81387a92082d0f60522d96090a1eeaec9be112d53b1eb49b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830205c01a832fefd882520884561bc0c080a0de8417fd968b5db0924efe3111e742b6e09920f5aed2f8b5d446eff3505bd77388e040c6acc5731482f862f86019018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0734b867a17657b015590e03422001b22d6f93d0f20bc284f7e8437c8c0eb4d56a006e3b8aa18d73aca1ca334e48fced7056cb1cbce6910c9310c1153e2f92bb40bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x19", + "r" : "0x734b867a17657b015590e03422001b22d6f93d0f20bc284f7e8437c8c0eb4d56", + "s" : "0x06e3b8aa18d73aca1ca334e48fced7056cb1cbce6910c9310c1153e2f92bb40b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020600", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "3998dbf5fdf0306c5065177f2ceabf3378f89fd9603f0f103848d0ade919a1aa", + "mixHash" : "7c634c43d0faa3befba3eb85e9884f1242cf00ff8f02fea294b9ab4a6dfbd481", + "nonce" : "a05fac834612ca34", + "number" : "0x1b", + "parentHash" : "6e90a45ea236f9b9f75553760a1639ac57cd2f75ad622de1c629edc3a9631c55", + "receiptTrie" : "cef914c6f2233a74398bb7afd67a4a8ee89da4144987c1137f61e29f7a7dd16f", + "stateRoot" : "88ecea6c2f43db5342b72750bb941068d1abfc261d332825ad11d037ed0455e4", + "timestamp" : "0x561bc0c3", + "transactionsTrie" : "6af55dfeb1f9e5e3b5dbf01239f8319b14e108d44e648b6818efe639096b26de", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "27", + "chainname" : "A", + "rlp" : "0xf90261f901f9a06e90a45ea236f9b9f75553760a1639ac57cd2f75ad622de1c629edc3a9631c55a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a088ecea6c2f43db5342b72750bb941068d1abfc261d332825ad11d037ed0455e4a06af55dfeb1f9e5e3b5dbf01239f8319b14e108d44e648b6818efe639096b26dea0cef914c6f2233a74398bb7afd67a4a8ee89da4144987c1137f61e29f7a7dd16fb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830206001b832fefd882520884561bc0c380a07c634c43d0faa3befba3eb85e9884f1242cf00ff8f02fea294b9ab4a6dfbd48188a05fac834612ca34f862f8601a018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca076255591d617dac95ab658cd14659fb1a4e849c03d5ae416c3f3c940ad5d6d1ea0058212abb71e05556720ffc7fc8069e42163bb9ebc80e465e6e1bbf14f031180c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x1a", + "r" : "0x76255591d617dac95ab658cd14659fb1a4e849c03d5ae416c3f3c940ad5d6d1e", + "s" : "0x058212abb71e05556720ffc7fc8069e42163bb9ebc80e465e6e1bbf14f031180", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "358421456d3c9d810bdfb4d07743a6f1ae5509f78ab3efe52f710468095c94bd", + "mixHash" : "d74400047c6e2cb734a25003715921e4b1d8394bc188b85aaa0a2421c1719f37", + "nonce" : "f7d60b973bae6868", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0d74400047c6e2cb734a25003715921e4b1d8394bc188b85aaa0a2421c1719f3788f7d60b973bae6868c0c0", + "lastblockhash" : "3998dbf5fdf0306c5065177f2ceabf3378f89fd9603f0f103848d0ade919a1aa", + "noBlockChainHistory" : "1", + "postState" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x010e", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x07518058bd45c4a6d8", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e69f81a", + "code" : "0x", + "nonce" : "0x1b", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e72a000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/files/BlockchainTests/bcGasPricerTest.json b/tests/files/BlockchainTests/bcGasPricerTest.json index 8601cf99d..cbf793464 100644 --- a/tests/files/BlockchainTests/bcGasPricerTest.json +++ b/tests/files/BlockchainTests/bcGasPricerTest.json @@ -1,990 +1,1117 @@ { - "highGasUsage": { - "blocks": [{ - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020000", - "extraData": "0x", - "gasLimit": "0x01dee69a", - "gasUsed": "0x53a0", - "hash": "51141aba6504ab86b86f61709c4660028633c252692e6f30778ea1915b87dbb9", - "mixHash": "55edf4d762c74ed37868666a28e9dbcbfc8ee2121766915fa461722ba91ea56f", - "nonce": "346921996dcbb61f", - "number": "0x01", - "parentHash": "a07e6e83984a8c98e83439eb737b429d8cbc0e6c8b37ba3e5ac5faebcf78db6b", - "receiptTrie": "08ffbde000912f7a562428e6750194b5862548d98ee02739e8d8671290d49abe", - "stateRoot": "8a9df04183e28fc7c26e4a40e359b2322bf77737a1592fe3a6f400651fb8979b", - "timestamp": "0x55b7e6f5", - "transactionsTrie": "bdb25a2e5860522e943625b58a5429571aaf3123038ffff0922fe58753e51b83", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf9026ef901faa0a07e6e83984a8c98e83439eb737b429d8cbc0e6c8b37ba3e5ac5faebcf78db6ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08a9df04183e28fc7c26e4a40e359b2322bf77737a1592fe3a6f400651fb8979ba0bdb25a2e5860522e943625b58a5429571aaf3123038ffff0922fe58753e51b83a008ffbde000912f7a562428e6750194b5862548d98ee02739e8d8671290d49abeb901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018401dee69a8253a08455b7e6f580a055edf4d762c74ed37868666a28e9dbcbfc8ee2121766915fa461722ba91ea56f88346921996dcbb61ff86ef86c808609184e72a000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ca019b72b9fb71e156dc46b934987514054bf7c6ba1b3f0030a2645d31d51f92979a01f60971cd6a647c763d70e81fbd3fdc8ad1c9a2b93771397040c2842042ae10dc0", - "transactions": [{ - "data": "0xffffffffffff", - "gasLimit": "0x0cf850", - "gasPrice": "0x09184e72a000", - "nonce": "0x00", - "r": "0x19b72b9fb71e156dc46b934987514054bf7c6ba1b3f0030a2645d31d51f92979", - "s": "0x1f60971cd6a647c763d70e81fbd3fdc8ad1c9a2b93771397040c2842042ae10d", - "to": "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v": "0x1c", - "value": "0x0a" - }], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020040", - "extraData": "0x", - "gasLimit": "0x01de6efb", - "gasUsed": "0x53a0", - "hash": "3df5da46728c26f2deff76b656984b232a2633854eb083aedab1c70a5c7a6631", - "mixHash": "e6326297bef00fd014818446c6c03cd05456ecbeea7d1f87d788d9a8d063b601", - "nonce": "835a76a0c05f1953", - "number": "0x02", - "parentHash": "51141aba6504ab86b86f61709c4660028633c252692e6f30778ea1915b87dbb9", - "receiptTrie": "dc4a27b2af103a3b9b7e00b8cbad790b61ac0f69603a3dfaf927d7f53bcb7dc9", - "stateRoot": "6137d35876b8d905a62931f0815fa5a92910ec5241862a75d44d097a6405925b", - "timestamp": "0x55b7e6f6", - "transactionsTrie": "17db9a3dd5b472429bd1b90821461a18b829a3b9c2a9fca3ad191f0b661cc407", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf9026ef901faa051141aba6504ab86b86f61709c4660028633c252692e6f30778ea1915b87dbb9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a06137d35876b8d905a62931f0815fa5a92910ec5241862a75d44d097a6405925ba017db9a3dd5b472429bd1b90821461a18b829a3b9c2a9fca3ad191f0b661cc407a0dc4a27b2af103a3b9b7e00b8cbad790b61ac0f69603a3dfaf927d7f53bcb7dc9b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020040028401de6efb8253a08455b7e6f680a0e6326297bef00fd014818446c6c03cd05456ecbeea7d1f87d788d9a8d063b60188835a76a0c05f1953f86ef86c01860ae9f7bcc000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ca0b4ab3eb88ca16e29f56e151a20ea5ee639ae06675f09fb6c6e16c4bc1e959626a002489e2fd69bffcb8da9fef04e8392fc0d54cae04d2b0d7b97eaa1a2da10c4b3c0", - "transactions": [{ - "data": "0xffffffffffff", - "gasLimit": "0x0cf850", - "gasPrice": "0x0ae9f7bcc000", - "nonce": "0x01", - "r": "0xb4ab3eb88ca16e29f56e151a20ea5ee639ae06675f09fb6c6e16c4bc1e959626", - "s": "0x02489e2fd69bffcb8da9fef04e8392fc0d54cae04d2b0d7b97eaa1a2da10c4b3", - "to": "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v": "0x1c", - "value": "0x0a" - }], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020080", - "extraData": "0x", - "gasLimit": "0x01ddf77a", - "gasUsed": "0x53a0", - "hash": "23f47e461d0d980edcc5f2017aac3a86f376817b142c90dae493b255bc634a70", - "mixHash": "94b9cd95199ca0be589e97fa3258e8fa84384d3864deda1cfcc6774ea7b0962d", - "nonce": "81d71d4f50745853", - "number": "0x03", - "parentHash": "3df5da46728c26f2deff76b656984b232a2633854eb083aedab1c70a5c7a6631", - "receiptTrie": "619cfe23ac6efecd3c57c2ff1aad604c9f7a62e4b4220c7854bdd8af33a814f8", - "stateRoot": "2e04b92acd81faf0cdce0d94d9870c3cabcf7a734ea96c3891bba6df11d071af", - "timestamp": "0x55b7e6f8", - "transactionsTrie": "d57c128083300688fb576176b64642c73923b044aac86cfd7a1ebbe06c05eb96", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf9026df901faa03df5da46728c26f2deff76b656984b232a2633854eb083aedab1c70a5c7a6631a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a02e04b92acd81faf0cdce0d94d9870c3cabcf7a734ea96c3891bba6df11d071afa0d57c128083300688fb576176b64642c73923b044aac86cfd7a1ebbe06c05eb96a0619cfe23ac6efecd3c57c2ff1aad604c9f7a62e4b4220c7854bdd8af33a814f8b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020080038401ddf77a8253a08455b7e6f880a094b9cd95199ca0be589e97fa3258e8fa84384d3864deda1cfcc6774ea7b0962d8881d71d4f50745853f86df86b02860cbba106e000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ca0a3a2bcd3060ce8c9dc7581366dd6b8aed226741ff0bd3cdbdbaaf91aef5e9bd89f4812314cce53dc10fcc9176b981858bc806b5fcb42a72fd5675027750ff925c0", - "transactions": [{ - "data": "0xffffffffffff", - "gasLimit": "0x0cf850", - "gasPrice": "0x0cbba106e000", - "nonce": "0x02", - "r": "0xa3a2bcd3060ce8c9dc7581366dd6b8aed226741ff0bd3cdbdbaaf91aef5e9bd8", - "s": "0x4812314cce53dc10fcc9176b981858bc806b5fcb42a72fd5675027750ff925", - "to": "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v": "0x1c", - "value": "0x0a" - }], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x0200c0", - "extraData": "0x", - "gasLimit": "0x01dd8017", - "gasUsed": "0x53a0", - "hash": "1512a800fae4c6cdddec175e5977d421c8c139de08a608c94579affa091f34a9", - "mixHash": "4ad5b0a6fd54a9b8293aef0706950ea145df2005d3bd28db9c10136926639df8", - "nonce": "395630a7c6b3c131", - "number": "0x04", - "parentHash": "23f47e461d0d980edcc5f2017aac3a86f376817b142c90dae493b255bc634a70", - "receiptTrie": "c45511afcf389dd4cd16dd9ccc2e8c0e94a98dc4f65461346582fd45d6c5bd53", - "stateRoot": "fc3425bcae459c9c17419fca2d3dbdcb7afc96c3cdd48b7017e40947960a0ee4", - "timestamp": "0x55b7e6fb", - "transactionsTrie": "d78763945db011d5419eec1a4ec20ae122a9e1360b5ba7bd255ae495d73be17f", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf9026ef901faa023f47e461d0d980edcc5f2017aac3a86f376817b142c90dae493b255bc634a70a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0fc3425bcae459c9c17419fca2d3dbdcb7afc96c3cdd48b7017e40947960a0ee4a0d78763945db011d5419eec1a4ec20ae122a9e1360b5ba7bd255ae495d73be17fa0c45511afcf389dd4cd16dd9ccc2e8c0e94a98dc4f65461346582fd45d6c5bd53b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c0048401dd80178253a08455b7e6fb80a04ad5b0a6fd54a9b8293aef0706950ea145df2005d3bd28db9c10136926639df888395630a7c6b3c131f86ef86c03860e8d4a510000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ca0f9cc20ee2874dce3b534d35149f43b4a0f3356d833d9d445fa8c161a6b622e6ba06543b736231a6d85107c7e6083e9067a0d00aaad744816646e16115445f908cac0", - "transactions": [{ - "data": "0xffffffffffff", - "gasLimit": "0x0cf850", - "gasPrice": "0x0e8d4a510000", - "nonce": "0x03", - "r": "0xf9cc20ee2874dce3b534d35149f43b4a0f3356d833d9d445fa8c161a6b622e6b", - "s": "0x6543b736231a6d85107c7e6083e9067a0d00aaad744816646e16115445f908ca", - "to": "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v": "0x1c", - "value": "0x0a" - }], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020100", - "extraData": "0x", - "gasLimit": "0x01dd08d1", - "gasUsed": "0x53a0", - "hash": "aa774115aa8cb0e0f4f94d3337a034bf54b36214a54f1658053d292d5c31a017", - "mixHash": "e13ef23b8e939b58a044d291bf14cc01a23f68389940d6cc38dd95809adabb76", - "nonce": "bd9aa907a816f269", - "number": "0x05", - "parentHash": "1512a800fae4c6cdddec175e5977d421c8c139de08a608c94579affa091f34a9", - "receiptTrie": "d2544e6a9719ec49333a83efbc4683019674a314c37c855d40dc95bb9080b3b9", - "stateRoot": "e118728dc0a21436632eb492cecab305940c0782da9cdc3bf2cea9f2d67f0257", - "timestamp": "0x55b7e6ff", - "transactionsTrie": "066a7ed4bb74feca3008a9dcfda7ad4291fe4124dd335ada65989ab27a776af9", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf9026ef901faa01512a800fae4c6cdddec175e5977d421c8c139de08a608c94579affa091f34a9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e118728dc0a21436632eb492cecab305940c0782da9cdc3bf2cea9f2d67f0257a0066a7ed4bb74feca3008a9dcfda7ad4291fe4124dd335ada65989ab27a776af9a0d2544e6a9719ec49333a83efbc4683019674a314c37c855d40dc95bb9080b3b9b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020100058401dd08d18253a08455b7e6ff80a0e13ef23b8e939b58a044d291bf14cc01a23f68389940d6cc38dd95809adabb7688bd9aa907a816f269f86ef86c0486105ef39b2000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ca06cda2e6b92c549ee2fb1c1078ad116315093eae7b06d54dd6ad8f3d4d1d246e5a026b9d1b5dfe1480b3b8f1cdccb06714f61631dcac3680f3b45ac9a84928b78a3c0", - "transactions": [{ - "data": "0xffffffffffff", - "gasLimit": "0x0cf850", - "gasPrice": "0x105ef39b2000", - "nonce": "0x04", - "r": "0x6cda2e6b92c549ee2fb1c1078ad116315093eae7b06d54dd6ad8f3d4d1d246e5", - "s": "0x26b9d1b5dfe1480b3b8f1cdccb06714f61631dcac3680f3b45ac9a84928b78a3", - "to": "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v": "0x1c", - "value": "0x0a" - }], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020140", - "extraData": "0x", - "gasLimit": "0x01dc91a9", - "gasUsed": "0x53a0", - "hash": "025e2faea5cd11c83fe99d1b3d6547d049609018146931d6266a4a4de0cc1a15", - "mixHash": "36462deee79c6bba8c835d66cf690d4a5e972c524d256cb07a1138a007f0d568", - "nonce": "afd358c3806197aa", - "number": "0x06", - "parentHash": "aa774115aa8cb0e0f4f94d3337a034bf54b36214a54f1658053d292d5c31a017", - "receiptTrie": "e42cc2b210e3b2cfb811ce2d9afa2207a03c3ec827ac68ade1d47551e5ce3148", - "stateRoot": "bbd6012af885d075e4d469716846b92cf80fb0184fbb2570d1c79f19737132b6", - "timestamp": "0x55b7e700", - "transactionsTrie": "1f4f6fa6c6d35a4af215a996cfcdcfb8eb3df22f0f6ab2f57ec58d6ad6a4e57d", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf9026ef901faa0aa774115aa8cb0e0f4f94d3337a034bf54b36214a54f1658053d292d5c31a017a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0bbd6012af885d075e4d469716846b92cf80fb0184fbb2570d1c79f19737132b6a01f4f6fa6c6d35a4af215a996cfcdcfb8eb3df22f0f6ab2f57ec58d6ad6a4e57da0e42cc2b210e3b2cfb811ce2d9afa2207a03c3ec827ac68ade1d47551e5ce3148b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020140068401dc91a98253a08455b7e70080a036462deee79c6bba8c835d66cf690d4a5e972c524d256cb07a1138a007f0d56888afd358c3806197aaf86ef86c058612309ce54000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ca0d2b6a9d3c6286c1a71d88ef2e3d3889352311a9348ee7c7256c2af3db4b048dca00e3f13618132ebefdf2e207668c6fff0b2b3f2bbe95f2b1528e2d267a24cade2c0", - "transactions": [{ - "data": "0xffffffffffff", - "gasLimit": "0x0cf850", - "gasPrice": "0x12309ce54000", - "nonce": "0x05", - "r": "0xd2b6a9d3c6286c1a71d88ef2e3d3889352311a9348ee7c7256c2af3db4b048dc", - "s": "0x0e3f13618132ebefdf2e207668c6fff0b2b3f2bbe95f2b1528e2d267a24cade2", - "to": "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v": "0x1c", - "value": "0x0a" - }], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020180", - "extraData": "0x", - "gasLimit": "0x01dc1a9f", - "gasUsed": "0x53a0", - "hash": "fcdac3fbf1838f533533908d71d54fd0cf0f506730615755ada63303bf40610d", - "mixHash": "a93600adb203da0f92017553b2c88fe18ebebfd93da90158e00c56d81a316666", - "nonce": "aefa3ed3e9eb83e9", - "number": "0x07", - "parentHash": "025e2faea5cd11c83fe99d1b3d6547d049609018146931d6266a4a4de0cc1a15", - "receiptTrie": "86d5cd24252cfe39096df1568affa38e5295232d5b2349792d195113f9b8d455", - "stateRoot": "8ccd601c1ae4548de690c21306ba4e9dd5a1ff03a31f8c08af968ffa7a6902fd", - "timestamp": "0x55b7e702", - "transactionsTrie": "71e64105f752773f43221dd85e44d299d08b229cdbcea166536fb48f72de8b73", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf9026ef901faa0025e2faea5cd11c83fe99d1b3d6547d049609018146931d6266a4a4de0cc1a15a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08ccd601c1ae4548de690c21306ba4e9dd5a1ff03a31f8c08af968ffa7a6902fda071e64105f752773f43221dd85e44d299d08b229cdbcea166536fb48f72de8b73a086d5cd24252cfe39096df1568affa38e5295232d5b2349792d195113f9b8d455b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020180078401dc1a9f8253a08455b7e70280a0a93600adb203da0f92017553b2c88fe18ebebfd93da90158e00c56d81a31666688aefa3ed3e9eb83e9f86ef86c06861402462f6000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ca07dbb1abd6964f8167ff9d79b438a83137eda9ee4d8d5e73b6088113249846956a03de1e4e462f720df0f4d7012c0f3be32cb908b309d70642fcf8175f2ca3b0c8fc0", - "transactions": [{ - "data": "0xffffffffffff", - "gasLimit": "0x0cf850", - "gasPrice": "0x1402462f6000", - "nonce": "0x06", - "r": "0x7dbb1abd6964f8167ff9d79b438a83137eda9ee4d8d5e73b6088113249846956", - "s": "0x3de1e4e462f720df0f4d7012c0f3be32cb908b309d70642fcf8175f2ca3b0c8f", - "to": "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v": "0x1c", - "value": "0x0a" - }], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x0201c0", - "extraData": "0x", - "gasLimit": "0x01dba3b3", - "gasUsed": "0x53a0", - "hash": "b0cad190b0a2a78cd23f5e62dd67acf8a01aef876b8479be680cf45c23fc5780", - "mixHash": "437c435a14a4a1918ad7a2ba37dd5dbefb071e41a2cea3c75505b937c5e2255c", - "nonce": "15c846a65edd10f4", - "number": "0x08", - "parentHash": "fcdac3fbf1838f533533908d71d54fd0cf0f506730615755ada63303bf40610d", - "receiptTrie": "f14192d5dd2ea1aa08314fbc05d61656cb37aff2396de80e8ff541080d540ae8", - "stateRoot": "84d881a23122ed0a46baac83083d3f2e46b3531c7cf35d08fd533f9015fdf35a", - "timestamp": "0x55b7e703", - "transactionsTrie": "5292f0bb53c9ff642471ea0098f045c8871914dc62bc44123f7db66adc83e925", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf9026ef901faa0fcdac3fbf1838f533533908d71d54fd0cf0f506730615755ada63303bf40610da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a084d881a23122ed0a46baac83083d3f2e46b3531c7cf35d08fd533f9015fdf35aa05292f0bb53c9ff642471ea0098f045c8871914dc62bc44123f7db66adc83e925a0f14192d5dd2ea1aa08314fbc05d61656cb37aff2396de80e8ff541080d540ae8b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c0088401dba3b38253a08455b7e70380a0437c435a14a4a1918ad7a2ba37dd5dbefb071e41a2cea3c75505b937c5e2255c8815c846a65edd10f4f86ef86c078615d3ef798000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ba0a4d2b7612da4b7493213decb120ea2826e72adac5e605bc9a889d287df4e6a50a04b08a8ee68b2e984220db524a5e6c5fa93b083bafb728734a5ddad91ee51b41fc0", - "transactions": [{ - "data": "0xffffffffffff", - "gasLimit": "0x0cf850", - "gasPrice": "0x15d3ef798000", - "nonce": "0x07", - "r": "0xa4d2b7612da4b7493213decb120ea2826e72adac5e605bc9a889d287df4e6a50", - "s": "0x4b08a8ee68b2e984220db524a5e6c5fa93b083bafb728734a5ddad91ee51b41f", - "to": "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v": "0x1b", - "value": "0x0a" - }], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020200", - "extraData": "0x", - "gasLimit": "0x01db2ce5", - "gasUsed": "0x53a0", - "hash": "ec3ee4b1446cf5baea491311aaf8d68ba71a7c540ee71334afa08556a24fc0c2", - "mixHash": "5c05372757a88c9536533fc454a7aacb1ed0b366828650dbeea09362ab35bf87", - "nonce": "8ed6b0b09318ad1d", - "number": "0x09", - "parentHash": "b0cad190b0a2a78cd23f5e62dd67acf8a01aef876b8479be680cf45c23fc5780", - "receiptTrie": "a06a1b861f74a7c1e8876e7dbb74d7e62d7c991c32ac84ff2774b88b5842cbdb", - "stateRoot": "aeb1fbf45a3bec7db72e65ead9d4237e7628be3e836df050c401c26614bb876f", - "timestamp": "0x55b7e704", - "transactionsTrie": "874dabcca653170e57fe4d0241cddcd6f9ef93c07765e1635de159cff6c4e753", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf9026ef901faa0b0cad190b0a2a78cd23f5e62dd67acf8a01aef876b8479be680cf45c23fc5780a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0aeb1fbf45a3bec7db72e65ead9d4237e7628be3e836df050c401c26614bb876fa0874dabcca653170e57fe4d0241cddcd6f9ef93c07765e1635de159cff6c4e753a0a06a1b861f74a7c1e8876e7dbb74d7e62d7c991c32ac84ff2774b88b5842cbdbb901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020200098401db2ce58253a08455b7e70480a05c05372757a88c9536533fc454a7aacb1ed0b366828650dbeea09362ab35bf87888ed6b0b09318ad1df86ef86c088617a598c3a000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ba09d1e6336a3acb8cf03efb4ab7e187a8bcaa125bbbe195997ac6fe2664b1ccce7a027d556535661b74e4453f54e6921117abbf541de92cbe791c463037bec440285c0", - "transactions": [{ - "data": "0xffffffffffff", - "gasLimit": "0x0cf850", - "gasPrice": "0x17a598c3a000", - "nonce": "0x08", - "r": "0x9d1e6336a3acb8cf03efb4ab7e187a8bcaa125bbbe195997ac6fe2664b1ccce7", - "s": "0x27d556535661b74e4453f54e6921117abbf541de92cbe791c463037bec440285", - "to": "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v": "0x1b", - "value": "0x0a" - }], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020240", - "extraData": "0x", - "gasLimit": "0x01dab634", - "gasUsed": "0x53a0", - "hash": "0cfebf2a15a40d1fa85b7232cec7cb80f83fd15f64ba0a5001b3d65c30a223e5", - "mixHash": "b57aa704d7d2d3c17312e6e0295f16474226441a752afffde9381b6369a53ba0", - "nonce": "13e30b4419905574", - "number": "0x0a", - "parentHash": "ec3ee4b1446cf5baea491311aaf8d68ba71a7c540ee71334afa08556a24fc0c2", - "receiptTrie": "dbedecbd6f556073b0fa43fb71b4c69df5384b6d4f43bd4cd0a0a97f4d43fbe8", - "stateRoot": "4b56583cd2308b5424ad7a632022073beabdfe282931019dac676ecb162cb23c", - "timestamp": "0x55b7e706", - "transactionsTrie": "557fb34c4e06a92e14a8dbf88f43c139ae7cfee4654b01f159509179eb86f17e", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf9026ef901faa0ec3ee4b1446cf5baea491311aaf8d68ba71a7c540ee71334afa08556a24fc0c2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04b56583cd2308b5424ad7a632022073beabdfe282931019dac676ecb162cb23ca0557fb34c4e06a92e14a8dbf88f43c139ae7cfee4654b01f159509179eb86f17ea0dbedecbd6f556073b0fa43fb71b4c69df5384b6d4f43bd4cd0a0a97f4d43fbe8b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a8401dab6348253a08455b7e70680a0b57aa704d7d2d3c17312e6e0295f16474226441a752afffde9381b6369a53ba08813e30b4419905574f86ef86c09861977420dc000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ba03e0d159c71bddaf7507905a0f97fb2c86b773a56460d3c3ae461fdb2593a0d4ea02deec822756dddc958ce784740a503cf4895e632502c6c7966a5c662cf6a3561c0", - "transactions": [{ - "data": "0xffffffffffff", - "gasLimit": "0x0cf850", - "gasPrice": "0x1977420dc000", - "nonce": "0x09", - "r": "0x3e0d159c71bddaf7507905a0f97fb2c86b773a56460d3c3ae461fdb2593a0d4e", - "s": "0x2deec822756dddc958ce784740a503cf4895e632502c6c7966a5c662cf6a3561", - "to": "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v": "0x1b", - "value": "0x0a" - }], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020280", - "extraData": "0x", - "gasLimit": "0x01da3fa1", - "gasUsed": "0x53a0", - "hash": "fc594b924f162e21e84d67b27eebd532227a2d61dc8a8e50ce5f656da0916afe", - "mixHash": "05f16acc9747f7d21872b0dcbf9c0037fd45f8a87386d69781980abb1750f32e", - "nonce": "17fa1270c59bcdd1", - "number": "0x0b", - "parentHash": "0cfebf2a15a40d1fa85b7232cec7cb80f83fd15f64ba0a5001b3d65c30a223e5", - "receiptTrie": "0a1936375f87b646a5a18839f658fa8b9af039f22d609fd5c6a0df4d52ce3bbb", - "stateRoot": "44ee2a97efc07fdf2af1ce9181f00b3b99feb92de903bc1ab26fc4db39f4bc9c", - "timestamp": "0x55b7e708", - "transactionsTrie": "54541930d62573205e70bcfd40bc51c131e79d9f038a85b84d20203381407e21", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf9026ef901faa00cfebf2a15a40d1fa85b7232cec7cb80f83fd15f64ba0a5001b3d65c30a223e5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a044ee2a97efc07fdf2af1ce9181f00b3b99feb92de903bc1ab26fc4db39f4bc9ca054541930d62573205e70bcfd40bc51c131e79d9f038a85b84d20203381407e21a00a1936375f87b646a5a18839f658fa8b9af039f22d609fd5c6a0df4d52ce3bbbb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202800b8401da3fa18253a08455b7e70880a005f16acc9747f7d21872b0dcbf9c0037fd45f8a87386d69781980abb1750f32e8817fa1270c59bcdd1f86ef86c0a861b48eb57e000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ba0a4ce64813530f35e4c45168988a82aaa5dd4ffec2e1325e8edc99b428dc390a8a0270598015d7aa6d92aacaad70a4c72f9022db2642c77b06cd068e28ba80a5a68c0", - "transactions": [{ - "data": "0xffffffffffff", - "gasLimit": "0x0cf850", - "gasPrice": "0x1b48eb57e000", - "nonce": "0x0a", - "r": "0xa4ce64813530f35e4c45168988a82aaa5dd4ffec2e1325e8edc99b428dc390a8", - "s": "0x270598015d7aa6d92aacaad70a4c72f9022db2642c77b06cd068e28ba80a5a68", - "to": "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v": "0x1b", - "value": "0x0a" - }], - "uncleHeaders": [] - }], - "genesisBlockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020000", - "extraData": "0x42", - "gasLimit": "0x01df5e70", - "gasUsed": "0x00", - "hash": "a07e6e83984a8c98e83439eb737b429d8cbc0e6c8b37ba3e5ac5faebcf78db6b", - "mixHash": "1fbb1c0dd4a71d0d6451d87118e8615e997c89ee002d412824166a471e4b487b", - "nonce": "64500fc0c924577b", - "number": "0x00", - "parentHash": "0000000000000000000000000000000000000000000000000000000000000000", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "71f7c8fb1ecac2ee69cd5aa02564d358fc641845977fa4e30c65be195167bb45", - "timestamp": "0x54c98c81", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + "highGasUsage" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x01dee69a", + "gasUsed" : "0x53a0", + "hash" : "b9ecf4f9727576440e034b213ecdc8e6dc69cf1737d7a7bd7a5aaac4584ad680", + "mixHash" : "b8c349f0eae1f8a431444c440acbd624fb5df26ea29ea73bb56f0a2ae0f1c1e7", + "nonce" : "afb21f21373b0fa2", + "number" : "0x01", + "parentHash" : "f7110e82104481c2f2e2e7e0b1ded4ca1337e6c7e7593214d61030dc197aa531", + "receiptTrie" : "08ffbde000912f7a562428e6750194b5862548d98ee02739e8d8671290d49abe", + "stateRoot" : "8a9df04183e28fc7c26e4a40e359b2322bf77737a1592fe3a6f400651fb8979b", + "timestamp" : "0x561bc5d8", + "transactionsTrie" : "bdb25a2e5860522e943625b58a5429571aaf3123038ffff0922fe58753e51b83", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf9026ef901faa0f7110e82104481c2f2e2e7e0b1ded4ca1337e6c7e7593214d61030dc197aa531a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08a9df04183e28fc7c26e4a40e359b2322bf77737a1592fe3a6f400651fb8979ba0bdb25a2e5860522e943625b58a5429571aaf3123038ffff0922fe58753e51b83a008ffbde000912f7a562428e6750194b5862548d98ee02739e8d8671290d49abeb901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000018401dee69a8253a084561bc5d880a0b8c349f0eae1f8a431444c440acbd624fb5df26ea29ea73bb56f0a2ae0f1c1e788afb21f21373b0fa2f86ef86c808609184e72a000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ca019b72b9fb71e156dc46b934987514054bf7c6ba1b3f0030a2645d31d51f92979a01f60971cd6a647c763d70e81fbd3fdc8ad1c9a2b93771397040c2842042ae10dc0", + "transactions" : [ + { + "data" : "0xffffffffffff", + "gasLimit" : "0x0cf850", + "gasPrice" : "0x09184e72a000", + "nonce" : "0x00", + "r" : "0x19b72b9fb71e156dc46b934987514054bf7c6ba1b3f0030a2645d31d51f92979", + "s" : "0x1f60971cd6a647c763d70e81fbd3fdc8ad1c9a2b93771397040c2842042ae10d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x01de6efb", + "gasUsed" : "0x53a0", + "hash" : "5c4e204a61671a5b1faff4fe2b652d8f68ed5ad7937cc081af27648a0e3a5a82", + "mixHash" : "221453bd71586f888688b4c6f33c3427cc9502574501928b33c6c65c18b5e5c2", + "nonce" : "165b203593ce5ed7", + "number" : "0x02", + "parentHash" : "b9ecf4f9727576440e034b213ecdc8e6dc69cf1737d7a7bd7a5aaac4584ad680", + "receiptTrie" : "dc4a27b2af103a3b9b7e00b8cbad790b61ac0f69603a3dfaf927d7f53bcb7dc9", + "stateRoot" : "6137d35876b8d905a62931f0815fa5a92910ec5241862a75d44d097a6405925b", + "timestamp" : "0x561bc5db", + "transactionsTrie" : "17db9a3dd5b472429bd1b90821461a18b829a3b9c2a9fca3ad191f0b661cc407", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf9026ef901faa0b9ecf4f9727576440e034b213ecdc8e6dc69cf1737d7a7bd7a5aaac4584ad680a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a06137d35876b8d905a62931f0815fa5a92910ec5241862a75d44d097a6405925ba017db9a3dd5b472429bd1b90821461a18b829a3b9c2a9fca3ad191f0b661cc407a0dc4a27b2af103a3b9b7e00b8cbad790b61ac0f69603a3dfaf927d7f53bcb7dc9b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020040028401de6efb8253a084561bc5db80a0221453bd71586f888688b4c6f33c3427cc9502574501928b33c6c65c18b5e5c288165b203593ce5ed7f86ef86c01860ae9f7bcc000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ca0b4ab3eb88ca16e29f56e151a20ea5ee639ae06675f09fb6c6e16c4bc1e959626a002489e2fd69bffcb8da9fef04e8392fc0d54cae04d2b0d7b97eaa1a2da10c4b3c0", + "transactions" : [ + { + "data" : "0xffffffffffff", + "gasLimit" : "0x0cf850", + "gasPrice" : "0x0ae9f7bcc000", + "nonce" : "0x01", + "r" : "0xb4ab3eb88ca16e29f56e151a20ea5ee639ae06675f09fb6c6e16c4bc1e959626", + "s" : "0x02489e2fd69bffcb8da9fef04e8392fc0d54cae04d2b0d7b97eaa1a2da10c4b3", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x01ddf77a", + "gasUsed" : "0x53a0", + "hash" : "5e1489cd6a1f38a8228452d9d8485ea08c2b6cf9d3607d69eca5e05f4de490a8", + "mixHash" : "2027f678dc209c2a2ce2b6bf0beb9d49bc56c9cf964daa9b91965705d22a9806", + "nonce" : "8164429b93f88be7", + "number" : "0x03", + "parentHash" : "5c4e204a61671a5b1faff4fe2b652d8f68ed5ad7937cc081af27648a0e3a5a82", + "receiptTrie" : "619cfe23ac6efecd3c57c2ff1aad604c9f7a62e4b4220c7854bdd8af33a814f8", + "stateRoot" : "2e04b92acd81faf0cdce0d94d9870c3cabcf7a734ea96c3891bba6df11d071af", + "timestamp" : "0x561bc5de", + "transactionsTrie" : "d57c128083300688fb576176b64642c73923b044aac86cfd7a1ebbe06c05eb96", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf9026df901faa05c4e204a61671a5b1faff4fe2b652d8f68ed5ad7937cc081af27648a0e3a5a82a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a02e04b92acd81faf0cdce0d94d9870c3cabcf7a734ea96c3891bba6df11d071afa0d57c128083300688fb576176b64642c73923b044aac86cfd7a1ebbe06c05eb96a0619cfe23ac6efecd3c57c2ff1aad604c9f7a62e4b4220c7854bdd8af33a814f8b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020080038401ddf77a8253a084561bc5de80a02027f678dc209c2a2ce2b6bf0beb9d49bc56c9cf964daa9b91965705d22a9806888164429b93f88be7f86df86b02860cbba106e000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ca0a3a2bcd3060ce8c9dc7581366dd6b8aed226741ff0bd3cdbdbaaf91aef5e9bd89f4812314cce53dc10fcc9176b981858bc806b5fcb42a72fd5675027750ff925c0", + "transactions" : [ + { + "data" : "0xffffffffffff", + "gasLimit" : "0x0cf850", + "gasPrice" : "0x0cbba106e000", + "nonce" : "0x02", + "r" : "0xa3a2bcd3060ce8c9dc7581366dd6b8aed226741ff0bd3cdbdbaaf91aef5e9bd8", + "s" : "0x4812314cce53dc10fcc9176b981858bc806b5fcb42a72fd5675027750ff925", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x01dd8017", + "gasUsed" : "0x53a0", + "hash" : "a97e998a75e171a86b038ec7021f961c1987a7d98341a39be109ec644f328012", + "mixHash" : "7e6b4923622fd05e1af3af3fee245b37f4fdbd4f03bf81e4f01247c55ddd5d84", + "nonce" : "8688ff5f9239d46b", + "number" : "0x04", + "parentHash" : "5e1489cd6a1f38a8228452d9d8485ea08c2b6cf9d3607d69eca5e05f4de490a8", + "receiptTrie" : "c45511afcf389dd4cd16dd9ccc2e8c0e94a98dc4f65461346582fd45d6c5bd53", + "stateRoot" : "fc3425bcae459c9c17419fca2d3dbdcb7afc96c3cdd48b7017e40947960a0ee4", + "timestamp" : "0x561bc5e0", + "transactionsTrie" : "d78763945db011d5419eec1a4ec20ae122a9e1360b5ba7bd255ae495d73be17f", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf9026ef901faa05e1489cd6a1f38a8228452d9d8485ea08c2b6cf9d3607d69eca5e05f4de490a8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0fc3425bcae459c9c17419fca2d3dbdcb7afc96c3cdd48b7017e40947960a0ee4a0d78763945db011d5419eec1a4ec20ae122a9e1360b5ba7bd255ae495d73be17fa0c45511afcf389dd4cd16dd9ccc2e8c0e94a98dc4f65461346582fd45d6c5bd53b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c0048401dd80178253a084561bc5e080a07e6b4923622fd05e1af3af3fee245b37f4fdbd4f03bf81e4f01247c55ddd5d84888688ff5f9239d46bf86ef86c03860e8d4a510000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ca0f9cc20ee2874dce3b534d35149f43b4a0f3356d833d9d445fa8c161a6b622e6ba06543b736231a6d85107c7e6083e9067a0d00aaad744816646e16115445f908cac0", + "transactions" : [ + { + "data" : "0xffffffffffff", + "gasLimit" : "0x0cf850", + "gasPrice" : "0x0e8d4a510000", + "nonce" : "0x03", + "r" : "0xf9cc20ee2874dce3b534d35149f43b4a0f3356d833d9d445fa8c161a6b622e6b", + "s" : "0x6543b736231a6d85107c7e6083e9067a0d00aaad744816646e16115445f908ca", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x01dd08d1", + "gasUsed" : "0x53a0", + "hash" : "03bc8f2c35ea633ce73500592be2b3ea78478a30787deb57527379cde53f090a", + "mixHash" : "994d9c720f0a12a74c9fb5af69088d4d1a5163ba68d068233764456440d6f66b", + "nonce" : "5aa58e25bc28f6ba", + "number" : "0x05", + "parentHash" : "a97e998a75e171a86b038ec7021f961c1987a7d98341a39be109ec644f328012", + "receiptTrie" : "d2544e6a9719ec49333a83efbc4683019674a314c37c855d40dc95bb9080b3b9", + "stateRoot" : "e118728dc0a21436632eb492cecab305940c0782da9cdc3bf2cea9f2d67f0257", + "timestamp" : "0x561bc5e4", + "transactionsTrie" : "066a7ed4bb74feca3008a9dcfda7ad4291fe4124dd335ada65989ab27a776af9", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf9026ef901faa0a97e998a75e171a86b038ec7021f961c1987a7d98341a39be109ec644f328012a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e118728dc0a21436632eb492cecab305940c0782da9cdc3bf2cea9f2d67f0257a0066a7ed4bb74feca3008a9dcfda7ad4291fe4124dd335ada65989ab27a776af9a0d2544e6a9719ec49333a83efbc4683019674a314c37c855d40dc95bb9080b3b9b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020100058401dd08d18253a084561bc5e480a0994d9c720f0a12a74c9fb5af69088d4d1a5163ba68d068233764456440d6f66b885aa58e25bc28f6baf86ef86c0486105ef39b2000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ca06cda2e6b92c549ee2fb1c1078ad116315093eae7b06d54dd6ad8f3d4d1d246e5a026b9d1b5dfe1480b3b8f1cdccb06714f61631dcac3680f3b45ac9a84928b78a3c0", + "transactions" : [ + { + "data" : "0xffffffffffff", + "gasLimit" : "0x0cf850", + "gasPrice" : "0x105ef39b2000", + "nonce" : "0x04", + "r" : "0x6cda2e6b92c549ee2fb1c1078ad116315093eae7b06d54dd6ad8f3d4d1d246e5", + "s" : "0x26b9d1b5dfe1480b3b8f1cdccb06714f61631dcac3680f3b45ac9a84928b78a3", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x01dc91a9", + "gasUsed" : "0x53a0", + "hash" : "9f2830180afe1e2e6cda761d882605c6cb08c7d709b8c445d867e3c652a18439", + "mixHash" : "808fafca9e064be14b894dc30d7dfe57fa4b9ef201b994e71f0d9a5d6995dae1", + "nonce" : "164c2d77bb1422e8", + "number" : "0x06", + "parentHash" : "03bc8f2c35ea633ce73500592be2b3ea78478a30787deb57527379cde53f090a", + "receiptTrie" : "e42cc2b210e3b2cfb811ce2d9afa2207a03c3ec827ac68ade1d47551e5ce3148", + "stateRoot" : "bbd6012af885d075e4d469716846b92cf80fb0184fbb2570d1c79f19737132b6", + "timestamp" : "0x561bc5e6", + "transactionsTrie" : "1f4f6fa6c6d35a4af215a996cfcdcfb8eb3df22f0f6ab2f57ec58d6ad6a4e57d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf9026ef901faa003bc8f2c35ea633ce73500592be2b3ea78478a30787deb57527379cde53f090aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0bbd6012af885d075e4d469716846b92cf80fb0184fbb2570d1c79f19737132b6a01f4f6fa6c6d35a4af215a996cfcdcfb8eb3df22f0f6ab2f57ec58d6ad6a4e57da0e42cc2b210e3b2cfb811ce2d9afa2207a03c3ec827ac68ade1d47551e5ce3148b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020140068401dc91a98253a084561bc5e680a0808fafca9e064be14b894dc30d7dfe57fa4b9ef201b994e71f0d9a5d6995dae188164c2d77bb1422e8f86ef86c058612309ce54000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ca0d2b6a9d3c6286c1a71d88ef2e3d3889352311a9348ee7c7256c2af3db4b048dca00e3f13618132ebefdf2e207668c6fff0b2b3f2bbe95f2b1528e2d267a24cade2c0", + "transactions" : [ + { + "data" : "0xffffffffffff", + "gasLimit" : "0x0cf850", + "gasPrice" : "0x12309ce54000", + "nonce" : "0x05", + "r" : "0xd2b6a9d3c6286c1a71d88ef2e3d3889352311a9348ee7c7256c2af3db4b048dc", + "s" : "0x0e3f13618132ebefdf2e207668c6fff0b2b3f2bbe95f2b1528e2d267a24cade2", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020180", + "extraData" : "0x", + "gasLimit" : "0x01dc1a9f", + "gasUsed" : "0x53a0", + "hash" : "ab3ec1bff4ed459b92500ed6ed9c0a07b9d7d714cbc47ceb4d1be572a62391c5", + "mixHash" : "d11cc127bbedc13af62c3dee0b4d07909a25a14125f76a0aed721e2efc0aadf4", + "nonce" : "6a95bdb4ff996c21", + "number" : "0x07", + "parentHash" : "9f2830180afe1e2e6cda761d882605c6cb08c7d709b8c445d867e3c652a18439", + "receiptTrie" : "86d5cd24252cfe39096df1568affa38e5295232d5b2349792d195113f9b8d455", + "stateRoot" : "8ccd601c1ae4548de690c21306ba4e9dd5a1ff03a31f8c08af968ffa7a6902fd", + "timestamp" : "0x561bc5e8", + "transactionsTrie" : "71e64105f752773f43221dd85e44d299d08b229cdbcea166536fb48f72de8b73", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf9026ef901faa09f2830180afe1e2e6cda761d882605c6cb08c7d709b8c445d867e3c652a18439a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08ccd601c1ae4548de690c21306ba4e9dd5a1ff03a31f8c08af968ffa7a6902fda071e64105f752773f43221dd85e44d299d08b229cdbcea166536fb48f72de8b73a086d5cd24252cfe39096df1568affa38e5295232d5b2349792d195113f9b8d455b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020180078401dc1a9f8253a084561bc5e880a0d11cc127bbedc13af62c3dee0b4d07909a25a14125f76a0aed721e2efc0aadf4886a95bdb4ff996c21f86ef86c06861402462f6000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ca07dbb1abd6964f8167ff9d79b438a83137eda9ee4d8d5e73b6088113249846956a03de1e4e462f720df0f4d7012c0f3be32cb908b309d70642fcf8175f2ca3b0c8fc0", + "transactions" : [ + { + "data" : "0xffffffffffff", + "gasLimit" : "0x0cf850", + "gasPrice" : "0x1402462f6000", + "nonce" : "0x06", + "r" : "0x7dbb1abd6964f8167ff9d79b438a83137eda9ee4d8d5e73b6088113249846956", + "s" : "0x3de1e4e462f720df0f4d7012c0f3be32cb908b309d70642fcf8175f2ca3b0c8f", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0201c0", + "extraData" : "0x", + "gasLimit" : "0x01dba3b3", + "gasUsed" : "0x53a0", + "hash" : "eca0cc03534f06f748750168e39293d463094bc1a2dd890f28b1efb6d41d2b72", + "mixHash" : "7cb0f3751ce4171a695271eefd8d63c15af93efdbacfefcbc2341ac1068ce672", + "nonce" : "543b9e53e20b6d15", + "number" : "0x08", + "parentHash" : "ab3ec1bff4ed459b92500ed6ed9c0a07b9d7d714cbc47ceb4d1be572a62391c5", + "receiptTrie" : "f14192d5dd2ea1aa08314fbc05d61656cb37aff2396de80e8ff541080d540ae8", + "stateRoot" : "84d881a23122ed0a46baac83083d3f2e46b3531c7cf35d08fd533f9015fdf35a", + "timestamp" : "0x561bc5eb", + "transactionsTrie" : "5292f0bb53c9ff642471ea0098f045c8871914dc62bc44123f7db66adc83e925", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf9026ef901faa0ab3ec1bff4ed459b92500ed6ed9c0a07b9d7d714cbc47ceb4d1be572a62391c5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a084d881a23122ed0a46baac83083d3f2e46b3531c7cf35d08fd533f9015fdf35aa05292f0bb53c9ff642471ea0098f045c8871914dc62bc44123f7db66adc83e925a0f14192d5dd2ea1aa08314fbc05d61656cb37aff2396de80e8ff541080d540ae8b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c0088401dba3b38253a084561bc5eb80a07cb0f3751ce4171a695271eefd8d63c15af93efdbacfefcbc2341ac1068ce67288543b9e53e20b6d15f86ef86c078615d3ef798000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ba0a4d2b7612da4b7493213decb120ea2826e72adac5e605bc9a889d287df4e6a50a04b08a8ee68b2e984220db524a5e6c5fa93b083bafb728734a5ddad91ee51b41fc0", + "transactions" : [ + { + "data" : "0xffffffffffff", + "gasLimit" : "0x0cf850", + "gasPrice" : "0x15d3ef798000", + "nonce" : "0x07", + "r" : "0xa4d2b7612da4b7493213decb120ea2826e72adac5e605bc9a889d287df4e6a50", + "s" : "0x4b08a8ee68b2e984220db524a5e6c5fa93b083bafb728734a5ddad91ee51b41f", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020200", + "extraData" : "0x", + "gasLimit" : "0x01db2ce5", + "gasUsed" : "0x53a0", + "hash" : "0e22ef30c1e4d2d45105fe5561939cf495bc48e82dc8c80c9c09eceba577caa9", + "mixHash" : "f44822ef060fd0c89c3e4a77ecf5edc2fa9b407b0676a221bfa5545697037c0a", + "nonce" : "030faefe8f786c13", + "number" : "0x09", + "parentHash" : "eca0cc03534f06f748750168e39293d463094bc1a2dd890f28b1efb6d41d2b72", + "receiptTrie" : "a06a1b861f74a7c1e8876e7dbb74d7e62d7c991c32ac84ff2774b88b5842cbdb", + "stateRoot" : "aeb1fbf45a3bec7db72e65ead9d4237e7628be3e836df050c401c26614bb876f", + "timestamp" : "0x561bc5ef", + "transactionsTrie" : "874dabcca653170e57fe4d0241cddcd6f9ef93c07765e1635de159cff6c4e753", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf9026ef901faa0eca0cc03534f06f748750168e39293d463094bc1a2dd890f28b1efb6d41d2b72a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0aeb1fbf45a3bec7db72e65ead9d4237e7628be3e836df050c401c26614bb876fa0874dabcca653170e57fe4d0241cddcd6f9ef93c07765e1635de159cff6c4e753a0a06a1b861f74a7c1e8876e7dbb74d7e62d7c991c32ac84ff2774b88b5842cbdbb901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020200098401db2ce58253a084561bc5ef80a0f44822ef060fd0c89c3e4a77ecf5edc2fa9b407b0676a221bfa5545697037c0a88030faefe8f786c13f86ef86c088617a598c3a000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ba09d1e6336a3acb8cf03efb4ab7e187a8bcaa125bbbe195997ac6fe2664b1ccce7a027d556535661b74e4453f54e6921117abbf541de92cbe791c463037bec440285c0", + "transactions" : [ + { + "data" : "0xffffffffffff", + "gasLimit" : "0x0cf850", + "gasPrice" : "0x17a598c3a000", + "nonce" : "0x08", + "r" : "0x9d1e6336a3acb8cf03efb4ab7e187a8bcaa125bbbe195997ac6fe2664b1ccce7", + "s" : "0x27d556535661b74e4453f54e6921117abbf541de92cbe791c463037bec440285", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020240", + "extraData" : "0x", + "gasLimit" : "0x01dab634", + "gasUsed" : "0x53a0", + "hash" : "48509a2896876861ce8ede9275ed991f3bd121bbe48eeb561d27b0294c105deb", + "mixHash" : "e787546532c305e9852821d0acbbc0256ac7c68dffa5dd77620a895be30c1a87", + "nonce" : "023093e1d82d5ead", + "number" : "0x0a", + "parentHash" : "0e22ef30c1e4d2d45105fe5561939cf495bc48e82dc8c80c9c09eceba577caa9", + "receiptTrie" : "dbedecbd6f556073b0fa43fb71b4c69df5384b6d4f43bd4cd0a0a97f4d43fbe8", + "stateRoot" : "4b56583cd2308b5424ad7a632022073beabdfe282931019dac676ecb162cb23c", + "timestamp" : "0x561bc5f1", + "transactionsTrie" : "557fb34c4e06a92e14a8dbf88f43c139ae7cfee4654b01f159509179eb86f17e", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf9026ef901faa00e22ef30c1e4d2d45105fe5561939cf495bc48e82dc8c80c9c09eceba577caa9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04b56583cd2308b5424ad7a632022073beabdfe282931019dac676ecb162cb23ca0557fb34c4e06a92e14a8dbf88f43c139ae7cfee4654b01f159509179eb86f17ea0dbedecbd6f556073b0fa43fb71b4c69df5384b6d4f43bd4cd0a0a97f4d43fbe8b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a8401dab6348253a084561bc5f180a0e787546532c305e9852821d0acbbc0256ac7c68dffa5dd77620a895be30c1a8788023093e1d82d5eadf86ef86c09861977420dc000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ba03e0d159c71bddaf7507905a0f97fb2c86b773a56460d3c3ae461fdb2593a0d4ea02deec822756dddc958ce784740a503cf4895e632502c6c7966a5c662cf6a3561c0", + "transactions" : [ + { + "data" : "0xffffffffffff", + "gasLimit" : "0x0cf850", + "gasPrice" : "0x1977420dc000", + "nonce" : "0x09", + "r" : "0x3e0d159c71bddaf7507905a0f97fb2c86b773a56460d3c3ae461fdb2593a0d4e", + "s" : "0x2deec822756dddc958ce784740a503cf4895e632502c6c7966a5c662cf6a3561", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020280", + "extraData" : "0x", + "gasLimit" : "0x01da3fa1", + "gasUsed" : "0x53a0", + "hash" : "e3b4145d7a52460ca7793617f924a62983084b47d2db27e121c80b4cb8c034eb", + "mixHash" : "cbc89399024ba0973df0bd63b8bda38b510558efecdf16be5b08d536ee2222ab", + "nonce" : "f1bee1225da000e1", + "number" : "0x0b", + "parentHash" : "48509a2896876861ce8ede9275ed991f3bd121bbe48eeb561d27b0294c105deb", + "receiptTrie" : "0a1936375f87b646a5a18839f658fa8b9af039f22d609fd5c6a0df4d52ce3bbb", + "stateRoot" : "44ee2a97efc07fdf2af1ce9181f00b3b99feb92de903bc1ab26fc4db39f4bc9c", + "timestamp" : "0x561bc5f5", + "transactionsTrie" : "54541930d62573205e70bcfd40bc51c131e79d9f038a85b84d20203381407e21", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf9026ef901faa048509a2896876861ce8ede9275ed991f3bd121bbe48eeb561d27b0294c105deba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a044ee2a97efc07fdf2af1ce9181f00b3b99feb92de903bc1ab26fc4db39f4bc9ca054541930d62573205e70bcfd40bc51c131e79d9f038a85b84d20203381407e21a00a1936375f87b646a5a18839f658fa8b9af039f22d609fd5c6a0df4d52ce3bbbb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202800b8401da3fa18253a084561bc5f580a0cbc89399024ba0973df0bd63b8bda38b510558efecdf16be5b08d536ee2222ab88f1bee1225da000e1f86ef86c0a861b48eb57e000830cf85094095e7baea6a6c7c4c2dfeb977efac326af552d870a86ffffffffffff1ba0a4ce64813530f35e4c45168988a82aaa5dd4ffec2e1325e8edc99b428dc390a8a0270598015d7aa6d92aacaad70a4c72f9022db2642c77b06cd068e28ba80a5a68c0", + "transactions" : [ + { + "data" : "0xffffffffffff", + "gasLimit" : "0x0cf850", + "gasPrice" : "0x1b48eb57e000", + "nonce" : "0x0a", + "r" : "0xa4ce64813530f35e4c45168988a82aaa5dd4ffec2e1325e8edc99b428dc390a8", + "s" : "0x270598015d7aa6d92aacaad70a4c72f9022db2642c77b06cd068e28ba80a5a68", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x01df5e70", + "gasUsed" : "0x00", + "hash" : "f7110e82104481c2f2e2e7e0b1ded4ca1337e6c7e7593214d61030dc197aa531", + "mixHash" : "bba8bfe0f3ef59f7fc55533c872b1cb73fb4ded52965452fdffab377ca229f49", + "nonce" : "93dafdabbafbd48f", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "71f7c8fb1ecac2ee69cd5aa02564d358fc641845977fa4e30c65be195167bb45", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fdf901f8a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a071f7c8fb1ecac2ee69cd5aa02564d358fc641845977fa4e30c65be195167bb45a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808401df5e70808454c98c8142a0bba8bfe0f3ef59f7fc55533c872b1cb73fb4ded52965452fdffab377ca229f498893dafdabbafbd48fc0c0", + "lastblockhash" : "e3b4145d7a52460ca7793617f924a62983084b47d2db27e121c80b4cb8c034eb", + "postState" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x6e", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x033ca3ae5d37d40000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x1d14a0215cf8145fe6a7ff92", + "code" : "0x", + "nonce" : "0x0b", + "storage" : { + } + }, + "aaaf5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x02540be400", + "code" : "0x60003551", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x1d14a0219e54822428000000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "aaaf5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x02540be400", + "code" : "0x60003551", + "nonce" : "0x00", + "storage" : { + } + } + } }, - "genesisRLP": "0xf901fdf901f8a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a071f7c8fb1ecac2ee69cd5aa02564d358fc641845977fa4e30c65be195167bb45a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083020000808401df5e70808454c98c8142a01fbb1c0dd4a71d0d6451d87118e8615e997c89ee002d412824166a471e4b487b8864500fc0c924577bc0c0", - "lastblockhash": "fc594b924f162e21e84d67b27eebd532227a2d61dc8a8e50ce5f656da0916afe", - "postState": { - "095e7baea6a6c7c4c2dfeb977efac326af552d87": { - "balance": "0x6e", - "code": "0x", - "nonce": "0x00", - "storage": {} - }, - "8888f1f195afa192cfee860698584c030f4c9db1": { - "balance": "0x033ca3ae5d37d40000", - "code": "0x", - "nonce": "0x00", - "storage": {} - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "balance": "0x1d14a0215cf8145fe6a7ff92", - "code": "0x", - "nonce": "0x0b", - "storage": {} - }, - "aaaf5374fce5edbc8e2a8697c15331677e6ebf0b": { - "balance": "0x02540be400", - "code": "0x60003551", - "nonce": "0x00", - "storage": {} - } - }, - "pre": { - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "balance": "0x1d14a0219e54822428000000", - "code": "0x", - "nonce": "0x00", - "storage": {} - }, - "aaaf5374fce5edbc8e2a8697c15331677e6ebf0b": { - "balance": "0x02540be400", - "code": "0x60003551", - "nonce": "0x00", - "storage": {} - } - } - }, - "notxs": { - "blocks": [{ - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020000", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "729b522b9852bf4141ca028b686ea22347b625c755be14fdf73c7a4eac642271", - "mixHash": "ac1254b4ec97b116e2975d4506093015d4470ed3a6fcc602e5f2403c7b3bb594", - "nonce": "341281600b5abd48", - "number": "0x01", - "parentHash": "de68deceb6f907a67e0bbc2dc5cbe3114ddadf66a771abfc2b8c5619e86f1b81", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "8503769bb14067be7c5e438c353094e5a9a6c72f375fad4a76878a8882ceb496", - "timestamp": "0x55b7e70a", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a0de68deceb6f907a67e0bbc2dc5cbe3114ddadf66a771abfc2b8c5619e86f1b81a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08503769bb14067be7c5e438c353094e5a9a6c72f375fad4a76878a8882ceb496a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8808455b7e70a80a0ac1254b4ec97b116e2975d4506093015d4470ed3a6fcc602e5f2403c7b3bb59488341281600b5abd48c0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020040", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "134171eb12ebe3c4f37be41376fd7abf9f5d826940e9cbaf3a7f03fc3a6acbdf", - "mixHash": "0c1daf93f42a09d560a9d113363f46bddc4d9fecafc2c864099d5be7c707b51c", - "nonce": "afa6dc2e6f49e535", - "number": "0x02", - "parentHash": "729b522b9852bf4141ca028b686ea22347b625c755be14fdf73c7a4eac642271", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "326587c5310ecdbd0c8d36c471eef6595a6046ad46ee90bf0db88e691223ee38", - "timestamp": "0x55b7e70b", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a0729b522b9852bf4141ca028b686ea22347b625c755be14fdf73c7a4eac642271a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0326587c5310ecdbd0c8d36c471eef6595a6046ad46ee90bf0db88e691223ee38a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e70b80a00c1daf93f42a09d560a9d113363f46bddc4d9fecafc2c864099d5be7c707b51c88afa6dc2e6f49e535c0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020080", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "f0296e94640614da9c901fedeae61ffb6b6f60323360e5904282f191f71b8c53", - "mixHash": "8ca62f80830ae7cd98a723aca64f79916c1c11d5853e940fc19561274fe7c835", - "nonce": "eb6e065fa2b84f3c", - "number": "0x03", - "parentHash": "134171eb12ebe3c4f37be41376fd7abf9f5d826940e9cbaf3a7f03fc3a6acbdf", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "c662553363b8624b50cd8f83a2a28ec38b6cf0c029db61cb21e06d7df87fb256", - "timestamp": "0x55b7e70c", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a0134171eb12ebe3c4f37be41376fd7abf9f5d826940e9cbaf3a7f03fc3a6acbdfa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c662553363b8624b50cd8f83a2a28ec38b6cf0c029db61cb21e06d7df87fb256a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd8808455b7e70c80a08ca62f80830ae7cd98a723aca64f79916c1c11d5853e940fc19561274fe7c83588eb6e065fa2b84f3cc0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x0200c0", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "cb3efe8324b8b2cbf944248971ea534c6300bdb76cd346c9e3be163688f6a541", - "mixHash": "c01b6e1ab7d2e1093cc4983328ef9e79fd7de14ea821094daaa9d695e17532a5", - "nonce": "ae81718595b5701e", - "number": "0x04", - "parentHash": "f0296e94640614da9c901fedeae61ffb6b6f60323360e5904282f191f71b8c53", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "6b6c82551219d30f4168674006e3e1ece38eb055d9575f63e6dcce05f4a610af", - "timestamp": "0x55b7e70f", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a0f0296e94640614da9c901fedeae61ffb6b6f60323360e5904282f191f71b8c53a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a06b6c82551219d30f4168674006e3e1ece38eb055d9575f63e6dcce05f4a610afa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd8808455b7e70f80a0c01b6e1ab7d2e1093cc4983328ef9e79fd7de14ea821094daaa9d695e17532a588ae81718595b5701ec0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020100", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "d5a9bfaacb5a003efa38df0b96469686a8de51aed9ce191add1cc9741484afee", - "mixHash": "947e445ea4fa307dd46513f99adc2e7f4c205345d4de1ac6a1e6592e739f2120", - "nonce": "6371252c7807f456", - "number": "0x05", - "parentHash": "cb3efe8324b8b2cbf944248971ea534c6300bdb76cd346c9e3be163688f6a541", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "d7fbf4bf063a6e4a506777007a071e16d4dc6cc18f9ced7b29261942b35409a3", - "timestamp": "0x55b7e711", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a0cb3efe8324b8b2cbf944248971ea534c6300bdb76cd346c9e3be163688f6a541a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d7fbf4bf063a6e4a506777007a071e16d4dc6cc18f9ced7b29261942b35409a3a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd8808455b7e71180a0947e445ea4fa307dd46513f99adc2e7f4c205345d4de1ac6a1e6592e739f2120886371252c7807f456c0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020140", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "1c3245b5a38e2c3f7fa083a6de7873e74692087f5841abe622c0ac0cfef1d7ed", - "mixHash": "528d4436d147a02a8ed551fae5f1f57413862617d8227cb4cf966cb952249463", - "nonce": "046fa7968c8cd601", - "number": "0x06", - "parentHash": "d5a9bfaacb5a003efa38df0b96469686a8de51aed9ce191add1cc9741484afee", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "d7073aa8551fa3daa4aa5472bb3e43f5bb5e573b201e808036ad7e495f55c42e", - "timestamp": "0x55b7e713", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a0d5a9bfaacb5a003efa38df0b96469686a8de51aed9ce191add1cc9741484afeea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d7073aa8551fa3daa4aa5472bb3e43f5bb5e573b201e808036ad7e495f55c42ea056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd8808455b7e71380a0528d4436d147a02a8ed551fae5f1f57413862617d8227cb4cf966cb95224946388046fa7968c8cd601c0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020180", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "33e92cdfabc54cb3c3772b38d484fa1d46cd2e99c889b421d128b900503eaa23", - "mixHash": "95edd26ffdf4ac20cfa92d1c7cf4c05c6105afd5d95eb595cd72f03a8ab5f5cf", - "nonce": "b14cea1c427ed752", - "number": "0x07", - "parentHash": "1c3245b5a38e2c3f7fa083a6de7873e74692087f5841abe622c0ac0cfef1d7ed", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "793912478fd35f247f64d392e8bcaead8ab614be3fd987264a173b68b879c58c", - "timestamp": "0x55b7e715", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a01c3245b5a38e2c3f7fa083a6de7873e74692087f5841abe622c0ac0cfef1d7eda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0793912478fd35f247f64d392e8bcaead8ab614be3fd987264a173b68b879c58ca056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd8808455b7e71580a095edd26ffdf4ac20cfa92d1c7cf4c05c6105afd5d95eb595cd72f03a8ab5f5cf88b14cea1c427ed752c0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x0201c0", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "fa4af3e332531c73dd2ca020a831fd9568b88134087349d521fa177c17bc41ed", - "mixHash": "feb26554b9f283bc91ecbbcaeea8385ddcccce61871299c18d9164d7da57813b", - "nonce": "d6337c1635671082", - "number": "0x08", - "parentHash": "33e92cdfabc54cb3c3772b38d484fa1d46cd2e99c889b421d128b900503eaa23", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "dcb04aa3695e496be9d1d0e6d2de0303f330e4f7f201b340f642da3714e648fa", - "timestamp": "0x55b7e717", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a033e92cdfabc54cb3c3772b38d484fa1d46cd2e99c889b421d128b900503eaa23a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0dcb04aa3695e496be9d1d0e6d2de0303f330e4f7f201b340f642da3714e648faa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd8808455b7e71780a0feb26554b9f283bc91ecbbcaeea8385ddcccce61871299c18d9164d7da57813b88d6337c1635671082c0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020200", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "7641d38a440222358cbf9c1150263abcea34e053dc13d0e3c23d1f7d1e061154", - "mixHash": "af5b02f45319575287bf82e566e527960ddec57456ca3b125684450ca4bdd1e0", - "nonce": "5b98740615bed5fb", - "number": "0x09", - "parentHash": "fa4af3e332531c73dd2ca020a831fd9568b88134087349d521fa177c17bc41ed", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "3ecc35b803ca5469044004746738b563022ee32f55a47bee84b1cbbc8aec7038", - "timestamp": "0x55b7e719", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a0fa4af3e332531c73dd2ca020a831fd9568b88134087349d521fa177c17bc41eda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a03ecc35b803ca5469044004746738b563022ee32f55a47bee84b1cbbc8aec7038a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd8808455b7e71980a0af5b02f45319575287bf82e566e527960ddec57456ca3b125684450ca4bdd1e0885b98740615bed5fbc0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020240", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "7278bbf2c40207fa684588682eb21b80d67fbb394442dc847ef724fb9ad6e31f", - "mixHash": "6b77228c3e37f1cfcac744570927355dc8977a0d5a07fef5bafc8dac09be66f9", - "nonce": "c8ae382f1e04738e", - "number": "0x0a", - "parentHash": "7641d38a440222358cbf9c1150263abcea34e053dc13d0e3c23d1f7d1e061154", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "82deda184becc41323eae64a6074f111e0cb35cd322f404f6b2a5adb5a34c6e5", - "timestamp": "0x55b7e71a", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a07641d38a440222358cbf9c1150263abcea34e053dc13d0e3c23d1f7d1e061154a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a082deda184becc41323eae64a6074f111e0cb35cd322f404f6b2a5adb5a34c6e5a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd8808455b7e71a80a06b77228c3e37f1cfcac744570927355dc8977a0d5a07fef5bafc8dac09be66f988c8ae382f1e04738ec0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020280", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "4301eea57e9eaec99c810d76250878a2d2044a98f2c4d99692d33ed11ab000f7", - "mixHash": "4c4b6f6d157c9b21e6503d43f51bf5fa795057dff76cfb5c3101c562a58e3075", - "nonce": "4b662bc13bd8eb3e", - "number": "0x0b", - "parentHash": "7278bbf2c40207fa684588682eb21b80d67fbb394442dc847ef724fb9ad6e31f", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "f156db8814724a583ca59380610df31556ef5c0d1902232d5682265582b1ddcc", - "timestamp": "0x55b7e71c", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a07278bbf2c40207fa684588682eb21b80d67fbb394442dc847ef724fb9ad6e31fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f156db8814724a583ca59380610df31556ef5c0d1902232d5682265582b1ddcca056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202800b832fefd8808455b7e71c80a04c4b6f6d157c9b21e6503d43f51bf5fa795057dff76cfb5c3101c562a58e3075884b662bc13bd8eb3ec0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x0202c0", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "89b180d2b7872dc62732450a266f5e38ff7fb24d9ef2d922ae1e4802e11b6df2", - "mixHash": "3caa350b0c80933c44ff1fce1207771382b7ddceab1fe29ace45ef36c2d1a4f8", - "nonce": "1cd1a30ad25263a2", - "number": "0x0c", - "parentHash": "4301eea57e9eaec99c810d76250878a2d2044a98f2c4d99692d33ed11ab000f7", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "27a822b12eb549a47e54bfbfed10435ba5e7ac2b6570e3a55a946ab4459ef565", - "timestamp": "0x55b7e71d", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a04301eea57e9eaec99c810d76250878a2d2044a98f2c4d99692d33ed11ab000f7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a027a822b12eb549a47e54bfbfed10435ba5e7ac2b6570e3a55a946ab4459ef565a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202c00c832fefd8808455b7e71d80a03caa350b0c80933c44ff1fce1207771382b7ddceab1fe29ace45ef36c2d1a4f8881cd1a30ad25263a2c0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020300", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "f04fa681d5b06ab134e47ff6160a84ab7ffffaa3de9bbd19de4853db1ce0d4f1", - "mixHash": "e0c86b7656ebeb87b9637ae65f0b844675b5e3ea60074ad9df783139fa6c7ab6", - "nonce": "4a715e52a6d3c641", - "number": "0x0d", - "parentHash": "89b180d2b7872dc62732450a266f5e38ff7fb24d9ef2d922ae1e4802e11b6df2", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "b0d8ef7663253d7b802a040678d7c2dbec2ff212cbdf21fa1b4ab3b0096d7b29", - "timestamp": "0x55b7e71f", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a089b180d2b7872dc62732450a266f5e38ff7fb24d9ef2d922ae1e4802e11b6df2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b0d8ef7663253d7b802a040678d7c2dbec2ff212cbdf21fa1b4ab3b0096d7b29a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203000d832fefd8808455b7e71f80a0e0c86b7656ebeb87b9637ae65f0b844675b5e3ea60074ad9df783139fa6c7ab6884a715e52a6d3c641c0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020340", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "e2762b21aac868b8104e50b0bbdf103cc01c02d416356f050cc98c064b8b782b", - "mixHash": "e9002b6cd5c35f7dc0cf84264130db0f478581cc42d771d750b2498bd06205ad", - "nonce": "6df69ea0cdaaf1fc", - "number": "0x0e", - "parentHash": "f04fa681d5b06ab134e47ff6160a84ab7ffffaa3de9bbd19de4853db1ce0d4f1", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "bcdf88f6700cebabc1092b5a663aae4e3c414e9cbc5c6ec862c310d810971145", - "timestamp": "0x55b7e721", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a0f04fa681d5b06ab134e47ff6160a84ab7ffffaa3de9bbd19de4853db1ce0d4f1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0bcdf88f6700cebabc1092b5a663aae4e3c414e9cbc5c6ec862c310d810971145a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203400e832fefd8808455b7e72180a0e9002b6cd5c35f7dc0cf84264130db0f478581cc42d771d750b2498bd06205ad886df69ea0cdaaf1fcc0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020380", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "ebed191766695e96925702f64521f5e2e00d58ce209e38ca417b479bb451238c", - "mixHash": "2738ce46b148eb08c0ba8a1276828282e82e2b5b4d0c26a6872129d939ddba6a", - "nonce": "8365e8d13580479f", - "number": "0x0f", - "parentHash": "e2762b21aac868b8104e50b0bbdf103cc01c02d416356f050cc98c064b8b782b", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "584e007c60cac97af14794fbf7ac16f2b7c2a2050da896711c97d4c162a32f66", - "timestamp": "0x55b7e722", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a0e2762b21aac868b8104e50b0bbdf103cc01c02d416356f050cc98c064b8b782ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0584e007c60cac97af14794fbf7ac16f2b7c2a2050da896711c97d4c162a32f66a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203800f832fefd8808455b7e72280a02738ce46b148eb08c0ba8a1276828282e82e2b5b4d0c26a6872129d939ddba6a888365e8d13580479fc0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x0203c0", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "132466cbb22aaadaa07f87f92576de6abb180c3e3a70361444168a20a059cdb6", - "mixHash": "f009294be3192196796e9188ade1e8b9cd29aeac8fc1ba60898c8543997cfce1", - "nonce": "ddd31cbcf7c06cb0", - "number": "0x10", - "parentHash": "ebed191766695e96925702f64521f5e2e00d58ce209e38ca417b479bb451238c", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "40018894b5b4ed58f3645029eb67a7bbdbc17403ea03c2c9ad31da2fbfbda54a", - "timestamp": "0x55b7e724", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a0ebed191766695e96925702f64521f5e2e00d58ce209e38ca417b479bb451238ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a040018894b5b4ed58f3645029eb67a7bbdbc17403ea03c2c9ad31da2fbfbda54aa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203c010832fefd8808455b7e72480a0f009294be3192196796e9188ade1e8b9cd29aeac8fc1ba60898c8543997cfce188ddd31cbcf7c06cb0c0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020400", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "c7a7db96d87a3372ac435803f32041658e5cab4f343d0f14d3353fc632962111", - "mixHash": "f9848a47ad2db2af447313cf466d9ad1e3bdec77f9e42059111f7413fba67271", - "nonce": "b86889cf6a60454e", - "number": "0x11", - "parentHash": "132466cbb22aaadaa07f87f92576de6abb180c3e3a70361444168a20a059cdb6", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "8f5c35386979fce489741a660bbb307fbf031d37228accfcdf8b172c8751b5d7", - "timestamp": "0x55b7e726", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a0132466cbb22aaadaa07f87f92576de6abb180c3e3a70361444168a20a059cdb6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08f5c35386979fce489741a660bbb307fbf031d37228accfcdf8b172c8751b5d7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302040011832fefd8808455b7e72680a0f9848a47ad2db2af447313cf466d9ad1e3bdec77f9e42059111f7413fba6727188b86889cf6a60454ec0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020440", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "8d204098e2ad9632c0966377a2b407166fd45db8a32969d8756b0f2441ccf1b0", - "mixHash": "2267ffcb65b55160f312f0766036f23b6bdf131d2e658ba09884664484f3bfc2", - "nonce": "1c36744758652660", - "number": "0x12", - "parentHash": "c7a7db96d87a3372ac435803f32041658e5cab4f343d0f14d3353fc632962111", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "558046f5f6d5c25f9dc3073feff56cfeb2d298cc305556507c438df83b9bb455", - "timestamp": "0x55b7e728", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a0c7a7db96d87a3372ac435803f32041658e5cab4f343d0f14d3353fc632962111a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0558046f5f6d5c25f9dc3073feff56cfeb2d298cc305556507c438df83b9bb455a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302044012832fefd8808455b7e72880a02267ffcb65b55160f312f0766036f23b6bdf131d2e658ba09884664484f3bfc2881c36744758652660c0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020480", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "cdc71b5d68cd899a436c02ec9f0b330bd8e08ad97d844bf6dc2c4d22413cf071", - "mixHash": "3881843b368cdef308cd5d79b6286383e98b32ae136a80ed7300d6a6895cc4dc", - "nonce": "d57c46d9d26f4748", - "number": "0x13", - "parentHash": "8d204098e2ad9632c0966377a2b407166fd45db8a32969d8756b0f2441ccf1b0", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "797f2c1a9d1412fba9a4c568345a153226cc515c29a975b07e14d87844c41077", - "timestamp": "0x55b7e729", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a08d204098e2ad9632c0966377a2b407166fd45db8a32969d8756b0f2441ccf1b0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0797f2c1a9d1412fba9a4c568345a153226cc515c29a975b07e14d87844c41077a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302048013832fefd8808455b7e72980a03881843b368cdef308cd5d79b6286383e98b32ae136a80ed7300d6a6895cc4dc88d57c46d9d26f4748c0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x0204c0", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "e41a4111822ebda2fe7274859b936e502ec358718406950c7d86325dfd211087", - "mixHash": "7ae4ed651c7a6e495e6f9cd3ba595da0b31dee931ca6e8ae8de4cbabb1b3ec3d", - "nonce": "bbebf5b64f3d6f87", - "number": "0x14", - "parentHash": "cdc71b5d68cd899a436c02ec9f0b330bd8e08ad97d844bf6dc2c4d22413cf071", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "b8d26292009aac0ac6fb3f27dfbe37417a4986e7eac92b087fc483163231455f", - "timestamp": "0x55b7e72b", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a0cdc71b5d68cd899a436c02ec9f0b330bd8e08ad97d844bf6dc2c4d22413cf071a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b8d26292009aac0ac6fb3f27dfbe37417a4986e7eac92b087fc483163231455fa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830204c014832fefd8808455b7e72b80a07ae4ed651c7a6e495e6f9cd3ba595da0b31dee931ca6e8ae8de4cbabb1b3ec3d88bbebf5b64f3d6f87c0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020500", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "baea77a3f112f38343d2213447f0f3c409bc159da44ab550f266f7b3846c78d0", - "mixHash": "e1e3e7773546606ae5b16bc539b426ca19ce92c690d70a47b596d3a560e3f43a", - "nonce": "c663712d7a706c71", - "number": "0x15", - "parentHash": "e41a4111822ebda2fe7274859b936e502ec358718406950c7d86325dfd211087", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "263ee0071da205fb88b8bfc6905ec4a382e004a16be57e328db7d5f6fe2ef094", - "timestamp": "0x55b7e72d", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a0e41a4111822ebda2fe7274859b936e502ec358718406950c7d86325dfd211087a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0263ee0071da205fb88b8bfc6905ec4a382e004a16be57e328db7d5f6fe2ef094a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302050015832fefd8808455b7e72d80a0e1e3e7773546606ae5b16bc539b426ca19ce92c690d70a47b596d3a560e3f43a88c663712d7a706c71c0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020540", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "b2634e0349df4e261245cce5d138ec361da14f8519dd6cdbe9d407ae2138f718", - "mixHash": "1f0a1b1a6dbd0fdf145cb9e0c9b4826562f0e75e9b96d5e42902a7a4222224f3", - "nonce": "1f8b9f0d6951ae05", - "number": "0x16", - "parentHash": "baea77a3f112f38343d2213447f0f3c409bc159da44ab550f266f7b3846c78d0", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "cb18f938d431b97f2da9da22d4ee0e7f5683bcd40b334d10a3c8a2c500f44172", - "timestamp": "0x55b7e72e", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a0baea77a3f112f38343d2213447f0f3c409bc159da44ab550f266f7b3846c78d0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb18f938d431b97f2da9da22d4ee0e7f5683bcd40b334d10a3c8a2c500f44172a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302054016832fefd8808455b7e72e80a01f0a1b1a6dbd0fdf145cb9e0c9b4826562f0e75e9b96d5e42902a7a4222224f3881f8b9f0d6951ae05c0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020580", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "86c993998a620791696827e69ae9706f559130ec35d27af56660eae1ac5d52f0", - "mixHash": "aeb9d07869fa0ca0b5acc071b0bd71171ab80c840fc1e2e207d77ff35b3ba847", - "nonce": "5579a65ec808c4b0", - "number": "0x17", - "parentHash": "b2634e0349df4e261245cce5d138ec361da14f8519dd6cdbe9d407ae2138f718", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "e43f761aec2f7c501460707beeb9cfdc327167de802b66bfe4fc242c445198c4", - "timestamp": "0x55b7e72f", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a0b2634e0349df4e261245cce5d138ec361da14f8519dd6cdbe9d407ae2138f718a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e43f761aec2f7c501460707beeb9cfdc327167de802b66bfe4fc242c445198c4a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302058017832fefd8808455b7e72f80a0aeb9d07869fa0ca0b5acc071b0bd71171ab80c840fc1e2e207d77ff35b3ba847885579a65ec808c4b0c0c0", - "transactions": [], - "uncleHeaders": [] - }, { - "blockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x0205c0", - "extraData": "0x", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "09d85cfb5f6d1dd01166312c7065f5398b62cb3238eb8b253203b1a7c6103130", - "mixHash": "3e65f4e43fdefc8580e0cb4060fdf42499b2f5693ace121555c55230a0bd9542", - "nonce": "741ed4886c1bdc2d", - "number": "0x18", - "parentHash": "86c993998a620791696827e69ae9706f559130ec35d27af56660eae1ac5d52f0", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "d03041a321e09270a4b492eb94e244a1b4517a76d6bfb59031aa7003eb287cf4", - "timestamp": "0x55b7e731", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp": "0xf901fcf901f7a086c993998a620791696827e69ae9706f559130ec35d27af56660eae1ac5d52f0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d03041a321e09270a4b492eb94e244a1b4517a76d6bfb59031aa7003eb287cf4a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830205c018832fefd8808455b7e73180a03e65f4e43fdefc8580e0cb4060fdf42499b2f5693ace121555c55230a0bd954288741ed4886c1bdc2dc0c0", - "transactions": [], - "uncleHeaders": [] - }], - "genesisBlockHeader": { - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty": "0x020000", - "extraData": "0x42", - "gasLimit": "0x2fefd8", - "gasUsed": "0x00", - "hash": "de68deceb6f907a67e0bbc2dc5cbe3114ddadf66a771abfc2b8c5619e86f1b81", - "mixHash": "73c1f97c35c8e8a9658b87b77c2059f8d0aba2a59325c3b17e8e8aa86ca13ba5", - "nonce": "6b8f68474b6896fb", - "number": "0x00", - "parentHash": "0000000000000000000000000000000000000000000000000000000000000000", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot": "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp": "0x54c98c81", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "genesisRLP": "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a073c1f97c35c8e8a9658b87b77c2059f8d0aba2a59325c3b17e8e8aa86ca13ba5886b8f68474b6896fbc0c0", - "lastblockhash": "09d85cfb5f6d1dd01166312c7065f5398b62cb3238eb8b253203b1a7c6103130", - "postState": { - "8888f1f195afa192cfee860698584c030f4c9db1": { - "balance": "0x068155a43676e00000", - "code": "0x", - "nonce": "0x00", - "storage": {} - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "balance": "0x02540be400", - "code": "0x", - "nonce": "0x00", - "storage": {} - } - }, - "pre": { - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "balance": "0x02540be400", - "code": "0x", - "nonce": "0x00", - "storage": {} - } + "notxs" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "0dcf0c60eae42e274d4a3b7d1eb676cb12d5ad7d19856a966b94e83c8dc1672b", + "mixHash" : "5c12c8b6e836f3c0e03a2280d23c58d07bc24de8acc585722a7321255d7fcc9f", + "nonce" : "ed7718eb1c78740f", + "number" : "0x01", + "parentHash" : "3e156d5bd5e5833d6377f8b083a14bdd0cc6170f4ce50b0e120a109dd0c28c06", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "8503769bb14067be7c5e438c353094e5a9a6c72f375fad4a76878a8882ceb496", + "timestamp" : "0x561bc5f9", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a03e156d5bd5e5833d6377f8b083a14bdd0cc6170f4ce50b0e120a109dd0c28c06a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08503769bb14067be7c5e438c353094e5a9a6c72f375fad4a76878a8882ceb496a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88084561bc5f980a05c12c8b6e836f3c0e03a2280d23c58d07bc24de8acc585722a7321255d7fcc9f88ed7718eb1c78740fc0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "2b428e860719978e1d31130c60b2f760fb3292ed5a0621ca857d522f8c29e506", + "mixHash" : "c12bce6d530c3e88ae7655cb45aa1aa6e7640bc58eca289bfd1e13748e40ef27", + "nonce" : "c778f78930bc8b6b", + "number" : "0x02", + "parentHash" : "0dcf0c60eae42e274d4a3b7d1eb676cb12d5ad7d19856a966b94e83c8dc1672b", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "326587c5310ecdbd0c8d36c471eef6595a6046ad46ee90bf0db88e691223ee38", + "timestamp" : "0x561bc5fb", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a00dcf0c60eae42e274d4a3b7d1eb676cb12d5ad7d19856a966b94e83c8dc1672ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0326587c5310ecdbd0c8d36c471eef6595a6046ad46ee90bf0db88e691223ee38a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc5fb80a0c12bce6d530c3e88ae7655cb45aa1aa6e7640bc58eca289bfd1e13748e40ef2788c778f78930bc8b6bc0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "6e3840ffd1953d1b0a031ea75339c655468b5fcb0aa3b57b91a3cc07ce4ddce8", + "mixHash" : "24650cac0c31871ec89d5b3e78da08a9c25ad2e9c7643c5503089a191b8110eb", + "nonce" : "103364bcdda31a59", + "number" : "0x03", + "parentHash" : "2b428e860719978e1d31130c60b2f760fb3292ed5a0621ca857d522f8c29e506", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "c662553363b8624b50cd8f83a2a28ec38b6cf0c029db61cb21e06d7df87fb256", + "timestamp" : "0x561bc5fd", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a02b428e860719978e1d31130c60b2f760fb3292ed5a0621ca857d522f8c29e506a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c662553363b8624b50cd8f83a2a28ec38b6cf0c029db61cb21e06d7df87fb256a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88084561bc5fd80a024650cac0c31871ec89d5b3e78da08a9c25ad2e9c7643c5503089a191b8110eb88103364bcdda31a59c0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "e19df3814112665976295eab87d954be8e428489deac7ce07e353bdbce0bd40d", + "mixHash" : "9a2883468ec7d8115b4794fad4d366b108db888bddef5ab8233367d4d74bd02a", + "nonce" : "40e37596f1d3086d", + "number" : "0x04", + "parentHash" : "6e3840ffd1953d1b0a031ea75339c655468b5fcb0aa3b57b91a3cc07ce4ddce8", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "6b6c82551219d30f4168674006e3e1ece38eb055d9575f63e6dcce05f4a610af", + "timestamp" : "0x561bc600", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a06e3840ffd1953d1b0a031ea75339c655468b5fcb0aa3b57b91a3cc07ce4ddce8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a06b6c82551219d30f4168674006e3e1ece38eb055d9575f63e6dcce05f4a610afa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88084561bc60080a09a2883468ec7d8115b4794fad4d366b108db888bddef5ab8233367d4d74bd02a8840e37596f1d3086dc0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "3fb310cb1f63a6e91a3a6bd49d5fe1e57d635f2c9c45bab480a71a9108744b65", + "mixHash" : "0890417e2562083e580758c946c2e0948f28961c39f6563f7589c793b007737a", + "nonce" : "57cf9bc8b0b0c512", + "number" : "0x05", + "parentHash" : "e19df3814112665976295eab87d954be8e428489deac7ce07e353bdbce0bd40d", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "d7fbf4bf063a6e4a506777007a071e16d4dc6cc18f9ced7b29261942b35409a3", + "timestamp" : "0x561bc604", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a0e19df3814112665976295eab87d954be8e428489deac7ce07e353bdbce0bd40da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d7fbf4bf063a6e4a506777007a071e16d4dc6cc18f9ced7b29261942b35409a3a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd88084561bc60480a00890417e2562083e580758c946c2e0948f28961c39f6563f7589c793b007737a8857cf9bc8b0b0c512c0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "6e965b9eeaeb25edc4ecacf85494d24bcbaf28ff6180033f335dfe310679b1d7", + "mixHash" : "d7eecefc7e19d53b844e6420c53be8eddd402e1fb2bb9296d6e9cc58bb46d4cf", + "nonce" : "d0761fc17b56e128", + "number" : "0x06", + "parentHash" : "3fb310cb1f63a6e91a3a6bd49d5fe1e57d635f2c9c45bab480a71a9108744b65", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "d7073aa8551fa3daa4aa5472bb3e43f5bb5e573b201e808036ad7e495f55c42e", + "timestamp" : "0x561bc606", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a03fb310cb1f63a6e91a3a6bd49d5fe1e57d635f2c9c45bab480a71a9108744b65a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d7073aa8551fa3daa4aa5472bb3e43f5bb5e573b201e808036ad7e495f55c42ea056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd88084561bc60680a0d7eecefc7e19d53b844e6420c53be8eddd402e1fb2bb9296d6e9cc58bb46d4cf88d0761fc17b56e128c0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020180", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "53748fc351fea2e75f54d2291c763080b231a8f5a6b20929465ed86f233d6e70", + "mixHash" : "d135e9b61ed66c1eaf1efd64f04fc00db378b3127e7dc727edfb143afae53f64", + "nonce" : "3885da6d45a6bc6b", + "number" : "0x07", + "parentHash" : "6e965b9eeaeb25edc4ecacf85494d24bcbaf28ff6180033f335dfe310679b1d7", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "793912478fd35f247f64d392e8bcaead8ab614be3fd987264a173b68b879c58c", + "timestamp" : "0x561bc60a", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a06e965b9eeaeb25edc4ecacf85494d24bcbaf28ff6180033f335dfe310679b1d7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0793912478fd35f247f64d392e8bcaead8ab614be3fd987264a173b68b879c58ca056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd88084561bc60a80a0d135e9b61ed66c1eaf1efd64f04fc00db378b3127e7dc727edfb143afae53f64883885da6d45a6bc6bc0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0201c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "d72795826af7d2086d917d6a77b7f70189132901b8956548ce0ae335a5d6f46b", + "mixHash" : "899269dedaec44eac6a65fdb2d9e223cb15e8899c6d3c43e83407e0cd20cb74e", + "nonce" : "a31d9212795f8148", + "number" : "0x08", + "parentHash" : "53748fc351fea2e75f54d2291c763080b231a8f5a6b20929465ed86f233d6e70", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "dcb04aa3695e496be9d1d0e6d2de0303f330e4f7f201b340f642da3714e648fa", + "timestamp" : "0x561bc60b", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a053748fc351fea2e75f54d2291c763080b231a8f5a6b20929465ed86f233d6e70a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0dcb04aa3695e496be9d1d0e6d2de0303f330e4f7f201b340f642da3714e648faa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd88084561bc60b80a0899269dedaec44eac6a65fdb2d9e223cb15e8899c6d3c43e83407e0cd20cb74e88a31d9212795f8148c0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020200", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "598fec880413fbe98d9ad707a89372db647b2a056351b9a99fa1757dda57202e", + "mixHash" : "51fd5d6da23091a77ce9f05efc451a99f9b01e6655db23d3ab30374825996fbd", + "nonce" : "f70b815ea4f39667", + "number" : "0x09", + "parentHash" : "d72795826af7d2086d917d6a77b7f70189132901b8956548ce0ae335a5d6f46b", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "3ecc35b803ca5469044004746738b563022ee32f55a47bee84b1cbbc8aec7038", + "timestamp" : "0x561bc60d", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a0d72795826af7d2086d917d6a77b7f70189132901b8956548ce0ae335a5d6f46ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a03ecc35b803ca5469044004746738b563022ee32f55a47bee84b1cbbc8aec7038a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd88084561bc60d80a051fd5d6da23091a77ce9f05efc451a99f9b01e6655db23d3ab30374825996fbd88f70b815ea4f39667c0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020240", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "ca5c5b19500daf5aace530570056df07a03429113ea45f32c9b959656fe56330", + "mixHash" : "81ce8449e9f68cd1fe6ba5693a3405d83dd839737e912cc6d7f91999126a3bab", + "nonce" : "7d3b1ccc5f00fbb4", + "number" : "0x0a", + "parentHash" : "598fec880413fbe98d9ad707a89372db647b2a056351b9a99fa1757dda57202e", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "82deda184becc41323eae64a6074f111e0cb35cd322f404f6b2a5adb5a34c6e5", + "timestamp" : "0x561bc60f", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a0598fec880413fbe98d9ad707a89372db647b2a056351b9a99fa1757dda57202ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a082deda184becc41323eae64a6074f111e0cb35cd322f404f6b2a5adb5a34c6e5a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd88084561bc60f80a081ce8449e9f68cd1fe6ba5693a3405d83dd839737e912cc6d7f91999126a3bab887d3b1ccc5f00fbb4c0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020280", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "36c374e85cb81c6866a02841bd25bb45d715336b03f4b13be096980ece6f1965", + "mixHash" : "5914cdfb1f0a9e226d72023c60f1327965cf72e76c73cb29755c6eb333b4c09f", + "nonce" : "6b2a074829b3859e", + "number" : "0x0b", + "parentHash" : "ca5c5b19500daf5aace530570056df07a03429113ea45f32c9b959656fe56330", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "f156db8814724a583ca59380610df31556ef5c0d1902232d5682265582b1ddcc", + "timestamp" : "0x561bc612", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a0ca5c5b19500daf5aace530570056df07a03429113ea45f32c9b959656fe56330a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f156db8814724a583ca59380610df31556ef5c0d1902232d5682265582b1ddcca056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202800b832fefd88084561bc61280a05914cdfb1f0a9e226d72023c60f1327965cf72e76c73cb29755c6eb333b4c09f886b2a074829b3859ec0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0202c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "c5a7b9e2c77672597117c3c1b6e9831ed45e29eaf7c7e0d7162e6e49878edde3", + "mixHash" : "a33be473b94bb737dc96d0b2c296ed302cddb7e5a2c870a3c243027f15cea112", + "nonce" : "18780728b97b6554", + "number" : "0x0c", + "parentHash" : "36c374e85cb81c6866a02841bd25bb45d715336b03f4b13be096980ece6f1965", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "27a822b12eb549a47e54bfbfed10435ba5e7ac2b6570e3a55a946ab4459ef565", + "timestamp" : "0x561bc614", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a036c374e85cb81c6866a02841bd25bb45d715336b03f4b13be096980ece6f1965a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a027a822b12eb549a47e54bfbfed10435ba5e7ac2b6570e3a55a946ab4459ef565a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202c00c832fefd88084561bc61480a0a33be473b94bb737dc96d0b2c296ed302cddb7e5a2c870a3c243027f15cea1128818780728b97b6554c0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020300", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "76234a5bc1ac65704869ef52b399bff893f34800b9be2b55206a0b263a803e92", + "mixHash" : "482ce268cc280cbdfd78747aaa64629a8ea009e4af8fdc95bf8bb00fa323cf59", + "nonce" : "b4dc9e2f92cdfaa1", + "number" : "0x0d", + "parentHash" : "c5a7b9e2c77672597117c3c1b6e9831ed45e29eaf7c7e0d7162e6e49878edde3", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "b0d8ef7663253d7b802a040678d7c2dbec2ff212cbdf21fa1b4ab3b0096d7b29", + "timestamp" : "0x561bc617", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a0c5a7b9e2c77672597117c3c1b6e9831ed45e29eaf7c7e0d7162e6e49878edde3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b0d8ef7663253d7b802a040678d7c2dbec2ff212cbdf21fa1b4ab3b0096d7b29a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203000d832fefd88084561bc61780a0482ce268cc280cbdfd78747aaa64629a8ea009e4af8fdc95bf8bb00fa323cf5988b4dc9e2f92cdfaa1c0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020340", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "564f6e72b08b74fe3840a8f48a2616d48a6e50e47e8aa56d6eea3242d4b4f273", + "mixHash" : "f8a51552281f7d61f4dfac7fe9de7ac04dcb271e4fadb64607cff4190bd97d2e", + "nonce" : "0c2ce1dfe210a39f", + "number" : "0x0e", + "parentHash" : "76234a5bc1ac65704869ef52b399bff893f34800b9be2b55206a0b263a803e92", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "bcdf88f6700cebabc1092b5a663aae4e3c414e9cbc5c6ec862c310d810971145", + "timestamp" : "0x561bc61a", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a076234a5bc1ac65704869ef52b399bff893f34800b9be2b55206a0b263a803e92a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0bcdf88f6700cebabc1092b5a663aae4e3c414e9cbc5c6ec862c310d810971145a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203400e832fefd88084561bc61a80a0f8a51552281f7d61f4dfac7fe9de7ac04dcb271e4fadb64607cff4190bd97d2e880c2ce1dfe210a39fc0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020380", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "244ca5c17c941a8935156d613ba28fd8f4f7d50a8700f9a0c90994de6effb8e2", + "mixHash" : "2aac4384ba1f26c9f7f048b7fca8a1e7a916059af07a13fe3475bde4c36944cd", + "nonce" : "ff9fc6bcd5697b2a", + "number" : "0x0f", + "parentHash" : "564f6e72b08b74fe3840a8f48a2616d48a6e50e47e8aa56d6eea3242d4b4f273", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "584e007c60cac97af14794fbf7ac16f2b7c2a2050da896711c97d4c162a32f66", + "timestamp" : "0x561bc61c", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a0564f6e72b08b74fe3840a8f48a2616d48a6e50e47e8aa56d6eea3242d4b4f273a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0584e007c60cac97af14794fbf7ac16f2b7c2a2050da896711c97d4c162a32f66a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203800f832fefd88084561bc61c80a02aac4384ba1f26c9f7f048b7fca8a1e7a916059af07a13fe3475bde4c36944cd88ff9fc6bcd5697b2ac0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0203c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "d3f78583ff7c0aa21b8602dbcac68072e231fb730755d7e21bf66dc8b9caed2e", + "mixHash" : "778344edbf8be089a1a71a04208c40bb100ac173cbd18e431607a8d2223c5559", + "nonce" : "f4f1f27483b0d899", + "number" : "0x10", + "parentHash" : "244ca5c17c941a8935156d613ba28fd8f4f7d50a8700f9a0c90994de6effb8e2", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "40018894b5b4ed58f3645029eb67a7bbdbc17403ea03c2c9ad31da2fbfbda54a", + "timestamp" : "0x561bc61f", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a0244ca5c17c941a8935156d613ba28fd8f4f7d50a8700f9a0c90994de6effb8e2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a040018894b5b4ed58f3645029eb67a7bbdbc17403ea03c2c9ad31da2fbfbda54aa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203c010832fefd88084561bc61f80a0778344edbf8be089a1a71a04208c40bb100ac173cbd18e431607a8d2223c555988f4f1f27483b0d899c0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020400", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "af94d4a811cabcefd2886e9018525254355a9e78ff9a4860234c776d51845227", + "mixHash" : "1e2601fdd8df8d0943dc1dd43ad17d6fbce5d0b94f6520951b0ab9d160dd571a", + "nonce" : "58a0ac7911e82fbb", + "number" : "0x11", + "parentHash" : "d3f78583ff7c0aa21b8602dbcac68072e231fb730755d7e21bf66dc8b9caed2e", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "8f5c35386979fce489741a660bbb307fbf031d37228accfcdf8b172c8751b5d7", + "timestamp" : "0x561bc621", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a0d3f78583ff7c0aa21b8602dbcac68072e231fb730755d7e21bf66dc8b9caed2ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08f5c35386979fce489741a660bbb307fbf031d37228accfcdf8b172c8751b5d7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302040011832fefd88084561bc62180a01e2601fdd8df8d0943dc1dd43ad17d6fbce5d0b94f6520951b0ab9d160dd571a8858a0ac7911e82fbbc0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020440", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "e41d1a02d11a8bc710713ee237c88addbb5603ed9c6769d8ebc9d79df9a834fa", + "mixHash" : "b53bcf0ab3471fd9cb04919470b0d5e2feed189ef0f2ebeb7e89d0679f00d77b", + "nonce" : "906c4150202f4349", + "number" : "0x12", + "parentHash" : "af94d4a811cabcefd2886e9018525254355a9e78ff9a4860234c776d51845227", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "558046f5f6d5c25f9dc3073feff56cfeb2d298cc305556507c438df83b9bb455", + "timestamp" : "0x561bc623", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a0af94d4a811cabcefd2886e9018525254355a9e78ff9a4860234c776d51845227a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0558046f5f6d5c25f9dc3073feff56cfeb2d298cc305556507c438df83b9bb455a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302044012832fefd88084561bc62380a0b53bcf0ab3471fd9cb04919470b0d5e2feed189ef0f2ebeb7e89d0679f00d77b88906c4150202f4349c0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020480", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "7b9c97373e27c7fa0ff0f7e369b7e6f4ada5484ce4c5f97a8b44cc4a48023e79", + "mixHash" : "9111c5449d3d763076c40ec734aab81457ad54252c102c49f16a6b328fa18678", + "nonce" : "a58938282ba3931b", + "number" : "0x13", + "parentHash" : "e41d1a02d11a8bc710713ee237c88addbb5603ed9c6769d8ebc9d79df9a834fa", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "797f2c1a9d1412fba9a4c568345a153226cc515c29a975b07e14d87844c41077", + "timestamp" : "0x561bc625", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a0e41d1a02d11a8bc710713ee237c88addbb5603ed9c6769d8ebc9d79df9a834faa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0797f2c1a9d1412fba9a4c568345a153226cc515c29a975b07e14d87844c41077a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302048013832fefd88084561bc62580a09111c5449d3d763076c40ec734aab81457ad54252c102c49f16a6b328fa1867888a58938282ba3931bc0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0204c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "b9a283f45b1d48dcd7b3a677006e32dc71b553ae5dff7a1deb3c72f282da5f73", + "mixHash" : "c114b290c7225c291ad77990377ca9e16f73d6679441b0c52662628f1b5e127a", + "nonce" : "eaea212689125cf8", + "number" : "0x14", + "parentHash" : "7b9c97373e27c7fa0ff0f7e369b7e6f4ada5484ce4c5f97a8b44cc4a48023e79", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "b8d26292009aac0ac6fb3f27dfbe37417a4986e7eac92b087fc483163231455f", + "timestamp" : "0x561bc626", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a07b9c97373e27c7fa0ff0f7e369b7e6f4ada5484ce4c5f97a8b44cc4a48023e79a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b8d26292009aac0ac6fb3f27dfbe37417a4986e7eac92b087fc483163231455fa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830204c014832fefd88084561bc62680a0c114b290c7225c291ad77990377ca9e16f73d6679441b0c52662628f1b5e127a88eaea212689125cf8c0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020500", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "46e349ba4e475529508cd279151154e4d00c0b9e6adcd53a448673b1bbe14503", + "mixHash" : "ec31773de60d359838ce225fab8eebc09ec71eb81dc379191fbd44a54db7b395", + "nonce" : "ab5f186d5b1b4feb", + "number" : "0x15", + "parentHash" : "b9a283f45b1d48dcd7b3a677006e32dc71b553ae5dff7a1deb3c72f282da5f73", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "263ee0071da205fb88b8bfc6905ec4a382e004a16be57e328db7d5f6fe2ef094", + "timestamp" : "0x561bc62a", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a0b9a283f45b1d48dcd7b3a677006e32dc71b553ae5dff7a1deb3c72f282da5f73a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0263ee0071da205fb88b8bfc6905ec4a382e004a16be57e328db7d5f6fe2ef094a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302050015832fefd88084561bc62a80a0ec31773de60d359838ce225fab8eebc09ec71eb81dc379191fbd44a54db7b39588ab5f186d5b1b4febc0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020540", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "29d5b0c3bb582811a766f527c82c1e44efd1347ba4672453d15af97f56bb9e1d", + "mixHash" : "beb80d0c3662979a5eec718b05fb855c4500f2eb884852257125d32935efefbf", + "nonce" : "a9f2ce31e43abb9d", + "number" : "0x16", + "parentHash" : "46e349ba4e475529508cd279151154e4d00c0b9e6adcd53a448673b1bbe14503", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "cb18f938d431b97f2da9da22d4ee0e7f5683bcd40b334d10a3c8a2c500f44172", + "timestamp" : "0x561bc62d", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a046e349ba4e475529508cd279151154e4d00c0b9e6adcd53a448673b1bbe14503a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb18f938d431b97f2da9da22d4ee0e7f5683bcd40b334d10a3c8a2c500f44172a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302054016832fefd88084561bc62d80a0beb80d0c3662979a5eec718b05fb855c4500f2eb884852257125d32935efefbf88a9f2ce31e43abb9dc0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020580", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "fe1566d9216a1fede6e086dfa306777d2968ef243951d3c1a712b55f1f69266b", + "mixHash" : "126ebe500aa098f9464315e8ead0030e23d7ef81b3194253cece5b938f99293b", + "nonce" : "704074f29f75e029", + "number" : "0x17", + "parentHash" : "29d5b0c3bb582811a766f527c82c1e44efd1347ba4672453d15af97f56bb9e1d", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "e43f761aec2f7c501460707beeb9cfdc327167de802b66bfe4fc242c445198c4", + "timestamp" : "0x561bc630", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a029d5b0c3bb582811a766f527c82c1e44efd1347ba4672453d15af97f56bb9e1da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e43f761aec2f7c501460707beeb9cfdc327167de802b66bfe4fc242c445198c4a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302058017832fefd88084561bc63080a0126ebe500aa098f9464315e8ead0030e23d7ef81b3194253cece5b938f99293b88704074f29f75e029c0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0205c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "038fb8e6b3d8519784d1af756f26e62083da8db5fcdf584ed29096407d01a0ae", + "mixHash" : "662b2f8bb7f6358bc7c4c9bd49e6d8361bf4db3784bb535addf0550fbbbdcb70", + "nonce" : "c5894cb53d556792", + "number" : "0x18", + "parentHash" : "fe1566d9216a1fede6e086dfa306777d2968ef243951d3c1a712b55f1f69266b", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "d03041a321e09270a4b492eb94e244a1b4517a76d6bfb59031aa7003eb287cf4", + "timestamp" : "0x561bc634", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf901fcf901f7a0fe1566d9216a1fede6e086dfa306777d2968ef243951d3c1a712b55f1f69266ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d03041a321e09270a4b492eb94e244a1b4517a76d6bfb59031aa7003eb287cf4a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830205c018832fefd88084561bc63480a0662b2f8bb7f6358bc7c4c9bd49e6d8361bf4db3784bb535addf0550fbbbdcb7088c5894cb53d556792c0c0", + "transactions" : [ + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "3e156d5bd5e5833d6377f8b083a14bdd0cc6170f4ce50b0e120a109dd0c28c06", + "mixHash" : "90f5d6239d614e3c902a306df650eb2c41f5791bfa73fe15c123b6d0b7664911", + "nonce" : "56fc7914f97dd78e", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a090f5d6239d614e3c902a306df650eb2c41f5791bfa73fe15c123b6d0b76649118856fc7914f97dd78ec0c0", + "lastblockhash" : "038fb8e6b3d8519784d1af756f26e62083da8db5fcdf584ed29096407d01a0ae", + "postState" : { + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x068155a43676e00000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x02540be400", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x02540be400", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } } - } -} +} \ No newline at end of file diff --git a/tests/files/BlockchainTests/bcInvalidHeaderTest.json b/tests/files/BlockchainTests/bcInvalidHeaderTest.json index 02db226f8..536032c29 100644 --- a/tests/files/BlockchainTests/bcInvalidHeaderTest.json +++ b/tests/files/BlockchainTests/bcInvalidHeaderTest.json @@ -2,7 +2,7 @@ "DifferentExtraData1025" : { "blocks" : [ { - "rlp" : "0xf90665f905fca0440d4a979c681ec0a00aee46da06536fc0505d9e327cefb1914b815caa5736e9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fe3de82560b8455ba16b6b904010101020304050607080910111213141516171819202122232410000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000a03faac4772687ad06f5ab15b5b447dd9846c49c0d94aa7de74016e8092bddb072883202011578ff6eb9f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" + "rlp" : "0xf90665f905fca0ef4ee2a65e04a651714793d93c0912aeae4097bb80c5d5b96d28250bc05acdcfa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84561c0cc5b904010101020304050607080910111213141516171819202122232410000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000a02e9931e5524a3bae992e1139e274a90d9cb99a270292c316b65adce39b186dc788b3f369a7f521bb24f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" } ], "genesisBlockHeader" : { @@ -12,9 +12,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "440d4a979c681ec0a00aee46da06536fc0505d9e327cefb1914b815caa5736e9", - "mixHash" : "78acdf9b4ec043511bc153c172adf8befc0c9291cb05af932918000dea58336e", - "nonce" : "9bc45aa6aa1d8ebe", + "hash" : "ef4ee2a65e04a651714793d93c0912aeae4097bb80c5d5b96d28250bc05acdcf", + "mixHash" : "71e135b3391a197e1a46d8dbb2078aac6b1523a732cb3ffdaabdb58988de47c1", + "nonce" : "94751b50827b42e9", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -23,8 +23,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a078acdf9b4ec043511bc153c172adf8befc0c9291cb05af932918000dea58336e889bc45aa6aa1d8ebec0c0", - "lastblockhash" : "440d4a979c681ec0a00aee46da06536fc0505d9e327cefb1914b815caa5736e9", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a071e135b3391a197e1a46d8dbb2078aac6b1523a732cb3ffdaabdb58988de47c18894751b50827b42e9c0c0", + "lastblockhash" : "ef4ee2a65e04a651714793d93c0912aeae4097bb80c5d5b96d28250bc05acdcf", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -61,7 +61,7 @@ "DifficultyIsZero" : { "blocks" : [ { - "rlp" : "0xf9025ff901f6a09debf1786a0c0f5d4d94b8c968ae670f7bb32dcccf8ccdb1bfbb4a2bf84c50e6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008001832fe3de82560b8455ba16bb80a00000000000000000000000000000000000000000000000000000000000000000880000000000000000f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" + "rlp" : "0xf9025ff901f6a0f6da09d962b55d4b8d243493fc1d61e9e68640fed31b15f862e6d8cff71b0962a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008001832fefd882560b84561c0cc980a09b8ecc2d11a986e713443b4e8503a56941a57c678c97a013c48f6aed6cea8f87880537775007d03dcdf863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" } ], "genesisBlockHeader" : { @@ -71,9 +71,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "9debf1786a0c0f5d4d94b8c968ae670f7bb32dcccf8ccdb1bfbb4a2bf84c50e6", - "mixHash" : "adcc734c5110e9b7d30dc4cbc71d102d8db67d94b6a3abf44c2c090f4ad285b6", - "nonce" : "2571928c70c163c6", + "hash" : "f6da09d962b55d4b8d243493fc1d61e9e68640fed31b15f862e6d8cff71b0962", + "mixHash" : "790cb7402328cce8f2b7918d65063a3f24c5e5bc3d49f63468ed848e34986044", + "nonce" : "f1bb4aed69ec6516", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -82,8 +82,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0adcc734c5110e9b7d30dc4cbc71d102d8db67d94b6a3abf44c2c090f4ad285b6882571928c70c163c6c0c0", - "lastblockhash" : "9debf1786a0c0f5d4d94b8c968ae670f7bb32dcccf8ccdb1bfbb4a2bf84c50e6", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0790cb7402328cce8f2b7918d65063a3f24c5e5bc3d49f63468ed848e3498604488f1bb4aed69ec6516c0c0", + "lastblockhash" : "f6da09d962b55d4b8d243493fc1d61e9e68640fed31b15f862e6d8cff71b0962", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -117,10 +117,128 @@ } } }, + "ExtraData1024" : { + "blocks" : [ + { + "rlp" : "0xf90667f905fba0f529d5ac9b850cc67ab62da1d3245a9e8bfd2a5a8add35f1f6134a6b65d3a346a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0bac6177a79e910c98d86ec31a09ae37ac2de15b754fd7bed1ba52362c49416bfa0498785da562aa0c5dd5937cf15f22139b0b1bcf3b4fc48986e1bb1dae9292796a0c7778a7376099ee2e5c455791c1885b5c361b95713fddcbe32d97fd01334d296b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84561c0ccdb9040001020304050607080910111213141516171819202122232410000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000a066fb7b19aaff0ee9408ba2baa08c56953bd39a84137bec18b2dfb0c5219998e488c91dcdf12d5765d9f866f864800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d8785012a05f200801ca0ee0b9ec878fbd4258a9473199d8ecc32996a20c323c004e79e0cda20e0418ce3a04e6bc63927d1510bab54f37e46fa036faf4b2c465d271920d9afea1fadf7bd21c0" + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "f529d5ac9b850cc67ab62da1d3245a9e8bfd2a5a8add35f1f6134a6b65d3a346", + "mixHash" : "40d40e5a67f3ec2f563b49fffd04f619d900571ead0146dbdd4d3e7c19f887d8", + "nonce" : "be01ebb03f308473", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "925002c3260b44e44c3edebad1cc442142b03020209df1ab8bb86752edbd2cd7", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0925002c3260b44e44c3edebad1cc442142b03020209df1ab8bb86752edbd2cd7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a040d40e5a67f3ec2f563b49fffd04f619d900571ead0146dbdd4d3e7c19f887d888be01ebb03f308473c0c0", + "lastblockhash" : "f529d5ac9b850cc67ab62da1d3245a9e8bfd2a5a8add35f1f6134a6b65d3a346", + "postState" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x64", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600052600060206000a1", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x02540be400", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x64", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600052600060206000a1", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x02540be400", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "ExtraData33" : { + "blocks" : [ + { + "rlp" : "0xf90286f9021aa088b359957bc7bb5f196e70bb5de59db3023937e6641d7fc2a0ce95d9add2d670a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0bac6177a79e910c98d86ec31a09ae37ac2de15b754fd7bed1ba52362c49416bfa0498785da562aa0c5dd5937cf15f22139b0b1bcf3b4fc48986e1bb1dae9292796a0c7778a7376099ee2e5c455791c1885b5c361b95713fddcbe32d97fd01334d296b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84561c0cd1a1010203040506070809101112131415161718192021222324252627282930313233a0d557d00369451b38d6a43f6a0c460445f856ec8ae78a11ce722e70e06e2e78a4884f51d00b37b39161f866f864800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d8785012a05f200801ca0ee0b9ec878fbd4258a9473199d8ecc32996a20c323c004e79e0cda20e0418ce3a04e6bc63927d1510bab54f37e46fa036faf4b2c465d271920d9afea1fadf7bd21c0" + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "88b359957bc7bb5f196e70bb5de59db3023937e6641d7fc2a0ce95d9add2d670", + "mixHash" : "b5b4fe0ddced1c5fe49a67b5567b5860a3e3ab86d3520af0a51f0a72c4a1e4f1", + "nonce" : "c337aa74f3bff1ce", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "925002c3260b44e44c3edebad1cc442142b03020209df1ab8bb86752edbd2cd7", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0925002c3260b44e44c3edebad1cc442142b03020209df1ab8bb86752edbd2cd7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0b5b4fe0ddced1c5fe49a67b5567b5860a3e3ab86d3520af0a51f0a72c4a1e4f188c337aa74f3bff1cec0c0", + "lastblockhash" : "88b359957bc7bb5f196e70bb5de59db3023937e6641d7fc2a0ce95d9add2d670", + "postState" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x64", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600052600060206000a1", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x02540be400", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x64", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600052600060206000a1", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x02540be400", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, "GasLimitIsZero" : { "blocks" : [ { - "rlp" : "0xf9025ff901f6a0cd57f848b4ea69b0d4a50fb4e8e2f7de285283ee23eb4ba3ccbb968cf82cebada01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b901000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000004000000000000000000000000000000000000000000000000000000083020000018082560b8455ba16bf80a017e567f85cb6da76152d4009440abf5e3210fa21884987e427207c7c0a3af75488b82be0ac08a4847af863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" + "rlp" : "0xf9025ff901f6a043dde0d0f2e5697a9cbd2047bbc6117521b969e0821b336fcf912893dfca846da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b901000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000004000000000000000000000000000000000000000000000000000000083020000018082560b84561c0cd480a022563c2180b9666e369e16d33b995269e6e431aa92f6150af9f44ed06d86ffe5887ec14e9716b7b1b9f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" } ], "genesisBlockHeader" : { @@ -130,9 +248,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "cd57f848b4ea69b0d4a50fb4e8e2f7de285283ee23eb4ba3ccbb968cf82cebad", - "mixHash" : "ad9c4d0e7f1f1a7f895c0502c3421426808810342231cc585ffb1a6161c70ec4", - "nonce" : "8acb2c0ccced1aa7", + "hash" : "43dde0d0f2e5697a9cbd2047bbc6117521b969e0821b336fcf912893dfca846d", + "mixHash" : "79cb42f92ce9eaad7b885138246c4e1f5ad55401de431ad8c972b9a3352a0fc7", + "nonce" : "88ea58b0c9969a21", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -141,8 +259,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0ad9c4d0e7f1f1a7f895c0502c3421426808810342231cc585ffb1a6161c70ec4888acb2c0ccced1aa7c0c0", - "lastblockhash" : "cd57f848b4ea69b0d4a50fb4e8e2f7de285283ee23eb4ba3ccbb968cf82cebad", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a079cb42f92ce9eaad7b885138246c4e1f5ad55401de431ad8c972b9a3352a0fc78888ea58b0c9969a21c0c0", + "lastblockhash" : "43dde0d0f2e5697a9cbd2047bbc6117521b969e0821b336fcf912893dfca846d", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -179,7 +297,7 @@ "log1_wrongBlockNumber" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a0696d4ea34d3d2277d4c53f97fb1f8abeb5236649862d32f598b91e416c622357a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000002832fe3de82560b8455ba16c280a06a662b70e1cc52ea863516c0d8d96c85e2166d2bf3d1383d6ae3890b540e08ff88544ef79dbe912546f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" + "rlp" : "0xf90262f901f9a0ef28fe81029b7f5a6eabfb46578ade817608509ea740f82f8cd8dcab16ba846aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000002832fefd882560b84561c0cd580a0eca4511a0b6c8fd32204f9ade6f1df6b494c976b9bad2a74782ea504744274fd889a9773e44bf59463f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" } ], "genesisBlockHeader" : { @@ -189,9 +307,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "696d4ea34d3d2277d4c53f97fb1f8abeb5236649862d32f598b91e416c622357", - "mixHash" : "ec9a575b6c584aa458ae490040300bb7169cba89e3aa67e2f94db5b13198eea5", - "nonce" : "f67e90bc34850b10", + "hash" : "ef28fe81029b7f5a6eabfb46578ade817608509ea740f82f8cd8dcab16ba846a", + "mixHash" : "73d0de89fbc3860a60990522aa0b6c1ba38d07008f490c6c242eb0bac312e12c", + "nonce" : "13b759352b0343a7", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -200,8 +318,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0ec9a575b6c584aa458ae490040300bb7169cba89e3aa67e2f94db5b13198eea588f67e90bc34850b10c0c0", - "lastblockhash" : "696d4ea34d3d2277d4c53f97fb1f8abeb5236649862d32f598b91e416c622357", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a073d0de89fbc3860a60990522aa0b6c1ba38d07008f490c6c242eb0bac312e12c8813b759352b0343a7c0c0", + "lastblockhash" : "ef28fe81029b7f5a6eabfb46578ade817608509ea740f82f8cd8dcab16ba846a", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -238,7 +356,7 @@ "log1_wrongBloom" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a03872ccb17632c8dbf0f8cc67a24f83409c1e65ba1decf8b669f18b179fb6d3e1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fe3de82560b8455ba16c880a08eab54e52b33ecf39381ec0c701b2f95a59f755dfaf6ffcaa2e37d1dadb2f76288f0e87dab24926ca9f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" + "rlp" : "0xf90262f901f9a086f0e76a2e8b4af92e491deaf3d5a1b674eef6e5b612570b4dfd4d57711ae97ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882560b84561c0cdb80a0fa92b3b29826c8a4080cabeef61a567116240592e79a9dca768f5487d58b533d88448cf8fbe6edc602f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" } ], "genesisBlockHeader" : { @@ -248,9 +366,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "3872ccb17632c8dbf0f8cc67a24f83409c1e65ba1decf8b669f18b179fb6d3e1", - "mixHash" : "7d35dfcae03d73d90602b5e8b5be301fce945ad2c1d6d3cb074adcf67679ea33", - "nonce" : "02f3632b96b923e9", + "hash" : "86f0e76a2e8b4af92e491deaf3d5a1b674eef6e5b612570b4dfd4d57711ae97e", + "mixHash" : "586be8873d3e2999e03e19224f57c2b5806ca1e00db4a28bd55b82e2e72a93a9", + "nonce" : "6cfc26d4d5fa2c4b", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -259,8 +377,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a07d35dfcae03d73d90602b5e8b5be301fce945ad2c1d6d3cb074adcf67679ea338802f3632b96b923e9c0c0", - "lastblockhash" : "3872ccb17632c8dbf0f8cc67a24f83409c1e65ba1decf8b669f18b179fb6d3e1", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0586be8873d3e2999e03e19224f57c2b5806ca1e00db4a28bd55b82e2e72a93a9886cfc26d4d5fa2c4bc0c0", + "lastblockhash" : "86f0e76a2e8b4af92e491deaf3d5a1b674eef6e5b612570b4dfd4d57711ae97e", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -297,7 +415,7 @@ "wrongCoinbase" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a0e1a12b1d7f8d97cba8894187f93eb7a04e0372f50c9320c43b623421e1b40372a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347949888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fe3de82560b8455ba16cc80a055cd7cfd5878cc450708f704f4bc04717f611d062b74edebe850a62f5c9a6a4b8898de985c345027e2f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" + "rlp" : "0xf90262f901f9a0e6bdee1e16566b66b9329ddfa67106837e605795afb8f88e4f76172833789d76a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347949888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84561c0cde80a0de8692b019755ae274b63b725622702e5b5d089720fded36a0f12b242fa70a0f88bbb14e0b518c291bf863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" } ], "genesisBlockHeader" : { @@ -307,9 +425,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "e1a12b1d7f8d97cba8894187f93eb7a04e0372f50c9320c43b623421e1b40372", - "mixHash" : "d403f1c0af34e2f146e1d045b07fcf93615b96a6e5d8b3f58a4026ba83e5d438", - "nonce" : "8fbd78e25debad8f", + "hash" : "e6bdee1e16566b66b9329ddfa67106837e605795afb8f88e4f76172833789d76", + "mixHash" : "d4e06cc58f243f2ae5e6cf7c1ac9421aaae36f15230a78903558f8dcd9969eec", + "nonce" : "611a74b0bf540712", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -318,8 +436,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0d403f1c0af34e2f146e1d045b07fcf93615b96a6e5d8b3f58a4026ba83e5d438888fbd78e25debad8fc0c0", - "lastblockhash" : "e1a12b1d7f8d97cba8894187f93eb7a04e0372f50c9320c43b623421e1b40372", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0d4e06cc58f243f2ae5e6cf7c1ac9421aaae36f15230a78903558f8dcd9969eec88611a74b0bf540712c0c0", + "lastblockhash" : "e6bdee1e16566b66b9329ddfa67106837e605795afb8f88e4f76172833789d76", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -356,7 +474,7 @@ "wrongDifficulty" : { "blocks" : [ { - "rlp" : "0xf90261f901f8a0e3e7e6758e87ee1a483fde54e5a5a2f31f35f33cf6375b4ae58908e66d806700a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b901000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000004000000000000000000000000000000000000000000000000000000082271001832fe3de82560b8455ba16cf80a09d38baaed89aa2f79d743d5242fbdf7abf6ea9abb8f791a3ae6874963a2fc933887738c6ec6a110040f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" + "rlp" : "0xf90261f901f8a083c751752685fd1a94b70cea56d7e5763ce6ff69853410b97b694aba3d73ae4ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b901000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000004000000000000000000000000000000000000000000000000000000082271001832fefd882560b84561c0ce480a0cc5d6995d14d3b70335deb7c833260ba42b812add9f904d9aa014f94557a2f6b88cf06e43d458ee1e2f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" } ], "genesisBlockHeader" : { @@ -366,9 +484,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "e3e7e6758e87ee1a483fde54e5a5a2f31f35f33cf6375b4ae58908e66d806700", - "mixHash" : "bf5f8db70cb57f838ff0989acf36d241fb4048c7dd028a5ff707c481db9ac564", - "nonce" : "4abddd659c93a8e1", + "hash" : "83c751752685fd1a94b70cea56d7e5763ce6ff69853410b97b694aba3d73ae4c", + "mixHash" : "b40f80c5c512590c6d9f04adfaca11d467d977e2f061cc2d1eaf1bb3de9f6a70", + "nonce" : "b0c630692b065f97", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -377,8 +495,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0bf5f8db70cb57f838ff0989acf36d241fb4048c7dd028a5ff707c481db9ac564884abddd659c93a8e1c0c0", - "lastblockhash" : "e3e7e6758e87ee1a483fde54e5a5a2f31f35f33cf6375b4ae58908e66d806700", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0b40f80c5c512590c6d9f04adfaca11d467d977e2f061cc2d1eaf1bb3de9f6a7088b0c630692b065f97c0c0", + "lastblockhash" : "83c751752685fd1a94b70cea56d7e5763ce6ff69853410b97b694aba3d73ae4c", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -415,7 +533,7 @@ "wrongGasLimit" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a0642f145cc532ca38cc0b82f9eaa54c7eaabfccaa345103b7f969533207ed0239a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001830186a082560b8455ba16d280a0cdd1ae28284550924d66a61f8c97f004bf467f0ec25794ac25d33fa08bb7f225887b495ed3670e2ba5f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" + "rlp" : "0xf90262f901f9a00c39b1285f6f14932daadf3eaa8663f1befdb5ce8378aa5cef8a817b53700935a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001830186a082560b84561c0ce880a0614b214adc7acbd1a4f5a4c4a3c1726b7d807f063ba5555276f92899121ae6c5882929f97e780af8ddf863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" } ], "genesisBlockHeader" : { @@ -425,9 +543,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "642f145cc532ca38cc0b82f9eaa54c7eaabfccaa345103b7f969533207ed0239", - "mixHash" : "fbd8db99324134010f1a333a909091902722c7e09d671d0470c310491f984175", - "nonce" : "4329fc5921e3d391", + "hash" : "0c39b1285f6f14932daadf3eaa8663f1befdb5ce8378aa5cef8a817b53700935", + "mixHash" : "24184935ed5d0ecb7b1dae26efe63db672d703d4c45694ee287fe24fb73338c3", + "nonce" : "689a808e26032333", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -436,8 +554,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0fbd8db99324134010f1a333a909091902722c7e09d671d0470c310491f984175884329fc5921e3d391c0c0", - "lastblockhash" : "642f145cc532ca38cc0b82f9eaa54c7eaabfccaa345103b7f969533207ed0239", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a024184935ed5d0ecb7b1dae26efe63db672d703d4c45694ee287fe24fb73338c388689a808e26032333c0c0", + "lastblockhash" : "0c39b1285f6f14932daadf3eaa8663f1befdb5ce8378aa5cef8a817b53700935", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -474,7 +592,7 @@ "wrongGasUsed" : { "blocks" : [ { - "rlp" : "0xf90260f901f7a093b57d3fb3a6603526db90b8b721455ffdfb897ebeb61f2ec3e8018e21f25b59a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fe3de808455ba16d880a0b05f2da35205f175362667f198441135348ed811f03a0dc044077ee431ce116c883dd0fe42f9487603f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" + "rlp" : "0xf90260f901f7a04c46934ae681f8dee84890d1b207275977d0a0e38efc13973f341b1e659ea72da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd88084561c0cea80a0ad7e4f3fb8df1d94c8bdbf90cece1851ce51d68b4b08f8a7559fb345eb4668d7889c10899799c39ef2f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" } ], "genesisBlockHeader" : { @@ -484,9 +602,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "93b57d3fb3a6603526db90b8b721455ffdfb897ebeb61f2ec3e8018e21f25b59", - "mixHash" : "846e1edef05637687c60f1b608e536cd267aae5f188071ac0aa6ce8dc0f0f1cd", - "nonce" : "ef6ad02020125c01", + "hash" : "4c46934ae681f8dee84890d1b207275977d0a0e38efc13973f341b1e659ea72d", + "mixHash" : "23fc73ef6d4fe132975e08b3f9ac837b394d7a9fdb9cd468b59149d261c355f1", + "nonce" : "8baca1fba290cc75", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -495,8 +613,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0846e1edef05637687c60f1b608e536cd267aae5f188071ac0aa6ce8dc0f0f1cd88ef6ad02020125c01c0c0", - "lastblockhash" : "93b57d3fb3a6603526db90b8b721455ffdfb897ebeb61f2ec3e8018e21f25b59", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a023fc73ef6d4fe132975e08b3f9ac837b394d7a9fdb9cd468b59149d261c355f1888baca1fba290cc75c0c0", + "lastblockhash" : "4c46934ae681f8dee84890d1b207275977d0a0e38efc13973f341b1e659ea72d", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -533,7 +651,7 @@ "wrongMixHash" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a0cf43c17e91148df2fa2e28eee7268e58456cec839ecd232a63b096ad0b3a3a5ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fe3de82560b8455ba16dd80a0bad81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421880000000000000000f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" + "rlp" : "0xf90262f901f9a02bf78adff3de79b01b633d877e831a1af8cc0795ce90e85ee53931fea3b0d5f6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84561c0ced80a0bad81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421888011d65f280461d0f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" } ], "genesisBlockHeader" : { @@ -543,9 +661,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "cf43c17e91148df2fa2e28eee7268e58456cec839ecd232a63b096ad0b3a3a5e", - "mixHash" : "6269053d8763df925bf8fb3d33bf99138edd1901c0a3ab31d89e8c57fa6aa5b1", - "nonce" : "8c3fd62c2fa589fc", + "hash" : "2bf78adff3de79b01b633d877e831a1af8cc0795ce90e85ee53931fea3b0d5f6", + "mixHash" : "b3ca21bd98e299bd7dc8edad8f52e36815e5d85365af9d47dd3b08ada89a230b", + "nonce" : "1d2311fbc70a07b4", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -554,8 +672,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a06269053d8763df925bf8fb3d33bf99138edd1901c0a3ab31d89e8c57fa6aa5b1888c3fd62c2fa589fcc0c0", - "lastblockhash" : "cf43c17e91148df2fa2e28eee7268e58456cec839ecd232a63b096ad0b3a3a5e", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0b3ca21bd98e299bd7dc8edad8f52e36815e5d85365af9d47dd3b08ada89a230b881d2311fbc70a07b4c0c0", + "lastblockhash" : "2bf78adff3de79b01b633d877e831a1af8cc0795ce90e85ee53931fea3b0d5f6", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -592,7 +710,7 @@ "wrongNonce" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a07c23787f2495c483f590912abd5aa27742530fea821142baa4a5e966fcf4d591a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fe3de82560b8455ba16df80a00000000000000000000000000000000000000000000000000000000000000000880102030405060708f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" + "rlp" : "0xf90262f901f9a0b440cd10e0fb66856dc469c23583266ba73435218f47c6d63f56c6ab3be06b10a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84561c0cf080a0357d2ba4c942059d22c593626dbc823d198cca8fdd47d8df0e147ea58f7041ce880102030405060708f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" } ], "genesisBlockHeader" : { @@ -602,9 +720,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "7c23787f2495c483f590912abd5aa27742530fea821142baa4a5e966fcf4d591", - "mixHash" : "7d6d24ea9b740a4048701a3aa9f7221b9699c8e1464403219ae91c64e4b1dbf6", - "nonce" : "c9b38f2e0e510c9e", + "hash" : "b440cd10e0fb66856dc469c23583266ba73435218f47c6d63f56c6ab3be06b10", + "mixHash" : "384aaf0b5a2ffa30379b6e8b1f3d16ebc1f68f633a57c339bb7d545dce8dbc08", + "nonce" : "5b2f6011a2d6610b", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -613,8 +731,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a07d6d24ea9b740a4048701a3aa9f7221b9699c8e1464403219ae91c64e4b1dbf688c9b38f2e0e510c9ec0c0", - "lastblockhash" : "7c23787f2495c483f590912abd5aa27742530fea821142baa4a5e966fcf4d591", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0384aaf0b5a2ffa30379b6e8b1f3d16ebc1f68f633a57c339bb7d545dce8dbc08885b2f6011a2d6610bc0c0", + "lastblockhash" : "b440cd10e0fb66856dc469c23583266ba73435218f47c6d63f56c6ab3be06b10", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -651,7 +769,7 @@ "wrongNumber" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a08a8e1f09431f67f08ce8161cf16bdf931abdef25fb21fd1fbe35581e5e374d6aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000080832fe3de82560b8455ba16e280a0786329cc57f4337f6bd3e93c2249db1fc3a1e0a2bfe83d77507909a2f4a282d788db020fc109d92a54f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" + "rlp" : "0xf90262f901f9a03afdfac14ace9e40f8e206e59ba4c36d8c1be90e876e2f716483337cf63b7847a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000080832fefd882560b84561c0cf380a0cd724238dc1f1555d98506c221493c81f526d0c0597e8976254a465a0b969d3c881b0f75828f86e869f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" } ], "genesisBlockHeader" : { @@ -661,9 +779,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "8a8e1f09431f67f08ce8161cf16bdf931abdef25fb21fd1fbe35581e5e374d6a", - "mixHash" : "40b110792cc49ce285e481d4f1c7ef34a4a9f6f1de22be955034e0aeb53e6c57", - "nonce" : "f087b08b6c1f959e", + "hash" : "3afdfac14ace9e40f8e206e59ba4c36d8c1be90e876e2f716483337cf63b7847", + "mixHash" : "da6b5feba97ef31bf43d54fcfa05cadf08e67c50c54a7d397b216fa8346e28bf", + "nonce" : "577d713960a02bed", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -672,8 +790,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a040b110792cc49ce285e481d4f1c7ef34a4a9f6f1de22be955034e0aeb53e6c5788f087b08b6c1f959ec0c0", - "lastblockhash" : "8a8e1f09431f67f08ce8161cf16bdf931abdef25fb21fd1fbe35581e5e374d6a", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0da6b5feba97ef31bf43d54fcfa05cadf08e67c50c54a7d397b216fa8346e28bf88577d713960a02bedc0c0", + "lastblockhash" : "3afdfac14ace9e40f8e206e59ba4c36d8c1be90e876e2f716483337cf63b7847", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -710,7 +828,7 @@ "wrongParentHash" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fe3de82560b8455ba16e580a0bd9070a592a59069472e213f01bbdade128dad49d39d829a42f3e287a6ab6d2888a032d328ecae865df863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" + "rlp" : "0xf90262f901f9a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84561c0cf980a0c76e803d6135741c5e6128553b1727c70c87f37f335e62ec9d8aab5a0169ea6888c57ee80ed0a77bbaf863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" } ], "genesisBlockHeader" : { @@ -720,9 +838,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "c1f0e909afc9458be0e80e6d3a53bcc65d6c7c2d2cb7e99a5a0ee211a07e2f36", - "mixHash" : "47146a0254e65ab6df1cd2f428e282c3e38889344d044553cec29d6aaeb4fda8", - "nonce" : "f3c5cae3b080dd7f", + "hash" : "8fba5984d8d8110e1bd2597b9deb92295d2e0c1155fd521d2859a3501b27b006", + "mixHash" : "2efff0cd7f7b509e98ceb1796622d219e65ec35bba3259a9ab71086d0ced3afc", + "nonce" : "e5bfb06b11f4e7f6", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -731,8 +849,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a047146a0254e65ab6df1cd2f428e282c3e38889344d044553cec29d6aaeb4fda888f3c5cae3b080dd7fc0c0", - "lastblockhash" : "c1f0e909afc9458be0e80e6d3a53bcc65d6c7c2d2cb7e99a5a0ee211a07e2f36", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a02efff0cd7f7b509e98ceb1796622d219e65ec35bba3259a9ab71086d0ced3afc88e5bfb06b11f4e7f6c0c0", + "lastblockhash" : "8fba5984d8d8110e1bd2597b9deb92295d2e0c1155fd521d2859a3501b27b006", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -769,7 +887,7 @@ "wrongParentHash2" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a06151889c8f14ab46e32ee0b1894bc276416385d068a1ade000d0dadef9b08b18a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fe3de82560b8455ba16e980a0370b23757b9eb458446c61dfd41159b3d1a08671281d154eaa672215169d47fc88a03b9f26927cad00f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" + "rlp" : "0xf90262f901f9a06151889c8f14ab46e32ee0b1894bc276416385d068a1ade000d0dadef9b08b18a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84561c0cfc80a088f64151d57f9512943812017c123c18d70d05cae9b720ddd4bfdf594b2b40bb888da39c12468f7850f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" } ], "genesisBlockHeader" : { @@ -779,9 +897,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "423747387cd22d510c588253fc80af4bc517ebd3044d05474d3ad2a3011065c2", - "mixHash" : "67a528cf6e58ddf8e94f433a09a6f3c7c20f9ed0b2e72504fcf927bcd014d6b1", - "nonce" : "a060c9ea8115bb9f", + "hash" : "d1e2b0b917ef4402b3a634a3d12e033d19c5824b1ec55c1fe9725ed5b732a5dc", + "mixHash" : "9053d2c0277f92c6fed332d67b4ae5d4e7a91737c32b1d6802cbf65878778d26", + "nonce" : "b3049be56855e7fa", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -790,8 +908,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a067a528cf6e58ddf8e94f433a09a6f3c7c20f9ed0b2e72504fcf927bcd014d6b188a060c9ea8115bb9fc0c0", - "lastblockhash" : "423747387cd22d510c588253fc80af4bc517ebd3044d05474d3ad2a3011065c2", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a09053d2c0277f92c6fed332d67b4ae5d4e7a91737c32b1d6802cbf65878778d2688b3049be56855e7fac0c0", + "lastblockhash" : "d1e2b0b917ef4402b3a634a3d12e033d19c5824b1ec55c1fe9725ed5b732a5dc", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -828,7 +946,7 @@ "wrongReceiptTrie" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a0f8e6f19063f229bd6845c63bba1826834b94eaa24785e241eb611767979d59b8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fe3de82560b8455ba16ec80a0ec5857b4203992ffcf33bb3f924ca92a2bda18b94f6842ba00396d96de8043dd885a6f6371dd028d51f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" + "rlp" : "0xf90262f901f9a037b4c093f8c6d3a2d858d4a11ad3973d3943ea7a7a2a5cc298eda097a74d8b85a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84561c0d0180a0c1e7ad0602d9e1485c4eb48f4e24971a4dd1012f20584bff6e89c8626aecbd3f881f3f15b8009b52caf863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" } ], "genesisBlockHeader" : { @@ -838,9 +956,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "f8e6f19063f229bd6845c63bba1826834b94eaa24785e241eb611767979d59b8", - "mixHash" : "c1c2632bf0669c0723e9084c33fa77da182e18a6705e3017b3c309de395739d7", - "nonce" : "4e9d39524608117a", + "hash" : "37b4c093f8c6d3a2d858d4a11ad3973d3943ea7a7a2a5cc298eda097a74d8b85", + "mixHash" : "1d26fb87771eeb0b99b3519935c6c6551ff1cdff8c46fcaf637f56166125b77f", + "nonce" : "a5533e8ed3f3c8e9", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -849,8 +967,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0c1c2632bf0669c0723e9084c33fa77da182e18a6705e3017b3c309de395739d7884e9d39524608117ac0c0", - "lastblockhash" : "f8e6f19063f229bd6845c63bba1826834b94eaa24785e241eb611767979d59b8", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a01d26fb87771eeb0b99b3519935c6c6551ff1cdff8c46fcaf637f56166125b77f88a5533e8ed3f3c8e9c0c0", + "lastblockhash" : "37b4c093f8c6d3a2d858d4a11ad3973d3943ea7a7a2a5cc298eda097a74d8b85", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -887,7 +1005,7 @@ "wrongStateRoot" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a0de09b5652d059af8c01f596827ae060e6aedd8d5155642f94ec3e700a1031c00a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903aa0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fe3de82560b8455ba16f380a038184894b75645f283875e7613b9d8fe26b18bc135acad52e0c5b280367b1048884cd05359ee80e922f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" + "rlp" : "0xf90262f901f9a0cf3b10cf8de8ac334f16c66ed309ddfb0acbeb234676ac9487925cc2e440c5c6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903aa0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84561c0d0580a02d3b92d5113821ebaa045a3509cf3a4676f52a126baa447a975370cc2404c1e1886c2097e5ab2598f8f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" } ], "genesisBlockHeader" : { @@ -897,9 +1015,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "de09b5652d059af8c01f596827ae060e6aedd8d5155642f94ec3e700a1031c00", - "mixHash" : "f63248ea4ebccee0f146fb6ed766d1bdca67db1522ab1b9580c2130e8ef384f1", - "nonce" : "308bf9067641cb34", + "hash" : "cf3b10cf8de8ac334f16c66ed309ddfb0acbeb234676ac9487925cc2e440c5c6", + "mixHash" : "aa32473293334769fa242f2ddb993de19686c1448554a4c2fdb166586f8310f8", + "nonce" : "ca0be0eee7f73b1f", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -908,8 +1026,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0f63248ea4ebccee0f146fb6ed766d1bdca67db1522ab1b9580c2130e8ef384f188308bf9067641cb34c0c0", - "lastblockhash" : "de09b5652d059af8c01f596827ae060e6aedd8d5155642f94ec3e700a1031c00", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0aa32473293334769fa242f2ddb993de19686c1448554a4c2fdb166586f8310f888ca0be0eee7f73b1fc0c0", + "lastblockhash" : "cf3b10cf8de8ac334f16c66ed309ddfb0acbeb234676ac9487925cc2e440c5c6", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -946,7 +1064,7 @@ "wrongTimestamp" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a0b3f894e29025906db0b5619afc2a912e4454998c6c9b03d9f131e1b7621b9acea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fe3de82560b8454c98c8080a02eb8ed82ea879cf3a0c97da87896f246dcdb908d8e715f03c30cef3e565351e788092b842ae710fa0bf863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" + "rlp" : "0xf90262f901f9a02f388692dfc8ae85dd14352ddcd944f87285b97c4619edc4a852d3a150718c82a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b8454c98c8080a096c08bbf46832ccf156840d52533408447600fa55fcf85739beb1f20bfbab5b7886363737e27bb0862f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" } ], "genesisBlockHeader" : { @@ -956,9 +1074,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "b3f894e29025906db0b5619afc2a912e4454998c6c9b03d9f131e1b7621b9ace", - "mixHash" : "98078e1dd48a45cbe4c3e0e514792b63567757c62c31469533af77258ac85250", - "nonce" : "25f903b333f1d549", + "hash" : "2f388692dfc8ae85dd14352ddcd944f87285b97c4619edc4a852d3a150718c82", + "mixHash" : "7b8a91ed7ece31ecca97f21bbb5e9c479033ae5830bea7ff6033145f1fb18535", + "nonce" : "f3ddbb7e9ba38a53", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -967,8 +1085,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a098078e1dd48a45cbe4c3e0e514792b63567757c62c31469533af77258ac852508825f903b333f1d549c0c0", - "lastblockhash" : "b3f894e29025906db0b5619afc2a912e4454998c6c9b03d9f131e1b7621b9ace", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a07b8a91ed7ece31ecca97f21bbb5e9c479033ae5830bea7ff6033145f1fb1853588f3ddbb7e9ba38a53c0c0", + "lastblockhash" : "2f388692dfc8ae85dd14352ddcd944f87285b97c4619edc4a852d3a150718c82", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -1005,7 +1123,7 @@ "wrongTransactionsTrie" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a0ee31c25701e0df6cd6734423d3f1316923775992bc1c996026d2ddca258f5538a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a055e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fe3de82560b8455ba170180a08f718c110542703616a6dfe43939b600487307fb2ad4f561c7251a9e153eb1af88adbcfb985b4a26c0f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" + "rlp" : "0xf90262f901f9a0242c32d6e039d2942f7fc39221d34b4a2be0f3f0d19d05c3bc8da25e6fe05944a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a055e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84561c0d0d80a0a33c6b120b59a7ce91604a318df221b0933bf3d4d9364e534d0e1b39f615a2d188421a0301ca76bd3bf863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" } ], "genesisBlockHeader" : { @@ -1015,9 +1133,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "ee31c25701e0df6cd6734423d3f1316923775992bc1c996026d2ddca258f5538", - "mixHash" : "89197d75dd93b9b2697ccfb5e060c777512dc25b1bd0721de6938775452957cc", - "nonce" : "12623ec7f28dd452", + "hash" : "242c32d6e039d2942f7fc39221d34b4a2be0f3f0d19d05c3bc8da25e6fe05944", + "mixHash" : "f2247c6b680d9daa129b63153b4b35d18ed2726f76914d54cbdb694dd31e2201", + "nonce" : "c875391b64594ff9", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1026,8 +1144,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a089197d75dd93b9b2697ccfb5e060c777512dc25b1bd0721de6938775452957cc8812623ec7f28dd452c0c0", - "lastblockhash" : "ee31c25701e0df6cd6734423d3f1316923775992bc1c996026d2ddca258f5538", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0f2247c6b680d9daa129b63153b4b35d18ed2726f76914d54cbdb694dd31e220188c875391b64594ff9c0c0", + "lastblockhash" : "242c32d6e039d2942f7fc39221d34b4a2be0f3f0d19d05c3bc8da25e6fe05944", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -1064,7 +1182,7 @@ "wrongUncleHash" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a0f9da45c585379390c05c37ec616af2b35e7c5db88e83dad4f750577101fd7f31a00dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fe3de82560b8455ba170680a05b3497fce967dfc51e757c7d42502f7b19599d4303a2f529b784172401d49db48846a17f7388ad6c21f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" + "rlp" : "0xf90262f901f9a0cbd899ee0419ea6ef2dd3b421f33c8e602f9d805af5d709a2e2e5cf4ba1e10b7a00dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84561c0d1080a0c9a3f93cc2b64ea79da9bb30c7f080377220ee6bbb35f62cfe5829dcdc8e4c8288b86db61ad0842696f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0" } ], "genesisBlockHeader" : { @@ -1074,9 +1192,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "f9da45c585379390c05c37ec616af2b35e7c5db88e83dad4f750577101fd7f31", - "mixHash" : "ee5d608425df12733976b378d7f0e29942f118d177d4e3d05c5c3d5a8f9c58b2", - "nonce" : "e67b514e882c4562", + "hash" : "cbd899ee0419ea6ef2dd3b421f33c8e602f9d805af5d709a2e2e5cf4ba1e10b7", + "mixHash" : "98a5c7c3d6ac257dd496419bc3a8650cf80acc8b0be054c417e0260ffcaf216a", + "nonce" : "d80755c02470b351", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1085,8 +1203,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0ee5d608425df12733976b378d7f0e29942f118d177d4e3d05c5c3d5a8f9c58b288e67b514e882c4562c0c0", - "lastblockhash" : "f9da45c585379390c05c37ec616af2b35e7c5db88e83dad4f750577101fd7f31", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a098a5c7c3d6ac257dd496419bc3a8650cf80acc8b0be054c417e0260ffcaf216a88d80755c02470b351c0c0", + "lastblockhash" : "cbd899ee0419ea6ef2dd3b421f33c8e602f9d805af5d709a2e2e5cf4ba1e10b7", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", diff --git a/tests/files/BlockchainTests/bcMultiChainTest.json b/tests/files/BlockchainTests/bcMultiChainTest.json new file mode 100644 index 000000000..b3c9438f4 --- /dev/null +++ b/tests/files/BlockchainTests/bcMultiChainTest.json @@ -0,0 +1,3393 @@ +{ + "CallContractFromNotBestBlock" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "437e51676ff10756fcfee5edd9159fa41dbcb1b2c592850450371cbecd54ee4f", + "mixHash" : "51b3ecba4e3f2b49c11d42dd0851ec514b1be3138080f72a2b6e83868275d98f", + "nonce" : "77671f479c414b47", + "number" : "0x01", + "parentHash" : "5716670833ec874362d65fea27a7cd35af5897d275b31a44944113111e4e96d2", + "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", + "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", + "timestamp" : "0x562791e5", + "transactionsTrie" : "e78628dd45a1f8dc495594d83b76c588a3ee67463260f8b7d4a42f574aeab29a", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "A", + "rlp" : "0xf90261f901f9a05716670833ec874362d65fea27a7cd35af5897d275b31a44944113111e4e96d2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a0e78628dd45a1f8dc495594d83b76c588a3ee67463260f8b7d4a42f574aeab29aa0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884562791e580a051b3ecba4e3f2b49c11d42dd0851ec514b1be3138080f72a2b6e83868275d98f8877671f479c414b47f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca09e2709d7ec9bbe6b1bbbf0b2088828d14cd5e8642a1fee22dc74bfa89761a7f9a04bd8813dee4be989accdb708b1c2e325a7e9c695a8024e30e89d6c644e424747c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x9e2709d7ec9bbe6b1bbbf0b2088828d14cd5e8642a1fee22dc74bfa89761a7f9", + "s" : "0x4bd8813dee4be989accdb708b1c2e325a7e9c695a8024e30e89d6c644e424747", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0xc0e3", + "hash" : "36fde1253128666fcb95a5956da14a73489e988bb72738717ec1d31e1cee781a", + "mixHash" : "e3cc39ff775cc0a32f175995b92e84b729e5c9a3563ff899e3555b908bc21d75", + "nonce" : "7c3cde283f4846a6", + "number" : "0x02", + "parentHash" : "437e51676ff10756fcfee5edd9159fa41dbcb1b2c592850450371cbecd54ee4f", + "receiptTrie" : "86e608555f63628417032a011d107b36427af37d153f0da02ce3f90fdd5e8c08", + "stateRoot" : "c70a5dc56146e5ef025e4e5726a6373c6f12fd2f6784093a19ead0a7d17fb292", + "timestamp" : "0x562791e8", + "transactionsTrie" : "40645cbce4fd399e7bb9160b4c30c40d7ee616a030d4e18ef0ed3b02bdb65911", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "A", + "rlp" : "0xf902ccf901f9a0437e51676ff10756fcfee5edd9159fa41dbcb1b2c592850450371cbecd54ee4fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c70a5dc56146e5ef025e4e5726a6373c6f12fd2f6784093a19ead0a7d17fb292a040645cbce4fd399e7bb9160b4c30c40d7ee616a030d4e18ef0ed3b02bdb65911a086e608555f63628417032a011d107b36427af37d153f0da02ce3f90fdd5e8c08b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882c0e384562791e880a0e3cc39ff775cc0a32f175995b92e84b729e5c9a3563ff899e3555b908bc21d75887c3cde283f4846a6f8cdf8cb01018304cb2f8080b87e6060604052606e8060106000396000f360606040526000357c010000000000000000000000000000000000000000000000000000000090048063c0406226146037576035565b005b60406004506056565b6040518082815260200191505060405180910390f35b6000600560006000508190555060059050606b565b90561ba05258615c63503c0a600d6994b12ea5750d45b3c69668e2a371b4fbfb9eeff6b8a0a11be762bc90491231274a2945be35a43f23c27775b1ff24dd521702fe15f73ec0", + "transactions" : [ + { + "data" : "0x6060604052606e8060106000396000f360606040526000357c010000000000000000000000000000000000000000000000000000000090048063c0406226146037576035565b005b60406004506056565b6040518082815260200191505060405180910390f35b6000600560006000508190555060059050606b565b9056", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x5258615c63503c0a600d6994b12ea5750d45b3c69668e2a371b4fbfb9eeff6b8", + "s" : "0xa11be762bc90491231274a2945be35a43f23c27775b1ff24dd521702fe15f73e", + "to" : "", + "v" : "0x1b", + "value" : "0x00" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x524d", + "hash" : "c208f88c9f5bf7e00840439742c12e5226d9752981f3ec0521bdcb6dd08af277", + "mixHash" : "74861666bd346c025889745c793b91ab9cd1e2ca19b5cf3c50d04d135b0a4d2b", + "nonce" : "09fe9587ea4cdc04", + "number" : "0x03", + "parentHash" : "36fde1253128666fcb95a5956da14a73489e988bb72738717ec1d31e1cee781a", + "receiptTrie" : "07c6fdfa8eea7e86b81f5b0fc0f78f90cc19f4aa60d323151e0cac660199e9a1", + "stateRoot" : "5fb2b4bfdef7b314451cb138a534d225c922fc0e5fbe25e451142732c3e25c25", + "timestamp" : "0x562791eb", + "transactionsTrie" : "9dc4b1357c0b7b8108f8a098f4f9a1a274957bc9ebc22a9ae67ae81739e5b19c", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "A", + "rlp" : "0xf90261f901f9a036fde1253128666fcb95a5956da14a73489e988bb72738717ec1d31e1cee781aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05fb2b4bfdef7b314451cb138a534d225c922fc0e5fbe25e451142732c3e25c25a09dc4b1357c0b7b8108f8a098f4f9a1a274957bc9ebc22a9ae67ae81739e5b19ca007c6fdfa8eea7e86b81f5b0fc0f78f90cc19f4aa60d323151e0cac660199e9a1b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882524d84562791eb80a074861666bd346c025889745c793b91ab9cd1e2ca19b5cf3c50d04d135b0a4d2b8809fe9587ea4cdc04f862f86002018304cb2f94ec0e71ad0a90ffe1909d27dac207f7680abba42d01801ba06fd84874d36d5de9e8e48978c03619b53a96b7ae0a4cd1ac118f103098b44801a00572596974dd7df4f9f69bd7456585618c568d8434ef6453391b89281ce12ae1c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x6fd84874d36d5de9e8e48978c03619b53a96b7ae0a4cd1ac118f103098b44801", + "s" : "0x0572596974dd7df4f9f69bd7456585618c568d8434ef6453391b89281ce12ae1", + "to" : "ec0e71ad0a90ffe1909d27dac207f7680abba42d", + "v" : "0x1b", + "value" : "0x01" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0xa1f0", + "hash" : "bf72270ae0d95c9ea39a6adab994793fddb8c10fba7391e26279474124605d54", + "mixHash" : "fe7098fa7e4ac5d637eea81fb23f8f78346826dbab430068dd9a249d0afa9981", + "nonce" : "53e1a6b201ae3545", + "number" : "0x03", + "parentHash" : "36fde1253128666fcb95a5956da14a73489e988bb72738717ec1d31e1cee781a", + "receiptTrie" : "592fabf92476512952db3a69a2481a42912e668a1ee28c4c322e703bb665f8be", + "stateRoot" : "ab87dc338bfd6f662b1cd90bc0c9e40a1b2146a095312393c9e13ce3a5008b09", + "timestamp" : "0x562791ee", + "transactionsTrie" : "e609b7a7d4b8a2403ec1268627ecd98783627246e8f1b26addb3ff504f76a054", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "A", + "rlp" : "0xf90265f901f9a036fde1253128666fcb95a5956da14a73489e988bb72738717ec1d31e1cee781aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ab87dc338bfd6f662b1cd90bc0c9e40a1b2146a095312393c9e13ce3a5008b09a0e609b7a7d4b8a2403ec1268627ecd98783627246e8f1b26addb3ff504f76a054a0592fabf92476512952db3a69a2481a42912e668a1ee28c4c322e703bb665f8beb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882a1f084562791ee80a0fe7098fa7e4ac5d637eea81fb23f8f78346826dbab430068dd9a249d0afa99818853e1a6b201ae3545f866f86402018304cb2f94ec0e71ad0a90ffe1909d27dac207f7680abba42d0284c04062261ca06edc9ce8e7da4cc34067beb325dcad59e5655a164a5100a50bc3eb681b12c716a0abf9053d5de65b1be81fe50d327b84de685efbeecea34e7b747180a6c6023e44c0", + "transactions" : [ + { + "data" : "0xc0406226", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x6edc9ce8e7da4cc34067beb325dcad59e5655a164a5100a50bc3eb681b12c716", + "s" : "0xabf9053d5de65b1be81fe50d327b84de685efbeecea34e7b747180a6c6023e44", + "to" : "ec0e71ad0a90ffe1909d27dac207f7680abba42d", + "v" : "0x1c", + "value" : "0x02" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "5716670833ec874362d65fea27a7cd35af5897d275b31a44944113111e4e96d2", + "mixHash" : "59262c330941f3fe2a34d16d6e3c7b30d2ceb37c6a0e9a994c494ee1a61d2410", + "nonce" : "5aa4c8bf8e56e264", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a059262c330941f3fe2a34d16d6e3c7b30d2ceb37c6a0e9a994c494ee1a61d2410885aa4c8bf8e56e264c0c0", + "lastblockhash" : "c208f88c9f5bf7e00840439742c12e5226d9752981f3ec0521bdcb6dd08af277", + "postState" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x0a", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0xd02ab486cedd6538", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e713abd", + "code" : "0x", + "nonce" : "0x03", + "storage" : { + } + }, + "ec0e71ad0a90ffe1909d27dac207f7680abba42d" : { + "balance" : "0x01", + "code" : "0x60606040526000357c010000000000000000000000000000000000000000000000000000000090048063c0406226146037576035565b005b60406004506056565b6040518082815260200191505060405180910390f35b6000600560006000508190555060059050606b565b9056", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e72a000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "ChainAtoChainB" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "c6e31ac457938a749118f475775f8841e7278363c115cd92ec7667f06f9813c5", + "mixHash" : "e6a3a483d821727199e02fb4930e01bba807348bdcba99bce36bca70c973d0fe", + "nonce" : "73334b98f40e16c5", + "number" : "0x01", + "parentHash" : "8dc7df4ab809f36bac284ac98d1a1e87e0cdf107867270e3665995e089eecfc1", + "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", + "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", + "timestamp" : "0x562791f1", + "transactionsTrie" : "05c81c4c58236565faad2ffb2081c036ee3946a7e14ded0b8410a116c9fb8013", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "A", + "rlp" : "0xf90261f901f9a08dc7df4ab809f36bac284ac98d1a1e87e0cdf107867270e3665995e089eecfc1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a005c81c4c58236565faad2ffb2081c036ee3946a7e14ded0b8410a116c9fb8013a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884562791f180a0e6a3a483d821727199e02fb4930e01bba807348bdcba99bce36bca70c973d0fe8873334b98f40e16c5f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca03bf02ed14d9bec7db2ff675a5b519833e7947254cac5d2ed2af095f38d63965ba01c4de0ba81e13547e938c5ee5c35876ea0a5bcd0388813c3e35139aa355377eac0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x3bf02ed14d9bec7db2ff675a5b519833e7947254cac5d2ed2af095f38d63965b", + "s" : "0x1c4de0ba81e13547e938c5ee5c35876ea0a5bcd0388813c3e35139aa355377ea", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "04cc97d70aafdd7f7711589110543130be1367abfff71638e15e60cdb2b612d5", + "mixHash" : "1a6a954f07a340530ec8fd7688a571ce92f5fe08af215f3993f5ed7f30f866c1", + "nonce" : "eb9c4db08b3ab60a", + "number" : "0x02", + "parentHash" : "c6e31ac457938a749118f475775f8841e7278363c115cd92ec7667f06f9813c5", + "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", + "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", + "timestamp" : "0x562791f3", + "transactionsTrie" : "b5326b1e087d59b3422e17b600fb1a492b93f444ee82d9022d364b5b924c0125", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0c6e31ac457938a749118f475775f8841e7278363c115cd92ec7667f06f9813c5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0b5326b1e087d59b3422e17b600fb1a492b93f444ee82d9022d364b5b924c0125a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884562791f380a01a6a954f07a340530ec8fd7688a571ce92f5fe08af215f3993f5ed7f30f866c188eb9c4db08b3ab60af862f86001018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0c61ad209a86219c896b95361901ed2b00b435df35524476cd083739e24072360a0f5d91ff040d6bb72e8378c3d8e044bc5e0ba951225c9a685114a58a4edcb3a4fc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0xc61ad209a86219c896b95361901ed2b00b435df35524476cd083739e24072360", + "s" : "0xf5d91ff040d6bb72e8378c3d8e044bc5e0ba951225c9a685114a58a4edcb3a4f", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "0f44c34543cb80a8e323637c9ea1a9c50890beaa6e3f0e06f9cca239048f387c", + "mixHash" : "b65df339dfd7f509adecca8b8f8c00eca92a99f78c6baa29fa46b0387f366b11", + "nonce" : "6eb551413e1431bb", + "number" : "0x03", + "parentHash" : "04cc97d70aafdd7f7711589110543130be1367abfff71638e15e60cdb2b612d5", + "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", + "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", + "timestamp" : "0x562791f6", + "transactionsTrie" : "640014e0873b40f7e09dbc599bfdaacce119d1036b8311f0918dd8623ac9080f", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "A", + "rlp" : "0xf90261f901f9a004cc97d70aafdd7f7711589110543130be1367abfff71638e15e60cdb2b612d5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a0640014e0873b40f7e09dbc599bfdaacce119d1036b8311f0918dd8623ac9080fa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884562791f680a0b65df339dfd7f509adecca8b8f8c00eca92a99f78c6baa29fa46b0387f366b11886eb551413e1431bbf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0fecd224c389de08f08e6282e6edd0fc26dd77a3f73cc0c31dfb78c0c0683e0c7a0988f2cddc2d43994ad11568d2aa5f091a910debfcf5f08d293de92a1b7cbe18ac0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0xfecd224c389de08f08e6282e6edd0fc26dd77a3f73cc0c31dfb78c0c0683e0c7", + "s" : "0x988f2cddc2d43994ad11568d2aa5f091a910debfcf5f08d293de92a1b7cbe18a", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "b520c849aab30776e5b3947e59a4609044b21b50a0f7ac08a62572fc7414333e", + "mixHash" : "6266be6d173cd2c168855d2d5b0bae0c8994a254dc7c87bc3f994e26405b9c81", + "nonce" : "ed530b776569fe8a", + "number" : "0x01", + "parentHash" : "8dc7df4ab809f36bac284ac98d1a1e87e0cdf107867270e3665995e089eecfc1", + "receiptTrie" : "bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbb", + "stateRoot" : "1b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4", + "timestamp" : "0x562791f9", + "transactionsTrie" : "05c6a96a8cdf343031b55884e26256a29427ca3e1805bf711c5ad3e531606840", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "B", + "rlp" : "0xf90261f901f9a08dc7df4ab809f36bac284ac98d1a1e87e0cdf107867270e3665995e089eecfc1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4a005c6a96a8cdf343031b55884e26256a29427ca3e1805bf711c5ad3e531606840a0bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbbb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884562791f980a06266be6d173cd2c168855d2d5b0bae0c8994a254dc7c87bc3f994e26405b9c8188ed530b776569fe8af862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca00e96a2a53376a136473ba6fa7c0a9841a293526277717f16775fe27a91a36652a0d6bf8dda5c7f3f808a29346b6d8e32cb7d3ad73b48b64e1b4d27efd02e8afc8fc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x0e96a2a53376a136473ba6fa7c0a9841a293526277717f16775fe27a91a36652", + "s" : "0xd6bf8dda5c7f3f808a29346b6d8e32cb7d3ad73b48b64e1b4d27efd02e8afc8f", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "5f62e3369ade02b2fe6b0ee67b9a1158b66a8c41d8f13c941fb1538097e89dac", + "mixHash" : "4923e14ba2fc61dbce9e765662542757c660bebfd8beae208bef87c805ee45f7", + "nonce" : "b05c4ac144bd85f8", + "number" : "0x02", + "parentHash" : "b520c849aab30776e5b3947e59a4609044b21b50a0f7ac08a62572fc7414333e", + "receiptTrie" : "7fa6b426f40ed9fbcfdf1491008649c83e02bd4648492ff92d79de72c15cd11a", + "stateRoot" : "7cefe422fd5c4adc434377bf4b7ae17c091cbe1c6fc687986debbec9c432994b", + "timestamp" : "0x562791fc", + "transactionsTrie" : "ca99e70106fcd7a42503bf56714b9061261c53932229c794e1c14e625a0837a4", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "B", + "rlp" : "0xf90260f901f9a0b520c849aab30776e5b3947e59a4609044b21b50a0f7ac08a62572fc7414333ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07cefe422fd5c4adc434377bf4b7ae17c091cbe1c6fc687986debbec9c432994ba0ca99e70106fcd7a42503bf56714b9061261c53932229c794e1c14e625a0837a4a07fa6b426f40ed9fbcfdf1491008649c83e02bd4648492ff92d79de72c15cd11ab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884562791fc80a04923e14ba2fc61dbce9e765662542757c660bebfd8beae208bef87c805ee45f788b05c4ac144bd85f8f861f85f010182795394095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca06178771044d0a6e134635bd987559ae1a888ee1f2445ab86a11a4c1f45f8dce9a07788a6569ea7f8062dfd9c9ce71ebaa1ab8ee3076331f9e427b5d8a63bcec335c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x6178771044d0a6e134635bd987559ae1a888ee1f2445ab86a11a4c1f45f8dce9", + "s" : "0x7788a6569ea7f8062dfd9c9ce71ebaa1ab8ee3076331f9e427b5d8a63bcec335", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0xa520", + "hash" : "3f91e8d4f8184832fa161e379a0dd0f6384f6855f1b5c851624743a25ec3cce9", + "mixHash" : "bfd01cc6305017a0c9d00a6720de70bbcc920b063acf457695a16d94fb4efa4f", + "nonce" : "d9e52d1983db9ab7", + "number" : "0x03", + "parentHash" : "5f62e3369ade02b2fe6b0ee67b9a1158b66a8c41d8f13c941fb1538097e89dac", + "receiptTrie" : "5a02ed94a6e5d6c9bacd6a8b130e93e244ace661eea1cfeee0dd7d5d1e2b1040", + "stateRoot" : "95bfbb2eb79049c4803bc02673e07929eb22f99c786857b14d22a3de3b26ae55", + "timestamp" : "0x562791ff", + "transactionsTrie" : "d8c2234cbc1e206ef9e0dcc49d831e56758b3a046875bdab100ff9a2029809d6", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "B", + "rlp" : "0xf902c5f901f9a05f62e3369ade02b2fe6b0ee67b9a1158b66a8c41d8f13c941fb1538097e89daca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a095bfbb2eb79049c4803bc02673e07929eb22f99c786857b14d22a3de3b26ae55a0d8c2234cbc1e206ef9e0dcc49d831e56758b3a046875bdab100ff9a2029809d6a05a02ed94a6e5d6c9bacd6a8b130e93e244ace661eea1cfeee0dd7d5d1e2b1040b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882a52084562791ff80a0bfd01cc6305017a0c9d00a6720de70bbcc920b063acf457695a16d94fb4efa4f88d9e52d1983db9ab7f8c6f8630201827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ba08877ee8b7e992b374a96de017ca9a678904dc092e9ec1688917b888a8b239085a0f516efbdac51cc9d77ffa46e296507cf3c368b84ba41886e2aff33a9b02b5d70f85f0301827b1594095e7baea6a6c7c4c2dfeb977efac326af552d8714801ba0792211d7bfbdefb231e759788fad4b4d0701e4a7933bd90bff830cadf65c2e69a0127320937c1d53f154148bcb02f1c8280c003d8c0b6cf81e8a2473528b26c514c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x8877ee8b7e992b374a96de017ca9a678904dc092e9ec1688917b888a8b239085", + "s" : "0xf516efbdac51cc9d77ffa46e296507cf3c368b84ba41886e2aff33a9b02b5d70", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + }, + { + "data" : "0x", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0x792211d7bfbdefb231e759788fad4b4d0701e4a7933bd90bff830cadf65c2e69", + "s" : "0x127320937c1d53f154148bcb02f1c8280c003d8c0b6cf81e8a2473528b26c514", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x14" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "7d130d372898de7b9afbbb81c3204f913b1fd6844e894eb8475f1910f582939a", + "mixHash" : "d0702b7c583e69fb89b0d36331c36d24945f6518e9929b9670e59f6f74c6c730", + "nonce" : "d97e23d062580ec1", + "number" : "0x04", + "parentHash" : "3f91e8d4f8184832fa161e379a0dd0f6384f6855f1b5c851624743a25ec3cce9", + "receiptTrie" : "01b7ea0c86b233d8c5e352213671522789db46a5661ab28ce6cdca0586d59c89", + "stateRoot" : "f921b0ca9dc440556e39ff9d14a489bb74801e6725d6edb62d70e3ccc8ad758e", + "timestamp" : "0x56279202", + "transactionsTrie" : "789fa528957788b89ef6630a50301438ef13943a5ffaf7cb1c983cfcd772dbc1", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "chainname" : "B", + "rlp" : "0xf90260f901f9a03f91e8d4f8184832fa161e379a0dd0f6384f6855f1b5c851624743a25ec3cce9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f921b0ca9dc440556e39ff9d14a489bb74801e6725d6edb62d70e3ccc8ad758ea0789fa528957788b89ef6630a50301438ef13943a5ffaf7cb1c983cfcd772dbc1a001b7ea0c86b233d8c5e352213671522789db46a5661ab28ce6cdca0586d59c89b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd8825208845627920280a0d0702b7c583e69fb89b0d36331c36d24945f6518e9929b9670e59f6f74c6c73088d97e23d062580ec1f861f85f040182795394095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0eed656e677af97bd7dba8961685a976b46882660bcb5e8770efed80b21ff87eda058dff26ad95e1a684e96d4305e0ffea1f4f6ca6529306e6ebd0f595443383b0cc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0xeed656e677af97bd7dba8961685a976b46882660bcb5e8770efed80b21ff87ed", + "s" : "0x58dff26ad95e1a684e96d4305e0ffea1f4f6ca6529306e6ebd0f595443383b0c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "8dc7df4ab809f36bac284ac98d1a1e87e0cdf107867270e3665995e089eecfc1", + "mixHash" : "eae4feef5c2a3c790299caa64897428e3281447b02251cc6003cba0d20d92631", + "nonce" : "f7382b3e5bebdda4", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0eae4feef5c2a3c790299caa64897428e3281447b02251cc6003cba0d20d9263188f7382b3e5bebdda4c0c0", + "lastblockhash" : "7d130d372898de7b9afbbb81c3204f913b1fd6844e894eb8475f1910f582939a", + "postState" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x01a4", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x01158e460913d19b38", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e710324", + "code" : "0x", + "nonce" : "0x05", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e72a000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "ChainAtoChainBCallContractFormA" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "9c05850523eb3a4abc185126d09a00744d823c80d05e220b4a39398a1939f119", + "mixHash" : "4e5b79e754f40290c24f2f6ff3401a8bf7e2e3c09570f99036b64e7a68ae06ce", + "nonce" : "a2ab2e09336625c6", + "number" : "0x01", + "parentHash" : "5f09be6c095d3fd7b04488e377731592820a9837a4ac56f00e85ba3204c08cd4", + "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", + "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", + "timestamp" : "0x56279206", + "transactionsTrie" : "b3aac419d8b9948763575da30b9ca106b37bcebd5a25be5aac5c570be310e507", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "A", + "rlp" : "0xf90261f901f9a05f09be6c095d3fd7b04488e377731592820a9837a4ac56f00e85ba3204c08cd4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a0b3aac419d8b9948763575da30b9ca106b37bcebd5a25be5aac5c570be310e507a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845627920680a04e5b79e754f40290c24f2f6ff3401a8bf7e2e3c09570f99036b64e7a68ae06ce88a2ab2e09336625c6f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba07b96a31a90a491f6d5cc9a37054e8184040e883213aff46a8853987befb1c3e3a09040b8bf38365402fe6f650f85a54d72fc288d584881edef8c1215c4f16f71cdc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x7b96a31a90a491f6d5cc9a37054e8184040e883213aff46a8853987befb1c3e3", + "s" : "0x9040b8bf38365402fe6f650f85a54d72fc288d584881edef8c1215c4f16f71cd", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0xc0e3", + "hash" : "f20aa9701b5e1c06441312986e5acf3cead16e243899eec8ecb35d047c9f6983", + "mixHash" : "4bf2905b9a71661141c44123d94114eb5b922cc99f376a8fbf391944246d254b", + "nonce" : "8019b1ecbfdfa28e", + "number" : "0x02", + "parentHash" : "9c05850523eb3a4abc185126d09a00744d823c80d05e220b4a39398a1939f119", + "receiptTrie" : "86e608555f63628417032a011d107b36427af37d153f0da02ce3f90fdd5e8c08", + "stateRoot" : "c70a5dc56146e5ef025e4e5726a6373c6f12fd2f6784093a19ead0a7d17fb292", + "timestamp" : "0x56279208", + "transactionsTrie" : "fb50396b0aae70130934e20693a30097b1aae0b681cf6afca4a522dd9db90baf", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "A", + "rlp" : "0xf902ccf901f9a09c05850523eb3a4abc185126d09a00744d823c80d05e220b4a39398a1939f119a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c70a5dc56146e5ef025e4e5726a6373c6f12fd2f6784093a19ead0a7d17fb292a0fb50396b0aae70130934e20693a30097b1aae0b681cf6afca4a522dd9db90bafa086e608555f63628417032a011d107b36427af37d153f0da02ce3f90fdd5e8c08b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882c0e3845627920880a04bf2905b9a71661141c44123d94114eb5b922cc99f376a8fbf391944246d254b888019b1ecbfdfa28ef8cdf8cb01018304cb2f8080b87e6060604052606e8060106000396000f360606040526000357c010000000000000000000000000000000000000000000000000000000090048063c0406226146037576035565b005b60406004506056565b6040518082815260200191505060405180910390f35b6000600560006000508190555060059050606b565b90561ca00211c49604b0d9d1b9646c50d86f1de7d14d95e00c6d57140f91c6775d65e13ba0598af838979720f2ba393725ad551a410469d581ce4eb0a62e9ce4748eeb6fd2c0", + "transactions" : [ + { + "data" : "0x6060604052606e8060106000396000f360606040526000357c010000000000000000000000000000000000000000000000000000000090048063c0406226146037576035565b005b60406004506056565b6040518082815260200191505060405180910390f35b6000600560006000508190555060059050606b565b9056", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x0211c49604b0d9d1b9646c50d86f1de7d14d95e00c6d57140f91c6775d65e13b", + "s" : "0x598af838979720f2ba393725ad551a410469d581ce4eb0a62e9ce4748eeb6fd2", + "to" : "", + "v" : "0x1c", + "value" : "0x00" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0xa1f0", + "hash" : "a9bebe1f3b2bcd23592c1c7257a2b897dcabf125ab8da65462ce07823cdc0e2f", + "mixHash" : "00a9d8ec954f37a64b3dfaa878cd966a30c3eb6cc79f50b21b7bfbf96c01d7a4", + "nonce" : "9e9ca0aaac362ac6", + "number" : "0x03", + "parentHash" : "f20aa9701b5e1c06441312986e5acf3cead16e243899eec8ecb35d047c9f6983", + "receiptTrie" : "6213df1e25c8d6432824e05e0f633a17bdefea31b93f2eef4e3a56fa4c2a52d1", + "stateRoot" : "1f292dd7999f91e32e6e0ddc2bea5f94258f4da78977444a6eaa078adbaac419", + "timestamp" : "0x5627920b", + "transactionsTrie" : "4aad89421d63aafbed717464fb646813788256a6081c2b1fe53edd002dcfd213", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "A", + "rlp" : "0xf90265f901f9a0f20aa9701b5e1c06441312986e5acf3cead16e243899eec8ecb35d047c9f6983a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01f292dd7999f91e32e6e0ddc2bea5f94258f4da78977444a6eaa078adbaac419a04aad89421d63aafbed717464fb646813788256a6081c2b1fe53edd002dcfd213a06213df1e25c8d6432824e05e0f633a17bdefea31b93f2eef4e3a56fa4c2a52d1b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882a1f0845627920b80a000a9d8ec954f37a64b3dfaa878cd966a30c3eb6cc79f50b21b7bfbf96c01d7a4889e9ca0aaac362ac6f866f86402018304cb2f94ec0e71ad0a90ffe1909d27dac207f7680abba42d0184c04062261ba029361ae68352d360f9dc321d3686b9765925b5adbb8144fa9bc9fb8ea6ef9cd7a0b2abd544f8f2e98dd580acf4776739cd14c507e3daf20772260b107dd8d58e02c0", + "transactions" : [ + { + "data" : "0xc0406226", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x29361ae68352d360f9dc321d3686b9765925b5adbb8144fa9bc9fb8ea6ef9cd7", + "s" : "0xb2abd544f8f2e98dd580acf4776739cd14c507e3daf20772260b107dd8d58e02", + "to" : "ec0e71ad0a90ffe1909d27dac207f7680abba42d", + "v" : "0x1b", + "value" : "0x01" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "d3c5887ba8d08979c8d44e74c4c8756b4ef186e5990479598b1334fb3f156daf", + "mixHash" : "6fe2bf6c17f641ed72167bbebe92b0dfcb55033c498820579e630013fb0a3f7e", + "nonce" : "76c14314e1755d0d", + "number" : "0x01", + "parentHash" : "5f09be6c095d3fd7b04488e377731592820a9837a4ac56f00e85ba3204c08cd4", + "receiptTrie" : "bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbb", + "stateRoot" : "1b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4", + "timestamp" : "0x5627920d", + "transactionsTrie" : "21323d8f937951932e9e798240d4ce6bcd7f8b19d7fbda4a5b1b926f2112365c", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "B", + "rlp" : "0xf90261f901f9a05f09be6c095d3fd7b04488e377731592820a9837a4ac56f00e85ba3204c08cd4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4a021323d8f937951932e9e798240d4ce6bcd7f8b19d7fbda4a5b1b926f2112365ca0bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbbb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845627920d80a06fe2bf6c17f641ed72167bbebe92b0dfcb55033c498820579e630013fb0a3f7e8876c14314e1755d0df862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0f65457c76268d1daf1b6787f75bc9ca65c670296e803026d4ed7d84253501bfea028485ae85d3ae02b1c993ad22e3a411cf1a439ab9800ad3f931958ee484ea8cac0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0xf65457c76268d1daf1b6787f75bc9ca65c670296e803026d4ed7d84253501bfe", + "s" : "0x28485ae85d3ae02b1c993ad22e3a411cf1a439ab9800ad3f931958ee484ea8ca", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "3fb5f33a7f5c4cb1cb6542a899b8018c773ba8501887b0b0bc44ffa60d623ea3", + "mixHash" : "72fb7052c8a65f14e819680d97e88c3f185e59789a7554fdf137bc8b6d6051a3", + "nonce" : "e75f0561147575f2", + "number" : "0x02", + "parentHash" : "d3c5887ba8d08979c8d44e74c4c8756b4ef186e5990479598b1334fb3f156daf", + "receiptTrie" : "4b537799b2af8111468d04555f117a5d58c13abceb1143938b55a8f6e4e3cd53", + "stateRoot" : "91dd7653677e235215376aaf1753722797397edbb16630cefc6baffa7624ea53", + "timestamp" : "0x56279212", + "transactionsTrie" : "e21146c3377555ec2c7dfbfbde899edb93622a5d0bdf0617f8d49bcc8e7220bc", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "B", + "rlp" : "0xf90260f901f9a0d3c5887ba8d08979c8d44e74c4c8756b4ef186e5990479598b1334fb3f156dafa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a091dd7653677e235215376aaf1753722797397edbb16630cefc6baffa7624ea53a0e21146c3377555ec2c7dfbfbde899edb93622a5d0bdf0617f8d49bcc8e7220bca04b537799b2af8111468d04555f117a5d58c13abceb1143938b55a8f6e4e3cd53b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8825208845627921280a072fb7052c8a65f14e819680d97e88c3f185e59789a7554fdf137bc8b6d6051a388e75f0561147575f2f861f85f010182795394ec0e71ad0a90ffe1909d27dac207f7680abba42d64801ba06e35f4f17eec9cea57e15eff42773e1cdbe66e13c7d16ef8d74c25ea3d614a66a08f177cfdf728267277a8dd831012c307ffe8ee80f06da9d0da48b7c9687b6a34c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x6e35f4f17eec9cea57e15eff42773e1cdbe66e13c7d16ef8d74c25ea3d614a66", + "s" : "0x8f177cfdf728267277a8dd831012c307ffe8ee80f06da9d0da48b7c9687b6a34", + "to" : "ec0e71ad0a90ffe1909d27dac207f7680abba42d", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0xa630", + "hash" : "7354f2a99172705007e105a56d54c9fdf9428ed5b1344375b5f65bdde528772f", + "mixHash" : "f467698218467560e4f15d8349e8261dfe6062c105870571b49c3c61c1e5d778", + "nonce" : "0eebc73d198ba502", + "number" : "0x03", + "parentHash" : "3fb5f33a7f5c4cb1cb6542a899b8018c773ba8501887b0b0bc44ffa60d623ea3", + "receiptTrie" : "2a5f7b7d687b735358f1c007d28577f1feefe1293ff863b4ca055b80afc39f3d", + "stateRoot" : "da9e18ad28f51e32c235d00e3e6bd82b7a15340ac199d54ae2feae77a258ce3d", + "timestamp" : "0x56279215", + "transactionsTrie" : "c82c15f739cc14e98886a77e681845e815e39b5608228381544253ba0ae0100d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "B", + "rlp" : "0xf902c9f901f9a03fb5f33a7f5c4cb1cb6542a899b8018c773ba8501887b0b0bc44ffa60d623ea3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0da9e18ad28f51e32c235d00e3e6bd82b7a15340ac199d54ae2feae77a258ce3da0c82c15f739cc14e98886a77e681845e815e39b5608228381544253ba0ae0100da02a5f7b7d687b735358f1c007d28577f1feefe1293ff863b4ca055b80afc39f3db90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882a630845627921580a0f467698218467560e4f15d8349e8261dfe6062c105870571b49c3c61c1e5d778880eebc73d198ba502f8caf8630201827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca0d965c99809ba282cef6bb5aa90722844241f4263602776935341496beea96756a087b4cd41019e6af200d7ff3c3dd5e6dbb493cb470802533b9ac646a5b98ef291f8630301827b1594ec0e71ad0a90ffe1909d27dac207f7680abba42d1484c04062261ca08b8621d7fe5fa4b76a2a37f7078313bd09f3830863c206b349ce3285816b8c1ba0757b8a8aeb23da56ff041968c308aed86a05e5c3b82562c57e7b56a06c1ccec9c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0xd965c99809ba282cef6bb5aa90722844241f4263602776935341496beea96756", + "s" : "0x87b4cd41019e6af200d7ff3c3dd5e6dbb493cb470802533b9ac646a5b98ef291", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + }, + { + "data" : "0xc0406226", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0x8b8621d7fe5fa4b76a2a37f7078313bd09f3830863c206b349ce3285816b8c1b", + "s" : "0x757b8a8aeb23da56ff041968c308aed86a05e5c3b82562c57e7b56a06c1ccec9", + "to" : "ec0e71ad0a90ffe1909d27dac207f7680abba42d", + "v" : "0x1c", + "value" : "0x14" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "a669655d3f816fa71ae5cb53489afa07bc8dba97e00775250e319b8847e080c0", + "mixHash" : "29c9b589ac3818e67d8d26ae3aae4dea24e299c64310ca9353be9c00b7298a66", + "nonce" : "a7c97a974893c07f", + "number" : "0x04", + "parentHash" : "7354f2a99172705007e105a56d54c9fdf9428ed5b1344375b5f65bdde528772f", + "receiptTrie" : "46ff7498cefadb972ae4b497cab4ada7b237ea59775b26f78403755f04f8c71c", + "stateRoot" : "bed09a3fdeffc8d53235cc9031efcb52792363294aef46bcae5ac672cffd1ba6", + "timestamp" : "0x56279217", + "transactionsTrie" : "54936893da74eb175bcdfb9a25f3639a94b58fae1b81baa8e459266b0d0fa942", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "chainname" : "B", + "rlp" : "0xf90260f901f9a07354f2a99172705007e105a56d54c9fdf9428ed5b1344375b5f65bdde528772fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0bed09a3fdeffc8d53235cc9031efcb52792363294aef46bcae5ac672cffd1ba6a054936893da74eb175bcdfb9a25f3639a94b58fae1b81baa8e459266b0d0fa942a046ff7498cefadb972ae4b497cab4ada7b237ea59775b26f78403755f04f8c71cb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd8825208845627921780a029c9b589ac3818e67d8d26ae3aae4dea24e299c64310ca9353be9c00b7298a6688a7c97a974893c07ff861f85f040182795394095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba02f1c5fb1858507fe4a0822dfd19ab982b5f2e586e5e6e3fc5ef0529ba2b3b933a04e04fc46ab2cb2dfe19a8db39cf2d3dfcc3b86b48eaeddaecfa83f928ece19cfc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0x2f1c5fb1858507fe4a0822dfd19ab982b5f2e586e5e6e3fc5ef0529ba2b3b933", + "s" : "0x4e04fc46ab2cb2dfe19a8db39cf2d3dfcc3b86b48eaeddaecfa83f928ece19cf", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "5f09be6c095d3fd7b04488e377731592820a9837a4ac56f00e85ba3204c08cd4", + "mixHash" : "2f43640fd119d309e9e1ff1b26549d907073bf79f30af6aaa33d8c4e7f60d36d", + "nonce" : "6609de0890019a7e", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a02f43640fd119d309e9e1ff1b26549d907073bf79f30af6aaa33d8c4e7f60d36d886609de0890019a7ec0c0", + "lastblockhash" : "a669655d3f816fa71ae5cb53489afa07bc8dba97e00775250e319b8847e080c0", + "postState" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x012c", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x01158e460913d19c48", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e710214", + "code" : "0x", + "nonce" : "0x05", + "storage" : { + } + }, + "ec0e71ad0a90ffe1909d27dac207f7680abba42d" : { + "balance" : "0x78", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e72a000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "ChainAtoChainB_BlockHash" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "8efebb71b7eb9659fc12f934c4152a9455953df6dd063227549405c215ad0be1", + "mixHash" : "e7b3effbb8d61646fb3d05560926cd9e001c65bde3e4fc0ac69fe222bde8de8a", + "nonce" : "fdc84d5dea6095a9", + "number" : "0x01", + "parentHash" : "c208413a430ff6d51023109f61d39ea94bb380c8437f2912ead10d98c8ea5945", + "receiptTrie" : "94264acfe9e9340b55758ed4dfcf4401ae5fd4f826c413d1176de3f74f437ff6", + "stateRoot" : "a6eb513ed30898d4b0dbd4936bac047e34cf8fd9baab7667e6bc67efb576f35e", + "timestamp" : "0x5627921b", + "transactionsTrie" : "07cd737b2802415df628fc81bdd66722da4e109d4d4ce6532308ea6333295d6d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0c208413a430ff6d51023109f61d39ea94bb380c8437f2912ead10d98c8ea5945a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a6eb513ed30898d4b0dbd4936bac047e34cf8fd9baab7667e6bc67efb576f35ea007cd737b2802415df628fc81bdd66722da4e109d4d4ce6532308ea6333295d6da094264acfe9e9340b55758ed4dfcf4401ae5fd4f826c413d1176de3f74f437ff6b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845627921b80a0e7b3effbb8d61646fb3d05560926cd9e001c65bde3e4fc0ac69fe222bde8de8a88fdc84d5dea6095a9f862f86080018304cb2f94a95e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ef084d88e31406ea999f73beb9b515a88e0ca294bb7ce91d9887b7c4e76f40efa0ce43ab4551b974da740d828b7427bab1e0eaa0d5bbf8a2c7578027561e2e9614c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0xef084d88e31406ea999f73beb9b515a88e0ca294bb7ce91d9887b7c4e76f40ef", + "s" : "0xce43ab4551b974da740d828b7427bab1e0eaa0d5bbf8a2c7578027561e2e9614", + "to" : "a95e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0xa042", + "hash" : "a50d4caa798862651549ae13be9393943aa8b85f99a5dda5a4f1ec944a7e3016", + "mixHash" : "825038d543076997beb52a64536133ee024ab8230e4d2e510036b3ff7a238b06", + "nonce" : "4cfb22f78099adf6", + "number" : "0x02", + "parentHash" : "8efebb71b7eb9659fc12f934c4152a9455953df6dd063227549405c215ad0be1", + "receiptTrie" : "4d167821f0b0be5963a6590f2cdeda245cf8a6fc8f0ae5d2221323bdaa38ec17", + "stateRoot" : "c64286c20c284abc8f884dfaf5b4019046d017722d5220ecdd613e56f7c4684f", + "timestamp" : "0x5627921d", + "transactionsTrie" : "30748fe4107b6a3a6f7c87a404fa6c87ecd9ffa50666ccd3dca6a7c6b7c0fe78", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "A", + "rlp" : "0xf90261f901f9a08efebb71b7eb9659fc12f934c4152a9455953df6dd063227549405c215ad0be1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c64286c20c284abc8f884dfaf5b4019046d017722d5220ecdd613e56f7c4684fa030748fe4107b6a3a6f7c87a404fa6c87ecd9ffa50666ccd3dca6a7c6b7c0fe78a04d167821f0b0be5963a6590f2cdeda245cf8a6fc8f0ae5d2221323bdaa38ec17b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882a042845627921d80a0825038d543076997beb52a64536133ee024ab8230e4d2e510036b3ff7a238b06884cfb22f78099adf6f862f86001018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0896d291b48c01d3225c9c8656e7f4c1f5e9a28a0caf3bbfc95a11cf12a6f0f04a0f46bbffa1c54cfcd8fc15b56c72c125c8e965ec900f640e9873454202005f606c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x896d291b48c01d3225c9c8656e7f4c1f5e9a28a0caf3bbfc95a11cf12a6f0f04", + "s" : "0xf46bbffa1c54cfcd8fc15b56c72c125c8e965ec900f640e9873454202005f606", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "49b1babe5484770409efce4e085ba53ad1e1bbdd6d2380ff423af0dc1ff3b23b", + "mixHash" : "9c9669e8642a64fe16b09f46bc9134137f8426c99047b0e950c90fa2489f6529", + "nonce" : "6ac1ae2c228a92c5", + "number" : "0x03", + "parentHash" : "a50d4caa798862651549ae13be9393943aa8b85f99a5dda5a4f1ec944a7e3016", + "receiptTrie" : "9c39805f2be87e7d261284c6cda6cb002acc2d6268047a79750f07332cc34079", + "stateRoot" : "963cc89930a06e8c32a65839e19375493e258bbd1bef15f95d1b05642f2b68e3", + "timestamp" : "0x56279235", + "transactionsTrie" : "d09efbc573ae976d7ec63b5e024b34f2317f674d7469ed2f2189740b53ed15c5", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0a50d4caa798862651549ae13be9393943aa8b85f99a5dda5a4f1ec944a7e3016a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0963cc89930a06e8c32a65839e19375493e258bbd1bef15f95d1b05642f2b68e3a0d09efbc573ae976d7ec63b5e024b34f2317f674d7469ed2f2189740b53ed15c5a09c39805f2be87e7d261284c6cda6cb002acc2d6268047a79750f07332cc34079b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd8825208845627923580a09c9669e8642a64fe16b09f46bc9134137f8426c99047b0e950c90fa2489f6529886ac1ae2c228a92c5f862f86002018304cb2f94a95e7baea6a6c7c4c2dfeb977efac326af552d870a801ca03d9ca243430cb244c14e8c4a39aab87af9e16dedac4e02310b93c96ca9b5acd2a0e2f526c37c34e998814fa5d29a712dd2c507c2b95e4cb7b68579655fcee3c029c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x3d9ca243430cb244c14e8c4a39aab87af9e16dedac4e02310b93c96ca9b5acd2", + "s" : "0xe2f526c37c34e998814fa5d29a712dd2c507c2b95e4cb7b68579655fcee3c029", + "to" : "a95e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "776faf12fae4c5c1a935eaa1293a34797e65864ac2aadf4d5dae34d3334a8b09", + "mixHash" : "2e6dd9635106f9a4cc8dfc583a94374c1e628c3e32e2801788bf196a54ae4874", + "nonce" : "97d6f3512442e8c3", + "number" : "0x01", + "parentHash" : "c208413a430ff6d51023109f61d39ea94bb380c8437f2912ead10d98c8ea5945", + "receiptTrie" : "e7c9c91da0687a786ed87c8a37b08412df21563910ca41a608e518343dc08f42", + "stateRoot" : "5fdd84b1c76f0dc301f035d08e72138bc0bc6e676a9ccc3ae11caae6a4ab6f68", + "timestamp" : "0x5627923a", + "transactionsTrie" : "66cb46d43289301cdffb34a8bf469fb2a6b406c17aa2fa1ef0515e52923016d8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "B", + "rlp" : "0xf90261f901f9a0c208413a430ff6d51023109f61d39ea94bb380c8437f2912ead10d98c8ea5945a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05fdd84b1c76f0dc301f035d08e72138bc0bc6e676a9ccc3ae11caae6a4ab6f68a066cb46d43289301cdffb34a8bf469fb2a6b406c17aa2fa1ef0515e52923016d8a0e7c9c91da0687a786ed87c8a37b08412df21563910ca41a608e518343dc08f42b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845627923a80a02e6dd9635106f9a4cc8dfc583a94374c1e628c3e32e2801788bf196a54ae48748897d6f3512442e8c3f862f86080018304cb2f94a95e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0ebfec3fcbcc6f77348f69a2b8b4c3b645d0635a0e578a5a32d941c208ea0bea4a02bfe227e840c82b1e8772172f5464d2bc493ece5f61ad410326d366b62dd7e08c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0xebfec3fcbcc6f77348f69a2b8b4c3b645d0635a0e578a5a32d941c208ea0bea4", + "s" : "0x2bfe227e840c82b1e8772172f5464d2bc493ece5f61ad410326d366b62dd7e08", + "to" : "a95e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0xa042", + "hash" : "dcd7192d8b0d72eb9995a5a5e625deebf52841f43980812efcfc5e4837006ee0", + "mixHash" : "245d3fe89b23bca2f5c59a74f75395c27d71ffa07517b5b5900385477fa700eb", + "nonce" : "2d86baafe60dee2b", + "number" : "0x02", + "parentHash" : "776faf12fae4c5c1a935eaa1293a34797e65864ac2aadf4d5dae34d3334a8b09", + "receiptTrie" : "aea9cb4878bc5c43cdb78b9cec503b63b522e8bef02ea8b7a28b47a44dbffb46", + "stateRoot" : "b10c4e2e1e67fbd48f4e7ff0ea0b8f329cd835f53ffb31d209a441c26a203638", + "timestamp" : "0x5627923d", + "transactionsTrie" : "8b54715f2e9b86d6f638d0f89b17e9778a8f896f766a9a7ae3d605d52f9f0db5", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "B", + "rlp" : "0xf90261f901f9a0776faf12fae4c5c1a935eaa1293a34797e65864ac2aadf4d5dae34d3334a8b09a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b10c4e2e1e67fbd48f4e7ff0ea0b8f329cd835f53ffb31d209a441c26a203638a08b54715f2e9b86d6f638d0f89b17e9778a8f896f766a9a7ae3d605d52f9f0db5a0aea9cb4878bc5c43cdb78b9cec503b63b522e8bef02ea8b7a28b47a44dbffb46b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882a042845627923d80a0245d3fe89b23bca2f5c59a74f75395c27d71ffa07517b5b5900385477fa700eb882d86baafe60dee2bf862f86001018304bb2b94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba03d054b3401e96f71ed932182b60f85319ffbc4fd64315ba8825575667dd9d0b2a048e203e5d6a0bc61023b0b0b1bd3b7011b4743747590a316ce681179b2586339c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04bb2b", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x3d054b3401e96f71ed932182b60f85319ffbc4fd64315ba8825575667dd9d0b2", + "s" : "0x48e203e5d6a0bc61023b0b0b1bd3b7011b4743747590a316ce681179b2586339", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0xb8c2", + "hash" : "6e4caaf691655ae2b1716b5fbade88d09223ab6f93e489669921f2d6a739b5aa", + "mixHash" : "fa8ba89bade1c3394c9b5b6bcb460213e591536fe1e459c8b3f0e4e487937a8b", + "nonce" : "29fbb33ddbb505cf", + "number" : "0x03", + "parentHash" : "dcd7192d8b0d72eb9995a5a5e625deebf52841f43980812efcfc5e4837006ee0", + "receiptTrie" : "4f8f3556264d8604864d57f00fde67eb1034948f0c0136969eb461d1523a0753", + "stateRoot" : "d83e817a59bb5798de187ac38af3fbe1e73fc5dfb8a0b67919d6f57456bcab41", + "timestamp" : "0x56279241", + "transactionsTrie" : "a8cbdd1ef626da06ab461f7069138457e272ec0a5031bd56bbd0b23f20183cc8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "B", + "rlp" : "0xf902c7f901f9a0dcd7192d8b0d72eb9995a5a5e625deebf52841f43980812efcfc5e4837006ee0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d83e817a59bb5798de187ac38af3fbe1e73fc5dfb8a0b67919d6f57456bcab41a0a8cbdd1ef626da06ab461f7069138457e272ec0a5031bd56bbd0b23f20183cc8a04f8f3556264d8604864d57f00fde67eb1034948f0c0136969eb461d1523a0753b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882b8c2845627924180a0fa8ba89bade1c3394c9b5b6bcb460213e591536fe1e459c8b3f0e4e487937a8b8829fbb33ddbb505cff8c8f86402018304bced94a95e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ba0a00f672f435a31de16bab7ffb38616c92b79a98728bdc11ede54e82391a209ffa0988bf091b2e8947486feeaf4a9433e2e737c2cf989a428197daf66037ddf456af86003018304bced94095e7baea6a6c7c4c2dfeb977efac326af552d8714801ca07d27c58f0af911e44e13e261fec16fd068e4bf8bc88dbd0c4f371885c4204a68a0dd72f4f93b5c8c2c7e5133b5a93fd3dd31075c5bd73f7b89e63aa5f1bedd619bc0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x04bced", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0xa00f672f435a31de16bab7ffb38616c92b79a98728bdc11ede54e82391a209ff", + "s" : "0x988bf091b2e8947486feeaf4a9433e2e737c2cf989a428197daf66037ddf456a", + "to" : "a95e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + }, + { + "data" : "0x", + "gasLimit" : "0x04bced", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0x7d27c58f0af911e44e13e261fec16fd068e4bf8bc88dbd0c4f371885c4204a68", + "s" : "0xdd72f4f93b5c8c2c7e5133b5a93fd3dd31075c5bd73f7b89e63aa5f1bedd619b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x14" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "c208413a430ff6d51023109f61d39ea94bb380c8437f2912ead10d98c8ea5945", + "mixHash" : "546b624558db2b543d60932bf609f3a9e370d36a7896f3828992cf55d4345648", + "nonce" : "3677b14294946589", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "398e5bc661b4ab9fe39ac0e75999adc2b233c95947c7cc6f0b8062510cac5bb8", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0398e5bc661b4ab9fe39ac0e75999adc2b233c95947c7cc6f0b8062510cac5bb8a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0546b624558db2b543d60932bf609f3a9e370d36a7896f3828992cf55d4345648883677b14294946589c0c0", + "lastblockhash" : "6e4caaf691655ae2b1716b5fbade88d09223ab6f93e489669921f2d6a739b5aa", + "postState" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x09184e72a078", + "code" : "0x600140600155", + "nonce" : "0x00", + "storage" : { + "0x01" : "0x776faf12fae4c5c1a935eaa1293a34797e65864ac2aadf4d5dae34d3334a8b09" + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0xd02ab486ceddab0c", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e70f3b4", + "code" : "0x", + "nonce" : "0x04", + "storage" : { + } + }, + "a95e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0xc8", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x09184e72a000", + "code" : "0x600140600155", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e72a000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "ChainAtoChainB_blockorder1" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "294adcf551197528efd2337302be6f4d6b96cacf5b4f36596708c0369ab2b50b", + "mixHash" : "de33a08cfe78e358e4eba710503f558c85cab28a94ba9f750bf57965304cf390", + "nonce" : "66fb69515b4af648", + "number" : "0x01", + "parentHash" : "3afddc20cdebb81d587a8d31e42a201d9e540cc87b98af937eb6dc4787a07290", + "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", + "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", + "timestamp" : "0x56279246", + "transactionsTrie" : "187661ca87618fa6b7b61b43a16da00ca392fe8c389dc8e28bcc3e735cf14f6d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "A", + "rlp" : "0xf90261f901f9a03afddc20cdebb81d587a8d31e42a201d9e540cc87b98af937eb6dc4787a07290a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a0187661ca87618fa6b7b61b43a16da00ca392fe8c389dc8e28bcc3e735cf14f6da0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845627924680a0de33a08cfe78e358e4eba710503f558c85cab28a94ba9f750bf57965304cf3908866fb69515b4af648f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0a72369836d8fc8b8fd18bb0d3c3dc041e0b9fb63575eb1d2b87f8075b5061aaaa0f31c8e356a4b9a2d31fbcf291d22aa8e5e57375c6b01a2246288c32a00355cf6c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0xa72369836d8fc8b8fd18bb0d3c3dc041e0b9fb63575eb1d2b87f8075b5061aaa", + "s" : "0xf31c8e356a4b9a2d31fbcf291d22aa8e5e57375c6b01a2246288c32a00355cf6", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "a054425298fe08fd2cd83d2e4f68c0840ad396f24b9c9fa307c756c9d630ec22", + "mixHash" : "f1fa5a74ada3e8c27a34a022576e63849dd505e6100b4bbfac1aae3530c1a336", + "nonce" : "79a2a2b175fb0adc", + "number" : "0x02", + "parentHash" : "294adcf551197528efd2337302be6f4d6b96cacf5b4f36596708c0369ab2b50b", + "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", + "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", + "timestamp" : "0x56279249", + "transactionsTrie" : "a63bfab724835c413d0673cbcaa9a2ac3b31b3d41fe5b90829636da2fd0a8cee", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0294adcf551197528efd2337302be6f4d6b96cacf5b4f36596708c0369ab2b50ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0a63bfab724835c413d0673cbcaa9a2ac3b31b3d41fe5b90829636da2fd0a8ceea05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8825208845627924980a0f1fa5a74ada3e8c27a34a022576e63849dd505e6100b4bbfac1aae3530c1a3368879a2a2b175fb0adcf862f86001018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0108474de6800c90134c7cbb0783bb44a82dafe7856c9b0bb8e448a6bfa868efda0c130548e2b969f8aa77309d0d2e88aec168cf64818bc75d49d22094d665869cfc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x108474de6800c90134c7cbb0783bb44a82dafe7856c9b0bb8e448a6bfa868efd", + "s" : "0xc130548e2b969f8aa77309d0d2e88aec168cf64818bc75d49d22094d665869cf", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "899a7631aa568f2267c1a02ec598102445dc6af3168876dcc1a65fe837504004", + "mixHash" : "3d6c4f690fff27da309512a9f2d3723b1538bcef7aae3d1d1f8b35a54e41a4c7", + "nonce" : "bd79729bbb158409", + "number" : "0x03", + "parentHash" : "a054425298fe08fd2cd83d2e4f68c0840ad396f24b9c9fa307c756c9d630ec22", + "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", + "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", + "timestamp" : "0x5627924c", + "transactionsTrie" : "5b9c012a28ab134e3e01a14d0ec1bbbf22f2c15e07c67baedc067b1871a59c66", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0a054425298fe08fd2cd83d2e4f68c0840ad396f24b9c9fa307c756c9d630ec22a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a05b9c012a28ab134e3e01a14d0ec1bbbf22f2c15e07c67baedc067b1871a59c66a04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd8825208845627924c80a03d6c4f690fff27da309512a9f2d3723b1538bcef7aae3d1d1f8b35a54e41a4c788bd79729bbb158409f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca06b289d6cf2e66cb019387327583a04110cd5b9932cfba232137114213f362fe0a05a8a3a08c266517957c9d4dd1f072df6e60c50c96d4e8fb571d67314a927a106c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x6b289d6cf2e66cb019387327583a04110cd5b9932cfba232137114213f362fe0", + "s" : "0x5a8a3a08c266517957c9d4dd1f072df6e60c50c96d4e8fb571d67314a927a106", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "422c146b7c99c398a67150eab6395776e5f89f549e9541ced0d4920e6072ff62", + "mixHash" : "0a44596b8c57a905f7d87149bbf1c97be28b425e78805563dc71b200088ed7ff", + "nonce" : "8813151cfab9f7f6", + "number" : "0x01", + "parentHash" : "3afddc20cdebb81d587a8d31e42a201d9e540cc87b98af937eb6dc4787a07290", + "receiptTrie" : "bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbb", + "stateRoot" : "1b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4", + "timestamp" : "0x56279251", + "transactionsTrie" : "1d10bd75d712a670061098bb08670a8fbeedd7ce983851ad173d76eca2351fc5", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "B", + "rlp" : "0xf90261f901f9a03afddc20cdebb81d587a8d31e42a201d9e540cc87b98af937eb6dc4787a07290a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4a01d10bd75d712a670061098bb08670a8fbeedd7ce983851ad173d76eca2351fc5a0bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbbb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845627925180a00a44596b8c57a905f7d87149bbf1c97be28b425e78805563dc71b200088ed7ff888813151cfab9f7f6f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba076ceddc69c18010372a89f8bedd639232da0e2deccc83c28e323c9289dc54ecea05df8ed17424370c8f527a3bb1f1587a2faad1cc71fb838020db6feb75cf65d6ec0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x76ceddc69c18010372a89f8bedd639232da0e2deccc83c28e323c9289dc54ece", + "s" : "0x5df8ed17424370c8f527a3bb1f1587a2faad1cc71fb838020db6feb75cf65d6e", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "a30118d33d108738add7a6d58aaec7b91f884873fecf43c068e5a0076db5020c", + "mixHash" : "4b81c2ea931bb0c60bbd629051a35767dfe3f7435e4a93d6094b496775f26dbf", + "nonce" : "b2927deac005a940", + "number" : "0x02", + "parentHash" : "422c146b7c99c398a67150eab6395776e5f89f549e9541ced0d4920e6072ff62", + "receiptTrie" : "7fa6b426f40ed9fbcfdf1491008649c83e02bd4648492ff92d79de72c15cd11a", + "stateRoot" : "7cefe422fd5c4adc434377bf4b7ae17c091cbe1c6fc687986debbec9c432994b", + "timestamp" : "0x56279253", + "transactionsTrie" : "3a2b405cbc6078ec334041d3861cdb47cd44af9a39c3fe815b8512f1317fbf28", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "B", + "rlp" : "0xf90260f901f9a0422c146b7c99c398a67150eab6395776e5f89f549e9541ced0d4920e6072ff62a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07cefe422fd5c4adc434377bf4b7ae17c091cbe1c6fc687986debbec9c432994ba03a2b405cbc6078ec334041d3861cdb47cd44af9a39c3fe815b8512f1317fbf28a07fa6b426f40ed9fbcfdf1491008649c83e02bd4648492ff92d79de72c15cd11ab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8825208845627925380a04b81c2ea931bb0c60bbd629051a35767dfe3f7435e4a93d6094b496775f26dbf88b2927deac005a940f861f85f010182795394095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca0eb2bfa2232b91accce93aabc0601892602af5320b01c5b34da2af0a25ca30e93a03fd8758b82ace83b692e680fb788242a30cd83294dcdf5510ab84df90a7ba019c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0xeb2bfa2232b91accce93aabc0601892602af5320b01c5b34da2af0a25ca30e93", + "s" : "0x3fd8758b82ace83b692e680fb788242a30cd83294dcdf5510ab84df90a7ba019", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0xa520", + "hash" : "860ff776d37b2e00d3c760bf5e197cb84ff40423b878c7d32eb02ae9cc568fd9", + "mixHash" : "9d970d73dd7ba44efcd7c7d5e3f22ef68e19e65011eb41b202de5cde08428cf1", + "nonce" : "40c7230a20694723", + "number" : "0x03", + "parentHash" : "a30118d33d108738add7a6d58aaec7b91f884873fecf43c068e5a0076db5020c", + "receiptTrie" : "5a02ed94a6e5d6c9bacd6a8b130e93e244ace661eea1cfeee0dd7d5d1e2b1040", + "stateRoot" : "95bfbb2eb79049c4803bc02673e07929eb22f99c786857b14d22a3de3b26ae55", + "timestamp" : "0x56279256", + "transactionsTrie" : "e48048992169b21c68d3721769455c4cfea3c607d00aea551f3d54b2bcc4917f", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "B", + "rlp" : "0xf902c5f901f9a0a30118d33d108738add7a6d58aaec7b91f884873fecf43c068e5a0076db5020ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a095bfbb2eb79049c4803bc02673e07929eb22f99c786857b14d22a3de3b26ae55a0e48048992169b21c68d3721769455c4cfea3c607d00aea551f3d54b2bcc4917fa05a02ed94a6e5d6c9bacd6a8b130e93e244ace661eea1cfeee0dd7d5d1e2b1040b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882a520845627925680a09d970d73dd7ba44efcd7c7d5e3f22ef68e19e65011eb41b202de5cde08428cf18840c7230a20694723f8c6f8630201827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca0690b3ec1d197c2ad07cbd8c889db365c1c834bc65a9c0323fa8630854f89cae6a0ab5a1af4913b9c4a377d1158e8ab6c773c1f1735eab255c65787ea1d48601259f85f0301827b1594095e7baea6a6c7c4c2dfeb977efac326af552d8714801ba0a5799636134ab2bfc22268f30f113f556f9c65cba525ea94abc72817358fb025a06808c33be74fbb14d185749249a3bbd6bbb1fb27930a0cbfa267f18043be8babc0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x690b3ec1d197c2ad07cbd8c889db365c1c834bc65a9c0323fa8630854f89cae6", + "s" : "0xab5a1af4913b9c4a377d1158e8ab6c773c1f1735eab255c65787ea1d48601259", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + }, + { + "data" : "0x", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0xa5799636134ab2bfc22268f30f113f556f9c65cba525ea94abc72817358fb025", + "s" : "0x6808c33be74fbb14d185749249a3bbd6bbb1fb27930a0cbfa267f18043be8bab", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x14" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "3afddc20cdebb81d587a8d31e42a201d9e540cc87b98af937eb6dc4787a07290", + "mixHash" : "e1c01c02cacedfb2fb2971e195ac46e2b46ffb90b769732fb8d9eec1f35fc011", + "nonce" : "075e02bda3ee63b3", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0e1c01c02cacedfb2fb2971e195ac46e2b46ffb90b769732fb8d9eec1f35fc01188075e02bda3ee63b3c0c0", + "lastblockhash" : "899a7631aa568f2267c1a02ec598102445dc6af3168876dcc1a65fe837504004", + "postState" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x1e", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0xd02ab486cedcf618", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e71a9ca", + "code" : "0x", + "nonce" : "0x03", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e72a000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "ChainAtoChainB_blockorder2" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "bac077df02df43138dd29cc69c60b5981e77409fc031c21780f91e63706ffeab", + "mixHash" : "0a4de9571aba997eba135de7ba2b9960b6dac695db6ee72df60218f5d84bcbc1", + "nonce" : "3257d5b68a960577", + "number" : "0x01", + "parentHash" : "7a61392fa3ccb1777fda1e6a6c9721c0a4c49d7c57e3be99e1facd91b36859bf", + "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", + "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", + "timestamp" : "0x5627925b", + "transactionsTrie" : "9e7eece6d378359be74d6e7fc777f65199b5677c80a6ca89e3c0acc66a692ffc", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "A", + "rlp" : "0xf90261f901f9a07a61392fa3ccb1777fda1e6a6c9721c0a4c49d7c57e3be99e1facd91b36859bfa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a09e7eece6d378359be74d6e7fc777f65199b5677c80a6ca89e3c0acc66a692ffca0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845627925b80a00a4de9571aba997eba135de7ba2b9960b6dac695db6ee72df60218f5d84bcbc1883257d5b68a960577f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca023b35dd7a2e46557730b0bc66433e6f6e2720cb7e6e2382ead3e32917fe423b6a0be54f0172e7e337cc89d35450b51a3cc67be16339b2d4731d913a983fb35ccd9c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x23b35dd7a2e46557730b0bc66433e6f6e2720cb7e6e2382ead3e32917fe423b6", + "s" : "0xbe54f0172e7e337cc89d35450b51a3cc67be16339b2d4731d913a983fb35ccd9", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "db121e3795a752b0ac338e57ab78d944e2db4fd21c9165d38c1bf33728518947", + "mixHash" : "5e91fc5dd062ee990e95a622683de0d53ccba3c3ac64a5f260ab3d90559588f1", + "nonce" : "eb4a28be87e03e7e", + "number" : "0x02", + "parentHash" : "bac077df02df43138dd29cc69c60b5981e77409fc031c21780f91e63706ffeab", + "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", + "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", + "timestamp" : "0x5627925e", + "transactionsTrie" : "f7b7f5c1c4f0d0bbb7103667197d3bc982834fb44bb6b65cdce64dc72d47e914", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0bac077df02df43138dd29cc69c60b5981e77409fc031c21780f91e63706ffeaba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0f7b7f5c1c4f0d0bbb7103667197d3bc982834fb44bb6b65cdce64dc72d47e914a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8825208845627925e80a05e91fc5dd062ee990e95a622683de0d53ccba3c3ac64a5f260ab3d90559588f188eb4a28be87e03e7ef862f86001018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba07af05da6adf7720c75f69e9662eb4c61a5d5e6dfe3aaf2689478edffeeb011c3a0be0a65150fddf0690c12cd87575d4af869a270e9f0282a7b1e451ddeb34718f7c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x7af05da6adf7720c75f69e9662eb4c61a5d5e6dfe3aaf2689478edffeeb011c3", + "s" : "0xbe0a65150fddf0690c12cd87575d4af869a270e9f0282a7b1e451ddeb34718f7", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "85a42de700321c7f96fa2b41817c4b756201e225d73dfbf4c0e2149b93f7b028", + "mixHash" : "826216f4bc0b7d963502b1f01fbd5a3a70cbaaf444169fde5f733907851e290f", + "nonce" : "437426ce37715958", + "number" : "0x01", + "parentHash" : "7a61392fa3ccb1777fda1e6a6c9721c0a4c49d7c57e3be99e1facd91b36859bf", + "receiptTrie" : "bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbb", + "stateRoot" : "1b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4", + "timestamp" : "0x56279263", + "transactionsTrie" : "67fb254503392da89aa494d8c43c8c5ea6ab3392481ecd4effbd0dd29a6fc549", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "B", + "rlp" : "0xf90261f901f9a07a61392fa3ccb1777fda1e6a6c9721c0a4c49d7c57e3be99e1facd91b36859bfa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4a067fb254503392da89aa494d8c43c8c5ea6ab3392481ecd4effbd0dd29a6fc549a0bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbbb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845627926380a0826216f4bc0b7d963502b1f01fbd5a3a70cbaaf444169fde5f733907851e290f88437426ce37715958f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca0d77ee94705a0f28227611816bc5568d60e807383517530429970f83d36aa3dc0a0662bc27db21b74c6ed89caf696d62c23df4fe2be461ef7d8ccf1e171f56ffe00c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0xd77ee94705a0f28227611816bc5568d60e807383517530429970f83d36aa3dc0", + "s" : "0x662bc27db21b74c6ed89caf696d62c23df4fe2be461ef7d8ccf1e171f56ffe00", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "2a1cdaa90572e562139467fd380cc85c596b17efd6b87df2f99958fe4795e557", + "mixHash" : "ef0280a7d3dea915f8e9eaf8041b854b9957b7d92f9bc648eb07130d96ee8bcc", + "nonce" : "9f18d03b21f7f6d6", + "number" : "0x02", + "parentHash" : "85a42de700321c7f96fa2b41817c4b756201e225d73dfbf4c0e2149b93f7b028", + "receiptTrie" : "7fa6b426f40ed9fbcfdf1491008649c83e02bd4648492ff92d79de72c15cd11a", + "stateRoot" : "7cefe422fd5c4adc434377bf4b7ae17c091cbe1c6fc687986debbec9c432994b", + "timestamp" : "0x56279265", + "transactionsTrie" : "c41c63b9276936f0bb4c6d099e889b2cf302a221ba1018173330035880140dd9", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "B", + "rlp" : "0xf90260f901f9a085a42de700321c7f96fa2b41817c4b756201e225d73dfbf4c0e2149b93f7b028a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07cefe422fd5c4adc434377bf4b7ae17c091cbe1c6fc687986debbec9c432994ba0c41c63b9276936f0bb4c6d099e889b2cf302a221ba1018173330035880140dd9a07fa6b426f40ed9fbcfdf1491008649c83e02bd4648492ff92d79de72c15cd11ab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8825208845627926580a0ef0280a7d3dea915f8e9eaf8041b854b9957b7d92f9bc648eb07130d96ee8bcc889f18d03b21f7f6d6f861f85f010182795394095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca003e492801de1c7f9ed5252b84c84f16e067437dabceef8f3d0af982f47887687a0ff891f300de01aaf9c8a3b42a74a58c5cf89eafd6f51106244a941ec7c870500c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x03e492801de1c7f9ed5252b84c84f16e067437dabceef8f3d0af982f47887687", + "s" : "0xff891f300de01aaf9c8a3b42a74a58c5cf89eafd6f51106244a941ec7c870500", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0xa520", + "hash" : "ed49dd97822fd8f69d9b6cccecca3d19658d78ff5affa88419ec2047abb9aaa0", + "mixHash" : "df824cac97693e47e050dcbf1ee906ae2285c613956b40a461dc13e62a3a6712", + "nonce" : "e4924bf6bd85a006", + "number" : "0x03", + "parentHash" : "2a1cdaa90572e562139467fd380cc85c596b17efd6b87df2f99958fe4795e557", + "receiptTrie" : "5a02ed94a6e5d6c9bacd6a8b130e93e244ace661eea1cfeee0dd7d5d1e2b1040", + "stateRoot" : "95bfbb2eb79049c4803bc02673e07929eb22f99c786857b14d22a3de3b26ae55", + "timestamp" : "0x56279268", + "transactionsTrie" : "54d086d903f53ebef5c21c491ab1bef450e8eb1e720155488cd93beb1c866c74", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "B", + "rlp" : "0xf902c5f901f9a02a1cdaa90572e562139467fd380cc85c596b17efd6b87df2f99958fe4795e557a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a095bfbb2eb79049c4803bc02673e07929eb22f99c786857b14d22a3de3b26ae55a054d086d903f53ebef5c21c491ab1bef450e8eb1e720155488cd93beb1c866c74a05a02ed94a6e5d6c9bacd6a8b130e93e244ace661eea1cfeee0dd7d5d1e2b1040b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882a520845627926880a0df824cac97693e47e050dcbf1ee906ae2285c613956b40a461dc13e62a3a671288e4924bf6bd85a006f8c6f8630201827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ba0be887e56bd3e5ad4225cf1cc26916f83b1ea039e037ceee966165dab6628691ea050a300ec70676b8c1fdeaa996d19bc4016d0647c8302f5e10b33bc1eda8961cef85f0301827b1594095e7baea6a6c7c4c2dfeb977efac326af552d8714801ca03cd422e53b3a062aea7d29a6612e7ea675528b8babd3965b71dbf2a8f3ec4b86a040a6fc61be830b48f1be080967f85c447ae1f7e59955c649f547054b77de4994c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0xbe887e56bd3e5ad4225cf1cc26916f83b1ea039e037ceee966165dab6628691e", + "s" : "0x50a300ec70676b8c1fdeaa996d19bc4016d0647c8302f5e10b33bc1eda8961ce", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + }, + { + "data" : "0x", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0x3cd422e53b3a062aea7d29a6612e7ea675528b8babd3965b71dbf2a8f3ec4b86", + "s" : "0x40a6fc61be830b48f1be080967f85c447ae1f7e59955c649f547054b77de4994", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x14" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "a405cdd45116cc47fa122ee396bf84ad5b69dd232c2f07ddd0275f1a32f2c8e8", + "mixHash" : "f7d5eaa4df037e3bf9596bc0226e783bff680cce36f1a6fb5164709a0dd6a2a4", + "nonce" : "e1949765c0621a27", + "number" : "0x03", + "parentHash" : "db121e3795a752b0ac338e57ab78d944e2db4fd21c9165d38c1bf33728518947", + "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", + "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", + "timestamp" : "0x5627926b", + "transactionsTrie" : "d7c7ed1505e162a5a23e154f23e44f04848cb3013c5851785a46807c0a5f71f6", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0db121e3795a752b0ac338e57ab78d944e2db4fd21c9165d38c1bf33728518947a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a0d7c7ed1505e162a5a23e154f23e44f04848cb3013c5851785a46807c0a5f71f6a04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd8825208845627926b80a0f7d5eaa4df037e3bf9596bc0226e783bff680cce36f1a6fb5164709a0dd6a2a488e1949765c0621a27f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0741b8c53caa84b68740955672b94afd7b8eabef2c99bd35c8fbe41dc00a1cac5a0128937bafc4e66edea2223faf0700a9af5f20639eeea2abcd2c7300674a0c95ac0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x741b8c53caa84b68740955672b94afd7b8eabef2c99bd35c8fbe41dc00a1cac5", + "s" : "0x128937bafc4e66edea2223faf0700a9af5f20639eeea2abcd2c7300674a0c95a", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "7a61392fa3ccb1777fda1e6a6c9721c0a4c49d7c57e3be99e1facd91b36859bf", + "mixHash" : "fbad32fb91cfd5b1bf65e0da0bafd93e4125e65ec154b065055dc764109a1bf7", + "nonce" : "be06a6764b5c7f02", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0fbad32fb91cfd5b1bf65e0da0bafd93e4125e65ec154b065055dc764109a1bf788be06a6764b5c7f02c0c0", + "lastblockhash" : "ed49dd97822fd8f69d9b6cccecca3d19658d78ff5affa88419ec2047abb9aaa0", + "postState" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x0140", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0xd02ab486cedd4930", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e715590", + "code" : "0x", + "nonce" : "0x04", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e72a000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "ChainAtoChainB_difficultyB" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "41a3b0bafa1f03418b21559520302f2cda635e69009350963e5c224820c4f1fd", + "mixHash" : "45a0f47ea1ef10b6a721c098f9c4373fe32ca3da025427dc3407d9f21950f784", + "nonce" : "7bafb37945d2356c", + "number" : "0x01", + "parentHash" : "c37e6dd0e00584571a6039e7c03c2480fdad1524b38d83f2a434a4005384dc06", + "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", + "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", + "timestamp" : "0x5627926f", + "transactionsTrie" : "475a14dd4aed27093f66856d4978ee39e52d12792b1dccdd89b272190945e0c8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0c37e6dd0e00584571a6039e7c03c2480fdad1524b38d83f2a434a4005384dc06a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a0475a14dd4aed27093f66856d4978ee39e52d12792b1dccdd89b272190945e0c8a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845627926f80a045a0f47ea1ef10b6a721c098f9c4373fe32ca3da025427dc3407d9f21950f784887bafb37945d2356cf862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0691460c4dba7a3f957ba53943c2b92072d654eeba7375f7100dd194a30e4aa3fa08ffebeca62f5c83abea3b54d919c3c9ba82542c60517f5705aff511a66419be5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x691460c4dba7a3f957ba53943c2b92072d654eeba7375f7100dd194a30e4aa3f", + "s" : "0x8ffebeca62f5c83abea3b54d919c3c9ba82542c60517f5705aff511a66419be5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "c2b6c776575f5964a955e5328f9c827753c1e981b2113f1b80851cd9410e4161", + "mixHash" : "ea702361e430e6e6f73ee6a4fc7fd3361a2ee4df42b19361b70777d134c836be", + "nonce" : "0f91e7e8457faaf2", + "number" : "0x02", + "parentHash" : "41a3b0bafa1f03418b21559520302f2cda635e69009350963e5c224820c4f1fd", + "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", + "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", + "timestamp" : "0x56279271", + "transactionsTrie" : "02000c1721187b14eed0ca313b390679bd875841b0c49e705fcfec8fd93482cf", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "A", + "rlp" : "0xf90261f901f9a041a3b0bafa1f03418b21559520302f2cda635e69009350963e5c224820c4f1fda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea002000c1721187b14eed0ca313b390679bd875841b0c49e705fcfec8fd93482cfa05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8825208845627927180a0ea702361e430e6e6f73ee6a4fc7fd3361a2ee4df42b19361b70777d134c836be880f91e7e8457faaf2f862f86001018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0d38595d3c2861f39e738d037fddf505c61d9a2a592cb58b7805f4b5fae77a1d6a001806402953b1dd9bddba441f5654b31fa731b5b7c52f645b352acf89c8fb10cc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0xd38595d3c2861f39e738d037fddf505c61d9a2a592cb58b7805f4b5fae77a1d6", + "s" : "0x01806402953b1dd9bddba441f5654b31fa731b5b7c52f645b352acf89c8fb10c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "fefbfb9f09822c5e761a3c08598d423faa7668f890d4dabe8bec5549dadfc177", + "mixHash" : "13e2c3b16dfdb2ad50e76cab8112bd203e40cfeb145901a792f426da91dfaac3", + "nonce" : "f84bb3020dd5d440", + "number" : "0x03", + "parentHash" : "c2b6c776575f5964a955e5328f9c827753c1e981b2113f1b80851cd9410e4161", + "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", + "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", + "timestamp" : "0x56279289", + "transactionsTrie" : "7f269024accf09bf72ecff40bd5addabca584db59e16e446ca1f99c4c94e52dd", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0c2b6c776575f5964a955e5328f9c827753c1e981b2113f1b80851cd9410e4161a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a07f269024accf09bf72ecff40bd5addabca584db59e16e446ca1f99c4c94e52dda04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd8825208845627928980a013e2c3b16dfdb2ad50e76cab8112bd203e40cfeb145901a792f426da91dfaac388f84bb3020dd5d440f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0dfdbd597d4c453fdbce20870af429bfe027c02bdb7c3d645bcc248abd484b0f2a0fd23073fe6b9738081f9277d1d39d03ae01c264153ff17977894161491df63ecc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0xdfdbd597d4c453fdbce20870af429bfe027c02bdb7c3d645bcc248abd484b0f2", + "s" : "0xfd23073fe6b9738081f9277d1d39d03ae01c264153ff17977894161491df63ec", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "fe38b729148f3b94b0c804cc8c7e3e096345f56f46cfce002eb94ae45ea6ab00", + "mixHash" : "5bd41de2a2a335dc3fdbe9b37e48ff5fc0e1c333493862416eafc99b821aa369", + "nonce" : "dd53c65309618bc4", + "number" : "0x01", + "parentHash" : "c37e6dd0e00584571a6039e7c03c2480fdad1524b38d83f2a434a4005384dc06", + "receiptTrie" : "bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbb", + "stateRoot" : "1b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4", + "timestamp" : "0x56279290", + "transactionsTrie" : "65f972977decbf40019227793118bfa6cd071464adfcf5784dfca6a5162436cd", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "B", + "rlp" : "0xf90261f901f9a0c37e6dd0e00584571a6039e7c03c2480fdad1524b38d83f2a434a4005384dc06a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4a065f972977decbf40019227793118bfa6cd071464adfcf5784dfca6a5162436cda0bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbbb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845627929080a05bd41de2a2a335dc3fdbe9b37e48ff5fc0e1c333493862416eafc99b821aa36988dd53c65309618bc4f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca0ed87582f60ce48c4d0dcd2c5849a90a725397e8fb76972d527eecb2b82a503c8a0674e2058c1855dedf6eace6dac54a6a64ca963c79a7b0c6a5fd6801b0c8b7570c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0xed87582f60ce48c4d0dcd2c5849a90a725397e8fb76972d527eecb2b82a503c8", + "s" : "0x674e2058c1855dedf6eace6dac54a6a64ca963c79a7b0c6a5fd6801b0c8b7570", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "7ab8b9918f14734b2b927a06cca8994d53adfaf8b8ab4cd584a5ec75d3ff396c", + "mixHash" : "99a367b99670be3ed201d28ef089fab98ac07f164776a9dee031c27244b4f5d0", + "nonce" : "ce06dc1eac3915f9", + "number" : "0x02", + "parentHash" : "fe38b729148f3b94b0c804cc8c7e3e096345f56f46cfce002eb94ae45ea6ab00", + "receiptTrie" : "7fa6b426f40ed9fbcfdf1491008649c83e02bd4648492ff92d79de72c15cd11a", + "stateRoot" : "7cefe422fd5c4adc434377bf4b7ae17c091cbe1c6fc687986debbec9c432994b", + "timestamp" : "0x56279293", + "transactionsTrie" : "c1413e5ecb141c90dd0e4e29cd5b90579192089c5919c1e79665aa7c8b4656d2", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "B", + "rlp" : "0xf90260f901f9a0fe38b729148f3b94b0c804cc8c7e3e096345f56f46cfce002eb94ae45ea6ab00a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07cefe422fd5c4adc434377bf4b7ae17c091cbe1c6fc687986debbec9c432994ba0c1413e5ecb141c90dd0e4e29cd5b90579192089c5919c1e79665aa7c8b4656d2a07fa6b426f40ed9fbcfdf1491008649c83e02bd4648492ff92d79de72c15cd11ab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8825208845627929380a099a367b99670be3ed201d28ef089fab98ac07f164776a9dee031c27244b4f5d088ce06dc1eac3915f9f861f85f010182795394095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca093ee3a47b5e52e96bbbe8868bdc39e0bcc3ae3134201f63ae2cf7de2d858775aa07ba78a845ae1c14207e74c3c041ed9ae41ca9f4d405dff6392be31d7a01b7a0bc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x93ee3a47b5e52e96bbbe8868bdc39e0bcc3ae3134201f63ae2cf7de2d858775a", + "s" : "0x7ba78a845ae1c14207e74c3c041ed9ae41ca9f4d405dff6392be31d7a01b7a0b", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0xa520", + "hash" : "abcf4ce9519b80512932f881ba65911bf09fbc2b350624987f4a090059a3aa36", + "mixHash" : "355cc094af9981b3972091dbb06df90f94baf9c92b0127e88149c814e4f86cb4", + "nonce" : "4a568c30854871c2", + "number" : "0x03", + "parentHash" : "7ab8b9918f14734b2b927a06cca8994d53adfaf8b8ab4cd584a5ec75d3ff396c", + "receiptTrie" : "5a02ed94a6e5d6c9bacd6a8b130e93e244ace661eea1cfeee0dd7d5d1e2b1040", + "stateRoot" : "95bfbb2eb79049c4803bc02673e07929eb22f99c786857b14d22a3de3b26ae55", + "timestamp" : "0x56279297", + "transactionsTrie" : "a88c07f0f3566cbb615b74c5dada020f7242c989ac5689b197bae0a5a44d45ce", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "B", + "rlp" : "0xf902c5f901f9a07ab8b9918f14734b2b927a06cca8994d53adfaf8b8ab4cd584a5ec75d3ff396ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a095bfbb2eb79049c4803bc02673e07929eb22f99c786857b14d22a3de3b26ae55a0a88c07f0f3566cbb615b74c5dada020f7242c989ac5689b197bae0a5a44d45cea05a02ed94a6e5d6c9bacd6a8b130e93e244ace661eea1cfeee0dd7d5d1e2b1040b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882a520845627929780a0355cc094af9981b3972091dbb06df90f94baf9c92b0127e88149c814e4f86cb4884a568c30854871c2f8c6f8630201827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca0da2b282748f89720afed8ea8a532af0aee4bff1801b104d9a1767302ef908345a0e95fe3bcc1f00d52999fbbb74d81fda84d677f2ce938347ca6c83d1d35a72480f85f0301827b1594095e7baea6a6c7c4c2dfeb977efac326af552d8714801ba02614313bf96bf5ebc46ea4d4043e08f4c522a929d8ac000cefae98fff3fd3279a099cfdf61eb20cfbde407e1c5c51b912da77af938bff6e1fb5f7268623b785fdfc0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0xda2b282748f89720afed8ea8a532af0aee4bff1801b104d9a1767302ef908345", + "s" : "0xe95fe3bcc1f00d52999fbbb74d81fda84d677f2ce938347ca6c83d1d35a72480", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + }, + { + "data" : "0x", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0x2614313bf96bf5ebc46ea4d4043e08f4c522a929d8ac000cefae98fff3fd3279", + "s" : "0x99cfdf61eb20cfbde407e1c5c51b912da77af938bff6e1fb5f7268623b785fdf", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x14" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "c37e6dd0e00584571a6039e7c03c2480fdad1524b38d83f2a434a4005384dc06", + "mixHash" : "b90b5fb343e46fbd70ba86b6eb1b747c9803aa5afc0c00907a1ce0f34103c6b4", + "nonce" : "923de01291e45895", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0b90b5fb343e46fbd70ba86b6eb1b747c9803aa5afc0c00907a1ce0f34103c6b488923de01291e45895c0c0", + "lastblockhash" : "abcf4ce9519b80512932f881ba65911bf09fbc2b350624987f4a090059a3aa36", + "postState" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x0140", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0xd02ab486cedd4930", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e715590", + "code" : "0x", + "nonce" : "0x04", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e72a000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "ChainAtoChainBtoChainA" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "7a7b4b4c6c5e4242607991884da453a6a722bf8f707db01c4040f71ebd44f5ae", + "mixHash" : "3ce48d86a482e97d8d35388fbd291657df559b8af325c366c07f0025adb3233f", + "nonce" : "0fca97502f3e7498", + "number" : "0x01", + "parentHash" : "3a47fa56df0850ca21e1d81c765899c4b5bf420b4f81f82fade3e14552902abb", + "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", + "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", + "timestamp" : "0x5627929d", + "transactionsTrie" : "3a16bc2f30af7c15c170e323afed53a650f6cdb1dda27fdf4557272e5b53fe43", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "A", + "rlp" : "0xf90261f901f9a03a47fa56df0850ca21e1d81c765899c4b5bf420b4f81f82fade3e14552902abba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a03a16bc2f30af7c15c170e323afed53a650f6cdb1dda27fdf4557272e5b53fe43a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845627929d80a03ce48d86a482e97d8d35388fbd291657df559b8af325c366c07f0025adb3233f880fca97502f3e7498f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0d12faa40fede3220a4088a3e0e98738fe2bac3eaa43a866caceb9620439b127aa03c80da1f3e09fabaab086e13c3b569f6fc389c7ff349d56a39c0f9eac88aad4dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0xd12faa40fede3220a4088a3e0e98738fe2bac3eaa43a866caceb9620439b127a", + "s" : "0x3c80da1f3e09fabaab086e13c3b569f6fc389c7ff349d56a39c0f9eac88aad4d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "e5271e6514da6536f3c635e0b721a6f83f1ed1964a4c16aa57121a85a95c56e8", + "mixHash" : "416e0e8589e7e77b7978f1ec75dd5664d62af32656464d5cf071d73012f33316", + "nonce" : "b67817b2ba0a3f8a", + "number" : "0x02", + "parentHash" : "7a7b4b4c6c5e4242607991884da453a6a722bf8f707db01c4040f71ebd44f5ae", + "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", + "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", + "timestamp" : "0x562792a0", + "transactionsTrie" : "a1c3dbc998c3bf75336e734efb9c8cc83714043294109373a8c428b749193260", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "A", + "rlp" : "0xf90261f901f9a07a7b4b4c6c5e4242607991884da453a6a722bf8f707db01c4040f71ebd44f5aea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0a1c3dbc998c3bf75336e734efb9c8cc83714043294109373a8c428b749193260a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884562792a080a0416e0e8589e7e77b7978f1ec75dd5664d62af32656464d5cf071d73012f3331688b67817b2ba0a3f8af862f86001018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca03852882adb9cd62caf461c3d29803f2359d61c8bb9dfc6bdabdeef7c5ae5617fa09dc7e3cbda4e340a7d200e9d66d48e8f5bb971214d9a7cc31f0e52d8524a931ac0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x3852882adb9cd62caf461c3d29803f2359d61c8bb9dfc6bdabdeef7c5ae5617f", + "s" : "0x9dc7e3cbda4e340a7d200e9d66d48e8f5bb971214d9a7cc31f0e52d8524a931a", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "eb2fd962d848135db10000fd3d2735dfd1551b5b2ac732dc3304925b32aab189", + "mixHash" : "56287e7235c8ce24d04fae8f7fcddf3cb3750e88d191e59f31aa28fe7ec7171f", + "nonce" : "8db1ee97be22fef5", + "number" : "0x03", + "parentHash" : "e5271e6514da6536f3c635e0b721a6f83f1ed1964a4c16aa57121a85a95c56e8", + "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", + "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", + "timestamp" : "0x562792a2", + "transactionsTrie" : "de6a2cab25e03640dcf2df71a598d9ceaa361be9567fb2de66679e5ea2ac5de7", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0e5271e6514da6536f3c635e0b721a6f83f1ed1964a4c16aa57121a85a95c56e8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a0de6a2cab25e03640dcf2df71a598d9ceaa361be9567fb2de66679e5ea2ac5de7a04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884562792a280a056287e7235c8ce24d04fae8f7fcddf3cb3750e88d191e59f31aa28fe7ec7171f888db1ee97be22fef5f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba03b937dc12699d9d5a550f690360a4c2247edf3a4c876569859d347c9a2060117a08fcc2e136980e3e838f9c65ae365f924f559c4ae6f5d243f1c5e8e805614f4cbc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x3b937dc12699d9d5a550f690360a4c2247edf3a4c876569859d347c9a2060117", + "s" : "0x8fcc2e136980e3e838f9c65ae365f924f559c4ae6f5d243f1c5e8e805614f4cb", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "f9eebc951ad7bb734dfb5327ce23ba7d0170568ced1247951b44bd78f8c08dba", + "mixHash" : "ec0a983c3b4530b6f39ac77295b769f5076d762fe1b4e1b55a937645f29074b6", + "nonce" : "4170826670823e1f", + "number" : "0x01", + "parentHash" : "3a47fa56df0850ca21e1d81c765899c4b5bf420b4f81f82fade3e14552902abb", + "receiptTrie" : "bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbb", + "stateRoot" : "1b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4", + "timestamp" : "0x562792a4", + "transactionsTrie" : "175da4f7cfe55391b8b437ec6073a41a503b71f2a273eb6b90c61cf49388072e", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "B", + "rlp" : "0xf90261f901f9a03a47fa56df0850ca21e1d81c765899c4b5bf420b4f81f82fade3e14552902abba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4a0175da4f7cfe55391b8b437ec6073a41a503b71f2a273eb6b90c61cf49388072ea0bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbbb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884562792a480a0ec0a983c3b4530b6f39ac77295b769f5076d762fe1b4e1b55a937645f29074b6884170826670823e1ff862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba055bd053066e9b141e93f330b2bb778691df3ad6b8cd99c64418e641a4d569f9fa05de654039213a21fbda43500f3e5d42bc9a248e9b08b06f33c15b11894b1ae06c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x55bd053066e9b141e93f330b2bb778691df3ad6b8cd99c64418e641a4d569f9f", + "s" : "0x5de654039213a21fbda43500f3e5d42bc9a248e9b08b06f33c15b11894b1ae06", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "6d2aae0037a8d931faec113a051bf49adc63bc5d7bb3f44448a9e20a46809145", + "mixHash" : "b7ed73968fc6e42954bc62ceff9a7eaa553c1b8bb13d4fb1e82806f715476813", + "nonce" : "1b2088a875089f52", + "number" : "0x02", + "parentHash" : "f9eebc951ad7bb734dfb5327ce23ba7d0170568ced1247951b44bd78f8c08dba", + "receiptTrie" : "7fa6b426f40ed9fbcfdf1491008649c83e02bd4648492ff92d79de72c15cd11a", + "stateRoot" : "7cefe422fd5c4adc434377bf4b7ae17c091cbe1c6fc687986debbec9c432994b", + "timestamp" : "0x562792a6", + "transactionsTrie" : "fc191e639d318f5c9196f9962fe4bb2fc99d1daa5b0ae628bece5d59b9c45c92", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "B", + "rlp" : "0xf9025ff901f9a0f9eebc951ad7bb734dfb5327ce23ba7d0170568ced1247951b44bd78f8c08dbaa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07cefe422fd5c4adc434377bf4b7ae17c091cbe1c6fc687986debbec9c432994ba0fc191e639d318f5c9196f9962fe4bb2fc99d1daa5b0ae628bece5d59b9c45c92a07fa6b426f40ed9fbcfdf1491008649c83e02bd4648492ff92d79de72c15cd11ab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884562792a680a0b7ed73968fc6e42954bc62ceff9a7eaa553c1b8bb13d4fb1e82806f715476813881b2088a875089f52f860f85e010182795394095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0897afd67f78132b3946d9455da7212d6ffb09baba2dc0b5a0fe5d24d12bb039a9f896cf7f14645c7c334460040611d67ff8953d8d0c2331cc552f1ec0146cb3cc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x897afd67f78132b3946d9455da7212d6ffb09baba2dc0b5a0fe5d24d12bb039a", + "s" : "0x896cf7f14645c7c334460040611d67ff8953d8d0c2331cc552f1ec0146cb3c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0xa520", + "hash" : "79917d20fbd770e579e7181eb6b0eb789e9cae1465d9b20f06358e0bbdcb4523", + "mixHash" : "085cfedef2417ffdc91c0d1dd84e5bc9be06f368dc3e647d1623bd65c4eea44e", + "nonce" : "a5323a22827a8687", + "number" : "0x03", + "parentHash" : "6d2aae0037a8d931faec113a051bf49adc63bc5d7bb3f44448a9e20a46809145", + "receiptTrie" : "5a02ed94a6e5d6c9bacd6a8b130e93e244ace661eea1cfeee0dd7d5d1e2b1040", + "stateRoot" : "95bfbb2eb79049c4803bc02673e07929eb22f99c786857b14d22a3de3b26ae55", + "timestamp" : "0x562792aa", + "transactionsTrie" : "aa15c9b5456ab37e3a731da3ec88c1a9b8d05afa2cb4f049c52ee56360e1a6b3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "B", + "rlp" : "0xf902c5f901f9a06d2aae0037a8d931faec113a051bf49adc63bc5d7bb3f44448a9e20a46809145a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a095bfbb2eb79049c4803bc02673e07929eb22f99c786857b14d22a3de3b26ae55a0aa15c9b5456ab37e3a731da3ec88c1a9b8d05afa2cb4f049c52ee56360e1a6b3a05a02ed94a6e5d6c9bacd6a8b130e93e244ace661eea1cfeee0dd7d5d1e2b1040b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882a52084562792aa80a0085cfedef2417ffdc91c0d1dd84e5bc9be06f368dc3e647d1623bd65c4eea44e88a5323a22827a8687f8c6f8630201827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca0150a80ee1a4c4fc67c8d468b14fce09875cc93d543857a8fd0e0b2c56926b9eca0ddfda7add7966ce27df351035117c6aff0daed7208ab5947f11ea3b335f5c07cf85f0301827b1594095e7baea6a6c7c4c2dfeb977efac326af552d8714801ba0304951abdead86dfa9ad7c01cc8f29badce3fffdcfd502f9affa2d719adf329fa029df84f933181ddbaf9a62dc776b660deb2eb8faaf2e481cf1b20cf06c95289cc0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x150a80ee1a4c4fc67c8d468b14fce09875cc93d543857a8fd0e0b2c56926b9ec", + "s" : "0xddfda7add7966ce27df351035117c6aff0daed7208ab5947f11ea3b335f5c07c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + }, + { + "data" : "0x", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0x304951abdead86dfa9ad7c01cc8f29badce3fffdcfd502f9affa2d719adf329f", + "s" : "0x29df84f933181ddbaf9a62dc776b660deb2eb8faaf2e481cf1b20cf06c95289c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x14" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "a5c02da6aaa8ee56a2db23da446b8c3e214ab88acf431cdee8293eb883e59b0a", + "mixHash" : "ea87af202af34af57fbfab3f128cc5a32322c0c9ab7ec1a2731cc6ff0f502b31", + "nonce" : "6b7edfa1c5b6d466", + "number" : "0x04", + "parentHash" : "79917d20fbd770e579e7181eb6b0eb789e9cae1465d9b20f06358e0bbdcb4523", + "receiptTrie" : "01b7ea0c86b233d8c5e352213671522789db46a5661ab28ce6cdca0586d59c89", + "stateRoot" : "f921b0ca9dc440556e39ff9d14a489bb74801e6725d6edb62d70e3ccc8ad758e", + "timestamp" : "0x562792ad", + "transactionsTrie" : "ad672f53f9466743f3b5913e53bd2a3246ee411bbc9ae83e423d9fb007d5291a", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "chainname" : "B", + "rlp" : "0xf90260f901f9a079917d20fbd770e579e7181eb6b0eb789e9cae1465d9b20f06358e0bbdcb4523a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f921b0ca9dc440556e39ff9d14a489bb74801e6725d6edb62d70e3ccc8ad758ea0ad672f53f9466743f3b5913e53bd2a3246ee411bbc9ae83e423d9fb007d5291aa001b7ea0c86b233d8c5e352213671522789db46a5661ab28ce6cdca0586d59c89b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884562792ad80a0ea87af202af34af57fbfab3f128cc5a32322c0c9ab7ec1a2731cc6ff0f502b31886b7edfa1c5b6d466f861f85f040182795394095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca08b547aa24854a299c0bc647909196f447f515c4c996dd8858fc255145b578036a0c189aae842f6510837facf78138924592d39aff7bb390a655395efe6587a4127c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0x8b547aa24854a299c0bc647909196f447f515c4c996dd8858fc255145b578036", + "s" : "0xc189aae842f6510837facf78138924592d39aff7bb390a655395efe6587a4127", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "e307a8f5b6c8345fe18b38acf528b40a741297755bfaaf204ecf40762f3a3ec8", + "mixHash" : "61e54d2ec9167e19aff29d104dcfa276c8d601c4ae5e43707e45bae7c32a5ef8", + "nonce" : "590744ad23305fa9", + "number" : "0x05", + "parentHash" : "a5c02da6aaa8ee56a2db23da446b8c3e214ab88acf431cdee8293eb883e59b0a", + "receiptTrie" : "0690d5a2d2eb0f91821922f9e0ad2758f3d237de554635216a91c7e6a1bcbf6f", + "stateRoot" : "d76640536cdaeb91ba0198bbcbc9e2bb8a738dab503625f5669596f40f2a6304", + "timestamp" : "0x562792b0", + "transactionsTrie" : "5149a48eb3c814945420e6f2142f6623fcff83da406cdf63e0a6a0dbdb54e348", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "5", + "chainname" : "B", + "rlp" : "0xf90260f901f9a0a5c02da6aaa8ee56a2db23da446b8c3e214ab88acf431cdee8293eb883e59b0aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d76640536cdaeb91ba0198bbcbc9e2bb8a738dab503625f5669596f40f2a6304a05149a48eb3c814945420e6f2142f6623fcff83da406cdf63e0a6a0dbdb54e348a00690d5a2d2eb0f91821922f9e0ad2758f3d237de554635216a91c7e6a1bcbf6fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884562792b080a061e54d2ec9167e19aff29d104dcfa276c8d601c4ae5e43707e45bae7c32a5ef888590744ad23305fa9f861f85f050182795394095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca033fb62ffdc7a8d607a9ecf327b33b6973d9411af5cee552a1b237e7ee38bf28fa0305907808a1d8041dc7843ed98fb263efa50d52be97250f151d4d93762d0c0fbc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0x33fb62ffdc7a8d607a9ecf327b33b6973d9411af5cee552a1b237e7ee38bf28f", + "s" : "0x305907808a1d8041dc7843ed98fb263efa50d52be97250f151d4d93762d0c0fb", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "a5a0b9625ae316749b5f0e1430fe12ea24a201ad3d62a16ccb4c759366d50eda", + "mixHash" : "18b95c338eba4549ea7d2fcc62d97c909bd16388a098587224c82b8bf06a79bb", + "nonce" : "6fb788c9111c8441", + "number" : "0x04", + "parentHash" : "eb2fd962d848135db10000fd3d2735dfd1551b5b2ac732dc3304925b32aab189", + "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", + "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", + "timestamp" : "0x562792b4", + "transactionsTrie" : "139d0b218ce714e6d8c60f04e3e43078e3768ed5e40de25221f680fe241a41f0", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "chainname" : "A", + "rlp" : "0xf90260f901f9a0eb2fd962d848135db10000fd3d2735dfd1551b5b2ac732dc3304925b32aab189a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a0139d0b218ce714e6d8c60f04e3e43078e3768ed5e40de25221f680fe241a41f0a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd882520884562792b480a018b95c338eba4549ea7d2fcc62d97c909bd16388a098587224c82b8bf06a79bb886fb788c9111c8441f861f85f030182795394095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba01350169f6dac3ace2c1ee42f4402851cfe5d9cc258268230c682ee3fc9762ee3a00eac8172b26d2fc695c662ffd6c19ddb301a01d10c989d59c33aab01d1a9a31ec0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0x1350169f6dac3ace2c1ee42f4402851cfe5d9cc258268230c682ee3fc9762ee3", + "s" : "0x0eac8172b26d2fc695c662ffd6c19ddb301a01d10c989d59c33aab01d1a9a31e", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "073aa8d97d09d60286341e0580d1d28fc94d401f4ca2356cef8c006482f1f61c", + "mixHash" : "1678fdc3872141a396347827354111ec80eea4f47f716bcb456fbd548f2e2ac2", + "nonce" : "e51b80e474de5782", + "number" : "0x05", + "parentHash" : "a5a0b9625ae316749b5f0e1430fe12ea24a201ad3d62a16ccb4c759366d50eda", + "receiptTrie" : "e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9", + "stateRoot" : "72f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19", + "timestamp" : "0x562792b7", + "transactionsTrie" : "1d50e9a6f5983001b472f5596fa572d98f831446c2b0885a08a30238f85051f2", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "5", + "chainname" : "A", + "rlp" : "0xf90260f901f9a0a5a0b9625ae316749b5f0e1430fe12ea24a201ad3d62a16ccb4c759366d50edaa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a01d50e9a6f5983001b472f5596fa572d98f831446c2b0885a08a30238f85051f2a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008005832fefd882520884562792b780a01678fdc3872141a396347827354111ec80eea4f47f716bcb456fbd548f2e2ac288e51b80e474de5782f861f85f040182795394095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033cc70d54b8e7880ba8f715359b4dcaee854e9924cb3281798330c6089f6917fa0e982cb3f88b33966d43fb8b3d8d4e4067426f67b1e0fc3d75a41e29f4870aa69c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0x33cc70d54b8e7880ba8f715359b4dcaee854e9924cb3281798330c6089f6917f", + "s" : "0xe982cb3f88b33966d43fb8b3d8d4e4067426f67b1e0fc3d75a41e29f4870aa69", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "20d28e3dfc3d7d6ec268a6a8878f6e3f38b132f54649102c4dc39c6f5f27172a", + "mixHash" : "cf80d0eddd12b2c4d2f0ae244c9bc902efbf8d66fbd0c6f0a9503e60ef536495", + "nonce" : "48575d4b3b323853", + "number" : "0x06", + "parentHash" : "073aa8d97d09d60286341e0580d1d28fc94d401f4ca2356cef8c006482f1f61c", + "receiptTrie" : "849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01f", + "stateRoot" : "4fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640", + "timestamp" : "0x562792b9", + "transactionsTrie" : "deef00278ccbb8bbfb9fbcc0f428b08e6fa153dd1f81e7caf02803cf58bc34cf", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "chainname" : "A", + "rlp" : "0xf90260f901f9a0073aa8d97d09d60286341e0580d1d28fc94d401f4ca2356cef8c006482f1f61ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640a0deef00278ccbb8bbfb9fbcc0f428b08e6fa153dd1f81e7caf02803cf58bc34cfa0849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01fb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c006832fefd882520884562792b980a0cf80d0eddd12b2c4d2f0ae244c9bc902efbf8d66fbd0c6f0a9503e60ef5364958848575d4b3b323853f861f85f050182795394095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba08d326c3bdfb2da8ed6a61c86a6990d38c464e1d4366ca2dc1fbf7aaf474bb70ba0a062cd6e3d6e5fb139b192a476a5514c4ae91a27899f9a38d56c7c27542f65f6c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0x8d326c3bdfb2da8ed6a61c86a6990d38c464e1d4366ca2dc1fbf7aaf474bb70b", + "s" : "0xa062cd6e3d6e5fb139b192a476a5514c4ae91a27899f9a38d56c7c27542f65f6", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "3a47fa56df0850ca21e1d81c765899c4b5bf420b4f81f82fade3e14552902abb", + "mixHash" : "49f21a0e51edc1aaf2e39a4d858a4665da8169c8b382891e1c7272a2cedbfd2a", + "nonce" : "4b34fc135d0bfeca", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a049f21a0e51edc1aaf2e39a4d858a4665da8169c8b382891e1c7272a2cedbfd2a884b34fc135d0bfecac0c0", + "lastblockhash" : "20d28e3dfc3d7d6ec268a6a8878f6e3f38b132f54649102c4dc39c6f5f27172a", + "postState" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x3c", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x01a055690d9db9ec30", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e70b394", + "code" : "0x", + "nonce" : "0x06", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e72a000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "ChainAtoChainBtoChainAtoChainB" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "b2a4024e3f1e4b302c3c21103f8fd34e27f14e9da31e65d021e8c2fbb3f8bc84", + "mixHash" : "478a7224474461a84e7167896a750baed15955af4df482d92c7f3737075447dc", + "nonce" : "b686d92c02a725ef", + "number" : "0x01", + "parentHash" : "59f6d9a41a03e6e2b1c16c98bd805311ed4cc028eebacacbea62557c0d3c5670", + "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", + "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", + "timestamp" : "0x562792bb", + "transactionsTrie" : "1ef0dd57e0b513f6422f6802ff7f391aef79aa4382aaafd2b182a040bbd34c0a", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "A", + "rlp" : "0xf90261f901f9a059f6d9a41a03e6e2b1c16c98bd805311ed4cc028eebacacbea62557c0d3c5670a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a01ef0dd57e0b513f6422f6802ff7f391aef79aa4382aaafd2b182a040bbd34c0aa0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884562792bb80a0478a7224474461a84e7167896a750baed15955af4df482d92c7f3737075447dc88b686d92c02a725eff862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba034cb4e754702c2bd9c125a88c47d6fca5dc53163d2ce9ee894feba91612a3657a004dc41efac76833fa82cba1499142a0c06c6996159ee57800bf7547d4c79f405c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x34cb4e754702c2bd9c125a88c47d6fca5dc53163d2ce9ee894feba91612a3657", + "s" : "0x04dc41efac76833fa82cba1499142a0c06c6996159ee57800bf7547d4c79f405", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "6803649475ea7799b3ac293f192a5a2cacdb86f4a165d3f8a4b8bb86c785288c", + "mixHash" : "e2e215b2c603db670b10cf3b90388436589fb98749bc1d289936243d1637c49f", + "nonce" : "01887775ff51b0d3", + "number" : "0x02", + "parentHash" : "b2a4024e3f1e4b302c3c21103f8fd34e27f14e9da31e65d021e8c2fbb3f8bc84", + "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", + "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", + "timestamp" : "0x562792c0", + "transactionsTrie" : "8f3a99495fc317ecd10bbf47bcb0b9606f247633c73556d0885baabb7103f145", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0b2a4024e3f1e4b302c3c21103f8fd34e27f14e9da31e65d021e8c2fbb3f8bc84a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea08f3a99495fc317ecd10bbf47bcb0b9606f247633c73556d0885baabb7103f145a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884562792c080a0e2e215b2c603db670b10cf3b90388436589fb98749bc1d289936243d1637c49f8801887775ff51b0d3f862f86001018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0a929ef292410ace337848b090065f3feb72af5f8fb8f152b779f38923df65cd9a0b2111ca3a9a91fcbe4ab56040eda893b40c9434fa822a50047a3650834390fb1c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0xa929ef292410ace337848b090065f3feb72af5f8fb8f152b779f38923df65cd9", + "s" : "0xb2111ca3a9a91fcbe4ab56040eda893b40c9434fa822a50047a3650834390fb1", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "968cd54e3cb350ef0fec25dfa7b56417b3ead2847f905df52b641b3c72bc8ae2", + "mixHash" : "e43008b8f16fd43867924f62ac023713b70af87e3695059bfe02cb6c32bae948", + "nonce" : "688012ae95c48e7b", + "number" : "0x03", + "parentHash" : "6803649475ea7799b3ac293f192a5a2cacdb86f4a165d3f8a4b8bb86c785288c", + "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", + "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", + "timestamp" : "0x562792c2", + "transactionsTrie" : "c8ebc153a3d65e0f39d65a4c73bdf137bb7d6dc7573c741ca51cd529ec60ee86", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "A", + "rlp" : "0xf90261f901f9a06803649475ea7799b3ac293f192a5a2cacdb86f4a165d3f8a4b8bb86c785288ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a0c8ebc153a3d65e0f39d65a4c73bdf137bb7d6dc7573c741ca51cd529ec60ee86a04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884562792c280a0e43008b8f16fd43867924f62ac023713b70af87e3695059bfe02cb6c32bae94888688012ae95c48e7bf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0f9e9458b13d4a8cfee4b924b05df1c0d4118e256d10a103d558ef8bd682c14b2a034746e52a12e343262f2facdda7ded83be02b9838b0aae65f67ac75b9ba72ba8c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0xf9e9458b13d4a8cfee4b924b05df1c0d4118e256d10a103d558ef8bd682c14b2", + "s" : "0x34746e52a12e343262f2facdda7ded83be02b9838b0aae65f67ac75b9ba72ba8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "0a65b83216a9472908fbaf0658921c2b206ba78e7f37f8dda353e0f4bdbeb4b1", + "mixHash" : "bc006b7b096055aab756d7f94f73ddc875873be908857daac8047e90d433810c", + "nonce" : "a91388978773deb1", + "number" : "0x01", + "parentHash" : "59f6d9a41a03e6e2b1c16c98bd805311ed4cc028eebacacbea62557c0d3c5670", + "receiptTrie" : "bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbb", + "stateRoot" : "1b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4", + "timestamp" : "0x562792c3", + "transactionsTrie" : "9601bfdab3828f05593f6de6aaa8b76b8d9f8c78028b801393846a342bd54606", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "B", + "rlp" : "0xf90261f901f9a059f6d9a41a03e6e2b1c16c98bd805311ed4cc028eebacacbea62557c0d3c5670a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4a09601bfdab3828f05593f6de6aaa8b76b8d9f8c78028b801393846a342bd54606a0bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbbb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884562792c380a0bc006b7b096055aab756d7f94f73ddc875873be908857daac8047e90d433810c88a91388978773deb1f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0fda71b7d3f80155142a81c8937fe0b9606dfbd8c6eaa8257e3fa4372554e56c5a098f6b1504e30152b890e37ed83d59a7b4223b4e4565c19d5654ead237cfb4ad5c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0xfda71b7d3f80155142a81c8937fe0b9606dfbd8c6eaa8257e3fa4372554e56c5", + "s" : "0x98f6b1504e30152b890e37ed83d59a7b4223b4e4565c19d5654ead237cfb4ad5", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "b0c6c5b09ab48499bfda38b28ea53aae5a28f154a69cd2ff05e59f5b8d457ae7", + "mixHash" : "02ecd04742c5b80e0c586743cc5562d49cf8a77ee435c052d04b56a64236c3fa", + "nonce" : "1338b22c49803cf7", + "number" : "0x02", + "parentHash" : "0a65b83216a9472908fbaf0658921c2b206ba78e7f37f8dda353e0f4bdbeb4b1", + "receiptTrie" : "7fa6b426f40ed9fbcfdf1491008649c83e02bd4648492ff92d79de72c15cd11a", + "stateRoot" : "7cefe422fd5c4adc434377bf4b7ae17c091cbe1c6fc687986debbec9c432994b", + "timestamp" : "0x562792c8", + "transactionsTrie" : "9ebb62be04e292d0312a0e30466581c619b157e39bf72c49b1109998e167f07d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "B", + "rlp" : "0xf90260f901f9a00a65b83216a9472908fbaf0658921c2b206ba78e7f37f8dda353e0f4bdbeb4b1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07cefe422fd5c4adc434377bf4b7ae17c091cbe1c6fc687986debbec9c432994ba09ebb62be04e292d0312a0e30466581c619b157e39bf72c49b1109998e167f07da07fa6b426f40ed9fbcfdf1491008649c83e02bd4648492ff92d79de72c15cd11ab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884562792c880a002ecd04742c5b80e0c586743cc5562d49cf8a77ee435c052d04b56a64236c3fa881338b22c49803cf7f861f85f010182795394095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0d309754ce0f2b4aeb2ad69a4dc1064a172df018ed4bd3ac0960452940bb4ce01a09e674ede0a034da6aea1925ab99b30078c7461976fafca812020b5cf4b2d36c1c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0xd309754ce0f2b4aeb2ad69a4dc1064a172df018ed4bd3ac0960452940bb4ce01", + "s" : "0x9e674ede0a034da6aea1925ab99b30078c7461976fafca812020b5cf4b2d36c1", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0xa520", + "hash" : "89fea89380cf83f21e1eff14b563b90087f12a00d66ab2c7c92bd1c79ea78619", + "mixHash" : "94ae01708597b9e268b33cfc40d461e11e85c52f2114f48098614d5d71d7d1f1", + "nonce" : "c415fc1786cff6a0", + "number" : "0x03", + "parentHash" : "b0c6c5b09ab48499bfda38b28ea53aae5a28f154a69cd2ff05e59f5b8d457ae7", + "receiptTrie" : "5a02ed94a6e5d6c9bacd6a8b130e93e244ace661eea1cfeee0dd7d5d1e2b1040", + "stateRoot" : "95bfbb2eb79049c4803bc02673e07929eb22f99c786857b14d22a3de3b26ae55", + "timestamp" : "0x562792cc", + "transactionsTrie" : "8fcabe0483820971c2f08bfadbe5dadc033576eb138aad706e274870f6879897", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "B", + "rlp" : "0xf902c5f901f9a0b0c6c5b09ab48499bfda38b28ea53aae5a28f154a69cd2ff05e59f5b8d457ae7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a095bfbb2eb79049c4803bc02673e07929eb22f99c786857b14d22a3de3b26ae55a08fcabe0483820971c2f08bfadbe5dadc033576eb138aad706e274870f6879897a05a02ed94a6e5d6c9bacd6a8b130e93e244ace661eea1cfeee0dd7d5d1e2b1040b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882a52084562792cc80a094ae01708597b9e268b33cfc40d461e11e85c52f2114f48098614d5d71d7d1f188c415fc1786cff6a0f8c6f8630201827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca0c0ac2eb6b7926f7e86a4c861365056d6134b7ae5043e8f4179d1b78599f0abc0a0e26b3c51ecde939e1365b9dc7cc80d554f5f1951b4bbda8c0c9dd994b44afa7cf85f0301827b1594095e7baea6a6c7c4c2dfeb977efac326af552d8714801ba020126ee118fb6b05c9b1a3bb3ea3f571d2cc1e6269a359542beefcec59c94c8ca0bae5665013fb1b8ed2309a4758835883daa93a6c8881257585e412acaff69018c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0xc0ac2eb6b7926f7e86a4c861365056d6134b7ae5043e8f4179d1b78599f0abc0", + "s" : "0xe26b3c51ecde939e1365b9dc7cc80d554f5f1951b4bbda8c0c9dd994b44afa7c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + }, + { + "data" : "0x", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0x20126ee118fb6b05c9b1a3bb3ea3f571d2cc1e6269a359542beefcec59c94c8c", + "s" : "0xbae5665013fb1b8ed2309a4758835883daa93a6c8881257585e412acaff69018", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x14" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "bc4e3cd674b2cc6b4a0b9f152d5606aaca836c32fb7b6ee77e76f0e90e237d4d", + "mixHash" : "e56b76d4c740d5ce08ce7a92ae6cfbb0b6d23e9cc924613d2bca07a4e1b9b40f", + "nonce" : "5359a0ee111dfb06", + "number" : "0x04", + "parentHash" : "89fea89380cf83f21e1eff14b563b90087f12a00d66ab2c7c92bd1c79ea78619", + "receiptTrie" : "01b7ea0c86b233d8c5e352213671522789db46a5661ab28ce6cdca0586d59c89", + "stateRoot" : "f921b0ca9dc440556e39ff9d14a489bb74801e6725d6edb62d70e3ccc8ad758e", + "timestamp" : "0x562792ce", + "transactionsTrie" : "a4877320f75c6958b9b93af11f39f1dc0728c19419a0b345e46d7d53d1954905", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "chainname" : "B", + "rlp" : "0xf90260f901f9a089fea89380cf83f21e1eff14b563b90087f12a00d66ab2c7c92bd1c79ea78619a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f921b0ca9dc440556e39ff9d14a489bb74801e6725d6edb62d70e3ccc8ad758ea0a4877320f75c6958b9b93af11f39f1dc0728c19419a0b345e46d7d53d1954905a001b7ea0c86b233d8c5e352213671522789db46a5661ab28ce6cdca0586d59c89b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884562792ce80a0e56b76d4c740d5ce08ce7a92ae6cfbb0b6d23e9cc924613d2bca07a4e1b9b40f885359a0ee111dfb06f861f85f040182795394095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca0950af0e5a8bd64ba6bbaa6602c8b2c6e1bb99800eecfb7ea1840df95d45d3a97a0fe470baa22c4f27a702d202871adb4057dae639fa68d0bca68e50d430abf5252c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0x950af0e5a8bd64ba6bbaa6602c8b2c6e1bb99800eecfb7ea1840df95d45d3a97", + "s" : "0xfe470baa22c4f27a702d202871adb4057dae639fa68d0bca68e50d430abf5252", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "9884b87c42aa79d0db71aad455fc4b5e74f2ccd965e80dbcc07e901af2950346", + "mixHash" : "0c20ed1480c9d98a12d42c55fb66b7a6fd9c42324b0a494c0d6284c4ade3c98a", + "nonce" : "b1edd2b42e0b9dd6", + "number" : "0x05", + "parentHash" : "bc4e3cd674b2cc6b4a0b9f152d5606aaca836c32fb7b6ee77e76f0e90e237d4d", + "receiptTrie" : "0690d5a2d2eb0f91821922f9e0ad2758f3d237de554635216a91c7e6a1bcbf6f", + "stateRoot" : "d76640536cdaeb91ba0198bbcbc9e2bb8a738dab503625f5669596f40f2a6304", + "timestamp" : "0x562792d1", + "transactionsTrie" : "be396e16dfc55d04f8799adcddcd742075cf0a491d3d605dc6782560bc6b29fe", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "5", + "chainname" : "B", + "rlp" : "0xf90260f901f9a0bc4e3cd674b2cc6b4a0b9f152d5606aaca836c32fb7b6ee77e76f0e90e237d4da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d76640536cdaeb91ba0198bbcbc9e2bb8a738dab503625f5669596f40f2a6304a0be396e16dfc55d04f8799adcddcd742075cf0a491d3d605dc6782560bc6b29fea00690d5a2d2eb0f91821922f9e0ad2758f3d237de554635216a91c7e6a1bcbf6fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884562792d180a00c20ed1480c9d98a12d42c55fb66b7a6fd9c42324b0a494c0d6284c4ade3c98a88b1edd2b42e0b9dd6f861f85f050182795394095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba08e07ca252e5c9c19e7f535c74361f3eedd4b4d54830a6e111043929803ee00f3a08268f35dfb3ede6295b639659b19cb834c8b7ce6bd2131dd9bf968373018a0ddc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0x8e07ca252e5c9c19e7f535c74361f3eedd4b4d54830a6e111043929803ee00f3", + "s" : "0x8268f35dfb3ede6295b639659b19cb834c8b7ce6bd2131dd9bf968373018a0dd", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "23b0d5ae9e546ccee530067702f9da4ca28d42b49bb7eb86b0e3d4ac731a1742", + "mixHash" : "ab5bd33fae7a83c9f30c644cfcd06fda82130a5319dd46783af2039d5497704b", + "nonce" : "86317e8af5e069f6", + "number" : "0x04", + "parentHash" : "968cd54e3cb350ef0fec25dfa7b56417b3ead2847f905df52b641b3c72bc8ae2", + "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", + "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", + "timestamp" : "0x562792d3", + "transactionsTrie" : "1885b0491455f7cdec1a4b7e7c16b6b59e5c3da125a69c660e31c6c4c6f365d6", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "chainname" : "A", + "rlp" : "0xf90260f901f9a0968cd54e3cb350ef0fec25dfa7b56417b3ead2847f905df52b641b3c72bc8ae2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a01885b0491455f7cdec1a4b7e7c16b6b59e5c3da125a69c660e31c6c4c6f365d6a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd882520884562792d380a0ab5bd33fae7a83c9f30c644cfcd06fda82130a5319dd46783af2039d5497704b8886317e8af5e069f6f861f85f030182795394095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0664da5f51850d832dcae395deb257507d7da32185c265e02bdaca72cf4d1eb13a030afe7321ed84c92fc460e1faebeb62f2b8bd06baff7ffbf97229b723366f8d4c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0x664da5f51850d832dcae395deb257507d7da32185c265e02bdaca72cf4d1eb13", + "s" : "0x30afe7321ed84c92fc460e1faebeb62f2b8bd06baff7ffbf97229b723366f8d4", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "be86879d81bff4ac80a9c4fae046801acb9ec5cac9e5994eda26938596edbed8", + "mixHash" : "47123a9dd2e17927bc16d63d692e13beef496d76946b636100b038f6594ba93e", + "nonce" : "83929af72d532a4f", + "number" : "0x05", + "parentHash" : "23b0d5ae9e546ccee530067702f9da4ca28d42b49bb7eb86b0e3d4ac731a1742", + "receiptTrie" : "e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9", + "stateRoot" : "72f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19", + "timestamp" : "0x562792d6", + "transactionsTrie" : "0b87a4135d48037531ac8f632c50306852c3175cc5580b5c0f8d14064359c434", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "5", + "chainname" : "A", + "rlp" : "0xf90260f901f9a023b0d5ae9e546ccee530067702f9da4ca28d42b49bb7eb86b0e3d4ac731a1742a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a00b87a4135d48037531ac8f632c50306852c3175cc5580b5c0f8d14064359c434a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008005832fefd882520884562792d680a047123a9dd2e17927bc16d63d692e13beef496d76946b636100b038f6594ba93e8883929af72d532a4ff861f85f040182795394095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0d4a0e887ef810e8c897fd07e099f084b153a047f305c90f93cf5f151782045a5a0785e438b7e65609ce73aa460e625dee156197725cbb1bd61c244d8ae45ad5d7cc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0xd4a0e887ef810e8c897fd07e099f084b153a047f305c90f93cf5f151782045a5", + "s" : "0x785e438b7e65609ce73aa460e625dee156197725cbb1bd61c244d8ae45ad5d7c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "495ec2eac2baf047aa97d32de01fe6ba36b5e308535a7a6d8548b9d6a5ef1128", + "mixHash" : "91abb063701c843b311938b26b4b3c3f165ec7643664f5b840305b6747e0f787", + "nonce" : "92265861387ac4bd", + "number" : "0x06", + "parentHash" : "be86879d81bff4ac80a9c4fae046801acb9ec5cac9e5994eda26938596edbed8", + "receiptTrie" : "849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01f", + "stateRoot" : "4fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640", + "timestamp" : "0x562792d8", + "transactionsTrie" : "0a63577dc16925ab42007027a662a531d09ec7b95fb6f1ae60c867206a9f844c", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "chainname" : "A", + "rlp" : "0xf90260f901f9a0be86879d81bff4ac80a9c4fae046801acb9ec5cac9e5994eda26938596edbed8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640a00a63577dc16925ab42007027a662a531d09ec7b95fb6f1ae60c867206a9f844ca0849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01fb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c006832fefd882520884562792d880a091abb063701c843b311938b26b4b3c3f165ec7643664f5b840305b6747e0f7878892265861387ac4bdf861f85f050182795394095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0d9deaaeb125eb39e96168a16529024af2003fb0604f9813226c83a51dd3ffdf1a09513667a04e26765926a2217d04b800225d05ae4ba636ae1299b07b661178a53c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0xd9deaaeb125eb39e96168a16529024af2003fb0604f9813226c83a51dd3ffdf1", + "s" : "0x9513667a04e26765926a2217d04b800225d05ae4ba636ae1299b07b661178a53", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "2a90c6a3e9a40ac2747b9e8f1038aeab8cf7df6b4095e1db3e6f33127d93850f", + "mixHash" : "0ee0029ea1dd30723b097b847d776b9097b4c4ddcbbd3b9a4f09f23db95db3ee", + "nonce" : "837db0dedaea41e5", + "number" : "0x06", + "parentHash" : "9884b87c42aa79d0db71aad455fc4b5e74f2ccd965e80dbcc07e901af2950346", + "receiptTrie" : "7606e2eaf58eeb0d7486fd0429fde622baabcc2c289c6edb30066f81d4245713", + "stateRoot" : "88135803997dfd1cca34bcfbaa37985b298e564d2b1d3111b3d10309ea0019a6", + "timestamp" : "0x562792dc", + "transactionsTrie" : "a187b99cc88abc9ecbc9cde882bddca051c7789988c6d6c27314749989ed07b7", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "chainname" : "B", + "rlp" : "0xf90260f901f9a09884b87c42aa79d0db71aad455fc4b5e74f2ccd965e80dbcc07e901af2950346a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a088135803997dfd1cca34bcfbaa37985b298e564d2b1d3111b3d10309ea0019a6a0a187b99cc88abc9ecbc9cde882bddca051c7789988c6d6c27314749989ed07b7a07606e2eaf58eeb0d7486fd0429fde622baabcc2c289c6edb30066f81d4245713b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882520884562792dc80a00ee0029ea1dd30723b097b847d776b9097b4c4ddcbbd3b9a4f09f23db95db3ee88837db0dedaea41e5f861f85f060182795394095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca0e9465bd96ef1e7943447c1b03e29e0af0c64b2c75345e8b54f82b714472ba6d6a05dd8e13bd96a2612a25b8748731449f72f0b40f04ff48e51c9f1b9227bb1772cc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x06", + "r" : "0xe9465bd96ef1e7943447c1b03e29e0af0c64b2c75345e8b54f82b714472ba6d6", + "s" : "0x5dd8e13bd96a2612a25b8748731449f72f0b40f04ff48e51c9f1b9227bb1772c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "59f6d9a41a03e6e2b1c16c98bd805311ed4cc028eebacacbea62557c0d3c5670", + "mixHash" : "41ef98d434419b57f8a2ae19782ae1a8b8438f344c7fe6319c6919fefd312845", + "nonce" : "459b2c814d979f7d", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a041ef98d434419b57f8a2ae19782ae1a8b8438f344c7fe6319c6919fefd31284588459b2c814d979f7dc0c0", + "lastblockhash" : "2a90c6a3e9a40ac2747b9e8f1038aeab8cf7df6b4095e1db3e6f33127d93850f", + "postState" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x026c", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x01a055690d9dba3f48", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e705e4c", + "code" : "0x", + "nonce" : "0x07", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e72a000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "UncleFromSideChain" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "951bb65e74fc89b39560dc326f44b53382019c21f0404c43bcf8d967ac8bfd00", + "mixHash" : "9bf80875ef9fbd1fce8ad17dcdde3fa7c3721d8540f607cca92c2bc512343c86", + "nonce" : "cf5800eb259323f9", + "number" : "0x01", + "parentHash" : "9d16a6cf4da49fa291817db29b6b44186bb6741b2c2dcc18dd033c00ce59c767", + "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", + "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", + "timestamp" : "0x562792e2", + "transactionsTrie" : "5b113b6c7ba3a2f9655f84699131c1b518e1e5c1e4d5795d08d10dc505d077d2", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "A", + "rlp" : "0xf90261f901f9a09d16a6cf4da49fa291817db29b6b44186bb6741b2c2dcc18dd033c00ce59c767a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05b113b6c7ba3a2f9655f84699131c1b518e1e5c1e4d5795d08d10dc505d077d2a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884562792e280a09bf80875ef9fbd1fce8ad17dcdde3fa7c3721d8540f607cca92c2bc512343c8688cf5800eb259323f9f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba064d0e8f59da4f324fdd2aeb3fe4fcfe51fd7fa6127749c2ef97532fdf2250576a0b84684fe308ab7f93af9376456b355c8df49f131ff44db7e59febb78fd752073c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x64d0e8f59da4f324fdd2aeb3fe4fcfe51fd7fa6127749c2ef97532fdf2250576", + "s" : "0xb84684fe308ab7f93af9376456b355c8df49f131ff44db7e59febb78fd752073", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "0209b3cfd2e33a4dbd228ec1ca18720e1e46823a8277b836bb5ee124a8394b48", + "mixHash" : "c97a2398afc97e0c4b7cba8c975aa4e382a48632116cdfb19d2a67dba84e3839", + "nonce" : "dce08f042664ff8e", + "number" : "0x02", + "parentHash" : "951bb65e74fc89b39560dc326f44b53382019c21f0404c43bcf8d967ac8bfd00", + "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", + "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", + "timestamp" : "0x562792e4", + "transactionsTrie" : "518695e268f3f6e23b2431b107e8beced42f97f1a05e18654aff27a7eee08adf", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "A", + "rlp" : "0xf90261f901f9a0951bb65e74fc89b39560dc326f44b53382019c21f0404c43bcf8d967ac8bfd00a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0518695e268f3f6e23b2431b107e8beced42f97f1a05e18654aff27a7eee08adfa05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884562792e480a0c97a2398afc97e0c4b7cba8c975aa4e382a48632116cdfb19d2a67dba84e383988dce08f042664ff8ef862f86001018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0e1445a7e35672b8b73b70fad4f70a8217a0cd8cee6d03e01c5d1ee9f5d9fbb93a053082040e86376f04a7393296770e0c4b2fbf6599ce3eae23c9d7e39c796f9acc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0xe1445a7e35672b8b73b70fad4f70a8217a0cd8cee6d03e01c5d1ee9f5d9fbb93", + "s" : "0x53082040e86376f04a7393296770e0c4b2fbf6599ce3eae23c9d7e39c796f9ac", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "b6ab42485eec9a0c7a57dbf3029a1caf656cc9f0a65222ac8e51eadc11eff918", + "mixHash" : "70493c48429ee6edce2cd9fc49b5efba40908cc3fdc60c9773754152684851f4", + "nonce" : "558bf8bfdefc6482", + "number" : "0x03", + "parentHash" : "0209b3cfd2e33a4dbd228ec1ca18720e1e46823a8277b836bb5ee124a8394b48", + "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", + "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", + "timestamp" : "0x562792e7", + "transactionsTrie" : "2b176ee5ef1bac133d03a940c11bf1c56917dca276db4e474a2c30c4e7d16a8d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "A", + "rlp" : "0xf90261f901f9a00209b3cfd2e33a4dbd228ec1ca18720e1e46823a8277b836bb5ee124a8394b48a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a02b176ee5ef1bac133d03a940c11bf1c56917dca276db4e474a2c30c4e7d16a8da04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884562792e780a070493c48429ee6edce2cd9fc49b5efba40908cc3fdc60c9773754152684851f488558bf8bfdefc6482f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba00c3ee98dca8936d91e19159856c469b79c6a6d10d8a7c7942f195d1ae2413801a0d9a3ca334c79c32896e576c4b3198b34a84848a6e87e66e420311020bfbfda51c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x0c3ee98dca8936d91e19159856c469b79c6a6d10d8a7c7942f195d1ae2413801", + "s" : "0xd9a3ca334c79c32896e576c4b3198b34a84848a6e87e66e420311020bfbfda51", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "ed65b774e2c6813989f7ce827ccb888269359cb59fc1e8c7edc5c290b7182d6a", + "mixHash" : "f0c6a5f308e6b7a2728021636d7b61b6ddbbd3f32daaacc2f460ef5e2534a386", + "nonce" : "20d444ce83f5234a", + "number" : "0x01", + "parentHash" : "9d16a6cf4da49fa291817db29b6b44186bb6741b2c2dcc18dd033c00ce59c767", + "receiptTrie" : "bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbb", + "stateRoot" : "1b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4", + "timestamp" : "0x562792ea", + "transactionsTrie" : "90564217f45faf402d2b4373cc44f11dd1bff4a9a537e11476b809190850f79a", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "chainname" : "B", + "rlp" : "0xf90261f901f9a09d16a6cf4da49fa291817db29b6b44186bb6741b2c2dcc18dd033c00ce59c767a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01b5a6673bf1cb1fae85ff1aa7a851b9b3d7304908e62c30b9cb2da707be094a4a090564217f45faf402d2b4373cc44f11dd1bff4a9a537e11476b809190850f79aa0bcb5c54a9c1690fd2d9544f77f27c52ee53e82e21d6842f16787a38858225fbbb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884562792ea80a0f0c6a5f308e6b7a2728021636d7b61b6ddbbd3f32daaacc2f460ef5e2534a3868820d444ce83f5234af862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca02bad31ced8c1fbd0fe41fad1f7b1f580df4cb7120c9b84742d41938f68253a40a0575ef39988101f2a78fdb5c8abd8df6107f57bcfec6848e7e1a1564867b6a1e6c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x2bad31ced8c1fbd0fe41fad1f7b1f580df4cb7120c9b84742d41938f68253a40", + "s" : "0x575ef39988101f2a78fdb5c8abd8df6107f57bcfec6848e7e1a1564867b6a1e6", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "4dd201d9243306b52834dcf7903b175ef504580c69126383ec2b6987bcd82a9e", + "mixHash" : "ba0f7130aeb0f9e51b7f5064daac790d88080b729642b00d5f70dcace69c8c7f", + "nonce" : "01d52f8d2ae54716", + "number" : "0x02", + "parentHash" : "ed65b774e2c6813989f7ce827ccb888269359cb59fc1e8c7edc5c290b7182d6a", + "receiptTrie" : "7fa6b426f40ed9fbcfdf1491008649c83e02bd4648492ff92d79de72c15cd11a", + "stateRoot" : "7cefe422fd5c4adc434377bf4b7ae17c091cbe1c6fc687986debbec9c432994b", + "timestamp" : "0x562792ed", + "transactionsTrie" : "ed9fac8b2b5a5969d0ee545f35f4df41dbb0cf808943309c49f27570ebea8398", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "chainname" : "B", + "rlp" : "0xf90260f901f9a0ed65b774e2c6813989f7ce827ccb888269359cb59fc1e8c7edc5c290b7182d6aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07cefe422fd5c4adc434377bf4b7ae17c091cbe1c6fc687986debbec9c432994ba0ed9fac8b2b5a5969d0ee545f35f4df41dbb0cf808943309c49f27570ebea8398a07fa6b426f40ed9fbcfdf1491008649c83e02bd4648492ff92d79de72c15cd11ab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884562792ed80a0ba0f7130aeb0f9e51b7f5064daac790d88080b729642b00d5f70dcace69c8c7f8801d52f8d2ae54716f861f85f010182795394095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba00ace38fc608d95fa745e71161ef919b762749d38110c44337ee75ab0a910a6d6a0a5a5664c991ce243d9cfd885596bf1f9cac79a8017ba4163ddd2671cfdc330e0c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x0ace38fc608d95fa745e71161ef919b762749d38110c44337ee75ab0a910a6d6", + "s" : "0xa5a5664c991ce243d9cfd885596bf1f9cac79a8017ba4163ddd2671cfdc330e0", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0xa520", + "hash" : "381cb205612035b542c6f1a506d7233eda39b7b60d793e17b484cd522599d0f7", + "mixHash" : "fe6afe546e37cc6ba6c43ff3c0d0cc751d774732fe2ff1cac2c9a60825aa3bba", + "nonce" : "7c091e211e8b4a29", + "number" : "0x03", + "parentHash" : "4dd201d9243306b52834dcf7903b175ef504580c69126383ec2b6987bcd82a9e", + "receiptTrie" : "5a02ed94a6e5d6c9bacd6a8b130e93e244ace661eea1cfeee0dd7d5d1e2b1040", + "stateRoot" : "95bfbb2eb79049c4803bc02673e07929eb22f99c786857b14d22a3de3b26ae55", + "timestamp" : "0x562792f0", + "transactionsTrie" : "25a6086e92e9f51c453ffac6a9d9c57f88db47cfe49bea4be365bcc12c996908", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "chainname" : "B", + "rlp" : "0xf902c5f901f9a04dd201d9243306b52834dcf7903b175ef504580c69126383ec2b6987bcd82a9ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a095bfbb2eb79049c4803bc02673e07929eb22f99c786857b14d22a3de3b26ae55a025a6086e92e9f51c453ffac6a9d9c57f88db47cfe49bea4be365bcc12c996908a05a02ed94a6e5d6c9bacd6a8b130e93e244ace661eea1cfeee0dd7d5d1e2b1040b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882a52084562792f080a0fe6afe546e37cc6ba6c43ff3c0d0cc751d774732fe2ff1cac2c9a60825aa3bba887c091e211e8b4a29f8c6f8630201827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ba0db8dc4850a0283c5a10c9b22bef0011df40f65c8fc0f442913be2c6600c2b185a026838e13a1a1e2c083c6bc269ab96c4ec9c6b609377f17f5b3da50f817db16e4f85f0301827b1594095e7baea6a6c7c4c2dfeb977efac326af552d8714801ba02eaf3aa19dee3da1c4ecccc8d28d6f969bee549e596d92fe4192114302439d0ca0057c71b18b9cce8448b3c8e68ee667013043e39f8544ba47797f919e304d4b60c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0xdb8dc4850a0283c5a10c9b22bef0011df40f65c8fc0f442913be2c6600c2b185", + "s" : "0x26838e13a1a1e2c083c6bc269ab96c4ec9c6b609377f17f5b3da50f817db16e4", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + }, + { + "data" : "0x", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0x2eaf3aa19dee3da1c4ecccc8d28d6f969bee549e596d92fe4192114302439d0c", + "s" : "0x057c71b18b9cce8448b3c8e68ee667013043e39f8544ba47797f919e304d4b60", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x14" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blocknumber" : "4", + "chainname" : "B", + "rlp" : "0xf9045cf901f9a0381cb205612035b542c6f1a506d7233eda39b7b60d793e17b484cd522599d0f7a09e5d5a12cd0ef5a3886d123623a52682d3d7b458c9f882ec8272ce7825978c4b948888f1f195afa192cfee860698584c030f4c9db1a0f921b0ca9dc440556e39ff9d14a489bb74801e6725d6edb62d70e3ccc8ad758ea0d818eeb4c94992e48c77ab3820606c0380e4c277a518f4567c97721474ba859ea001b7ea0c86b233d8c5e352213671522789db46a5661ab28ce6cdca0586d59c89b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884562792f380a04d33a0cf893862caa7122cb245bb7a7c29101566a1c7cab459d74491eef6df5b88ca02ee8e8416f6cff861f85f040182795394095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca0b9e7902fbad441dbc77232a309b2eb1ba4fb8ccbad149c45bad8bea394ccd036a09e2ffc3a4e9b6d1a408536cbdfb2453dbcb21be40d198bfd74792391cafffb7df901faf901f7a00209b3cfd2e33a4dbd228ec1ca18720e1e46823a8277b836bb5ee124a8394b48a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd88084562792f280a03c49e41c4b013b02f1ed36187516f895534b87c9c1543d2e803e6e05dab4911c888159a5d0f256e3ef" + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "9d16a6cf4da49fa291817db29b6b44186bb6741b2c2dcc18dd033c00ce59c767", + "mixHash" : "aba1b1a3bc8c3a1d515f044713a059f0f9760e36625e425eb59bff6e08cd7a67", + "nonce" : "92d651880097c462", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0aba1b1a3bc8c3a1d515f044713a059f0f9760e36625e425eb59bff6e08cd7a678892d651880097c462c0c0", + "lastblockhash" : "b6ab42485eec9a0c7a57dbf3029a1caf656cc9f0a65222ac8e51eadc11eff918", + "postState" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x1e", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0xd02ab486cedcf618", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e71a9ca", + "code" : "0x", + "nonce" : "0x03", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e72a000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} diff --git a/tests/files/BlockchainTests/bcRPC_API_Test.json b/tests/files/BlockchainTests/bcRPC_API_Test.json index 30adb9b11..955e99c92 100644 --- a/tests/files/BlockchainTests/bcRPC_API_Test.json +++ b/tests/files/BlockchainTests/bcRPC_API_Test.json @@ -9,19 +9,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x078674", - "hash" : "8abdd180250955c0e96c8584fa5e7685169cd910be5de047d080ff63ef74fb4c", - "mixHash" : "7e41374cb58abc376d3b31b7150624907e0811c33f323c13853d691a5db84f40", - "nonce" : "53bcaa231efe9c73", + "hash" : "10aaf14a53caf27552325374429d3558398a36d3682ede6603c2c6511896e9f9", + "mixHash" : "552dd5ae3ccb7a278c6cedda27e48963101be56526a8ee8d70e8227f2c08edf0", + "nonce" : "bd2b1f0ebba7b989", "number" : "0x01", - "parentHash" : "2cea6f0c7c04b037b209a37d2b85d49579e38342fbaaf94a204fce57df270bc8", + "parentHash" : "f8f01382f5636d02edac7fff679a6feb7a572d37a395daaab77938feb6fe217f", "receiptTrie" : "a2bd925fcbb8b1ec39612553b17c9265ab198f5af25cc564655114bf5a28c75d", "stateRoot" : "ee57559895449b8dbd0a096b2999cf97b517b645ec8db33c7f5934778672263e", - "timestamp" : "0x55b7e4d0", + "timestamp" : "0x561bc2e0", "transactionsTrie" : "3ccbb984a0a736604acae327d9b643f8e75c7931cb2c6ac10dab4226e2e4c5a3", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "1", - "rlp" : "0xf90967f901faa02cea6f0c7c04b037b209a37d2b85d49579e38342fbaaf94a204fce57df270bc8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ee57559895449b8dbd0a096b2999cf97b517b645ec8db33c7f5934778672263ea03ccbb984a0a736604acae327d9b643f8e75c7931cb2c6ac10dab4226e2e4c5a3a0a2bd925fcbb8b1ec39612553b17c9265ab198f5af25cc564655114bf5a28c75db90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8830786748455b7e4d080a07e41374cb58abc376d3b31b7150624907e0811c33f323c13853d691a5db84f408853bcaa231efe9c73f90766f907638001832fefd8800ab907155b5b610705806100106000396000f3006000357c010000000000000000000000000000000000000000000000000000000090048063102accc11461012c57806312a7b9141461013a5780631774e6461461014c5780631e26fd331461015d5780631f9030371461016e578063343a875d1461018057806338cc4831146101955780634e7ad367146101bd57806357cb2fc4146101cb57806365538c73146101e057806368895979146101ee57806376bc21d9146102005780639a19a9531461020e5780639dc2c8f51461021f578063a53b1c1e1461022d578063a67808571461023e578063b61c05031461024c578063c2b12a731461025a578063d2282dc51461026b578063e30081a01461027c578063e8beef5b1461028d578063f38b06001461029b578063f5b53e17146102a9578063fd408767146102bb57005b6101346104d6565b60006000f35b61014261039b565b8060005260206000f35b610157600435610326565b60006000f35b6101686004356102c9565b60006000f35b610176610442565b8060005260206000f35b6101886103d3565b8060ff1660005260206000f35b61019d610413565b8073ffffffffffffffffffffffffffffffffffffffff1660005260206000f35b6101c56104c5565b60006000f35b6101d36103b7565b8060000b60005260206000f35b6101e8610454565b60006000f35b6101f6610401565b8060005260206000f35b61020861051f565b60006000f35b6102196004356102e5565b60006000f35b610227610693565b60006000f35b610238600435610342565b60006000f35b610246610484565b60006000f35b610254610493565b60006000f35b61026560043561038d565b60006000f35b610276600435610350565b60006000f35b61028760043561035e565b60006000f35b6102956105b4565b60006000f35b6102a3610547565b60006000f35b6102b16103ef565b8060005260206000f35b6102c3610600565b60006000f35b80600060006101000a81548160ff021916908302179055505b50565b80600060016101000a81548160ff02191690837f01000000000000000000000000000000000000000000000000000000000000009081020402179055505b50565b80600060026101000a81548160ff021916908302179055505b50565b806001600050819055505b50565b806002600050819055505b50565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b50565b806004600050819055505b50565b6000600060009054906101000a900460ff1690506103b4565b90565b6000600060019054906101000a900460000b90506103d0565b90565b6000600060029054906101000a900460ff1690506103ec565b90565b600060016000505490506103fe565b90565b60006002600050549050610410565b90565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061043f565b90565b60006004600050549050610451565b90565b7f65c9ac8011e286e89d02a269890f41d67ca2cc597b2c76c7c69321ff492be5806000602a81526020016000a15b565b6000602a81526020016000a05b565b60017f81933b308056e7e85668661dcd102b1f22795b4431f9cf4625794f381c271c6b6000602a81526020016000a25b565b60016000602a81526020016000a15b565b3373ffffffffffffffffffffffffffffffffffffffff1660017f0e216b62efbb97e751a2ce09f607048751720397ecfb9eef1e48a6644948985b6000602a81526020016000a35b565b3373ffffffffffffffffffffffffffffffffffffffff1660016000602a81526020016000a25b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001023373ffffffffffffffffffffffffffffffffffffffff1660017f317b31292193c2a4f561cc40a95ea0d97a2733f14af6d6d59522473e1f3ae65f6000602a81526020016000a45b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001023373ffffffffffffffffffffffffffffffffffffffff1660016000602a81526020016000a35b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001023373ffffffffffffffffffffffffffffffffffffffff1660017fd5f0a30e4be0c6be577a71eceb7464245a796a7e6a55c0d971837b250de05f4e60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe98152602001602a81526020016000a45b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001023373ffffffffffffffffffffffffffffffffffffffff16600160007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe98152602001602a81526020016000a35b561ca0e439aa8812c1c0a751b0931ea20c5a30cd54fe15cae883c59fd8107e04557679a058d025af99b538b778a47da8115c43d5cee564c3cc8d58eb972aaf80ea2c406ec0", + "rlp" : "0xf90967f901faa0f8f01382f5636d02edac7fff679a6feb7a572d37a395daaab77938feb6fe217fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ee57559895449b8dbd0a096b2999cf97b517b645ec8db33c7f5934778672263ea03ccbb984a0a736604acae327d9b643f8e75c7931cb2c6ac10dab4226e2e4c5a3a0a2bd925fcbb8b1ec39612553b17c9265ab198f5af25cc564655114bf5a28c75db90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88307867484561bc2e080a0552dd5ae3ccb7a278c6cedda27e48963101be56526a8ee8d70e8227f2c08edf088bd2b1f0ebba7b989f90766f907638001832fefd8800ab907155b5b610705806100106000396000f3006000357c010000000000000000000000000000000000000000000000000000000090048063102accc11461012c57806312a7b9141461013a5780631774e6461461014c5780631e26fd331461015d5780631f9030371461016e578063343a875d1461018057806338cc4831146101955780634e7ad367146101bd57806357cb2fc4146101cb57806365538c73146101e057806368895979146101ee57806376bc21d9146102005780639a19a9531461020e5780639dc2c8f51461021f578063a53b1c1e1461022d578063a67808571461023e578063b61c05031461024c578063c2b12a731461025a578063d2282dc51461026b578063e30081a01461027c578063e8beef5b1461028d578063f38b06001461029b578063f5b53e17146102a9578063fd408767146102bb57005b6101346104d6565b60006000f35b61014261039b565b8060005260206000f35b610157600435610326565b60006000f35b6101686004356102c9565b60006000f35b610176610442565b8060005260206000f35b6101886103d3565b8060ff1660005260206000f35b61019d610413565b8073ffffffffffffffffffffffffffffffffffffffff1660005260206000f35b6101c56104c5565b60006000f35b6101d36103b7565b8060000b60005260206000f35b6101e8610454565b60006000f35b6101f6610401565b8060005260206000f35b61020861051f565b60006000f35b6102196004356102e5565b60006000f35b610227610693565b60006000f35b610238600435610342565b60006000f35b610246610484565b60006000f35b610254610493565b60006000f35b61026560043561038d565b60006000f35b610276600435610350565b60006000f35b61028760043561035e565b60006000f35b6102956105b4565b60006000f35b6102a3610547565b60006000f35b6102b16103ef565b8060005260206000f35b6102c3610600565b60006000f35b80600060006101000a81548160ff021916908302179055505b50565b80600060016101000a81548160ff02191690837f01000000000000000000000000000000000000000000000000000000000000009081020402179055505b50565b80600060026101000a81548160ff021916908302179055505b50565b806001600050819055505b50565b806002600050819055505b50565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b50565b806004600050819055505b50565b6000600060009054906101000a900460ff1690506103b4565b90565b6000600060019054906101000a900460000b90506103d0565b90565b6000600060029054906101000a900460ff1690506103ec565b90565b600060016000505490506103fe565b90565b60006002600050549050610410565b90565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061043f565b90565b60006004600050549050610451565b90565b7f65c9ac8011e286e89d02a269890f41d67ca2cc597b2c76c7c69321ff492be5806000602a81526020016000a15b565b6000602a81526020016000a05b565b60017f81933b308056e7e85668661dcd102b1f22795b4431f9cf4625794f381c271c6b6000602a81526020016000a25b565b60016000602a81526020016000a15b565b3373ffffffffffffffffffffffffffffffffffffffff1660017f0e216b62efbb97e751a2ce09f607048751720397ecfb9eef1e48a6644948985b6000602a81526020016000a35b565b3373ffffffffffffffffffffffffffffffffffffffff1660016000602a81526020016000a25b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001023373ffffffffffffffffffffffffffffffffffffffff1660017f317b31292193c2a4f561cc40a95ea0d97a2733f14af6d6d59522473e1f3ae65f6000602a81526020016000a45b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001023373ffffffffffffffffffffffffffffffffffffffff1660016000602a81526020016000a35b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001023373ffffffffffffffffffffffffffffffffffffffff1660017fd5f0a30e4be0c6be577a71eceb7464245a796a7e6a55c0d971837b250de05f4e60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe98152602001602a81526020016000a45b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001023373ffffffffffffffffffffffffffffffffffffffff16600160007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe98152602001602a81526020016000a35b561ca0e439aa8812c1c0a751b0931ea20c5a30cd54fe15cae883c59fd8107e04557679a058d025af99b538b778a47da8115c43d5cee564c3cc8d58eb972aaf80ea2c406ec0", "transactions" : [ { "data" : "0x5b5b610705806100106000396000f3006000357c010000000000000000000000000000000000000000000000000000000090048063102accc11461012c57806312a7b9141461013a5780631774e6461461014c5780631e26fd331461015d5780631f9030371461016e578063343a875d1461018057806338cc4831146101955780634e7ad367146101bd57806357cb2fc4146101cb57806365538c73146101e057806368895979146101ee57806376bc21d9146102005780639a19a9531461020e5780639dc2c8f51461021f578063a53b1c1e1461022d578063a67808571461023e578063b61c05031461024c578063c2b12a731461025a578063d2282dc51461026b578063e30081a01461027c578063e8beef5b1461028d578063f38b06001461029b578063f5b53e17146102a9578063fd408767146102bb57005b6101346104d6565b60006000f35b61014261039b565b8060005260206000f35b610157600435610326565b60006000f35b6101686004356102c9565b60006000f35b610176610442565b8060005260206000f35b6101886103d3565b8060ff1660005260206000f35b61019d610413565b8073ffffffffffffffffffffffffffffffffffffffff1660005260206000f35b6101c56104c5565b60006000f35b6101d36103b7565b8060000b60005260206000f35b6101e8610454565b60006000f35b6101f6610401565b8060005260206000f35b61020861051f565b60006000f35b6102196004356102e5565b60006000f35b610227610693565b60006000f35b610238600435610342565b60006000f35b610246610484565b60006000f35b610254610493565b60006000f35b61026560043561038d565b60006000f35b610276600435610350565b60006000f35b61028760043561035e565b60006000f35b6102956105b4565b60006000f35b6102a3610547565b60006000f35b6102b16103ef565b8060005260206000f35b6102c3610600565b60006000f35b80600060006101000a81548160ff021916908302179055505b50565b80600060016101000a81548160ff02191690837f01000000000000000000000000000000000000000000000000000000000000009081020402179055505b50565b80600060026101000a81548160ff021916908302179055505b50565b806001600050819055505b50565b806002600050819055505b50565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b50565b806004600050819055505b50565b6000600060009054906101000a900460ff1690506103b4565b90565b6000600060019054906101000a900460000b90506103d0565b90565b6000600060029054906101000a900460ff1690506103ec565b90565b600060016000505490506103fe565b90565b60006002600050549050610410565b90565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061043f565b90565b60006004600050549050610451565b90565b7f65c9ac8011e286e89d02a269890f41d67ca2cc597b2c76c7c69321ff492be5806000602a81526020016000a15b565b6000602a81526020016000a05b565b60017f81933b308056e7e85668661dcd102b1f22795b4431f9cf4625794f381c271c6b6000602a81526020016000a25b565b60016000602a81526020016000a15b565b3373ffffffffffffffffffffffffffffffffffffffff1660017f0e216b62efbb97e751a2ce09f607048751720397ecfb9eef1e48a6644948985b6000602a81526020016000a35b565b3373ffffffffffffffffffffffffffffffffffffffff1660016000602a81526020016000a25b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001023373ffffffffffffffffffffffffffffffffffffffff1660017f317b31292193c2a4f561cc40a95ea0d97a2733f14af6d6d59522473e1f3ae65f6000602a81526020016000a45b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001023373ffffffffffffffffffffffffffffffffffffffff1660016000602a81526020016000a35b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001023373ffffffffffffffffffffffffffffffffffffffff1660017fd5f0a30e4be0c6be577a71eceb7464245a796a7e6a55c0d971837b250de05f4e60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe98152602001602a81526020016000a45b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001023373ffffffffffffffffffffffffffffffffffffffff16600160007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe98152602001602a81526020016000a35b56", @@ -46,19 +46,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x53f0", - "hash" : "898b73e85c9943bc99043543260a4939e8bed5efbaab066e32bfde2158efc303", - "mixHash" : "b60f4a57f972cb773f13ac3902fcbe58d1724474395da03ee3c5dac8da2f571d", - "nonce" : "43a69f344a720647", + "hash" : "0e29f455b8db7b15042efe9eabe0beb0ce2c7901919bba1107b1352191e09942", + "mixHash" : "a69a8faba7b51b68dec09647753d1657c918918b0adfc224749174eb0ce02fa9", + "nonce" : "f02576d9a03e7146", "number" : "0x02", - "parentHash" : "8abdd180250955c0e96c8584fa5e7685169cd910be5de047d080ff63ef74fb4c", + "parentHash" : "10aaf14a53caf27552325374429d3558398a36d3682ede6603c2c6511896e9f9", "receiptTrie" : "e9111d31a5282e8d68d1beaf1821405a9716182e2b780a724e1e6b78c609c6f3", "stateRoot" : "52cbd86e23f3cd03140f49302f32ace2583c5e046c91049eb10136266b932cac", - "timestamp" : "0x55b7e4d2", + "timestamp" : "0x561bc2e2", "transactionsTrie" : "f6f36662c7d5cd443067f551d9874f11a9dfc9c3cfd72388beb19e60b585938c", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "2", - "rlp" : "0xf90265f901f9a08abdd180250955c0e96c8584fa5e7685169cd910be5de047d080ff63ef74fb4ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a052cbd86e23f3cd03140f49302f32ace2583c5e046c91049eb10136266b932caca0f6f36662c7d5cd443067f551d9874f11a9dfc9c3cfd72388beb19e60b585938ca0e9111d31a5282e8d68d1beaf1821405a9716182e2b780a724e1e6b78c609c6f3b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88253f08455b7e4d280a0b60f4a57f972cb773f13ac3902fcbe58d1724474395da03ee3c5dac8da2f571d8843a69f344a720647f866f86401018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a8412a7b9141ba0ed2e0f715eccaab4362c19c1cf35ad8031ab1cabe71ada3fe8b269fe9d726712a06691074f289f826d23c92808ae363959eb958fb7a91fc721875ece4958114c65c0", + "rlp" : "0xf90265f901f9a010aaf14a53caf27552325374429d3558398a36d3682ede6603c2c6511896e9f9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a052cbd86e23f3cd03140f49302f32ace2583c5e046c91049eb10136266b932caca0f6f36662c7d5cd443067f551d9874f11a9dfc9c3cfd72388beb19e60b585938ca0e9111d31a5282e8d68d1beaf1821405a9716182e2b780a724e1e6b78c609c6f3b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88253f084561bc2e280a0a69a8faba7b51b68dec09647753d1657c918918b0adfc224749174eb0ce02fa988f02576d9a03e7146f866f86401018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a8412a7b9141ba0ed2e0f715eccaab4362c19c1cf35ad8031ab1cabe71ada3fe8b269fe9d726712a06691074f289f826d23c92808ae363959eb958fb7a91fc721875ece4958114c65c0", "transactions" : [ { "data" : "0x12a7b914", @@ -83,19 +83,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x549e", - "hash" : "919f41ce660b90012644edc0ef69f05588f02de351113a93ed49d11cbe71b6c3", - "mixHash" : "4c867e41354670814315c622291859475725313364569a98bbdd43006c899b7d", - "nonce" : "046976851aeb07e6", + "hash" : "3d813a0ffc9cd04436e17e3e9c309f1e80df0407078e50355ce0d570b5424812", + "mixHash" : "7b9a5ceb765790eefeb8dd32758060b36fda2183ee5da425a97541b33852608b", + "nonce" : "890822a131b9fe2a", "number" : "0x03", - "parentHash" : "898b73e85c9943bc99043543260a4939e8bed5efbaab066e32bfde2158efc303", + "parentHash" : "0e29f455b8db7b15042efe9eabe0beb0ce2c7901919bba1107b1352191e09942", "receiptTrie" : "cc75de830d98fc131e0095a1af48c448ac411cae96d7c0a19d75835ad5d34509", "stateRoot" : "e4538d357504f0e5cc1ee89e6eb5c31afe42c2ff947541b4a167ac6e8648bbdc", - "timestamp" : "0x55b7e4d4", + "timestamp" : "0x561bc2e4", "transactionsTrie" : "56d68ae8e838fd19419677280e63bc5445e967b5d7e486c622b51302a04f6580", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90265f901f9a0898b73e85c9943bc99043543260a4939e8bed5efbaab066e32bfde2158efc303a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e4538d357504f0e5cc1ee89e6eb5c31afe42c2ff947541b4a167ac6e8648bbdca056d68ae8e838fd19419677280e63bc5445e967b5d7e486c622b51302a04f6580a0cc75de830d98fc131e0095a1af48c448ac411cae96d7c0a19d75835ad5d34509b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882549e8455b7e4d480a04c867e41354670814315c622291859475725313364569a98bbdd43006c899b7d88046976851aeb07e6f866f86402018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a8457cb2fc41ba09dc3bf93e023b46d5d6d3ff2e62b06e10ba3877b8df69a408d8f8ec2ad8ea040a046c830e900919e5e0e6e48d413ad3f1f7906c6f0fe51c5d38431f3fe64622143c0", + "rlp" : "0xf90265f901f9a00e29f455b8db7b15042efe9eabe0beb0ce2c7901919bba1107b1352191e09942a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e4538d357504f0e5cc1ee89e6eb5c31afe42c2ff947541b4a167ac6e8648bbdca056d68ae8e838fd19419677280e63bc5445e967b5d7e486c622b51302a04f6580a0cc75de830d98fc131e0095a1af48c448ac411cae96d7c0a19d75835ad5d34509b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882549e84561bc2e480a07b9a5ceb765790eefeb8dd32758060b36fda2183ee5da425a97541b33852608b88890822a131b9fe2af866f86402018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a8457cb2fc41ba09dc3bf93e023b46d5d6d3ff2e62b06e10ba3877b8df69a408d8f8ec2ad8ea040a046c830e900919e5e0e6e48d413ad3f1f7906c6f0fe51c5d38431f3fe64622143c0", "transactions" : [ { "data" : "0x57cb2fc4", @@ -120,19 +120,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5458", - "hash" : "72b72d9306c7238d5f257553e1385782e5dcb5b3f8e9d24acdd540ee9d49e38b", - "mixHash" : "f26606102e919a9de622224235065ab6dff4d34d01cd949f647eb9a99bdb7a6b", - "nonce" : "aab3a8bb71e7e440", + "hash" : "4e9a67b663f9abe03e7e9fd5452c9497998337077122f44ee78a466f6a7358de", + "mixHash" : "47d2cba8e860e8784166293f9494918502e91adac3ab328151bcf9290dd54506", + "nonce" : "259e3a61cfa63d07", "number" : "0x04", - "parentHash" : "919f41ce660b90012644edc0ef69f05588f02de351113a93ed49d11cbe71b6c3", + "parentHash" : "3d813a0ffc9cd04436e17e3e9c309f1e80df0407078e50355ce0d570b5424812", "receiptTrie" : "7ed8026cf72ed0e98e6fd53ab406e51ffd34397d9da0052494ff41376fda7b5f", "stateRoot" : "68805721294e365020aca15ed56c360d9dc2cf03cbeff84c9b84b8aed023bfb5", - "timestamp" : "0x55b7e4d5", + "timestamp" : "0x561bc2ea", "transactionsTrie" : "97a593d8d7e15b57f5c6bb25bc6c325463ef99f874bc08a78656c3ab5cb23262", - "uncleHash" : "640e8e8fd784f7d8e9af58ffa64fa5b1577697d1b03b79645452f6150de51c95" + "uncleHash" : "ef6bd204aa862087c8100818ecb02c1273f1f84ce603fba9c702491ced36e704" }, "blocknumber" : "4", - "rlp" : "0xf9065bf901f9a0919f41ce660b90012644edc0ef69f05588f02de351113a93ed49d11cbe71b6c3a0640e8e8fd784f7d8e9af58ffa64fa5b1577697d1b03b79645452f6150de51c95948888f1f195afa192cfee860698584c030f4c9db1a068805721294e365020aca15ed56c360d9dc2cf03cbeff84c9b84b8aed023bfb5a097a593d8d7e15b57f5c6bb25bc6c325463ef99f874bc08a78656c3ab5cb23262a07ed8026cf72ed0e98e6fd53ab406e51ffd34397d9da0052494ff41376fda7b5fb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88254588455b7e4d580a0f26606102e919a9de622224235065ab6dff4d34d01cd949f647eb9a99bdb7a6b88aab3a8bb71e7e440f866f86403018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84343a875d1ca0e267b43407d35d8dec3c4b5b4a2f18d9eec4833c9632c1d1144be17640ca2017a0488259fc3d1495b356033c85218665f07c5fa75ebd30e5dfd3771c3ad3dae8f5f903f4f901f7a08abdd180250955c0e96c8584fa5e7685169cd910be5de047d080ff63ef74fb4ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794a94f5374fce5edbc8e2a8697c15331677e6ebf0ba0ee57559895449b8dbd0a096b2999cf97b517b645ec8db33c7f5934778672263ea056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e4d580a0601624cf8fd765f895a8abe4031fba8bd6fcc5d8c7040717926b0580a63a81ff88c4d3ca95aa3e8acdf901f7a08abdd180250955c0e96c8584fa5e7685169cd910be5de047d080ff63ef74fb4ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0ee57559895449b8dbd0a096b2999cf97b517b645ec8db33c7f5934778672263ea056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e4d680a08a85721736b69977bc19ed5fce503a7c475ef667a9b68034761e5aa57c0ac32188b03a39f76c5299af", + "rlp" : "0xf9065bf901f9a03d813a0ffc9cd04436e17e3e9c309f1e80df0407078e50355ce0d570b5424812a0ef6bd204aa862087c8100818ecb02c1273f1f84ce603fba9c702491ced36e704948888f1f195afa192cfee860698584c030f4c9db1a068805721294e365020aca15ed56c360d9dc2cf03cbeff84c9b84b8aed023bfb5a097a593d8d7e15b57f5c6bb25bc6c325463ef99f874bc08a78656c3ab5cb23262a07ed8026cf72ed0e98e6fd53ab406e51ffd34397d9da0052494ff41376fda7b5fb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882545884561bc2ea80a047d2cba8e860e8784166293f9494918502e91adac3ab328151bcf9290dd5450688259e3a61cfa63d07f866f86403018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84343a875d1ca0e267b43407d35d8dec3c4b5b4a2f18d9eec4833c9632c1d1144be17640ca2017a0488259fc3d1495b356033c85218665f07c5fa75ebd30e5dfd3771c3ad3dae8f5f903f4f901f7a010aaf14a53caf27552325374429d3558398a36d3682ede6603c2c6511896e9f9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794a94f5374fce5edbc8e2a8697c15331677e6ebf0ba0ee57559895449b8dbd0a096b2999cf97b517b645ec8db33c7f5934778672263ea056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc2e780a0e970d9815a634e25a778a765764d91ecc80d667a85721dcd4297d00be8d2af298864050e6ee4c2f3c7f901f7a010aaf14a53caf27552325374429d3558398a36d3682ede6603c2c6511896e9f9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0ee57559895449b8dbd0a096b2999cf97b517b645ec8db33c7f5934778672263ea056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc2e780a0bda8cd85288f2766a1757b7fbddaca97690976247b46f19f7e807c615900f66488b1593471fa7094d5", "transactions" : [ { "data" : "0x343a875d", @@ -154,14 +154,14 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "1ee06d1e9c73cf930b3f38dbcdd929562146cc6b8e0b8e5ada308f426b1ec199", - "mixHash" : "601624cf8fd765f895a8abe4031fba8bd6fcc5d8c7040717926b0580a63a81ff", - "nonce" : "c4d3ca95aa3e8acd", + "hash" : "9fbaff6f69e4f47a09fb30a14baadf2435bd1ad1f1940e7e985de0b3acff4e0a", + "mixHash" : "e970d9815a634e25a778a765764d91ecc80d667a85721dcd4297d00be8d2af29", + "nonce" : "64050e6ee4c2f3c7", "number" : "0x02", - "parentHash" : "8abdd180250955c0e96c8584fa5e7685169cd910be5de047d080ff63ef74fb4c", + "parentHash" : "10aaf14a53caf27552325374429d3558398a36d3682ede6603c2c6511896e9f9", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "ee57559895449b8dbd0a096b2999cf97b517b645ec8db33c7f5934778672263e", - "timestamp" : "0x55b7e4d5", + "timestamp" : "0x561bc2e7", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, @@ -172,14 +172,14 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "f949f78977a6028bb9a3f8e53d5ee0b1e89792497472f5e0fe136191cf0e7cd7", - "mixHash" : "8a85721736b69977bc19ed5fce503a7c475ef667a9b68034761e5aa57c0ac321", - "nonce" : "b03a39f76c5299af", + "hash" : "6dda9c9a716b7378ffabb3b9d7b42ea3f2133f702beb8ed2901ac91eae0624d4", + "mixHash" : "bda8cd85288f2766a1757b7fbddaca97690976247b46f19f7e807c615900f664", + "nonce" : "b1593471fa7094d5", "number" : "0x02", - "parentHash" : "8abdd180250955c0e96c8584fa5e7685169cd910be5de047d080ff63ef74fb4c", + "parentHash" : "10aaf14a53caf27552325374429d3558398a36d3682ede6603c2c6511896e9f9", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "ee57559895449b8dbd0a096b2999cf97b517b645ec8db33c7f5934778672263e", - "timestamp" : "0x55b7e4d6", + "timestamp" : "0x561bc2e7", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" } @@ -193,19 +193,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x559f", - "hash" : "a0bcfb6c6f885efaf3cf21b52b9e8100524198cdc27eaad1f44d5cb5dffad3a7", - "mixHash" : "a220503c6d55c4daae34063f4f5ea9bfd6d9694506df681e7f5e998d522f55c6", - "nonce" : "d6434ad563d00f5a", + "hash" : "609427ccfeae6d2a930927c9a29a0a3077cac7e4b5826159586b10e25770eef9", + "mixHash" : "1657e6f42fc186c23d921ba9bcf93f287db353762682f675fa3969757e410e00", + "nonce" : "b65c663250417c60", "number" : "0x05", - "parentHash" : "72b72d9306c7238d5f257553e1385782e5dcb5b3f8e9d24acdd540ee9d49e38b", + "parentHash" : "4e9a67b663f9abe03e7e9fd5452c9497998337077122f44ee78a466f6a7358de", "receiptTrie" : "01bf16fce84572feb648e5f3487eb3b6648a49639888a90eb552aa661f38f8bd", "stateRoot" : "0c7a49b1ae3138ae33d88b21d5543b8d2c8e2377bd2b58e73db8ea8924395ff4", - "timestamp" : "0x55b7e4d9", + "timestamp" : "0x561bc2ec", "transactionsTrie" : "d8672f45d109c2e0b27acf68fd67b9eae14957fd2bf2444210ee0d7e97bc68a6", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "5", - "rlp" : "0xf90265f901f9a072b72d9306c7238d5f257553e1385782e5dcb5b3f8e9d24acdd540ee9d49e38ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c7a49b1ae3138ae33d88b21d5543b8d2c8e2377bd2b58e73db8ea8924395ff4a0d8672f45d109c2e0b27acf68fd67b9eae14957fd2bf2444210ee0d7e97bc68a6a001bf16fce84572feb648e5f3487eb3b6648a49639888a90eb552aa661f38f8bdb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882559f8455b7e4d980a0a220503c6d55c4daae34063f4f5ea9bfd6d9694506df681e7f5e998d522f55c688d6434ad563d00f5af866f86404018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84f5b53e171ca01c07bd41fc821f95b9f543b080c520654727f9cf829800f789c3b03b8de8b326a0259c8aceea2d462192d95f9d6b7cb9e0bf2a6d549c3a4111194fdd22105728f5c0", + "rlp" : "0xf90265f901f9a04e9a67b663f9abe03e7e9fd5452c9497998337077122f44ee78a466f6a7358dea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c7a49b1ae3138ae33d88b21d5543b8d2c8e2377bd2b58e73db8ea8924395ff4a0d8672f45d109c2e0b27acf68fd67b9eae14957fd2bf2444210ee0d7e97bc68a6a001bf16fce84572feb648e5f3487eb3b6648a49639888a90eb552aa661f38f8bdb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882559f84561bc2ec80a01657e6f42fc186c23d921ba9bcf93f287db353762682f675fa3969757e410e0088b65c663250417c60f866f86404018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84f5b53e171ca01c07bd41fc821f95b9f543b080c520654727f9cf829800f789c3b03b8de8b326a0259c8aceea2d462192d95f9d6b7cb9e0bf2a6d549c3a4111194fdd22105728f5c0", "transactions" : [ { "data" : "0xf5b53e17", @@ -230,19 +230,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5497", - "hash" : "bbc13add998d83d48c19a723619d3bcf866fabe43046f5895c964adafc4ae6aa", - "mixHash" : "a47ad398f4d5448b5be4e8eebcf2806cf25cdbf4405abae7622fe7aca27aae29", - "nonce" : "78e6b500ae20efa5", + "hash" : "666c5e63d52c4f8fb56830158e84ca903081f45929aedb5045c649645b410751", + "mixHash" : "ca00769707d34e210334aeae8879ab57649badd44f6b55cfe0f93b0217ecafeb", + "nonce" : "1e1d9fec5fe4f930", "number" : "0x06", - "parentHash" : "a0bcfb6c6f885efaf3cf21b52b9e8100524198cdc27eaad1f44d5cb5dffad3a7", + "parentHash" : "609427ccfeae6d2a930927c9a29a0a3077cac7e4b5826159586b10e25770eef9", "receiptTrie" : "b313ec0f4baf95a785eeef299ca0949ca993633e5b7d6ad3f411810c2ef67315", "stateRoot" : "0d2c014ca769e42692557860ee09316aba9df04fa7684a22c0d8cacec60ff15a", - "timestamp" : "0x55b7e4da", + "timestamp" : "0x561bc2ef", "transactionsTrie" : "8201175f277007fa3de767711aee4f543841208c9d6411f4ecca7cf285f363b9", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "6", - "rlp" : "0xf90265f901f9a0a0bcfb6c6f885efaf3cf21b52b9e8100524198cdc27eaad1f44d5cb5dffad3a7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00d2c014ca769e42692557860ee09316aba9df04fa7684a22c0d8cacec60ff15aa08201175f277007fa3de767711aee4f543841208c9d6411f4ecca7cf285f363b9a0b313ec0f4baf95a785eeef299ca0949ca993633e5b7d6ad3f411810c2ef67315b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd88254978455b7e4da80a0a47ad398f4d5448b5be4e8eebcf2806cf25cdbf4405abae7622fe7aca27aae298878e6b500ae20efa5f866f86405018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84688959791ca0b7927d06ce01c6c1d9bab2999104c7ccdb68ddfc9e31cb12b3607b96a18fcb42a044ea07ec88f82c06f1ca26ca0a427f47c8a32b6f64cd0ecda3c44688007b445ac0", + "rlp" : "0xf90265f901f9a0609427ccfeae6d2a930927c9a29a0a3077cac7e4b5826159586b10e25770eef9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00d2c014ca769e42692557860ee09316aba9df04fa7684a22c0d8cacec60ff15aa08201175f277007fa3de767711aee4f543841208c9d6411f4ecca7cf285f363b9a0b313ec0f4baf95a785eeef299ca0949ca993633e5b7d6ad3f411810c2ef67315b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882549784561bc2ef80a0ca00769707d34e210334aeae8879ab57649badd44f6b55cfe0f93b0217ecafeb881e1d9fec5fe4f930f866f86405018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84688959791ca0b7927d06ce01c6c1d9bab2999104c7ccdb68ddfc9e31cb12b3607b96a18fcb42a044ea07ec88f82c06f1ca26ca0a427f47c8a32b6f64cd0ecda3c44688007b445ac0", "transactions" : [ { "data" : "0x68895979", @@ -267,19 +267,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5464", - "hash" : "197f690b831d3d4c4664573ae7afc2f69fd06159f690d5c557d11ada1ce477ca", - "mixHash" : "1e407a69e300fef0f64469d09ec705c30d49793aa876828562c74e18cef288cb", - "nonce" : "ce0097a56fb7a088", + "hash" : "4997e4f37ac249fec5dc4cefce8ceaa2671689c25c5a739f9360f5773ed24e36", + "mixHash" : "fdb494565b5a211f2924c70f8230af553940d028597ebb700549aa7d54db338a", + "nonce" : "8988e5692e30f5d1", "number" : "0x07", - "parentHash" : "bbc13add998d83d48c19a723619d3bcf866fabe43046f5895c964adafc4ae6aa", + "parentHash" : "666c5e63d52c4f8fb56830158e84ca903081f45929aedb5045c649645b410751", "receiptTrie" : "f6556d82da2cbecd9cea48c0104f42fbb1801a93760099c3da6bb2e723521d75", "stateRoot" : "b0a6edc04738fcb908eca1e2019a4b3e3b4e353a8460c207da64d1d2593d4b7c", - "timestamp" : "0x55b7e4dd", + "timestamp" : "0x561bc2f1", "transactionsTrie" : "e292810aaa47797a9477d20b5e780b3ce062f97a75a9c6ea9f666fa5a6d01fa6", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "7", - "rlp" : "0xf90265f901f9a0bbc13add998d83d48c19a723619d3bcf866fabe43046f5895c964adafc4ae6aaa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b0a6edc04738fcb908eca1e2019a4b3e3b4e353a8460c207da64d1d2593d4b7ca0e292810aaa47797a9477d20b5e780b3ce062f97a75a9c6ea9f666fa5a6d01fa6a0f6556d82da2cbecd9cea48c0104f42fbb1801a93760099c3da6bb2e723521d75b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd88254648455b7e4dd80a01e407a69e300fef0f64469d09ec705c30d49793aa876828562c74e18cef288cb88ce0097a56fb7a088f866f86406018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a8438cc48311ba0ba6d6539e741114d9d1c6b8e1f773d21108bba39058a8b21ebfde65206b8e056a06b3d13ce255e5bbb29e6e736cd351bad7d2380950e5b39a44b4fd120ab187a68c0", + "rlp" : "0xf90265f901f9a0666c5e63d52c4f8fb56830158e84ca903081f45929aedb5045c649645b410751a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b0a6edc04738fcb908eca1e2019a4b3e3b4e353a8460c207da64d1d2593d4b7ca0e292810aaa47797a9477d20b5e780b3ce062f97a75a9c6ea9f666fa5a6d01fa6a0f6556d82da2cbecd9cea48c0104f42fbb1801a93760099c3da6bb2e723521d75b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882546484561bc2f180a0fdb494565b5a211f2924c70f8230af553940d028597ebb700549aa7d54db338a888988e5692e30f5d1f866f86406018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a8438cc48311ba0ba6d6539e741114d9d1c6b8e1f773d21108bba39058a8b21ebfde65206b8e056a06b3d13ce255e5bbb29e6e736cd351bad7d2380950e5b39a44b4fd120ab187a68c0", "transactions" : [ { "data" : "0x38cc4831", @@ -304,19 +304,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5413", - "hash" : "6d643540a0de1eeaab8cf5d4e6ca79cb46d81b146ed70724a0112b07a41cc0d5", - "mixHash" : "a759cdd414cb2d993089e97bb28317b7c441aaae61130ed1c0a988de0d0fa474", - "nonce" : "e8e6cea4cf2c2291", + "hash" : "45f6111842923d5154a5aed97318ed56ed2a2c2d93ac9e1cb7383fb3cf937374", + "mixHash" : "1965d553bdd31dcd04b890cfd58addf363e95ad8fbf8d2f61edd77a784a7118a", + "nonce" : "a8083f8b1f7c50ee", "number" : "0x08", - "parentHash" : "197f690b831d3d4c4664573ae7afc2f69fd06159f690d5c557d11ada1ce477ca", + "parentHash" : "4997e4f37ac249fec5dc4cefce8ceaa2671689c25c5a739f9360f5773ed24e36", "receiptTrie" : "dc3b367fe42e476791a74e86b5ac2bc87e7ba7232a3fa6b54d6a3ec4093119cb", "stateRoot" : "52936ad1ec2e2a05cd8a02b48fe7b4ed7e470c90c1daef120942e8e431a6db61", - "timestamp" : "0x55b7e4df", + "timestamp" : "0x561bc2f4", "transactionsTrie" : "43a5c54589705d2dacf5108a2c69f165b980f56d8d8ac17048321dee038165e5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "8", - "rlp" : "0xf90265f901f9a0197f690b831d3d4c4664573ae7afc2f69fd06159f690d5c557d11ada1ce477caa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a052936ad1ec2e2a05cd8a02b48fe7b4ed7e470c90c1daef120942e8e431a6db61a043a5c54589705d2dacf5108a2c69f165b980f56d8d8ac17048321dee038165e5a0dc3b367fe42e476791a74e86b5ac2bc87e7ba7232a3fa6b54d6a3ec4093119cbb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd88254138455b7e4df80a0a759cdd414cb2d993089e97bb28317b7c441aaae61130ed1c0a988de0d0fa47488e8e6cea4cf2c2291f866f86407018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a841f9030371ca00d4e17e818f1032841ba5ecd894db0d4832e1c088a92b3abf90306c0c970091da071574730eeb727a0362ac0f92a8326863efb4fb1c53081fe5d3432841bee096cc0", + "rlp" : "0xf90265f901f9a04997e4f37ac249fec5dc4cefce8ceaa2671689c25c5a739f9360f5773ed24e36a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a052936ad1ec2e2a05cd8a02b48fe7b4ed7e470c90c1daef120942e8e431a6db61a043a5c54589705d2dacf5108a2c69f165b980f56d8d8ac17048321dee038165e5a0dc3b367fe42e476791a74e86b5ac2bc87e7ba7232a3fa6b54d6a3ec4093119cbb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd882541384561bc2f480a01965d553bdd31dcd04b890cfd58addf363e95ad8fbf8d2f61edd77a784a7118a88a8083f8b1f7c50eef866f86407018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a841f9030371ca00d4e17e818f1032841ba5ecd894db0d4832e1c088a92b3abf90306c0c970091da071574730eeb727a0362ac0f92a8326863efb4fb1c53081fe5d3432841bee096cc0", "transactions" : [ { "data" : "0x1f903037", @@ -341,19 +341,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0xa2f8", - "hash" : "5aae960b62f001e2dd6eaeba09a0c9a83f7e819c33ca6a83ced3826a136c7445", - "mixHash" : "00f6c1267d4ff226fac0e6235a5e1117817073b0973164867f89534a7c3ae0c9", - "nonce" : "b5363162fb1f096e", + "hash" : "0362d0ee919714b702cb31d2f4fe6b5c834f36cc19558acb81a4832f86738e39", + "mixHash" : "1de8a1da080144a41ba087e17d71dbea97877b040af2bb51d921a72e5b7a7730", + "nonce" : "b368286424a9d36f", "number" : "0x09", - "parentHash" : "6d643540a0de1eeaab8cf5d4e6ca79cb46d81b146ed70724a0112b07a41cc0d5", + "parentHash" : "45f6111842923d5154a5aed97318ed56ed2a2c2d93ac9e1cb7383fb3cf937374", "receiptTrie" : "ca1baec0669065e3e3e8fe64f331504473b9eb69d1626edd11f38f9462b72539", "stateRoot" : "a8aca172de729c7ccef4d4c730e12c55d7d754c60cd4e5b14c7d359bf3974858", - "timestamp" : "0x55b7e4e0", + "timestamp" : "0x561bc2f6", "transactionsTrie" : "7eeae6b704fe5d39b01774ea298a5d17ca22d851bdb7fb8b6975723e03ff73de", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "9", - "rlp" : "0xf90285f901f9a06d643540a0de1eeaab8cf5d4e6ca79cb46d81b146ed70724a0112b07a41cc0d5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a8aca172de729c7ccef4d4c730e12c55d7d754c60cd4e5b14c7d359bf3974858a07eeae6b704fe5d39b01774ea298a5d17ca22d851bdb7fb8b6975723e03ff73dea0ca1baec0669065e3e3e8fe64f331504473b9eb69d1626edd11f38f9462b72539b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd882a2f88455b7e4e080a000f6c1267d4ff226fac0e6235a5e1117817073b0973164867f89534a7c3ae0c988b5363162fb1f096ef886f88408018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0aa41e26fd3300000000000000000000000000000000000000000000000000000000000000011ba048ffcb6701d05e9c7e4f0e019c629b63c0062fb7f43b3e9e6fe905b723568baea07f2dce55f84070c34b6b8002b59f791cefd4801ee5110bef669ef20588c1c863c0", + "rlp" : "0xf90285f901f9a045f6111842923d5154a5aed97318ed56ed2a2c2d93ac9e1cb7383fb3cf937374a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a8aca172de729c7ccef4d4c730e12c55d7d754c60cd4e5b14c7d359bf3974858a07eeae6b704fe5d39b01774ea298a5d17ca22d851bdb7fb8b6975723e03ff73dea0ca1baec0669065e3e3e8fe64f331504473b9eb69d1626edd11f38f9462b72539b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd882a2f884561bc2f680a01de8a1da080144a41ba087e17d71dbea97877b040af2bb51d921a72e5b7a773088b368286424a9d36ff886f88408018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0aa41e26fd3300000000000000000000000000000000000000000000000000000000000000011ba048ffcb6701d05e9c7e4f0e019c629b63c0062fb7f43b3e9e6fe905b723568baea07f2dce55f84070c34b6b8002b59f791cefd4801ee5110bef669ef20588c1c863c0", "transactions" : [ { "data" : "0x1e26fd330000000000000000000000000000000000000000000000000000000000000001", @@ -378,19 +378,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x6860", - "hash" : "9e08d11e79ad24424b300f9ce05b419e31552e342153d089e5ef57579c2caebb", - "mixHash" : "5f73d43c5f24f80a671c07549e82e806aeca34e27dbddee21d66f5ee72620b2d", - "nonce" : "7196e9ae176810d4", + "hash" : "c37f28ec7d58caa76e838629f431821cf69b6bcdf0332df636017d12bfad18c0", + "mixHash" : "de35524512715db59817d725e24a07c2b37021fc169c1b5949cd9cd24d4417a0", + "nonce" : "a2b2f525430fcb6d", "number" : "0x0a", - "parentHash" : "5aae960b62f001e2dd6eaeba09a0c9a83f7e819c33ca6a83ced3826a136c7445", + "parentHash" : "0362d0ee919714b702cb31d2f4fe6b5c834f36cc19558acb81a4832f86738e39", "receiptTrie" : "a42921a4499dfe19a6a950c10d71cc47a0f7688616782b207f77e447941f3471", "stateRoot" : "db9ce66923d4ec50112d77abdb2eda9107f15cc4e37e6b59df5749aeb00c5f0d", - "timestamp" : "0x55b7e4e2", + "timestamp" : "0x561bc2f7", "transactionsTrie" : "37563c073c9851a2d48939676a6637183070c704d36279f159e6dafd017f06fb", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "10", - "rlp" : "0xf90285f901f9a05aae960b62f001e2dd6eaeba09a0c9a83f7e819c33ca6a83ced3826a136c7445a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0db9ce66923d4ec50112d77abdb2eda9107f15cc4e37e6b59df5749aeb00c5f0da037563c073c9851a2d48939676a6637183070c704d36279f159e6dafd017f06fba0a42921a4499dfe19a6a950c10d71cc47a0f7688616782b207f77e447941f3471b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd88268608455b7e4e280a05f73d43c5f24f80a671c07549e82e806aeca34e27dbddee21d66f5ee72620b2d887196e9ae176810d4f886f88409018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0aa41e26fd3300000000000000000000000000000000000000000000000000000000000000011ca0807d242ec63bda9a8d37dc243ca7259659dd82b88d0f7eea5858b76798134629a042a6e4fc2c37d6b318ecd6714886fd960a9a0ac368fa38633b163c8b0b63991fc0", + "rlp" : "0xf90285f901f9a00362d0ee919714b702cb31d2f4fe6b5c834f36cc19558acb81a4832f86738e39a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0db9ce66923d4ec50112d77abdb2eda9107f15cc4e37e6b59df5749aeb00c5f0da037563c073c9851a2d48939676a6637183070c704d36279f159e6dafd017f06fba0a42921a4499dfe19a6a950c10d71cc47a0f7688616782b207f77e447941f3471b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd882686084561bc2f780a0de35524512715db59817d725e24a07c2b37021fc169c1b5949cd9cd24d4417a088a2b2f525430fcb6df886f88409018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0aa41e26fd3300000000000000000000000000000000000000000000000000000000000000011ca0807d242ec63bda9a8d37dc243ca7259659dd82b88d0f7eea5858b76798134629a042a6e4fc2c37d6b318ecd6714886fd960a9a0ac368fa38633b163c8b0b63991fc0", "transactions" : [ { "data" : "0x1e26fd330000000000000000000000000000000000000000000000000000000000000001", @@ -415,19 +415,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x7103", - "hash" : "97f83d9f92ba18f75e3a5b8249b62c71ec95bf38b348b62bd9c4196a9ea20769", - "mixHash" : "5ef5d74c3afa02f28d055ea4ceef19a0fabfd627054aeea75b290dafd38abbf3", - "nonce" : "3b3f9af3d2c04cd0", + "hash" : "595973e2cc9451287e31b6a9f5fe4150fd3471f3d2dfc8861fdd4fbfc12b1650", + "mixHash" : "788d6bbd3859bdb47ceb28a0cfa8b5cacea3aafa835ee17c99ac0df3c0d6278b", + "nonce" : "06c9ac282179a165", "number" : "0x0b", - "parentHash" : "9e08d11e79ad24424b300f9ce05b419e31552e342153d089e5ef57579c2caebb", + "parentHash" : "c37f28ec7d58caa76e838629f431821cf69b6bcdf0332df636017d12bfad18c0", "receiptTrie" : "a0610aeb97e78d955fd1770bc0880b2d1300f3ca8f61e22c7cc42f15608ee6d6", "stateRoot" : "5015c1ad3198a735628061d0d346e6c37d382c68346d011c300adc1cc7df1f00", - "timestamp" : "0x55b7e4e4", + "timestamp" : "0x561bc2fa", "transactionsTrie" : "676ace47a65117357ee423e7091aac2436539593b567b3fe4d8e74c8e600aae8", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "11", - "rlp" : "0xf90285f901f9a09e08d11e79ad24424b300f9ce05b419e31552e342153d089e5ef57579c2caebba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05015c1ad3198a735628061d0d346e6c37d382c68346d011c300adc1cc7df1f00a0676ace47a65117357ee423e7091aac2436539593b567b3fe4d8e74c8e600aae8a0a0610aeb97e78d955fd1770bc0880b2d1300f3ca8f61e22c7cc42f15608ee6d6b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202800b832fefd88271038455b7e4e480a05ef5d74c3afa02f28d055ea4ceef19a0fabfd627054aeea75b290dafd38abbf3883b3f9af3d2c04cd0f886f8840a018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0aa49a19a953fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1ba053155ee76f5877ca5345e2b9bf3e1847744fd6cd0f51eca8d6c6a9727dd67523a049e4a24fe6650858c9f2bb286adb47429a4a1ddd78f9e483b1dcab0253ce2abec0", + "rlp" : "0xf90285f901f9a0c37f28ec7d58caa76e838629f431821cf69b6bcdf0332df636017d12bfad18c0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05015c1ad3198a735628061d0d346e6c37d382c68346d011c300adc1cc7df1f00a0676ace47a65117357ee423e7091aac2436539593b567b3fe4d8e74c8e600aae8a0a0610aeb97e78d955fd1770bc0880b2d1300f3ca8f61e22c7cc42f15608ee6d6b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202800b832fefd882710384561bc2fa80a0788d6bbd3859bdb47ceb28a0cfa8b5cacea3aafa835ee17c99ac0df3c0d6278b8806c9ac282179a165f886f8840a018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0aa49a19a953fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1ba053155ee76f5877ca5345e2b9bf3e1847744fd6cd0f51eca8d6c6a9727dd67523a049e4a24fe6650858c9f2bb286adb47429a4a1ddd78f9e483b1dcab0253ce2abec0", "transactions" : [ { "data" : "0x9a19a953fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa", @@ -452,19 +452,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x6854", - "hash" : "a2ad47981d6b9df84774a611d3efcece25d68643baa75eac4d11a822d0c131f5", - "mixHash" : "9d119b0f2941b537622e8246ccca6f0c579ce084c372928e3fda00fd8b402ffd", - "nonce" : "f753458a6dc02f22", + "hash" : "2c18d097b30201aa5208badb361bdbcf439c09a126923845c0aa78dbd3ddaa05", + "mixHash" : "5b2422952bcbb8bbe5a017e312f7b1bf9378d40f48b3a80cf78804a7053e6a51", + "nonce" : "970bd08b4f3b9a97", "number" : "0x0c", - "parentHash" : "97f83d9f92ba18f75e3a5b8249b62c71ec95bf38b348b62bd9c4196a9ea20769", + "parentHash" : "595973e2cc9451287e31b6a9f5fe4150fd3471f3d2dfc8861fdd4fbfc12b1650", "receiptTrie" : "fc9a75d5a13ca296733302e29a64d850c51bc610134510847268528534d74131", "stateRoot" : "ab3715a71512fdc05fea7e56aca037799511b4c95552509a3f273587e44777f4", - "timestamp" : "0x55b7e4e6", + "timestamp" : "0x561bc2fd", "transactionsTrie" : "e7f974024c63a07221cb6cda24ef8ba7cd4600073bedd9d03286ed94c272b1de", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "12", - "rlp" : "0xf90285f901f9a097f83d9f92ba18f75e3a5b8249b62c71ec95bf38b348b62bd9c4196a9ea20769a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ab3715a71512fdc05fea7e56aca037799511b4c95552509a3f273587e44777f4a0e7f974024c63a07221cb6cda24ef8ba7cd4600073bedd9d03286ed94c272b1dea0fc9a75d5a13ca296733302e29a64d850c51bc610134510847268528534d74131b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202c00c832fefd88268548455b7e4e680a09d119b0f2941b537622e8246ccca6f0c579ce084c372928e3fda00fd8b402ffd88f753458a6dc02f22f886f8840b018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0aa41774e64600000000000000000000000000000000000000000000000000000000000000081ca084d03f59f2a6d7ed940db80f9eedc832c979eb01e4ac22e43e90650fa31615b2a062cd375ff71b9e96384263e8f635af5e75021a6459a6b71322e505171cf2b8f8c0", + "rlp" : "0xf90285f901f9a0595973e2cc9451287e31b6a9f5fe4150fd3471f3d2dfc8861fdd4fbfc12b1650a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ab3715a71512fdc05fea7e56aca037799511b4c95552509a3f273587e44777f4a0e7f974024c63a07221cb6cda24ef8ba7cd4600073bedd9d03286ed94c272b1dea0fc9a75d5a13ca296733302e29a64d850c51bc610134510847268528534d74131b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202c00c832fefd882685484561bc2fd80a05b2422952bcbb8bbe5a017e312f7b1bf9378d40f48b3a80cf78804a7053e6a5188970bd08b4f3b9a97f886f8840b018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0aa41774e64600000000000000000000000000000000000000000000000000000000000000081ca084d03f59f2a6d7ed940db80f9eedc832c979eb01e4ac22e43e90650fa31615b2a062cd375ff71b9e96384263e8f635af5e75021a6459a6b71322e505171cf2b8f8c0", "transactions" : [ { "data" : "0x1774e6460000000000000000000000000000000000000000000000000000000000000008", @@ -489,19 +489,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0xab4e", - "hash" : "db638de6f0be5df0e75048c0a2d4410dc0d3fbd450783a0f432defb3d1817c70", - "mixHash" : "60a7ab68ca2d03eb537d160e5cb5193d6d27ac0d36251ede643ce547e6ac8da5", - "nonce" : "9351a82965b8bd6f", + "hash" : "c3b22a280b6815007686f3b036d2a259da22922c307c937f24d41983280abd5c", + "mixHash" : "cecd87f5c9a16235549850dffdc5e164967f2022954230c6a3fa52be2c166f38", + "nonce" : "60afdeef2fc58aef", "number" : "0x0d", - "parentHash" : "a2ad47981d6b9df84774a611d3efcece25d68643baa75eac4d11a822d0c131f5", + "parentHash" : "2c18d097b30201aa5208badb361bdbcf439c09a126923845c0aa78dbd3ddaa05", "receiptTrie" : "6d32ffc6c9181edd9834e6b1d2a17f07c4156f848a4ae49262390bab00b04371", "stateRoot" : "db31f094a72f03dad82c1a434a1b5e56294880413afc658cbe44c982e645f9f0", - "timestamp" : "0x55b7e4e8", + "timestamp" : "0x561bc2ff", "transactionsTrie" : "b4f179be47745b17fd2a7e553084986539b7767805aa6492c760b0efa35d7b12", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "13", - "rlp" : "0xf90285f901f9a0a2ad47981d6b9df84774a611d3efcece25d68643baa75eac4d11a822d0c131f5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0db31f094a72f03dad82c1a434a1b5e56294880413afc658cbe44c982e645f9f0a0b4f179be47745b17fd2a7e553084986539b7767805aa6492c760b0efa35d7b12a06d32ffc6c9181edd9834e6b1d2a17f07c4156f848a4ae49262390bab00b04371b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203000d832fefd882ab4e8455b7e4e880a060a7ab68ca2d03eb537d160e5cb5193d6d27ac0d36251ede643ce547e6ac8da5889351a82965b8bd6ff886f8840c018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0aa4a53b1c1effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee1ba0b05a17ff37cc57d25dc8f71fec72a9975d6e1b47aa93ef3d621381d27f5754e8a04efaca3b1467c4aaefdf9ee996452eaf946cd47a4e2b38d7969ec2572fa5c43bc0", + "rlp" : "0xf90285f901f9a02c18d097b30201aa5208badb361bdbcf439c09a126923845c0aa78dbd3ddaa05a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0db31f094a72f03dad82c1a434a1b5e56294880413afc658cbe44c982e645f9f0a0b4f179be47745b17fd2a7e553084986539b7767805aa6492c760b0efa35d7b12a06d32ffc6c9181edd9834e6b1d2a17f07c4156f848a4ae49262390bab00b04371b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203000d832fefd882ab4e84561bc2ff80a0cecd87f5c9a16235549850dffdc5e164967f2022954230c6a3fa52be2c166f388860afdeef2fc58aeff886f8840c018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0aa4a53b1c1effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee1ba0b05a17ff37cc57d25dc8f71fec72a9975d6e1b47aa93ef3d621381d27f5754e8a04efaca3b1467c4aaefdf9ee996452eaf946cd47a4e2b38d7969ec2572fa5c43bc0", "transactions" : [ { "data" : "0xa53b1c1effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee", @@ -526,19 +526,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0xaba6", - "hash" : "3eea044976f1856715de2411e1da2cb3088d5281489dda62c054a402acb051ef", - "mixHash" : "9496095df746d7f66273c3663514ef48b997dccd4b075a4605cab8702c5c2402", - "nonce" : "931b21947c4f7c74", + "hash" : "dc0db8193aa3016d11fcd8ba8e0089dcd005f885c23b07ec973b6fe4c2ee4d77", + "mixHash" : "7df12ed5745885ed0c7be34cc8bd7add411211afcd8c758f9e632958d5b33dac", + "nonce" : "a79e9f718520240e", "number" : "0x0e", - "parentHash" : "db638de6f0be5df0e75048c0a2d4410dc0d3fbd450783a0f432defb3d1817c70", + "parentHash" : "c3b22a280b6815007686f3b036d2a259da22922c307c937f24d41983280abd5c", "receiptTrie" : "72767fdc315246a5f34f9e152658c2862ca93747403c1529a5946f32dcffcc4d", "stateRoot" : "788d588dc59650c0c167f493fc7bc3ea0c22a24a9b3ff3bc513c44ef923b3b3f", - "timestamp" : "0x55b7e4ea", + "timestamp" : "0x561bc302", "transactionsTrie" : "9b897f5f6cbf1afecf6103a8d07207b024513ad6459ced475fde6cf50222268f", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "14", - "rlp" : "0xf90285f901f9a0db638de6f0be5df0e75048c0a2d4410dc0d3fbd450783a0f432defb3d1817c70a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0788d588dc59650c0c167f493fc7bc3ea0c22a24a9b3ff3bc513c44ef923b3b3fa09b897f5f6cbf1afecf6103a8d07207b024513ad6459ced475fde6cf50222268fa072767fdc315246a5f34f9e152658c2862ca93747403c1529a5946f32dcffcc4db9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203400e832fefd882aba68455b7e4ea80a09496095df746d7f66273c3663514ef48b997dccd4b075a4605cab8702c5c240288931b21947c4f7c74f886f8840d018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0aa4d2282dc5ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee1ca0b9711c23046e1b202cfa43ab00885f89db77cdec6f8323a470f3c9970753eb0ba0416f364a793988e44a143c22876a0cbd6c419a48c23064a084c8a5ec6ccb9ffbc0", + "rlp" : "0xf90285f901f9a0c3b22a280b6815007686f3b036d2a259da22922c307c937f24d41983280abd5ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0788d588dc59650c0c167f493fc7bc3ea0c22a24a9b3ff3bc513c44ef923b3b3fa09b897f5f6cbf1afecf6103a8d07207b024513ad6459ced475fde6cf50222268fa072767fdc315246a5f34f9e152658c2862ca93747403c1529a5946f32dcffcc4db9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203400e832fefd882aba684561bc30280a07df12ed5745885ed0c7be34cc8bd7add411211afcd8c758f9e632958d5b33dac88a79e9f718520240ef886f8840d018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0aa4d2282dc5ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee1ca0b9711c23046e1b202cfa43ab00885f89db77cdec6f8323a470f3c9970753eb0ba0416f364a793988e44a143c22876a0cbd6c419a48c23064a084c8a5ec6ccb9ffbc0", "transactions" : [ { "data" : "0xd2282dc5ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee", @@ -563,19 +563,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0xabd8", - "hash" : "faa62f384fc7d730c03d479921491609b63a29cb3bac64528788f2110a485406", - "mixHash" : "f488a6ebda74a4d5b0989c667092f30385a47255b1e938a3e94b2b28f9fd4625", - "nonce" : "ed904b4c54fdfb3e", + "hash" : "9dcd5e20cc30e48e3635ac3a1c398c2f45ee818fcbc232110878ddf0e936e7ea", + "mixHash" : "baf96d19efa10153db1d835c9ae8ed2203630f96a4f76200f6d6bf638eccfb3a", + "nonce" : "00962d3dfc8399ec", "number" : "0x0f", - "parentHash" : "3eea044976f1856715de2411e1da2cb3088d5281489dda62c054a402acb051ef", + "parentHash" : "dc0db8193aa3016d11fcd8ba8e0089dcd005f885c23b07ec973b6fe4c2ee4d77", "receiptTrie" : "d30b8f73878637f2a7ea6b1f52b8d5746f462135edf434746c3ac3ae381aa741", "stateRoot" : "82a7740461f03f7a3aa4a2cb63d8ac51ae3c163e4179a19170ad8006e040cab9", - "timestamp" : "0x55b7e4eb", + "timestamp" : "0x561bc304", "transactionsTrie" : "4f33e7c6c5f2ad707903f53d7d7dac4f3ffcb6c91aa7eed2b9f9c77f2107cb01", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "15", - "rlp" : "0xf90285f901f9a03eea044976f1856715de2411e1da2cb3088d5281489dda62c054a402acb051efa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a082a7740461f03f7a3aa4a2cb63d8ac51ae3c163e4179a19170ad8006e040cab9a04f33e7c6c5f2ad707903f53d7d7dac4f3ffcb6c91aa7eed2b9f9c77f2107cb01a0d30b8f73878637f2a7ea6b1f52b8d5746f462135edf434746c3ac3ae381aa741b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203800f832fefd882abd88455b7e4eb80a0f488a6ebda74a4d5b0989c667092f30385a47255b1e938a3e94b2b28f9fd462588ed904b4c54fdfb3ef886f8840e018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0aa4e30081a0aabbccffffffffffffffffffffffffffffffffffffffffffffffffffffffffee1ba085b7373c38815f016c9b4737742bd0743e37a8de5e3e000901d42a75349a6e50a01992976186639c3cfca0c6f4f785a6e4cb1e1a644a320a997d82d8a19818603fc0", + "rlp" : "0xf90285f901f9a0dc0db8193aa3016d11fcd8ba8e0089dcd005f885c23b07ec973b6fe4c2ee4d77a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a082a7740461f03f7a3aa4a2cb63d8ac51ae3c163e4179a19170ad8006e040cab9a04f33e7c6c5f2ad707903f53d7d7dac4f3ffcb6c91aa7eed2b9f9c77f2107cb01a0d30b8f73878637f2a7ea6b1f52b8d5746f462135edf434746c3ac3ae381aa741b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203800f832fefd882abd884561bc30480a0baf96d19efa10153db1d835c9ae8ed2203630f96a4f76200f6d6bf638eccfb3a8800962d3dfc8399ecf886f8840e018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0aa4e30081a0aabbccffffffffffffffffffffffffffffffffffffffffffffffffffffffffee1ba085b7373c38815f016c9b4737742bd0743e37a8de5e3e000901d42a75349a6e50a01992976186639c3cfca0c6f4f785a6e4cb1e1a644a320a997d82d8a19818603fc0", "transactions" : [ { "data" : "0xe30081a0aabbccffffffffffffffffffffffffffffffffffffffffffffffffffffffffee", @@ -600,19 +600,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0xab90", - "hash" : "ad43e1e1d8c7427ee441342ad9573f403b444ad18d786cc381e08cd0c18d1ead", - "mixHash" : "99dc92d8ff14281de14df5b38ca138177d29d48dea562b2b5cd6c648dc18124c", - "nonce" : "6a6cbdf064c80624", + "hash" : "1878c6f27178250f3d55186a2887b076936599f307d96dabcf331b2ff0a38f0c", + "mixHash" : "a358a5b5e5faed469d9603e454ace5764cc6da652f22eed5318b40982973d822", + "nonce" : "dfc50ac1134d764f", "number" : "0x10", - "parentHash" : "faa62f384fc7d730c03d479921491609b63a29cb3bac64528788f2110a485406", + "parentHash" : "9dcd5e20cc30e48e3635ac3a1c398c2f45ee818fcbc232110878ddf0e936e7ea", "receiptTrie" : "3e5fff5f6eaeee82841547e049b6bdb980c4e6bd8539fb072a346a30ee72a25d", "stateRoot" : "f4814dce3c4230ab409f92001f88e55d63ed5a23d84c73ad3fad1222ba06cb7a", - "timestamp" : "0x55b7e4ed", + "timestamp" : "0x561bc307", "transactionsTrie" : "399a0923c02fd28a351a11cbf2fd647225c0a69a67d7e04ad1c35c9435fc7d82", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "16", - "rlp" : "0xf90285f901f9a0faa62f384fc7d730c03d479921491609b63a29cb3bac64528788f2110a485406a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f4814dce3c4230ab409f92001f88e55d63ed5a23d84c73ad3fad1222ba06cb7aa0399a0923c02fd28a351a11cbf2fd647225c0a69a67d7e04ad1c35c9435fc7d82a03e5fff5f6eaeee82841547e049b6bdb980c4e6bd8539fb072a346a30ee72a25db9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203c010832fefd882ab908455b7e4ed80a099dc92d8ff14281de14df5b38ca138177d29d48dea562b2b5cd6c648dc18124c886a6cbdf064c80624f886f8840f018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0aa4c2b12a73aabbccffffffffffffffffffffffffffffffffffffffffffffffffffffffffee1ba00394fa9c43a2469d48b98f4f7e8dfdf7bd3c7abd9eafe8c124b362594aafc5d6a00ecf369283eda15f4c4db09784b5226dfe48a0a80ff91e87d858f6adbb131cf9c0", + "rlp" : "0xf90285f901f9a09dcd5e20cc30e48e3635ac3a1c398c2f45ee818fcbc232110878ddf0e936e7eaa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f4814dce3c4230ab409f92001f88e55d63ed5a23d84c73ad3fad1222ba06cb7aa0399a0923c02fd28a351a11cbf2fd647225c0a69a67d7e04ad1c35c9435fc7d82a03e5fff5f6eaeee82841547e049b6bdb980c4e6bd8539fb072a346a30ee72a25db9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830203c010832fefd882ab9084561bc30780a0a358a5b5e5faed469d9603e454ace5764cc6da652f22eed5318b40982973d82288dfc50ac1134d764ff886f8840f018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0aa4c2b12a73aabbccffffffffffffffffffffffffffffffffffffffffffffffffffffffffee1ba00394fa9c43a2469d48b98f4f7e8dfdf7bd3c7abd9eafe8c124b362594aafc5d6a00ecf369283eda15f4c4db09784b5226dfe48a0a80ff91e87d858f6adbb131cf9c0", "transactions" : [ { "data" : "0xc2b12a73aabbccffffffffffffffffffffffffffffffffffffffffffffffffffffffffee", @@ -637,19 +637,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x549e", - "hash" : "216d028c87dd4ebe053060cd8e2a15aa7de4acea966831955a00b8b2dfe2b6e1", - "mixHash" : "d50d42aa3481b3d7e2474b5412ff30fea52520d04984b41f6fdca8569ebde44f", - "nonce" : "a5f8ed7f1145917c", + "hash" : "fa2ccd3c04d8526f4865419e3f20a2a49e71816a8f48e650cbbcec969c30c9f7", + "mixHash" : "e89500b07cf1b793a81ca757d0727a2168ec783612540c87fc4e46b8a08a98ce", + "nonce" : "f53a77544e983419", "number" : "0x11", - "parentHash" : "ad43e1e1d8c7427ee441342ad9573f403b444ad18d786cc381e08cd0c18d1ead", + "parentHash" : "1878c6f27178250f3d55186a2887b076936599f307d96dabcf331b2ff0a38f0c", "receiptTrie" : "366cdc8d05100f5383d8d998a82e0780511d562c49dd5b316f29ab0f048c4fca", "stateRoot" : "7deffd1234f741f38c882c32f774e49bfe44ff219670f818a77f642d4198ce89", - "timestamp" : "0x55b7e4ee", + "timestamp" : "0x561bc30a", "transactionsTrie" : "71c76029feb275268f876ba1e212e333a1a812b40d936723e7d1b6541fd08501", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "17", - "rlp" : "0xf90265f901f9a0ad43e1e1d8c7427ee441342ad9573f403b444ad18d786cc381e08cd0c18d1eada01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07deffd1234f741f38c882c32f774e49bfe44ff219670f818a77f642d4198ce89a071c76029feb275268f876ba1e212e333a1a812b40d936723e7d1b6541fd08501a0366cdc8d05100f5383d8d998a82e0780511d562c49dd5b316f29ab0f048c4fcab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302040011832fefd882549e8455b7e4ee80a0d50d42aa3481b3d7e2474b5412ff30fea52520d04984b41f6fdca8569ebde44f88a5f8ed7f1145917cf866f86410018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a8457cb2fc41ca0060dc80554e845b572ab6b88dab08f7491f83b4405fea2f067a80b3742127fb0a0246160f01d027a0335be590d443335ecb2cf5d9f9589c8efffa4acbda4acafeac0", + "rlp" : "0xf90265f901f9a01878c6f27178250f3d55186a2887b076936599f307d96dabcf331b2ff0a38f0ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07deffd1234f741f38c882c32f774e49bfe44ff219670f818a77f642d4198ce89a071c76029feb275268f876ba1e212e333a1a812b40d936723e7d1b6541fd08501a0366cdc8d05100f5383d8d998a82e0780511d562c49dd5b316f29ab0f048c4fcab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302040011832fefd882549e84561bc30a80a0e89500b07cf1b793a81ca757d0727a2168ec783612540c87fc4e46b8a08a98ce88f53a77544e983419f866f86410018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a8457cb2fc41ca0060dc80554e845b572ab6b88dab08f7491f83b4405fea2f067a80b3742127fb0a0246160f01d027a0335be590d443335ecb2cf5d9f9589c8efffa4acbda4acafeac0", "transactions" : [ { "data" : "0x57cb2fc4", @@ -674,19 +674,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5458", - "hash" : "e7e0a2b94635c8324357a8299e93838df0d837e00d739ff411d162a6e0be1bfa", - "mixHash" : "b2e7f54dd85ed2ce98bb2cec517faf1752ce3eeb78b87ebd9eeaec2701f47ef2", - "nonce" : "9f84497a0ccc701d", + "hash" : "16dd36d0f1175f6cf3edb10eea43433770debca41d0e849d9564dd4048de55a3", + "mixHash" : "a6240cae7c4241c5203c0cfcdce3f8e75805fef05115af9f2d8c6145edda575b", + "nonce" : "40466dd3b850ea91", "number" : "0x12", - "parentHash" : "216d028c87dd4ebe053060cd8e2a15aa7de4acea966831955a00b8b2dfe2b6e1", + "parentHash" : "fa2ccd3c04d8526f4865419e3f20a2a49e71816a8f48e650cbbcec969c30c9f7", "receiptTrie" : "bfc9dfd441586836d1c7793e071c3e7ebefa09d6e540d39e240f651e3ef1d055", "stateRoot" : "2a340c5e2deb1b2bec0974224383f24e52ee0fbc23a52478c814db48e471bbe5", - "timestamp" : "0x55b7e4f0", + "timestamp" : "0x561bc30e", "transactionsTrie" : "ada6f27a30a969dd37afc4e6d59eadd00218372f841e62a57873da923e0f69d0", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "18", - "rlp" : "0xf90265f901f9a0216d028c87dd4ebe053060cd8e2a15aa7de4acea966831955a00b8b2dfe2b6e1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a02a340c5e2deb1b2bec0974224383f24e52ee0fbc23a52478c814db48e471bbe5a0ada6f27a30a969dd37afc4e6d59eadd00218372f841e62a57873da923e0f69d0a0bfc9dfd441586836d1c7793e071c3e7ebefa09d6e540d39e240f651e3ef1d055b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302044012832fefd88254588455b7e4f080a0b2e7f54dd85ed2ce98bb2cec517faf1752ce3eeb78b87ebd9eeaec2701f47ef2889f84497a0ccc701df866f86411018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84343a875d1ca0b193b128dba991651b570675d0b33787c30dfb4c63113d4e9688ebeb9526bdb5a03839eb0b2ec8c110a7667a2939fccb50e210d8d443854eb319437725e1549815c0", + "rlp" : "0xf90265f901f9a0fa2ccd3c04d8526f4865419e3f20a2a49e71816a8f48e650cbbcec969c30c9f7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a02a340c5e2deb1b2bec0974224383f24e52ee0fbc23a52478c814db48e471bbe5a0ada6f27a30a969dd37afc4e6d59eadd00218372f841e62a57873da923e0f69d0a0bfc9dfd441586836d1c7793e071c3e7ebefa09d6e540d39e240f651e3ef1d055b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302044012832fefd882545884561bc30e80a0a6240cae7c4241c5203c0cfcdce3f8e75805fef05115af9f2d8c6145edda575b8840466dd3b850ea91f866f86411018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84343a875d1ca0b193b128dba991651b570675d0b33787c30dfb4c63113d4e9688ebeb9526bdb5a03839eb0b2ec8c110a7667a2939fccb50e210d8d443854eb319437725e1549815c0", "transactions" : [ { "data" : "0x343a875d", @@ -711,19 +711,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x559f", - "hash" : "0cd4db0e4a3ea25514dd49549551f15816eebd69ebbe55b963a9d36c42d8bfc0", - "mixHash" : "0699924ebb9cc3b19fdde7a47d70a2e265394ba5df963a812cf70a2b1ae4916d", - "nonce" : "d97ffda0f588b716", + "hash" : "432cb1a243bb66e3877875277ddc1cc8c47d284fe6b357817f06a2f68fcfc6ed", + "mixHash" : "5c087fa80d102e99449616ee6555f7d27379276273cde97b11bc704897fe3f18", + "nonce" : "1b5b7ddfea4249ee", "number" : "0x13", - "parentHash" : "e7e0a2b94635c8324357a8299e93838df0d837e00d739ff411d162a6e0be1bfa", + "parentHash" : "16dd36d0f1175f6cf3edb10eea43433770debca41d0e849d9564dd4048de55a3", "receiptTrie" : "1aaa4b63d7856cea98edad6147a7a866021d59751a68f7d5926cbb93ac1a013c", "stateRoot" : "29f31ac8375d56b40d36a041ecdb2dd31af8356e2df5f70d04c3098a576a38f7", - "timestamp" : "0x55b7e4f2", + "timestamp" : "0x561bc310", "transactionsTrie" : "a0bab9980dfe8d2ee0ade2315c1bf283de07baccb5cbb50da0e222ad3764e98b", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "19", - "rlp" : "0xf90265f901f9a0e7e0a2b94635c8324357a8299e93838df0d837e00d739ff411d162a6e0be1bfaa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a029f31ac8375d56b40d36a041ecdb2dd31af8356e2df5f70d04c3098a576a38f7a0a0bab9980dfe8d2ee0ade2315c1bf283de07baccb5cbb50da0e222ad3764e98ba01aaa4b63d7856cea98edad6147a7a866021d59751a68f7d5926cbb93ac1a013cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302048013832fefd882559f8455b7e4f280a00699924ebb9cc3b19fdde7a47d70a2e265394ba5df963a812cf70a2b1ae4916d88d97ffda0f588b716f866f86412018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84f5b53e171ba097a8b53e1b5fdd07d51577461bdfa5c4e452af4202af31fb7367b265b2a5b715a02976291d808198866ddadc50eb47ed880826353566a04f23407e0cc319c57723c0", + "rlp" : "0xf90265f901f9a016dd36d0f1175f6cf3edb10eea43433770debca41d0e849d9564dd4048de55a3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a029f31ac8375d56b40d36a041ecdb2dd31af8356e2df5f70d04c3098a576a38f7a0a0bab9980dfe8d2ee0ade2315c1bf283de07baccb5cbb50da0e222ad3764e98ba01aaa4b63d7856cea98edad6147a7a866021d59751a68f7d5926cbb93ac1a013cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302048013832fefd882559f84561bc31080a05c087fa80d102e99449616ee6555f7d27379276273cde97b11bc704897fe3f18881b5b7ddfea4249eef866f86412018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84f5b53e171ba097a8b53e1b5fdd07d51577461bdfa5c4e452af4202af31fb7367b265b2a5b715a02976291d808198866ddadc50eb47ed880826353566a04f23407e0cc319c57723c0", "transactions" : [ { "data" : "0xf5b53e17", @@ -748,19 +748,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5497", - "hash" : "1ec233d5101b7c939b76a95d54ccef7d321fc6d4621011fcc49c83e24a13ad7a", - "mixHash" : "fbe931ef3103b55915dec397fa70303fa6a8ae735c5d36622cb379e95c1276a6", - "nonce" : "bc0294bfda5565af", + "hash" : "664088129893a56d2cbe4e7b8f30abe017c998541ea66c6511fad4ce919045f2", + "mixHash" : "bdaa9072802a669ef6b0ea7af99dea0d6f0bb59877bbd0120e9f91f3734c81f2", + "nonce" : "6879017016af6337", "number" : "0x14", - "parentHash" : "0cd4db0e4a3ea25514dd49549551f15816eebd69ebbe55b963a9d36c42d8bfc0", + "parentHash" : "432cb1a243bb66e3877875277ddc1cc8c47d284fe6b357817f06a2f68fcfc6ed", "receiptTrie" : "7dbc98dfc1e8cf44aad1d6ef2b088b8bef0243a83443f4ca6e245bbbf18cddcd", "stateRoot" : "a9a285204205c8819bcc7c62a35ed9e781822d51d17db2fe6f330edf46e7d8a7", - "timestamp" : "0x55b7e4f4", + "timestamp" : "0x561bc313", "transactionsTrie" : "23374dab8adf8a20601359fcc4cb75283b0b1fd122addcd5bcb62987d6645de7", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "20", - "rlp" : "0xf90265f901f9a00cd4db0e4a3ea25514dd49549551f15816eebd69ebbe55b963a9d36c42d8bfc0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a9a285204205c8819bcc7c62a35ed9e781822d51d17db2fe6f330edf46e7d8a7a023374dab8adf8a20601359fcc4cb75283b0b1fd122addcd5bcb62987d6645de7a07dbc98dfc1e8cf44aad1d6ef2b088b8bef0243a83443f4ca6e245bbbf18cddcdb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830204c014832fefd88254978455b7e4f480a0fbe931ef3103b55915dec397fa70303fa6a8ae735c5d36622cb379e95c1276a688bc0294bfda5565aff866f86413018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84688959791ca05e61ee2fb2e0ceb14d6ab58f8af9281c67a449de9cf97efb390b0b2f93dce7e9a025c5e006b664b7157f3daed877ef9cd8eb856150cf88b9c5ed194ac0a91b4f7ac0", + "rlp" : "0xf90265f901f9a0432cb1a243bb66e3877875277ddc1cc8c47d284fe6b357817f06a2f68fcfc6eda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a9a285204205c8819bcc7c62a35ed9e781822d51d17db2fe6f330edf46e7d8a7a023374dab8adf8a20601359fcc4cb75283b0b1fd122addcd5bcb62987d6645de7a07dbc98dfc1e8cf44aad1d6ef2b088b8bef0243a83443f4ca6e245bbbf18cddcdb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830204c014832fefd882549784561bc31380a0bdaa9072802a669ef6b0ea7af99dea0d6f0bb59877bbd0120e9f91f3734c81f2886879017016af6337f866f86413018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84688959791ca05e61ee2fb2e0ceb14d6ab58f8af9281c67a449de9cf97efb390b0b2f93dce7e9a025c5e006b664b7157f3daed877ef9cd8eb856150cf88b9c5ed194ac0a91b4f7ac0", "transactions" : [ { "data" : "0x68895979", @@ -785,19 +785,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5464", - "hash" : "d675197ca9b66592265a5fcab4ca7035a654dc2b404ef964d3d53274dd882104", - "mixHash" : "d1d8fd6c8893cd1c82fc50d7d228c60304336b08e91f7146a2b48ce50bc26fbd", - "nonce" : "a80d3a02cf835b35", + "hash" : "bfbcc1d07dd618a4685c74dc64b20e4d76e4d51804ab4a7378332a7947e63d36", + "mixHash" : "2ac7ff812dc8a3cff067c049a9109b033d095b5384337b8035be63df5d58701f", + "nonce" : "7df91c033d972f83", "number" : "0x15", - "parentHash" : "1ec233d5101b7c939b76a95d54ccef7d321fc6d4621011fcc49c83e24a13ad7a", + "parentHash" : "664088129893a56d2cbe4e7b8f30abe017c998541ea66c6511fad4ce919045f2", "receiptTrie" : "56723243ec6cd3b9610248310e24baace6100528983dbcbd7800fe08b490b1aa", "stateRoot" : "84a7d74f06ac47742632e3fbd5046426acd943757097791d7eabb1e467dbe11e", - "timestamp" : "0x55b7e4f7", + "timestamp" : "0x561bc315", "transactionsTrie" : "1e4fc4ad8a46dc055bfe3c57e4f0138f6ea604c027437585386c5d07c06619cf", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "21", - "rlp" : "0xf90265f901f9a01ec233d5101b7c939b76a95d54ccef7d321fc6d4621011fcc49c83e24a13ad7aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a084a7d74f06ac47742632e3fbd5046426acd943757097791d7eabb1e467dbe11ea01e4fc4ad8a46dc055bfe3c57e4f0138f6ea604c027437585386c5d07c06619cfa056723243ec6cd3b9610248310e24baace6100528983dbcbd7800fe08b490b1aab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302050015832fefd88254648455b7e4f780a0d1d8fd6c8893cd1c82fc50d7d228c60304336b08e91f7146a2b48ce50bc26fbd88a80d3a02cf835b35f866f86414018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a8438cc48311ca05c551e2cafbddee83acd18f6d995ccb141fdb0cf6183726972b7c31a36437b17a00444f3679aea6a5374bd129b51b96b1e53635ae3e4690c3958f371420a1892c8c0", + "rlp" : "0xf90265f901f9a0664088129893a56d2cbe4e7b8f30abe017c998541ea66c6511fad4ce919045f2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a084a7d74f06ac47742632e3fbd5046426acd943757097791d7eabb1e467dbe11ea01e4fc4ad8a46dc055bfe3c57e4f0138f6ea604c027437585386c5d07c06619cfa056723243ec6cd3b9610248310e24baace6100528983dbcbd7800fe08b490b1aab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302050015832fefd882546484561bc31580a02ac7ff812dc8a3cff067c049a9109b033d095b5384337b8035be63df5d58701f887df91c033d972f83f866f86414018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a8438cc48311ca05c551e2cafbddee83acd18f6d995ccb141fdb0cf6183726972b7c31a36437b17a00444f3679aea6a5374bd129b51b96b1e53635ae3e4690c3958f371420a1892c8c0", "transactions" : [ { "data" : "0x38cc4831", @@ -822,19 +822,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5413", - "hash" : "aa8782c3f4e2e4bafaaf04e0ed7664292c7fd2516a3921747c22834b21b4fbb2", - "mixHash" : "73c34df783e9de2095618aa435dab69245f33395ccda8c66994afc1ff76144cd", - "nonce" : "9eb71a2310d9f71d", + "hash" : "a2a75c6b6af8220fcb4d6d3b0c65603ed5338e9f4421ea27577f0ed6ff59fd68", + "mixHash" : "f210b2f91e5d017a22b8f35445dd174c5efa3d2bfc84f35f240132db227ad953", + "nonce" : "f407c538f0b7624d", "number" : "0x16", - "parentHash" : "d675197ca9b66592265a5fcab4ca7035a654dc2b404ef964d3d53274dd882104", + "parentHash" : "bfbcc1d07dd618a4685c74dc64b20e4d76e4d51804ab4a7378332a7947e63d36", "receiptTrie" : "597d4238bea8f4fa7e8e2c4be8f991aa5bcf80fdc0ea68986be4ab4457b7d4dc", "stateRoot" : "961c13d8d654ac348f088077cb63566568e607947fd518e76724b3f1775d876f", - "timestamp" : "0x55b7e4f8", + "timestamp" : "0x561bc319", "transactionsTrie" : "7e2da9ba7755d5162f50ad1f59f22f6ee9fcc57e616611ff17ca3b888b2d4490", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "22", - "rlp" : "0xf90265f901f9a0d675197ca9b66592265a5fcab4ca7035a654dc2b404ef964d3d53274dd882104a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0961c13d8d654ac348f088077cb63566568e607947fd518e76724b3f1775d876fa07e2da9ba7755d5162f50ad1f59f22f6ee9fcc57e616611ff17ca3b888b2d4490a0597d4238bea8f4fa7e8e2c4be8f991aa5bcf80fdc0ea68986be4ab4457b7d4dcb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302054016832fefd88254138455b7e4f880a073c34df783e9de2095618aa435dab69245f33395ccda8c66994afc1ff76144cd889eb71a2310d9f71df866f86415018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a841f9030371ba06ca0193acc1447bc6f02c770fb84c199d02fde0063cfa1981d8e08cb1eefb13fa02a6fb4b232c82c731b19bc0e74d39e785858fc1f02b16048b0047539e9ef2bbec0", + "rlp" : "0xf90265f901f9a0bfbcc1d07dd618a4685c74dc64b20e4d76e4d51804ab4a7378332a7947e63d36a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0961c13d8d654ac348f088077cb63566568e607947fd518e76724b3f1775d876fa07e2da9ba7755d5162f50ad1f59f22f6ee9fcc57e616611ff17ca3b888b2d4490a0597d4238bea8f4fa7e8e2c4be8f991aa5bcf80fdc0ea68986be4ab4457b7d4dcb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302054016832fefd882541384561bc31980a0f210b2f91e5d017a22b8f35445dd174c5efa3d2bfc84f35f240132db227ad95388f407c538f0b7624df866f86415018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a841f9030371ba06ca0193acc1447bc6f02c770fb84c199d02fde0063cfa1981d8e08cb1eefb13fa02a6fb4b232c82c731b19bc0e74d39e785858fc1f02b16048b0047539e9ef2bbec0", "transactions" : [ { "data" : "0x1f903037", @@ -859,19 +859,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x582e", - "hash" : "53d212b403e937395ed656d04d88b897624ce043054749006ac97fb1a0a8ad33", - "mixHash" : "54b38a9123e3931fb848fa24653d2caad09fc07e0764e520509021274b19951c", - "nonce" : "74b7042fc59aa206", + "hash" : "3c419f39b340a4c35cc27b8f7880b779dc1abb9814ad13a2a5a55b885cc8ec2d", + "mixHash" : "aa37862d3a18b59d2f4842c06f866acc665cde98a29a8ab07c41b5f537bf5450", + "nonce" : "f081fab8c4fbc6bb", "number" : "0x17", - "parentHash" : "aa8782c3f4e2e4bafaaf04e0ed7664292c7fd2516a3921747c22834b21b4fbb2", + "parentHash" : "a2a75c6b6af8220fcb4d6d3b0c65603ed5338e9f4421ea27577f0ed6ff59fd68", "receiptTrie" : "90e73847b7d298430e43d8f26a55f4fa8230b5f54b4ba0f282d9c356390871ea", "stateRoot" : "29ca3b3932c78d4cd0a88a101d7691e18c69beb4853b82d73bb25cfbf5e50a32", - "timestamp" : "0x55b7e4fc", + "timestamp" : "0x561bc31b", "transactionsTrie" : "9bc2daa9216cef28be185542631820ebd2df7781c099fcc4cdfef91545dfc756", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "23", - "rlp" : "0xf90265f901f9a0aa8782c3f4e2e4bafaaf04e0ed7664292c7fd2516a3921747c22834b21b4fbb2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a029ca3b3932c78d4cd0a88a101d7691e18c69beb4853b82d73bb25cfbf5e50a32a09bc2daa9216cef28be185542631820ebd2df7781c099fcc4cdfef91545dfc756a090e73847b7d298430e43d8f26a55f4fa8230b5f54b4ba0f282d9c356390871eab90100000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000020000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000200000000008302058017832fefd882582e8455b7e4fc80a054b38a9123e3931fb848fa24653d2caad09fc07e0764e520509021274b19951c8874b7042fc59aa206f866f86416018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a8465538c731ca033932b5358a71603542c966d87cbb162dc145d8f05bc8c39d845f82a56203db9a0120c57e57dc1cfa46118d9d5c1d36ecc2f75a041fcbfa2bfd8131c4ba3d9371dc0", + "rlp" : "0xf90265f901f9a0a2a75c6b6af8220fcb4d6d3b0c65603ed5338e9f4421ea27577f0ed6ff59fd68a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a029ca3b3932c78d4cd0a88a101d7691e18c69beb4853b82d73bb25cfbf5e50a32a09bc2daa9216cef28be185542631820ebd2df7781c099fcc4cdfef91545dfc756a090e73847b7d298430e43d8f26a55f4fa8230b5f54b4ba0f282d9c356390871eab90100000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000020000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000200000000008302058017832fefd882582e84561bc31b80a0aa37862d3a18b59d2f4842c06f866acc665cde98a29a8ab07c41b5f537bf545088f081fab8c4fbc6bbf866f86416018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a8465538c731ca033932b5358a71603542c966d87cbb162dc145d8f05bc8c39d845f82a56203db9a0120c57e57dc1cfa46118d9d5c1d36ecc2f75a041fcbfa2bfd8131c4ba3d9371dc0", "transactions" : [ { "data" : "0x65538c73", @@ -896,19 +896,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5738", - "hash" : "c00b1b9e6f1b3516f5e4db53231600598ed94683667700cbe1c452668a1ba3af", - "mixHash" : "e77a5c6b434c68f7c0223518e7f85bd1646716c9e4694bcc79982966319b1b72", - "nonce" : "379c6b60154eb442", + "hash" : "1b0e205a3863367b61e0a3092adc7a9c16e85e23dbb8e8a7c34aa470bdc32113", + "mixHash" : "ddae82d71b7876692f0104ce9132ae8e62c2081afdf342c22f275068df52c7b5", + "nonce" : "e4f299306bc633c8", "number" : "0x18", - "parentHash" : "53d212b403e937395ed656d04d88b897624ce043054749006ac97fb1a0a8ad33", + "parentHash" : "3c419f39b340a4c35cc27b8f7880b779dc1abb9814ad13a2a5a55b885cc8ec2d", "receiptTrie" : "1831001c5b74ee333486bbdb249e94f33108ac583b07413ee97da50434d1ee02", "stateRoot" : "51b91a60660023f28df93f274a8c34e25fdd2f60904603f922ed1bdb65332437", - "timestamp" : "0x55b7e4ff", + "timestamp" : "0x561bc31f", "transactionsTrie" : "22a8b494a03ba87a7a7907f3e78f4662cef1f867f1f31e4cd552e1fa08893feb", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "24", - "rlp" : "0xf90265f901f9a053d212b403e937395ed656d04d88b897624ce043054749006ac97fb1a0a8ad33a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a051b91a60660023f28df93f274a8c34e25fdd2f60904603f922ed1bdb65332437a022a8b494a03ba87a7a7907f3e78f4662cef1f867f1f31e4cd552e1fa08893feba01831001c5b74ee333486bbdb249e94f33108ac583b07413ee97da50434d1ee02b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000830205c018832fefd88257388455b7e4ff80a0e77a5c6b434c68f7c0223518e7f85bd1646716c9e4694bcc79982966319b1b7288379c6b60154eb442f866f86417018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84a67808571ba041e6b57662e4dc74c7f9d2de26d82690bd12a450edde4d42eca663a0fde7f87ca05398be934512bfb337278c89fb9ce6c5318ee04240b592aae9a19d737d199d5bc0", + "rlp" : "0xf90265f901f9a03c419f39b340a4c35cc27b8f7880b779dc1abb9814ad13a2a5a55b885cc8ec2da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a051b91a60660023f28df93f274a8c34e25fdd2f60904603f922ed1bdb65332437a022a8b494a03ba87a7a7907f3e78f4662cef1f867f1f31e4cd552e1fa08893feba01831001c5b74ee333486bbdb249e94f33108ac583b07413ee97da50434d1ee02b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000830205c018832fefd882573884561bc31f80a0ddae82d71b7876692f0104ce9132ae8e62c2081afdf342c22f275068df52c7b588e4f299306bc633c8f866f86417018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84a67808571ba041e6b57662e4dc74c7f9d2de26d82690bd12a450edde4d42eca663a0fde7f87ca05398be934512bfb337278c89fb9ce6c5318ee04240b592aae9a19d737d199d5bc0", "transactions" : [ { "data" : "0xa6780857", @@ -933,19 +933,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5a42", - "hash" : "26492149b84324a501a48d307902aaa8d435a9b41daeb5c29a374cbd00f0b743", - "mixHash" : "50d46eb9bcd45288482226489dd997db6d88fd174f85696bd774ed2d448ea37a", - "nonce" : "87d2ed16dbbdbe0f", + "hash" : "b73cee02246c6f32ac0f459934e89102c2ce904d966a4fc2ab6309c3e104b9cb", + "mixHash" : "c0c0a005e3051ed0ff3f65867f83cf22bab8d289cfd59410c878ceff9c3289a9", + "nonce" : "18e179a6d53f6917", "number" : "0x19", - "parentHash" : "c00b1b9e6f1b3516f5e4db53231600598ed94683667700cbe1c452668a1ba3af", + "parentHash" : "1b0e205a3863367b61e0a3092adc7a9c16e85e23dbb8e8a7c34aa470bdc32113", "receiptTrie" : "dfbc5e47076c37b43e77dfc3f9e2c08269e5a9f5a27e9142b74ab971565aafd5", "stateRoot" : "cf966b3f77c73436ebd1ef71d85a4561e0a6616d831c2d2bfa540988b892de4f", - "timestamp" : "0x55b7e503", + "timestamp" : "0x561bc321", "transactionsTrie" : "b3e4765530d4eea64c0a0170b962871f6427678a4cb611677c9f4711ea7efbab", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "25", - "rlp" : "0xf90265f901f9a0c00b1b9e6f1b3516f5e4db53231600598ed94683667700cbe1c452668a1ba3afa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cf966b3f77c73436ebd1ef71d85a4561e0a6616d831c2d2bfa540988b892de4fa0b3e4765530d4eea64c0a0170b962871f6427678a4cb611677c9f4711ea7efbaba0dfbc5e47076c37b43e77dfc3f9e2c08269e5a9f5a27e9142b74ab971565aafd5b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000020000000000000000000000000000000000020000000000000001000000000000000000000000000000000000000000000000000000000008000000000400000000000000000000000000000000000000000000000000000000000000000008302060019832fefd8825a428455b7e50380a050d46eb9bcd45288482226489dd997db6d88fd174f85696bd774ed2d448ea37a8887d2ed16dbbdbe0ff866f86418018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84b61c05031ba08a7b6003ebec88ecf63224c10449f1e070b3402d0eef26ebb8428127154a8cfaa0797fc274f648c58fdd5f991480bfc3b40784a96cc478de8754943de69d28d9ebc0", + "rlp" : "0xf90265f901f9a01b0e205a3863367b61e0a3092adc7a9c16e85e23dbb8e8a7c34aa470bdc32113a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cf966b3f77c73436ebd1ef71d85a4561e0a6616d831c2d2bfa540988b892de4fa0b3e4765530d4eea64c0a0170b962871f6427678a4cb611677c9f4711ea7efbaba0dfbc5e47076c37b43e77dfc3f9e2c08269e5a9f5a27e9142b74ab971565aafd5b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000020000000000000000000000000000000000020000000000000001000000000000000000000000000000000000000000000000000000000008000000000400000000000000000000000000000000000000000000000000000000000000000008302060019832fefd8825a4284561bc32180a0c0c0a005e3051ed0ff3f65867f83cf22bab8d289cfd59410c878ceff9c3289a98818e179a6d53f6917f866f86418018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84b61c05031ba08a7b6003ebec88ecf63224c10449f1e070b3402d0eef26ebb8428127154a8cfaa0797fc274f648c58fdd5f991480bfc3b40784a96cc478de8754943de69d28d9ebc0", "transactions" : [ { "data" : "0xb61c0503", @@ -970,19 +970,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5802", - "hash" : "6083676b5ecdb08e71ba87efa86da5f3d4ccd1abd8f7751b493b5ee48787831c", - "mixHash" : "e957b66d5c8d7fb93c0a18d2c3781f287ca1a703d994c37877d628a6281a9501", - "nonce" : "87f877bff46e3ac5", + "hash" : "cf6322ea8cb70889f848d02750c16b05efe1cca66c7886364b38b79511eb6296", + "mixHash" : "028be630c55d64748be148b9af9f66748a90f54d6701906a2daeb4b32321196b", + "nonce" : "c360bdbc87819f8e", "number" : "0x1a", - "parentHash" : "26492149b84324a501a48d307902aaa8d435a9b41daeb5c29a374cbd00f0b743", + "parentHash" : "b73cee02246c6f32ac0f459934e89102c2ce904d966a4fc2ab6309c3e104b9cb", "receiptTrie" : "5f65c93364fc875392c424393462348dba0fc68d82a1fc292fc572a2be6c5559", "stateRoot" : "72aa24a3b4cbf17363e34478850a5e063982f7fc0e26e455d9501923747ebf54", - "timestamp" : "0x55b7e504", + "timestamp" : "0x561bc323", "transactionsTrie" : "ee4f8fb4f5b00ab1c4554adf50720f893661d1644f5dc1d3d019adeadc68c7be", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "26", - "rlp" : "0xf90265f901f9a026492149b84324a501a48d307902aaa8d435a9b41daeb5c29a374cbd00f0b743a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072aa24a3b4cbf17363e34478850a5e063982f7fc0e26e455d9501923747ebf54a0ee4f8fb4f5b00ab1c4554adf50720f893661d1644f5dc1d3d019adeadc68c7bea05f65c93364fc875392c424393462348dba0fc68d82a1fc292fc572a2be6c5559b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000040000000000000000000000000000000000000000000000000000000000000000000830206401a832fefd88258028455b7e50480a0e957b66d5c8d7fb93c0a18d2c3781f287ca1a703d994c37877d628a6281a95018887f877bff46e3ac5f866f86419018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a844e7ad3671ba0a0d3d69f5500344c6fae3771e9352d1344295e84d164baf5a6c522e3e22bfe5ba057d790c8c275459b566fe58d912a5a08c6c733dd6f1aa312974de80cde457b04c0", + "rlp" : "0xf90265f901f9a0b73cee02246c6f32ac0f459934e89102c2ce904d966a4fc2ab6309c3e104b9cba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072aa24a3b4cbf17363e34478850a5e063982f7fc0e26e455d9501923747ebf54a0ee4f8fb4f5b00ab1c4554adf50720f893661d1644f5dc1d3d019adeadc68c7bea05f65c93364fc875392c424393462348dba0fc68d82a1fc292fc572a2be6c5559b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000040000000000000000000000000000000000000000000000000000000000000000000830206401a832fefd882580284561bc32380a0028be630c55d64748be148b9af9f66748a90f54d6701906a2daeb4b32321196b88c360bdbc87819f8ef866f86419018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a844e7ad3671ba0a0d3d69f5500344c6fae3771e9352d1344295e84d164baf5a6c522e3e22bfe5ba057d790c8c275459b566fe58d912a5a08c6c733dd6f1aa312974de80cde457b04c0", "transactions" : [ { "data" : "0x4e7ad367", @@ -1007,20 +1007,20 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5802", - "hash" : "6659b8a43739bd1f6c029c2b9e53e960581b78c85564d28548c1902a9b5d044e", - "mixHash" : "58ee9029bbf582703c1c73bf28132cae1b07acfb14b9fb8552f4bffc345c181b", - "nonce" : "2f9d39d90c79956a", + "hash" : "8807dc8e3c00e4852a8058a46f8d75af8c4733538b9fcdab1aa8c9206c317c04", + "mixHash" : "14596cc50693cfbdc7fddeb997aa9c47f0cf644078e3580d9ed2a77affa7cbbc", + "nonce" : "f9b5598d82099146", "number" : "0x1b", - "parentHash" : "6083676b5ecdb08e71ba87efa86da5f3d4ccd1abd8f7751b493b5ee48787831c", + "parentHash" : "cf6322ea8cb70889f848d02750c16b05efe1cca66c7886364b38b79511eb6296", "receiptTrie" : "38bef5758a3c44a18101670a8db5ff61b9849edcf08c4269175e2634642770ea", "stateRoot" : "f52cdf1bf5cbeca07363386807b87e729bfc3e1e6de0b13de586edfbc023932d", - "timestamp" : "0x55b7e506", + "timestamp" : "0x561bc326", "transactionsTrie" : "baec81594dd0c6ff1b564d23aa78396bea8da06f77cfcd3d230a953a51e6f1b0", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "27", "reverted" : true, - "rlp" : "0xf90265f901f9a06083676b5ecdb08e71ba87efa86da5f3d4ccd1abd8f7751b493b5ee48787831ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f52cdf1bf5cbeca07363386807b87e729bfc3e1e6de0b13de586edfbc023932da0baec81594dd0c6ff1b564d23aa78396bea8da06f77cfcd3d230a953a51e6f1b0a038bef5758a3c44a18101670a8db5ff61b9849edcf08c4269175e2634642770eab9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000040000000000000000000000000000000000000000000000000000000000000000000830206801b832fefd88258028455b7e50680a058ee9029bbf582703c1c73bf28132cae1b07acfb14b9fb8552f4bffc345c181b882f9d39d90c79956af866f8641a018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a844e7ad3671ca0963d2a7d24fce46f8a0a1f5aec4d3eba558a2ac4758b88e198e6ab3a6e504aa7a02c3449797f7f2fec739b04ed579485cdd71adf83d3351e8d6ff2d2a381a5afcec0", + "rlp" : "0xf90265f901f9a0cf6322ea8cb70889f848d02750c16b05efe1cca66c7886364b38b79511eb6296a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f52cdf1bf5cbeca07363386807b87e729bfc3e1e6de0b13de586edfbc023932da0baec81594dd0c6ff1b564d23aa78396bea8da06f77cfcd3d230a953a51e6f1b0a038bef5758a3c44a18101670a8db5ff61b9849edcf08c4269175e2634642770eab9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000040000000000000000000000000000000000000000000000000000000000000000000830206801b832fefd882580284561bc32680a014596cc50693cfbdc7fddeb997aa9c47f0cf644078e3580d9ed2a77affa7cbbc88f9b5598d82099146f866f8641a018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a844e7ad3671ca0963d2a7d24fce46f8a0a1f5aec4d3eba558a2ac4758b88e198e6ab3a6e504aa7a02c3449797f7f2fec739b04ed579485cdd71adf83d3351e8d6ff2d2a381a5afcec0", "transactions" : [ { "data" : "0x4e7ad367", @@ -1045,20 +1045,20 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5802", - "hash" : "bece7789c20568ea9ebe84be5c82fab4e53aed99ab8441432f38b2a1abbb6e58", - "mixHash" : "51b262724ce1208e59492c9b5447437ffc1f0ee6852580794ab3210a5c74f711", - "nonce" : "98b3f1a2d193922a", + "hash" : "0586b6ab308baacd0888a0fcb674bc335a6a79ef8646d03eca7404b337dfe376", + "mixHash" : "1b1353a53da760a86c7cf37ce3694a6127296ac1a5c8ad22af4308639ed41d2c", + "nonce" : "58b22b72b8e6ffb7", "number" : "0x1c", - "parentHash" : "6659b8a43739bd1f6c029c2b9e53e960581b78c85564d28548c1902a9b5d044e", + "parentHash" : "8807dc8e3c00e4852a8058a46f8d75af8c4733538b9fcdab1aa8c9206c317c04", "receiptTrie" : "ed7c1ade4afde994ff5be2a8da568723ced04f00abe43e06041b808e55449667", "stateRoot" : "5d7d0bb1e5bdd228a5303959da84bf47397c3837c2f0f18a9ce16b814f5e5624", - "timestamp" : "0x55b7e507", + "timestamp" : "0x561bc329", "transactionsTrie" : "f31d97f455889f3e546a301ae23bebb423ebd96af65091efbfa235590817992b", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "28", "reverted" : true, - "rlp" : "0xf90265f901f9a06659b8a43739bd1f6c029c2b9e53e960581b78c85564d28548c1902a9b5d044ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05d7d0bb1e5bdd228a5303959da84bf47397c3837c2f0f18a9ce16b814f5e5624a0f31d97f455889f3e546a301ae23bebb423ebd96af65091efbfa235590817992ba0ed7c1ade4afde994ff5be2a8da568723ced04f00abe43e06041b808e55449667b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000040000000000000000000000000000000000000000000000000000000000000000000830206c01c832fefd88258028455b7e50780a051b262724ce1208e59492c9b5447437ffc1f0ee6852580794ab3210a5c74f7118898b3f1a2d193922af866f8641b018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a844e7ad3671ca07ff9664a11bdede05371bed4697e712d6b2d2928f9b30a25601ba1540717fffea00475ab2fe2a21820d9752d5c2af73a05a50b0a211837d662dfb9d4a7cc11485cc0", + "rlp" : "0xf90265f901f9a08807dc8e3c00e4852a8058a46f8d75af8c4733538b9fcdab1aa8c9206c317c04a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05d7d0bb1e5bdd228a5303959da84bf47397c3837c2f0f18a9ce16b814f5e5624a0f31d97f455889f3e546a301ae23bebb423ebd96af65091efbfa235590817992ba0ed7c1ade4afde994ff5be2a8da568723ced04f00abe43e06041b808e55449667b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000040000000000000000000000000000000000000000000000000000000000000000000830206c01c832fefd882580284561bc32980a01b1353a53da760a86c7cf37ce3694a6127296ac1a5c8ad22af4308639ed41d2c8858b22b72b8e6ffb7f866f8641b018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a844e7ad3671ca07ff9664a11bdede05371bed4697e712d6b2d2928f9b30a25601ba1540717fffea00475ab2fe2a21820d9752d5c2af73a05a50b0a211837d662dfb9d4a7cc11485cc0", "transactions" : [ { "data" : "0x4e7ad367", @@ -1083,19 +1083,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5a61", - "hash" : "3b8defdc8d449fd1a4d263406c63cb55b56dc7d73be57b6455aae05d105378b2", - "mixHash" : "c889587ef80c569bea05101a3500ca3b5f504cfc1b2d1eb75d9503c6d0a2ad7b", - "nonce" : "9d5474ded8077cef", + "hash" : "7d5e45fa3fb773a8f20e6d78be05e1be5c833f3f55c78e39f86de344ba3ca466", + "mixHash" : "f94e8e461c7bc765f4019361419374601b72e21a7cbf69380b98961ddd66f841", + "nonce" : "a6fcbcb5480561f2", "number" : "0x1b", - "parentHash" : "6083676b5ecdb08e71ba87efa86da5f3d4ccd1abd8f7751b493b5ee48787831c", + "parentHash" : "cf6322ea8cb70889f848d02750c16b05efe1cca66c7886364b38b79511eb6296", "receiptTrie" : "d27053885a2fff8e47f262eedca37f47c4e08f71afd2fc9be871d99f6798ee1e", "stateRoot" : "b2806069ee8f4f39ab16a99af1d218f872c74be8b5203dd7f5dc13d9fd20f535", - "timestamp" : "0x55b7e509", + "timestamp" : "0x561bc32c", "transactionsTrie" : "4fb0607d82cc93844cf08999b13d4b7e4f6d77f0b3b6080cca552e321124ae4f", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "27", - "rlp" : "0xf90265f901f9a06083676b5ecdb08e71ba87efa86da5f3d4ccd1abd8f7751b493b5ee48787831ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b2806069ee8f4f39ab16a99af1d218f872c74be8b5203dd7f5dc13d9fd20f535a04fb0607d82cc93844cf08999b13d4b7e4f6d77f0b3b6080cca552e321124ae4fa0d27053885a2fff8e47f262eedca37f47c4e08f71afd2fc9be871d99f6798ee1eb9010000200000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000008000800000000040000000000000000000000000000000000000000000000000000000000000000000830206801b832fefd8825a618455b7e50980a0c889587ef80c569bea05101a3500ca3b5f504cfc1b2d1eb75d9503c6d0a2ad7b889d5474ded8077ceff866f8641a018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84102accc11ba085b3d99f1b45b3bb686d3dd801515dd02c0b7714fece58b33ed83a168ba3b876a02d9f7e8bce06f5de1686297c01dace2e4d6995c25a6b1bb614bff12ca4880d0cc0", + "rlp" : "0xf90265f901f9a0cf6322ea8cb70889f848d02750c16b05efe1cca66c7886364b38b79511eb6296a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b2806069ee8f4f39ab16a99af1d218f872c74be8b5203dd7f5dc13d9fd20f535a04fb0607d82cc93844cf08999b13d4b7e4f6d77f0b3b6080cca552e321124ae4fa0d27053885a2fff8e47f262eedca37f47c4e08f71afd2fc9be871d99f6798ee1eb9010000200000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000008000800000000040000000000000000000000000000000000000000000000000000000000000000000830206801b832fefd8825a6184561bc32c80a0f94e8e461c7bc765f4019361419374601b72e21a7cbf69380b98961ddd66f84188a6fcbcb5480561f2f866f8641a018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84102accc11ba085b3d99f1b45b3bb686d3dd801515dd02c0b7714fece58b33ed83a168ba3b876a02d9f7e8bce06f5de1686297c01dace2e4d6995c25a6b1bb614bff12ca4880d0cc0", "transactions" : [ { "data" : "0x102accc1", @@ -1120,19 +1120,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x59d9", - "hash" : "dbcb0e37a03846feb77fc862eedcc541819f8429d2b9100d567db79e380d47f3", - "mixHash" : "96d18c7c40ef9bbc6457cff7808eea8b6b96a4b88d21dd6b3b40bebaa0b67af4", - "nonce" : "e2bb8bd0ce469d51", + "hash" : "3af4d65d0a3cd2b227a57db72c6281ea9bf8af991a38c56e8fde3f79139f1fb9", + "mixHash" : "14537dc73fdec3a374c9be98894730129d21987eb5ad3b54ca51f721e724b829", + "nonce" : "00aa479cb98a719e", "number" : "0x1c", - "parentHash" : "3b8defdc8d449fd1a4d263406c63cb55b56dc7d73be57b6455aae05d105378b2", + "parentHash" : "7d5e45fa3fb773a8f20e6d78be05e1be5c833f3f55c78e39f86de344ba3ca466", "receiptTrie" : "cd7a231551a790daf984b468ecd8d44f2a1622120657c327226c7551badc913a", "stateRoot" : "d3a23bf54b42df2f60c22497f90f883b62a4a5ba9c31ebc825c521cdf79f5559", - "timestamp" : "0x55b7e50a", + "timestamp" : "0x561bc330", "transactionsTrie" : "f03a9d896e978fd8840e4a606b9d89535467eb865eabb535ae53af515951ef41", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "28", - "rlp" : "0xf90265f901f9a03b8defdc8d449fd1a4d263406c63cb55b56dc7d73be57b6455aae05d105378b2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d3a23bf54b42df2f60c22497f90f883b62a4a5ba9c31ebc825c521cdf79f5559a0f03a9d896e978fd8840e4a606b9d89535467eb865eabb535ae53af515951ef41a0cd7a231551a790daf984b468ecd8d44f2a1622120657c327226c7551badc913ab9010000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000040000000000000000000000000000000000000000000000000000000000000000000830206c01c832fefd88259d98455b7e50a80a096d18c7c40ef9bbc6457cff7808eea8b6b96a4b88d21dd6b3b40bebaa0b67af488e2bb8bd0ce469d51f866f8641b018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a8476bc21d91ba08e52a96e2829c05c81fa4495908fdb637de59411a6fe51bad0d81448660ae833a070b204e1f9266980a6fc391f58df76d329f8e2c9dc81aeeefea9e1adafa244c1c0", + "rlp" : "0xf90265f901f9a07d5e45fa3fb773a8f20e6d78be05e1be5c833f3f55c78e39f86de344ba3ca466a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d3a23bf54b42df2f60c22497f90f883b62a4a5ba9c31ebc825c521cdf79f5559a0f03a9d896e978fd8840e4a606b9d89535467eb865eabb535ae53af515951ef41a0cd7a231551a790daf984b468ecd8d44f2a1622120657c327226c7551badc913ab9010000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000040000000000000000000000000000000000000000000000000000000000000000000830206c01c832fefd88259d984561bc33080a014537dc73fdec3a374c9be98894730129d21987eb5ad3b54ca51f721e724b8298800aa479cb98a719ef866f8641b018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a8476bc21d91ba08e52a96e2829c05c81fa4495908fdb637de59411a6fe51bad0d81448660ae833a070b204e1f9266980a6fc391f58df76d329f8e2c9dc81aeeefea9e1adafa244c1c0", "transactions" : [ { "data" : "0x76bc21d9", @@ -1157,19 +1157,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5d71", - "hash" : "a861daf9c8691fe5a3a975bcb34aa103214e9864818de25f0da09ab7b958c965", - "mixHash" : "bbd7df00bd20993156d9a8ac59a859c1ece24ecca4458ce0a32f9a49e97ac020", - "nonce" : "99de8bdcb239f6b8", + "hash" : "f8cfa377bd766cdf22edb388dd08cc149e85d24f2796678c835f3c54ab930803", + "mixHash" : "a2a1bc99a5be81795ff2913df60fa50e8e92a79aee8ba8d6679cf4150bf6d204", + "nonce" : "ac60333bb1dc1b9f", "number" : "0x1d", - "parentHash" : "dbcb0e37a03846feb77fc862eedcc541819f8429d2b9100d567db79e380d47f3", + "parentHash" : "3af4d65d0a3cd2b227a57db72c6281ea9bf8af991a38c56e8fde3f79139f1fb9", "receiptTrie" : "e581db9e8fccb100c62d375422e8b03b193b3959d6728ecb4fa4162df09de7ce", "stateRoot" : "6272d848a20a32c67ce49130cc524750b01b8caaa7be2fc3318d7d6d0c846bc4", - "timestamp" : "0x55b7e50c", + "timestamp" : "0x561bc334", "transactionsTrie" : "bc429bf175bb1bc8922de0738c057349b37fb520827d872e1c0d3f5c4ab9b7cd", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "29", - "rlp" : "0xf90265f901f9a0dbcb0e37a03846feb77fc862eedcc541819f8429d2b9100d567db79e380d47f3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a06272d848a20a32c67ce49130cc524750b01b8caaa7be2fc3318d7d6d0c846bc4a0bc429bf175bb1bc8922de0738c057349b37fb520827d872e1c0d3f5c4ab9b7cda0e581db9e8fccb100c62d375422e8b03b193b3959d6728ecb4fa4162df09de7ceb9010000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200080000000000000002000000000000000000000000000000000000000000000000000800000000000000000000000200000000000000000000000000000000000800000000040000000000000000000000000000000000000000010000000000000000000000000830207001d832fefd8825d718455b7e50c80a0bbd7df00bd20993156d9a8ac59a859c1ece24ecca4458ce0a32f9a49e97ac0208899de8bdcb239f6b8f866f8641c018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84f38b06001ca059c60e61c44cfd1f6dc872763e6cf6f84b62430ca1b8e8186894064740c30022a070d82ba16c8feb6ea33c8bdbfd0ac52df572061fdf3c5d34c8b0526dff4666b6c0", + "rlp" : "0xf90265f901f9a03af4d65d0a3cd2b227a57db72c6281ea9bf8af991a38c56e8fde3f79139f1fb9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a06272d848a20a32c67ce49130cc524750b01b8caaa7be2fc3318d7d6d0c846bc4a0bc429bf175bb1bc8922de0738c057349b37fb520827d872e1c0d3f5c4ab9b7cda0e581db9e8fccb100c62d375422e8b03b193b3959d6728ecb4fa4162df09de7ceb9010000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200080000000000000002000000000000000000000000000000000000000000000000000800000000000000000000000200000000000000000000000000000000000800000000040000000000000000000000000000000000000000010000000000000000000000000830207001d832fefd8825d7184561bc33480a0a2a1bc99a5be81795ff2913df60fa50e8e92a79aee8ba8d6679cf4150bf6d20488ac60333bb1dc1b9ff866f8641c018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84f38b06001ca059c60e61c44cfd1f6dc872763e6cf6f84b62430ca1b8e8186894064740c30022a070d82ba16c8feb6ea33c8bdbfd0ac52df572061fdf3c5d34c8b0526dff4666b6c0", "transactions" : [ { "data" : "0xf38b0600", @@ -1194,19 +1194,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5c21", - "hash" : "f8f8bf8317c7a3e7e38f50176a8e5434f9d5b7008637cffec90ce78fe284773a", - "mixHash" : "f3a60cf0b52a90595cd011b3593564d5a7e3bf8d0f9c187ae813e85adf502a77", - "nonce" : "0c6185a33a4008ab", + "hash" : "c8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6", + "mixHash" : "6ce1c4afb4f85fefd1b0ed966b20cd248f08d9a5b0df773f75c6c2f5cc237b7c", + "nonce" : "5c321bd9e9f040f1", "number" : "0x1e", - "parentHash" : "a861daf9c8691fe5a3a975bcb34aa103214e9864818de25f0da09ab7b958c965", + "parentHash" : "f8cfa377bd766cdf22edb388dd08cc149e85d24f2796678c835f3c54ab930803", "receiptTrie" : "88b3b304b058b39791c26fdb94a05cc16ce67cf8f84f7348cb3c60c0ff342d0d", "stateRoot" : "db46d6bb168130fe2cb60b4b24346137b5741f11283e0d7edace65c5f5466b2e", - "timestamp" : "0x55b7e50e", + "timestamp" : "0x561bc336", "transactionsTrie" : "5a8d5d966b48e1331ae19eb459eb28882cdc7654e615d37774b79204e875dc01", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "30", - "rlp" : "0xf90265f901f9a0a861daf9c8691fe5a3a975bcb34aa103214e9864818de25f0da09ab7b958c965a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0db46d6bb168130fe2cb60b4b24346137b5741f11283e0d7edace65c5f5466b2ea05a8d5d966b48e1331ae19eb459eb28882cdc7654e615d37774b79204e875dc01a088b3b304b058b39791c26fdb94a05cc16ce67cf8f84f7348cb3c60c0ff342d0db9010000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000800000000040000000000000000000000000000000000000000010000000000000000000000000830207401e832fefd8825c218455b7e50e80a0f3a60cf0b52a90595cd011b3593564d5a7e3bf8d0f9c187ae813e85adf502a77880c6185a33a4008abf866f8641d018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84e8beef5b1ca011232cac2f935ab8dd5d5972438fde90e05d0dd620860b42886e7d54dc5c4a0ca03dd467b5faa6e5a0f3c22a5396fefa5b03f07d8114d8434e0e1493736aad8d0ec0", + "rlp" : "0xf90265f901f9a0f8cfa377bd766cdf22edb388dd08cc149e85d24f2796678c835f3c54ab930803a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0db46d6bb168130fe2cb60b4b24346137b5741f11283e0d7edace65c5f5466b2ea05a8d5d966b48e1331ae19eb459eb28882cdc7654e615d37774b79204e875dc01a088b3b304b058b39791c26fdb94a05cc16ce67cf8f84f7348cb3c60c0ff342d0db9010000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000800000000040000000000000000000000000000000000000000010000000000000000000000000830207401e832fefd8825c2184561bc33680a06ce1c4afb4f85fefd1b0ed966b20cd248f08d9a5b0df773f75c6c2f5cc237b7c885c321bd9e9f040f1f866f8641d018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84e8beef5b1ca011232cac2f935ab8dd5d5972438fde90e05d0dd620860b42886e7d54dc5c4a0ca03dd467b5faa6e5a0f3c22a5396fefa5b03f07d8114d8434e0e1493736aad8d0ec0", "transactions" : [ { "data" : "0xe8beef5b", @@ -1231,19 +1231,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5eef", - "hash" : "fdf70abc003b27538551d1eba63454ba477940db691f3ac2efa18bae89b7933a", - "mixHash" : "f81290df6825cf3c70e0e978eb363a1a985183d68b586037ad51f9e913eb892a", - "nonce" : "dee58178eeb52361", + "hash" : "0f765087745aa259d9e5ac39c367c57432a16ed98e3b0d81c5b51d10f301dc49", + "mixHash" : "47c3c542b2db45599dd9f6e6f8bdc0ca3ed9694a92d65e617c44d685ee855bcf", + "nonce" : "d3a27a3001616468", "number" : "0x1f", - "parentHash" : "f8f8bf8317c7a3e7e38f50176a8e5434f9d5b7008637cffec90ce78fe284773a", + "parentHash" : "c8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6", "receiptTrie" : "2440c44a3f75ad8b0425a73e7be2f61a5171112465cfd14e62e735b56d7178e6", "stateRoot" : "a80997cf804269d64f2479baf535cf8f9090b70fbf515741c6995564f1e678bd", - "timestamp" : "0x55b7e510", + "timestamp" : "0x561bc33a", "transactionsTrie" : "3820f2d246abd73f840499da859eeaa599ce830d6023e4e92ca463570aa6aa70", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "31", - "rlp" : "0xf90265f901f9a0f8f8bf8317c7a3e7e38f50176a8e5434f9d5b7008637cffec90ce78fe284773aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a80997cf804269d64f2479baf535cf8f9090b70fbf515741c6995564f1e678bda03820f2d246abd73f840499da859eeaa599ce830d6023e4e92ca463570aa6aa70a02440c44a3f75ad8b0425a73e7be2f61a5171112465cfd14e62e735b56d7178e6b9010000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200000000000000000002000000000000000000000001000000000000000000000000000000000000000000000000000200000000000000000000000000000000000800000000040000000000001000000000000000000000000000010000000000000000000400000830207801f832fefd8825eef8455b7e51080a0f81290df6825cf3c70e0e978eb363a1a985183d68b586037ad51f9e913eb892a88dee58178eeb52361f866f8641e018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84fd4087671ca00687b8e307292652f09a743e3d43322feb5d837089f70face43b14b215a2c46aa0622020b8b9f36a66c55d65a1d66bd7003b23956584e1a3b477d9406b5db7842cc0", + "rlp" : "0xf90265f901f9a0c8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a80997cf804269d64f2479baf535cf8f9090b70fbf515741c6995564f1e678bda03820f2d246abd73f840499da859eeaa599ce830d6023e4e92ca463570aa6aa70a02440c44a3f75ad8b0425a73e7be2f61a5171112465cfd14e62e735b56d7178e6b9010000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200000000000000000002000000000000000000000001000000000000000000000000000000000000000000000000000200000000000000000000000000000000000800000000040000000000001000000000000000000000000000010000000000000000000400000830207801f832fefd8825eef84561bc33a80a047c3c542b2db45599dd9f6e6f8bdc0ca3ed9694a92d65e617c44d685ee855bcf88d3a27a3001616468f866f8641e018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a84fd4087671ca00687b8e307292652f09a743e3d43322feb5d837089f70face43b14b215a2c46aa0622020b8b9f36a66c55d65a1d66bd7003b23956584e1a3b477d9406b5db7842cc0", "transactions" : [ { "data" : "0xfd408767", @@ -1268,19 +1268,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5c99", - "hash" : "96359e770685cb02977a3bd6bb7181e0a7a20ce5ffee92525407bde2fd619dbc", - "mixHash" : "875fc85eeb862faccd027fe008125cf2a1a17186d594c138b19c129f43473ac4", - "nonce" : "b987b0725363e752", + "hash" : "71d59849ddd98543bdfbe8548f5eed559b07b8aaf196369f39134500eab68e53", + "mixHash" : "4edd77bfff565659bb0ae09421918e4def65d938a900eb94230eb01f5ce80c99", + "nonce" : "db063000b00e8026", "number" : "0x20", - "parentHash" : "fdf70abc003b27538551d1eba63454ba477940db691f3ac2efa18bae89b7933a", + "parentHash" : "0f765087745aa259d9e5ac39c367c57432a16ed98e3b0d81c5b51d10f301dc49", "receiptTrie" : "a50a7e67e833f4502524371ee462ccbcc6c6cabd2aeb1555c56150007a53183c", "stateRoot" : "f65f3dd13f72f5fa5607a5224691419969b4f4bae7a00a6cdb853f2ca9eeb1be", - "timestamp" : "0x55b7e514", + "timestamp" : "0x561bc33d", "transactionsTrie" : "6075dd391cf791c74f9e01855d9e5061d009c0903dc102e8b00bcafde8f92839", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "32", - "rlp" : "0xf90265f901f9a0fdf70abc003b27538551d1eba63454ba477940db691f3ac2efa18bae89b7933aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f65f3dd13f72f5fa5607a5224691419969b4f4bae7a00a6cdb853f2ca9eeb1bea06075dd391cf791c74f9e01855d9e5061d009c0903dc102e8b00bcafde8f92839a0a50a7e67e833f4502524371ee462ccbcc6c6cabd2aeb1555c56150007a53183cb9010000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000800000000040000000000000000000000000000000000000000010000000000000000000000000830207c020832fefd8825c998455b7e51480a0875fc85eeb862faccd027fe008125cf2a1a17186d594c138b19c129f43473ac488b987b0725363e752f866f8641f018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a849dc2c8f51ba0705b002a7df60707d33812e0298411721be20ea5a2f533707295140d89263b79a078024390784f24160739533b3ceea2698289a02afd9cc768581b4aa3d5f4b105c0", + "rlp" : "0xf90265f901f9a00f765087745aa259d9e5ac39c367c57432a16ed98e3b0d81c5b51d10f301dc49a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f65f3dd13f72f5fa5607a5224691419969b4f4bae7a00a6cdb853f2ca9eeb1bea06075dd391cf791c74f9e01855d9e5061d009c0903dc102e8b00bcafde8f92839a0a50a7e67e833f4502524371ee462ccbcc6c6cabd2aeb1555c56150007a53183cb9010000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000800000000040000000000000000000000000000000000000000010000000000000000000000000830207c020832fefd8825c9984561bc33d80a04edd77bfff565659bb0ae09421918e4def65d938a900eb94230eb01f5ce80c9988db063000b00e8026f866f8641f018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a849dc2c8f51ba0705b002a7df60707d33812e0298411721be20ea5a2f533707295140d89263b79a078024390784f24160739533b3ceea2698289a02afd9cc768581b4aa3d5f4b105c0", "transactions" : [ { "data" : "0x9dc2c8f5", @@ -1305,9 +1305,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "2cea6f0c7c04b037b209a37d2b85d49579e38342fbaaf94a204fce57df270bc8", - "mixHash" : "262fac522e13afa2ccf8b0484dedd2bb58b9807591500f8f7736faa7ba53696d", - "nonce" : "648c5dac63fcf035", + "hash" : "f8f01382f5636d02edac7fff679a6feb7a572d37a395daaab77938feb6fe217f", + "mixHash" : "2c85bcbce56429100b2108254bb56906257582aeafcbd682bc9af67a9f5aee46", + "nonce" : "78cc16f7b4f65485", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1316,8 +1316,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0262fac522e13afa2ccf8b0484dedd2bb58b9807591500f8f7736faa7ba53696d88648c5dac63fcf035c0c0", - "lastblockhash" : "96359e770685cb02977a3bd6bb7181e0a7a20ce5ffee92525407bde2fd619dbc", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a02c85bcbce56429100b2108254bb56906257582aeafcbd682bc9af67a9f5aee468878cc16f7b4f65485c0c0", + "lastblockhash" : "71d59849ddd98543bdfbe8548f5eed559b07b8aaf196369f39134500eab68e53", "postState" : { "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { "balance" : "0x0140", diff --git a/tests/files/BlockchainTests/bcStateTest.json b/tests/files/BlockchainTests/bcStateTest.json new file mode 100644 index 000000000..42a178883 --- /dev/null +++ b/tests/files/BlockchainTests/bcStateTest.json @@ -0,0 +1,390 @@ +{ + "OOGStateCopyContainingDeletedContract" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x038630", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x021ed0", + "hash" : "014b39d133f9d4c8c7bdcee836d4fe604c756631b7898b460a617a421543e280", + "mixHash" : "da18471f32318c815ec959b86d97c24c65fae58e3a902ebd5b7c284392560ad8", + "nonce" : "1ac71d069dca27a7", + "number" : "0x01", + "parentHash" : "86cd7aadbf4f477ea464777479de88b172152fedacf5c7890c28b78254b6db5f", + "receiptTrie" : "3e21fb330e6981a4657f97fc2ace223c75f17d83f0fa017586d5b872b48b4824", + "stateRoot" : "042cf0272a105f572ee8a5a3014aef7fff760fc3ce18c2aedac0cc55c152a4b9", + "timestamp" : "0x561bbe06", + "transactionsTrie" : "5c3eb7e26c39308ede0b5a0b9b403fb89c3369deda106c32faf7d0def6f421d2", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf902eef901faa086cd7aadbf4f477ea464777479de88b172152fedacf5c7890c28b78254b6db5fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0042cf0272a105f572ee8a5a3014aef7fff760fc3ce18c2aedac0cc55c152a4b9a05c3eb7e26c39308ede0b5a0b9b403fb89c3369deda106c32faf7d0def6f421d2a03e21fb330e6981a4657f97fc2ace223c75f17d83f0fa017586d5b872b48b4824b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd883021ed084561bbe0680a0da18471f32318c815ec959b86d97c24c65fae58e3a902ebd5b7c284392560ad8881ac71d069dca27a7f8eef864800a830493e09464306ec3f51a26dcf19f5da0c043040f54f4eca501840c5feb5d1ba00cf2cc4de3013273d0aae3cf36cdb6cf152573f7a5b99fe2c514a845bbb98a93a048f4aa20b37303bf4f2c0e7e5f6c178814f99ab4d3d98cf9382185f1ae256b7ff886010a830493e0942e0de3fc10a88911ff857126db1a5f0da6f251738203eaa4fc49c80e00000000000000000000000064306ec3f51a26dcf19f5da0c043040f54f4eca51ca0c9f11f1b4aedd9c1d99a6e2aea6f9ce90bdd6bb6063193715fdb43e77029346fa03440044e3aa54293e887f1751146bf915e73c39eae7da82b75a6d2c7a31d252bc0", + "transactions" : [ + { + "data" : "0x0c5feb5d", + "gasLimit" : "0x0493e0", + "gasPrice" : "0x0a", + "nonce" : "0x00", + "r" : "0x0cf2cc4de3013273d0aae3cf36cdb6cf152573f7a5b99fe2c514a845bbb98a93", + "s" : "0x48f4aa20b37303bf4f2c0e7e5f6c178814f99ab4d3d98cf9382185f1ae256b7f", + "to" : "64306ec3f51a26dcf19f5da0c043040f54f4eca5", + "v" : "0x1b", + "value" : "0x01" + }, + { + "data" : "0xfc49c80e00000000000000000000000064306ec3f51a26dcf19f5da0c043040f54f4eca5", + "gasLimit" : "0x0493e0", + "gasPrice" : "0x0a", + "nonce" : "0x01", + "r" : "0xc9f11f1b4aedd9c1d99a6e2aea6f9ce90bdd6bb6063193715fdb43e77029346f", + "s" : "0x3440044e3aa54293e887f1751146bf915e73c39eae7da82b75a6d2c7a31d252b", + "to" : "2e0de3fc10a88911ff857126db1a5f0da6f25173", + "v" : "0x1c", + "value" : "0x03ea" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0386a0", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "86cd7aadbf4f477ea464777479de88b172152fedacf5c7890c28b78254b6db5f", + "mixHash" : "74b52d9518d9bf2a1ca37de5defc10ced5f94712cf550af50abf15907f4f4450", + "nonce" : "bffdbdd2a34e324c", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "2b9f478fe39744a8c17eb48ae7bf86f6a47031a823a632f9bd661b59978aeefd", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a02b9f478fe39744a8c17eb48ae7bf86f6a47031a823a632f9bd661b59978aeefda056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a074b52d9518d9bf2a1ca37de5defc10ced5f94712cf550af50abf15907f4f445088bffdbdd2a34e324cc0c0", + "lastblockhash" : "014b39d133f9d4c8c7bdcee836d4fe604c756631b7898b460a617a421543e280", + "postState" : { + "2e0de3fc10a88911ff857126db1a5f0da6f25173" : { + "balance" : "0x03eb", + "code" : "0x60606040526000357c01000000000000000000000000000000000000000000000000000000009004806342e90c3314610044578063fc49c80e1461005157610042565b005b61004f600450610064565b005b6100626004803590602001506100a4565b005b6000600090505b600a8160ff1610156100a057602a600060005082600a81101561000257909001600050819055505b808060010191505061006b565b5b50565b3073ffffffffffffffffffffffffffffffffffffffff1661ea6060405180807f53746f7265282900000000000000000000000000000000000000000000000000815260200150600701905060405180910390207c0100000000000000000000000000000000000000000000000000000000809104027c0100000000000000000000000000000000000000000000000000000000900490604051827c010000000000000000000000000000000000000000000000000000000002815260040180905060006040518083038160008887f19350505050508073ffffffffffffffffffffffffffffffffffffffff166326c6a34c604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506020604051808303816000876161da5a03f115610002575050506040515160006000506009600a81101561000257909001600050819055505b5056", + "nonce" : "0x00", + "storage" : { + "0x09" : "0x26c6a34c00000000000000000000000000000000000000000000000000000000" + } + }, + "64306ec3f51a26dcf19f5da0c043040f54f4eca5" : { + "balance" : "0x00", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x4563918245093420", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x174861aff7", + "code" : "0x", + "nonce" : "0x02", + "storage" : { + } + } + }, + "pre" : { + "2e0de3fc10a88911ff857126db1a5f0da6f25173" : { + "balance" : "0x01", + "code" : "0x60606040526000357c01000000000000000000000000000000000000000000000000000000009004806342e90c3314610044578063fc49c80e1461005157610042565b005b61004f600450610064565b005b6100626004803590602001506100a4565b005b6000600090505b600a8160ff1610156100a057602a600060005082600a81101561000257909001600050819055505b808060010191505061006b565b5b50565b3073ffffffffffffffffffffffffffffffffffffffff1661ea6060405180807f53746f7265282900000000000000000000000000000000000000000000000000815260200150600701905060405180910390207c0100000000000000000000000000000000000000000000000000000000809104027c0100000000000000000000000000000000000000000000000000000000900490604051827c010000000000000000000000000000000000000000000000000000000002815260040180905060006040518083038160008887f19350505050508073ffffffffffffffffffffffffffffffffffffffff166326c6a34c604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506020604051808303816000876161da5a03f115610002575050506040515160006000506009600a81101561000257909001600050819055505b5056", + "nonce" : "0x00", + "storage" : { + } + }, + "64306ec3f51a26dcf19f5da0c043040f54f4eca5" : { + "balance" : "0x01", + "code" : "0x60606040526000357c0100000000000000000000000000000000000000000000000000000000900480630c5feb5d14604157806326c6a34c14604c57603f565b005b604a600450606b565b005b60556004506086565b6040518082815260200191505060405180910390f35b3373ffffffffffffffffffffffffffffffffffffffff16ff5b565b600061053990506091565b9056", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x174876e800", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "SuicideCoinbase" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x038630", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0xcdc7", + "hash" : "31a2017106ea3824e38473942bd2e3b2821c8b3180eb64b25f9beb00a8a1fcb7", + "mixHash" : "a713c7d424b0945b3e2212c9710efe7c704750fa5553c6b7eb86d2a1a19d1f79", + "nonce" : "89725425afc4aff2", + "number" : "0x01", + "parentHash" : "577f0011f92e09511e4ab256b72e1ac11610c3728179e0b7bd76aad4426adb92", + "receiptTrie" : "56e592ae6cf92b6c205e50d9cdbf1d3c5fe7f9fbc2bf219b93855107518e7e7f", + "stateRoot" : "7564aa479e81b3f9a05b0f99193fdd7367ccc0e74d140249d943ce0df904ba02", + "timestamp" : "0x561bbe0b", + "transactionsTrie" : "fcfe9f2203bd98342867117fa3de299a09578371efd04fc9e76a46f7f1fda4bb", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf9032ef901f9a0577f0011f92e09511e4ab256b72e1ac11610c3728179e0b7bd76aad4426adb92a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07564aa479e81b3f9a05b0f99193fdd7367ccc0e74d140249d943ce0df904ba02a0fcfe9f2203bd98342867117fa3de299a09578371efd04fc9e76a46f7f1fda4bba056e592ae6cf92b6c205e50d9cdbf1d3c5fe7f9fbc2bf219b93855107518e7e7fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd882cdc784561bbe0b80a0a713c7d424b0945b3e2212c9710efe7c704750fa5553c6b7eb86d2a1a19d1f798889725425afc4aff2f9012ef866800a8307a120948888f1f195afa192cfee860698584c030f4c9db18203e9840c55699c1ba091fc4c402ced19b984e953546d3fc786c46a79c9f0c7918b8f3343dc529ef0e5a0546d89230c90ca8bf7988a826430d4771ab3a67cc0f3cb8019d67ab10ec10524f861010a82c3509400000000000000000000000000000000000000008203e8801ba0b03ab16ed211bf447ac030216ab088f18367ee51303545d2957990e9d3a28f10a07f18dd055139f7ac5558997b80ccae799ab6fbad2326799db509a9d4e5a52d72f861020a82c3509400000000000000000000000000000000000000008203ea801ba00925abd1221d388622138f4bae46803313f297001e96fec22dc4268fca5b5a82a055cd8142bcec39f80b359aa089f6a70568d23a67048026703981fad9339ef5d4c0", + "transactions" : [ + { + "data" : "0x0c55699c", + "gasLimit" : "0x07a120", + "gasPrice" : "0x0a", + "nonce" : "0x00", + "r" : "0x91fc4c402ced19b984e953546d3fc786c46a79c9f0c7918b8f3343dc529ef0e5", + "s" : "0x546d89230c90ca8bf7988a826430d4771ab3a67cc0f3cb8019d67ab10ec10524", + "to" : "8888f1f195afa192cfee860698584c030f4c9db1", + "v" : "0x1b", + "value" : "0x03e9" + }, + { + "data" : "0x", + "gasLimit" : "0xc350", + "gasPrice" : "0x0a", + "nonce" : "0x01", + "r" : "0xb03ab16ed211bf447ac030216ab088f18367ee51303545d2957990e9d3a28f10", + "s" : "0x7f18dd055139f7ac5558997b80ccae799ab6fbad2326799db509a9d4e5a52d72", + "to" : "0000000000000000000000000000000000000000", + "v" : "0x1b", + "value" : "0x03e8" + }, + { + "data" : "0x", + "gasLimit" : "0xc350", + "gasPrice" : "0x0a", + "nonce" : "0x02", + "r" : "0x0925abd1221d388622138f4bae46803313f297001e96fec22dc4268fca5b5a82", + "s" : "0x55cd8142bcec39f80b359aa089f6a70568d23a67048026703981fad9339ef5d4", + "to" : "0000000000000000000000000000000000000000", + "v" : "0x1b", + "value" : "0x03ea" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0386a0", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "577f0011f92e09511e4ab256b72e1ac11610c3728179e0b7bd76aad4426adb92", + "mixHash" : "7d92760f89c04bc4d1b3716423d0cc5c89244a513e960979149cea0b5162ea91", + "nonce" : "a35294f86be5ddb3", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "4941fba20142b10d43d0a893dfa4f5eedcbcb4b55c8554efd71e226624d9b37c", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04941fba20142b10d43d0a893dfa4f5eedcbcb4b55c8554efd71e226624d9b37ca056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a07d92760f89c04bc4d1b3716423d0cc5c89244a513e960979149cea0b5162ea9188a35294f86be5ddb3c0c0", + "lastblockhash" : "31a2017106ea3824e38473942bd2e3b2821c8b3180eb64b25f9beb00a8a1fcb7", + "postState" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0x07d2", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x4563918244fa68a0", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x025403d650", + "code" : "0x", + "nonce" : "0x03", + "storage" : { + } + } + }, + "pre" : { + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x03e8", + "code" : "0x60606040526000357c0100000000000000000000000000000000000000000000000000000000900480630c55699c146037576035565b005b60406004506042565b005b3373ffffffffffffffffffffffffffffffffffffffff16ff5b56", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x02540be400", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "simpleSuicide" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x038630", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x2906", + "hash" : "8ef175b4e1686b5356e5dcd67d011ba533930c5b9c71299ed290a0760094e471", + "mixHash" : "d09d59d77aa2d58a4c0467c2e154e4196c48d4e798053707672566b4939bd5d8", + "nonce" : "e1801fd770254ee7", + "number" : "0x01", + "parentHash" : "db30263a5f8d24f8b8eed1a1145188e137f0b54c4383cb7691a1a792abf2b33e", + "receiptTrie" : "45a1e5d92294ba129a8dcd41456fd5ffc2eadb690b16916783910b77d05e61c8", + "stateRoot" : "2634dc0c8fab13c3e11d813a506945f50b03f86221b1713ee7a33229da24f943", + "timestamp" : "0x561bbe10", + "transactionsTrie" : "53d5b71a8fbb9590de82d69dfa4ac31923b0c8afce0d30d0d8d1e931f25030dc", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf90260f901f9a0db30263a5f8d24f8b8eed1a1145188e137f0b54c4383cb7691a1a792abf2b33ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a02634dc0c8fab13c3e11d813a506945f50b03f86221b1713ee7a33229da24f943a053d5b71a8fbb9590de82d69dfa4ac31923b0c8afce0d30d0d8d1e931f25030dca045a1e5d92294ba129a8dcd41456fd5ffc2eadb690b16916783910b77d05e61c8b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd882290684561bbe1080a0d09d59d77aa2d58a4c0467c2e154e4196c48d4e798053707672566b4939bd5d888e1801fd770254ee7f861f85f800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0f3266921c93d600c43f6fa4724b7abae079b35b9e95df592f95f9f3445e94c88a012f977552ebdb7a492cf35f3106df16ccb4576ebad4113056ee1f52cbe4978c1c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0xc350", + "gasPrice" : "0x0a", + "nonce" : "0x00", + "r" : "0xf3266921c93d600c43f6fa4724b7abae079b35b9e95df592f95f9f3445e94c88", + "s" : "0x12f977552ebdb7a492cf35f3106df16ccb4576ebad4113056ee1f52cbe4978c1", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0386a0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "931242008fdd7af531ca0a94fe481592a2ec46813d67c246e6d53f5a09cdf2b1", + "mixHash" : "d7cd6cc9a86a3f8818843fa8ee25c55f62f491d6246bb248613c810d7b3c5423", + "nonce" : "f32510acc0379d94", + "number" : "0x02", + "parentHash" : "8ef175b4e1686b5356e5dcd67d011ba533930c5b9c71299ed290a0760094e471", + "receiptTrie" : "6952621e59f670b82f765b40711cfbc3fff5eb3ca56c6c1509cb8bf915ae94da", + "stateRoot" : "600002151e3bc50cd8136dcbfbc8dedf3ec063710d46e5ba1cc6f5d1796f1ea5", + "timestamp" : "0x561bbe13", + "transactionsTrie" : "326814571a40c9c7db48527b6819d6a25c03735dd63a9762911729510d07a45c", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf90262f901f9a08ef175b4e1686b5356e5dcd67d011ba533930c5b9c71299ed290a0760094e471a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0600002151e3bc50cd8136dcbfbc8dedf3ec063710d46e5ba1cc6f5d1796f1ea5a0326814571a40c9c7db48527b6819d6a25c03735dd63a9762911729510d07a45ca06952621e59f670b82f765b40711cfbc3fff5eb3ca56c6c1509cb8bf915ae94dab9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd882520884561bbe1380a0d7cd6cc9a86a3f8818843fa8ee25c55f62f491d6246bb248613c810d7b3c542388f32510acc0379d94f863f861010a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d878203e8801ba0823762ef8e6fc0498753553d5defe18004462e636cf76eb06515c7652aac3040a07239c31a3df7ea1e894d71558ac36179c97446bc630f3f4b8d035ee436b6ad46c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0xc350", + "gasPrice" : "0x0a", + "nonce" : "0x01", + "r" : "0x823762ef8e6fc0498753553d5defe18004462e636cf76eb06515c7652aac3040", + "s" : "0x7239c31a3df7ea1e894d71558ac36179c97446bc630f3f4b8d035ee436b6ad46", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x03e8" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0386a0", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "db30263a5f8d24f8b8eed1a1145188e137f0b54c4383cb7691a1a792abf2b33e", + "mixHash" : "30ff6ec57e2a78935672f5bc465560aaea35ec4d0205d6782b5f8d75c8223204", + "nonce" : "0727621fcf9d0354", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "c53ee8f6624173f7efcc6c8a9bd54181fb079a52e0e1a78e16de4a6a5b74071b", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c53ee8f6624173f7efcc6c8a9bd54181fb079a52e0e1a78e16de4a6a5b74071ba056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a030ff6ec57e2a78935672f5bc465560aaea35ec4d0205d6782b5f8d75c8223204880727621fcf9d0354c0c0", + "lastblockhash" : "931242008fdd7af531ca0a94fe481592a2ec46813d67c246e6d53f5a09cdf2b1", + "postState" : { + "0000000000000000000000000000000000000080" : { + "balance" : "0x0186aa", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x03e8", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x8ac7230489ecce8c", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x17486d4304", + "code" : "0x", + "nonce" : "0x02", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x0186a0", + "code" : "0x6080ff", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x1748721582", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/files/BlockchainTests/bcTotalDifficultyTest.json b/tests/files/BlockchainTests/bcTotalDifficultyTest.json index d0b637790..b88000346 100644 --- a/tests/files/BlockchainTests/bcTotalDifficultyTest.json +++ b/tests/files/BlockchainTests/bcTotalDifficultyTest.json @@ -9,19 +9,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "a96d5a22328f7587aa3ba472074d5a89f8c6813ab8de2e98c02334bc87c9ec81", - "mixHash" : "16c79ca4af69f90219d1cdb49e72e148aec1dabc2218c0a931eb3f624b7a530d", - "nonce" : "078348d823227ede", + "hash" : "0e4d85769385d0ad89b00f3156924c51618d8d9824db47ee2a185c30382836c2", + "mixHash" : "79caeef18300e4fa32500b4a809b45b06507af5947a54d84c6535886e5c2c761", + "nonce" : "23fd150fa6da87a8", "number" : "0x01", - "parentHash" : "c6d9b261b911c48e5274bff91149682505b6dd8c56af24c9f7da1735141856ea", + "parentHash" : "978d45b092a880b1eea0dd9de140f6b730eddc1e11fbf1d4b838e84543b908b7", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e3e3", + "timestamp" : "0x561bc197", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "1", - "rlp" : "0xf90261f901f9a0c6d9b261b911c48e5274bff91149682505b6dd8c56af24c9f7da1735141856eaa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e3e380a016c79ca4af69f90219d1cdb49e72e148aec1dabc2218c0a931eb3f624b7a530d88078348d823227edef862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a0978d45b092a880b1eea0dd9de140f6b730eddc1e11fbf1d4b838e84543b908b7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc19780a079caeef18300e4fa32500b4a809b45b06507af5947a54d84c6535886e5c2c7618823fd150fa6da87a8f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -46,19 +46,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "f7ed74b542b7efbce9e5e0051bc34faf1464c205b6d658ce09c7724c57e11404", - "mixHash" : "93ffe8498f896215702088655cf163fc30623475fb7708266399644577d1e4cd", - "nonce" : "9e07ee426199eead", + "hash" : "a3ab1ded2dd5436be251bdf952b680c1db03305f65d6f289acdccdf932779ed3", + "mixHash" : "12ce23608bbcc083f27a8459b562facf92f6b26366e0dfa09fd70575a7757d73", + "nonce" : "ee6be03446eeb75c", "number" : "0x02", - "parentHash" : "a96d5a22328f7587aa3ba472074d5a89f8c6813ab8de2e98c02334bc87c9ec81", + "parentHash" : "0e4d85769385d0ad89b00f3156924c51618d8d9824db47ee2a185c30382836c2", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e3e4", + "timestamp" : "0x561bc19a", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "2", - "rlp" : "0xf90260f901f9a0a96d5a22328f7587aa3ba472074d5a89f8c6813ab8de2e98c02334bc87c9ec81a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e3e480a093ffe8498f896215702088655cf163fc30623475fb7708266399644577d1e4cd889e07ee426199eeadf861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a00e4d85769385d0ad89b00f3156924c51618d8d9824db47ee2a185c30382836c2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc19a80a012ce23608bbcc083f27a8459b562facf92f6b26366e0dfa09fd70575a7757d7388ee6be03446eeb75cf861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -83,19 +83,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "0a1e626a4619fb7328aa1e5f3d509da322eae41469552ab339aad88ef50c8e49", - "mixHash" : "b5be320fc1e6233601860a98d8b52c9b172d0dcb3adb2781564fb00cf01a4393", - "nonce" : "ece58d576b51c3f4", + "hash" : "6f139c7f4fecfd81a82f4b358530a258fb952d061ca7708dd90032a9b24751b8", + "mixHash" : "6dd71228f2a79ad4c14ce63f0ed75fe7d26713e4612a0492bb4b22beca5169d1", + "nonce" : "5b18bebb29bfbdd2", "number" : "0x03", - "parentHash" : "f7ed74b542b7efbce9e5e0051bc34faf1464c205b6d658ce09c7724c57e11404", + "parentHash" : "a3ab1ded2dd5436be251bdf952b680c1db03305f65d6f289acdccdf932779ed3", "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", - "timestamp" : "0x55b7e3e7", + "timestamp" : "0x561bc19c", "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90261f901f9a0f7ed74b542b7efbce9e5e0051bc34faf1464c205b6d658ce09c7724c57e11404a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e3e780a0b5be320fc1e6233601860a98d8b52c9b172d0dcb3adb2781564fb00cf01a439388ece58d576b51c3f4f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "rlp" : "0xf90261f901f9a0a3ab1ded2dd5436be251bdf952b680c1db03305f65d6f289acdccdf932779ed3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc19c80a06dd71228f2a79ad4c14ce63f0ed75fe7d26713e4612a0492bb4b22beca5169d1885b18bebb29bfbdd2f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", "transactions" : [ { "data" : "0x", @@ -120,19 +120,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "bb5fa875abb5d654761ddd00addb9c23bc33599fdf0ebf6f23bf38f196749de5", - "mixHash" : "6ff2766d7ef150fae4d7d4a5bd2701bb369d7ad11821a55a270257a30e9f392f", - "nonce" : "5f458c36c2aaf66f", + "hash" : "54b2745b4b3b723ed5beb2e5f7533942fa537e53a6b980ece12e174af0967be2", + "mixHash" : "7b37c4e3f3de1f3d5f5e72df179172d16d111ff9503005f85001a72aac0bd6c4", + "nonce" : "d96bd90ab561d203", "number" : "0x04", - "parentHash" : "0a1e626a4619fb7328aa1e5f3d509da322eae41469552ab339aad88ef50c8e49", + "parentHash" : "6f139c7f4fecfd81a82f4b358530a258fb952d061ca7708dd90032a9b24751b8", "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", - "timestamp" : "0x55b7e3e9", + "timestamp" : "0x561bc19e", "transactionsTrie" : "9735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf90261f901f9a00a1e626a4619fb7328aa1e5f3d509da322eae41469552ab339aad88ef50c8e49a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88252088455b7e3e980a06ff2766d7ef150fae4d7d4a5bd2701bb369d7ad11821a55a270257a30e9f392f885f458c36c2aaf66ff862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", + "rlp" : "0xf90261f901f9a06f139c7f4fecfd81a82f4b358530a258fb952d061ca7708dd90032a9b24751b8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc19e80a07b37c4e3f3de1f3d5f5e72df179172d16d111ff9503005f85001a72aac0bd6c488d96bd90ab561d203f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", "transactions" : [ { "data" : "0x", @@ -157,19 +157,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "e1b1eefb26f6f628f540c6ed935da00ac4e2fb693846622139cb6f591a4ebcf8", - "mixHash" : "aa02241c49f7ee837c2c2a7bc6e31e6e8c19b2e5ad01bc4eb70947b2fd871df3", - "nonce" : "53e9b95db2208cd5", + "hash" : "584b2eaec18f59b8a704a2f71dfd7906c54f557d3a9688cd725dd863221448b6", + "mixHash" : "8802efc663490799f102f59233361a3c320f06f8a01087be3fc98c4b962d970a", + "nonce" : "1086ded06478c112", "number" : "0x03", - "parentHash" : "f7ed74b542b7efbce9e5e0051bc34faf1464c205b6d658ce09c7724c57e11404", + "parentHash" : "a3ab1ded2dd5436be251bdf952b680c1db03305f65d6f289acdccdf932779ed3", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "f9c18298c8beb11c13bfe48b0ed5f227e7a4a7fc7ab1b8293f7d8264322306af", - "timestamp" : "0x55b7e3eb", + "timestamp" : "0x561bc1a0", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf901fcf901f7a0f7ed74b542b7efbce9e5e0051bc34faf1464c205b6d658ce09c7724c57e11404a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f9c18298c8beb11c13bfe48b0ed5f227e7a4a7fc7ab1b8293f7d8264322306afa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd8808455b7e3eb80a0aa02241c49f7ee837c2c2a7bc6e31e6e8c19b2e5ad01bc4eb70947b2fd871df38853e9b95db2208cd5c0c0", + "rlp" : "0xf901fcf901f7a0a3ab1ded2dd5436be251bdf952b680c1db03305f65d6f289acdccdf932779ed3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f9c18298c8beb11c13bfe48b0ed5f227e7a4a7fc7ab1b8293f7d8264322306afa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88084561bc1a080a08802efc663490799f102f59233361a3c320f06f8a01087be3fc98c4b962d970a881086ded06478c112c0c0", "transactions" : [ ], "uncleHeaders" : [ @@ -183,19 +183,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "026cd1bc696f1b6d1d60941fb2125f40d23d054bc1d9229f711e412b47362e20", - "mixHash" : "3083bd4880a0ff7f948a6efbf9c602db8ac549a71d10ab23435495829f56e5b3", - "nonce" : "3434a5165a16afd6", + "hash" : "509ded09c13e97a79da2ae2f70492046bf5d77a23eb011ac8857cdfb7575404c", + "mixHash" : "955ac528cc1058fc42901e8e21dc621539010429e67324a228a65fbd2c3551ab", + "nonce" : "44230622fc36ae1b", "number" : "0x04", - "parentHash" : "e1b1eefb26f6f628f540c6ed935da00ac4e2fb693846622139cb6f591a4ebcf8", + "parentHash" : "584b2eaec18f59b8a704a2f71dfd7906c54f557d3a9688cd725dd863221448b6", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "a6623b7af1b50fec6f00440ffb1bae5add128da884b8d5f3f732d274c4a67dab", - "timestamp" : "0x55b7e3ec", + "timestamp" : "0x561bc1a3", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf901fcf901f7a0e1b1eefb26f6f628f540c6ed935da00ac4e2fb693846622139cb6f591a4ebcf8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a6623b7af1b50fec6f00440ffb1bae5add128da884b8d5f3f732d274c4a67daba056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd8808455b7e3ec80a03083bd4880a0ff7f948a6efbf9c602db8ac549a71d10ab23435495829f56e5b3883434a5165a16afd6c0c0", + "rlp" : "0xf901fcf901f7a0584b2eaec18f59b8a704a2f71dfd7906c54f557d3a9688cd725dd863221448b6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a6623b7af1b50fec6f00440ffb1bae5add128da884b8d5f3f732d274c4a67daba056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88084561bc1a380a0955ac528cc1058fc42901e8e21dc621539010429e67324a228a65fbd2c3551ab8844230622fc36ae1bc0c0", "transactions" : [ ], "uncleHeaders" : [ @@ -209,19 +209,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "1abc55ef3d76f8c6f6869a7ddbe95dce3dcc424af689c20aab8c7d9abb774e14", - "mixHash" : "c66618c42a73df09432f9166786bcaa6d19685e54c11b193c0bbbab0da8fc464", - "nonce" : "67d89500970cb947", + "hash" : "6b3cfa4c7d633b6bbfc9017d3e8a208b62373298e018d0152ebfb8f7707d5722", + "mixHash" : "15c2d747c30d0860805992e88a857f3649abec12b4dc57190850d72a2ee51183", + "nonce" : "4fa86a93422179ca", "number" : "0x03", - "parentHash" : "f7ed74b542b7efbce9e5e0051bc34faf1464c205b6d658ce09c7724c57e11404", + "parentHash" : "a3ab1ded2dd5436be251bdf952b680c1db03305f65d6f289acdccdf932779ed3", "receiptTrie" : "82a61c371d777ef243b6dec5b581d8fd0dbebc07a3de54329598c5f8a226e056", "stateRoot" : "0f3d2f68dbe8c6381ef39c27cc0e4006a0d3d216b333c397c59f546cc40ad62e", - "timestamp" : "0x55b7e3ee", + "timestamp" : "0x561bc1a6", "transactionsTrie" : "072046258d0ca95c113aa82fd6f6b9c0ec185a48ebc25d3faec9de49ffd6215d", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90264f901f9a0f7ed74b542b7efbce9e5e0051bc34faf1464c205b6d658ce09c7724c57e11404a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00f3d2f68dbe8c6381ef39c27cc0e4006a0d3d216b333c397c59f546cc40ad62ea0072046258d0ca95c113aa82fd6f6b9c0ec185a48ebc25d3faec9de49ffd6215da082a61c371d777ef243b6dec5b581d8fd0dbebc07a3de54329598c5f8a226e056b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e3ee80a0c66618c42a73df09432f9166786bcaa6d19685e54c11b193c0bbbab0da8fc4648867d89500970cb947f865f86302820d038304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8781c8801ca0ef0ce7166d296ce37ca5f553375dcf065f64593ab866b2a644fdfae88d138c92a061bcf1a04c234d3b8f1093597f82c222ba512f9d1525681df57dcd90335de427c0", + "rlp" : "0xf90264f901f9a0a3ab1ded2dd5436be251bdf952b680c1db03305f65d6f289acdccdf932779ed3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00f3d2f68dbe8c6381ef39c27cc0e4006a0d3d216b333c397c59f546cc40ad62ea0072046258d0ca95c113aa82fd6f6b9c0ec185a48ebc25d3faec9de49ffd6215da082a61c371d777ef243b6dec5b581d8fd0dbebc07a3de54329598c5f8a226e056b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc1a680a015c2d747c30d0860805992e88a857f3649abec12b4dc57190850d72a2ee51183884fa86a93422179caf865f86302820d038304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8781c8801ca0ef0ce7166d296ce37ca5f553375dcf065f64593ab866b2a644fdfae88d138c92a061bcf1a04c234d3b8f1093597f82c222ba512f9d1525681df57dcd90335de427c0", "transactions" : [ { "data" : "0x", @@ -246,19 +246,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5318", - "hash" : "6d6904b010c086d378ced6028751c243445bcd27646566ab36336bc98d7a5400", - "mixHash" : "d87b6dc9d575e008dd08d4e0798695299801a06ebb851ea05855193d13e6cb49", - "nonce" : "b431268c427ece78", + "hash" : "7e41c0174a987b94bfbe74cd9b011dad1b742af2fba369bf5cb0b02340caca38", + "mixHash" : "858d60b261267b6e8cd7b1a1a2473bc418192f6ad2d3bf8114630822c0f2cd96", + "nonce" : "912113c2916327de", "number" : "0x04", - "parentHash" : "1abc55ef3d76f8c6f6869a7ddbe95dce3dcc424af689c20aab8c7d9abb774e14", + "parentHash" : "6b3cfa4c7d633b6bbfc9017d3e8a208b62373298e018d0152ebfb8f7707d5722", "receiptTrie" : "f652d8fe780db9346ca7e0595e29cb94ba4a06d8f039fac4333eff25092e20cc", "stateRoot" : "dd01241e01c18ef580df49e57d9207bb8c873a91eb6274ad941ea11bafabff8f", - "timestamp" : "0x55b7e3f1", + "timestamp" : "0x561bc1a8", "transactionsTrie" : "ee51a9bfd102ea1edc3d5fae62373cdade733f7725f05ab4c03d0159e463678e", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf90266f901f9a01abc55ef3d76f8c6f6869a7ddbe95dce3dcc424af689c20aab8c7d9abb774e14a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0dd01241e01c18ef580df49e57d9207bb8c873a91eb6274ad941ea11bafabff8fa0ee51a9bfd102ea1edc3d5fae62373cdade733f7725f05ab4c03d0159e463678ea0f652d8fe780db9346ca7e0595e29cb94ba4a06d8f039fac4333eff25092e20ccb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88253188455b7e3f180a0d87b6dc9d575e008dd08d4e0798695299801a06ebb851ea05855193d13e6cb4988b431268c427ece78f867f86503018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8781c884446346341ba050dfd0a6d8ad080637aa6a6a70ddee4f0f6f099445afbe21f437fa3ba2edff9ea06d57c3fa59d837de61c2006223f125afb5ce62252d76c36c58cfaf948da8f2c6c0", + "rlp" : "0xf90266f901f9a06b3cfa4c7d633b6bbfc9017d3e8a208b62373298e018d0152ebfb8f7707d5722a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0dd01241e01c18ef580df49e57d9207bb8c873a91eb6274ad941ea11bafabff8fa0ee51a9bfd102ea1edc3d5fae62373cdade733f7725f05ab4c03d0159e463678ea0f652d8fe780db9346ca7e0595e29cb94ba4a06d8f039fac4333eff25092e20ccb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882531884561bc1a880a0858d60b261267b6e8cd7b1a1a2473bc418192f6ad2d3bf8114630822c0f2cd9688912113c2916327def867f86503018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8781c884446346341ba050dfd0a6d8ad080637aa6a6a70ddee4f0f6f099445afbe21f437fa3ba2edff9ea06d57c3fa59d837de61c2006223f125afb5ce62252d76c36c58cfaf948da8f2c6c0", "transactions" : [ { "data" : "0x44634634", @@ -283,19 +283,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "f4e7b9714c2d787f200b69f0708cf5fd0c41de7809dd5d6a23393cef19a3c515", - "mixHash" : "b6de7dd5752821140fa1d2270ec81bf8bca3997290c3ef565d0c3929b5d0e7e2", - "nonce" : "3ea5b515b474b88b", + "hash" : "3e48812ce9e136692186b32d9fedb9de8fe994d15eab491cb8f7b2579154ccfd", + "mixHash" : "5a6453f53f4029d1bafcaa5653c7e48fd309fe01723cbb500de0960bf4293953", + "nonce" : "18c96806fdb3840f", "number" : "0x03", - "parentHash" : "f7ed74b542b7efbce9e5e0051bc34faf1464c205b6d658ce09c7724c57e11404", + "parentHash" : "a3ab1ded2dd5436be251bdf952b680c1db03305f65d6f289acdccdf932779ed3", "receiptTrie" : "e717fb2be39da3e69db18c84baa4b9a59ecfa3454ed7e0946468a91b8e93d2ea", "stateRoot" : "f6dab66d4dd2727ba6c6bba0a434052435f3a82f68682af5d54093ccd81e4c40", - "timestamp" : "0x55b7e3f2", + "timestamp" : "0x561bc1aa", "transactionsTrie" : "8d4f70e47fd980bc4182bf6735e827a3ab98040b97bc27765aa69bedbc03aec1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90262f901f9a0f7ed74b542b7efbce9e5e0051bc34faf1464c205b6d658ce09c7724c57e11404a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f6dab66d4dd2727ba6c6bba0a434052435f3a82f68682af5d54093ccd81e4c40a08d4f70e47fd980bc4182bf6735e827a3ab98040b97bc27765aa69bedbc03aec1a0e717fb2be39da3e69db18c84baa4b9a59ecfa3454ed7e0946468a91b8e93d2eab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd88252088455b7e3f280a0b6de7dd5752821140fa1d2270ec81bf8bca3997290c3ef565d0c3929b5d0e7e2883ea5b515b474b88bf863f861020182795394095e7baea6a6c7c4c2dfeb977efac326af552d8782012c801ba02c0496b83cb527e403cb3900d83856644a2359e9cc79ca5fbcf508d8c6c1506ca030cedfd3b5105bbf823116d858790f1c48ab545751cb870ffda6ba3663d9261dc0", + "rlp" : "0xf90262f901f9a0a3ab1ded2dd5436be251bdf952b680c1db03305f65d6f289acdccdf932779ed3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f6dab66d4dd2727ba6c6bba0a434052435f3a82f68682af5d54093ccd81e4c40a08d4f70e47fd980bc4182bf6735e827a3ab98040b97bc27765aa69bedbc03aec1a0e717fb2be39da3e69db18c84baa4b9a59ecfa3454ed7e0946468a91b8e93d2eab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd882520884561bc1aa80a05a6453f53f4029d1bafcaa5653c7e48fd309fe01723cbb500de0960bf42939538818c96806fdb3840ff863f861020182795394095e7baea6a6c7c4c2dfeb977efac326af552d8782012c801ba02c0496b83cb527e403cb3900d83856644a2359e9cc79ca5fbcf508d8c6c1506ca030cedfd3b5105bbf823116d858790f1c48ab545751cb870ffda6ba3663d9261dc0", "transactions" : [ { "data" : "0x", @@ -320,19 +320,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5318", - "hash" : "960c349dd434f7471fb6898a6842c58ad53502d2696292400906c8cf13a9425d", - "mixHash" : "6bd66f7cc84b3bfa4546349b06f24a656e819a93b5f2f6fe62b80bf4651f9a68", - "nonce" : "580c8f436400f9a1", + "hash" : "b81ddaeb5c152b4e521d1a87a099a75f83973f6db3e2ba2ed5ce8dd3965ddce3", + "mixHash" : "c4e2d62227944eb56d82129172acdcaecf9fd0b48495397064690e8380ad93b8", + "nonce" : "b16c9182f005e8d2", "number" : "0x04", - "parentHash" : "f4e7b9714c2d787f200b69f0708cf5fd0c41de7809dd5d6a23393cef19a3c515", + "parentHash" : "3e48812ce9e136692186b32d9fedb9de8fe994d15eab491cb8f7b2579154ccfd", "receiptTrie" : "7cb6bfa3e8e51d075e953b7306ae8e24a97212bc85c88495c9e6ea846f2498a1", "stateRoot" : "181367d4eb4ab410ae4445ea529a7eb076c818df88cd11a9970185d690f16b70", - "timestamp" : "0x55b7e3f4", + "timestamp" : "0x561bc1ad", "transactionsTrie" : "a824e7e68b27913f80d5161edffda31a85446ed5088a9b3718ef975f88968195", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf90266f901f9a0f4e7b9714c2d787f200b69f0708cf5fd0c41de7809dd5d6a23393cef19a3c515a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0181367d4eb4ab410ae4445ea529a7eb076c818df88cd11a9970185d690f16b70a0a824e7e68b27913f80d5161edffda31a85446ed5088a9b3718ef975f88968195a07cb6bfa3e8e51d075e953b7306ae8e24a97212bc85c88495c9e6ea846f2498a1b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd88253188455b7e3f480a06bd66f7cc84b3bfa4546349b06f24a656e819a93b5f2f6fe62b80bf4651f9a6888580c8f436400f9a1f867f8650301827b1594095e7baea6a6c7c4c2dfeb977efac326af552d8782012c84034534541ba0cd40a210ac0630db56ac26feb53cfa84d9ae86d43c2eb3e3735471c6a3fd2383a0572ef18095e34cc33dbd39bfac3e0ff1c247ffddb2dcc00848cc79706c0fdf65c0", + "rlp" : "0xf90266f901f9a03e48812ce9e136692186b32d9fedb9de8fe994d15eab491cb8f7b2579154ccfda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0181367d4eb4ab410ae4445ea529a7eb076c818df88cd11a9970185d690f16b70a0a824e7e68b27913f80d5161edffda31a85446ed5088a9b3718ef975f88968195a07cb6bfa3e8e51d075e953b7306ae8e24a97212bc85c88495c9e6ea846f2498a1b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd882531884561bc1ad80a0c4e2d62227944eb56d82129172acdcaecf9fd0b48495397064690e8380ad93b888b16c9182f005e8d2f867f8650301827b1594095e7baea6a6c7c4c2dfeb977efac326af552d8782012c84034534541ba0cd40a210ac0630db56ac26feb53cfa84d9ae86d43c2eb3e3735471c6a3fd2383a0572ef18095e34cc33dbd39bfac3e0ff1c247ffddb2dcc00848cc79706c0fdf65c0", "transactions" : [ { "data" : "0x03453454", @@ -357,19 +357,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "eeadbc48f1ae7b47adad0c4b90698983ea0bc9b9641f04824ce81865b58fa94a", - "mixHash" : "51548025b8fe12e7968838242f42ee12db5842c628cd402d2cffc6f829bbc793", - "nonce" : "0ae999a76d1985e3", + "hash" : "94b96e1c94d4f3b822c6ac65f37b5702f8fd1994e7bae9efe35f79e7b3a08c3c", + "mixHash" : "fc737b8c875e0435468e245a7044557f68ea9c8741ab4fb01a987dc129b80062", + "nonce" : "6ebf6811e5f7051c", "number" : "0x03", - "parentHash" : "f7ed74b542b7efbce9e5e0051bc34faf1464c205b6d658ce09c7724c57e11404", + "parentHash" : "a3ab1ded2dd5436be251bdf952b680c1db03305f65d6f289acdccdf932779ed3", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "f9c18298c8beb11c13bfe48b0ed5f227e7a4a7fc7ab1b8293f7d8264322306af", - "timestamp" : "0x55b7e3f6", + "timestamp" : "0x561bc1af", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf901fcf901f7a0f7ed74b542b7efbce9e5e0051bc34faf1464c205b6d658ce09c7724c57e11404a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f9c18298c8beb11c13bfe48b0ed5f227e7a4a7fc7ab1b8293f7d8264322306afa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd8808455b7e3f680a051548025b8fe12e7968838242f42ee12db5842c628cd402d2cffc6f829bbc793880ae999a76d1985e3c0c0", + "rlp" : "0xf901fcf901f7a0a3ab1ded2dd5436be251bdf952b680c1db03305f65d6f289acdccdf932779ed3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f9c18298c8beb11c13bfe48b0ed5f227e7a4a7fc7ab1b8293f7d8264322306afa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd88084561bc1af80a0fc737b8c875e0435468e245a7044557f68ea9c8741ab4fb01a987dc129b80062886ebf6811e5f7051cc0c0", "transactions" : [ ], "uncleHeaders" : [ @@ -383,19 +383,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "7e352ff24009f5e917af8decffa9a327a40e99a160272e9d0a728ea179341bef", - "mixHash" : "f713c3ef94a7d14de7cbed97e815ecc5f809b4fc94cba2066523d2ad7af09793", - "nonce" : "a61f71def2a07406", + "hash" : "aab21fa51d3af69efbc233885dbc61383856ff02c2b2e7884997bc21a4b92028", + "mixHash" : "90e9a6201ada87540ccb52d927a84f8a3ceff4a55f1fd5698cdf99567040c0e7", + "nonce" : "d9c38c615d3e8c1c", "number" : "0x04", - "parentHash" : "eeadbc48f1ae7b47adad0c4b90698983ea0bc9b9641f04824ce81865b58fa94a", + "parentHash" : "94b96e1c94d4f3b822c6ac65f37b5702f8fd1994e7bae9efe35f79e7b3a08c3c", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "a6623b7af1b50fec6f00440ffb1bae5add128da884b8d5f3f732d274c4a67dab", - "timestamp" : "0x55b7e3f7", + "timestamp" : "0x561bc1b1", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf901fcf901f7a0eeadbc48f1ae7b47adad0c4b90698983ea0bc9b9641f04824ce81865b58fa94aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a6623b7af1b50fec6f00440ffb1bae5add128da884b8d5f3f732d274c4a67daba056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd8808455b7e3f780a0f713c3ef94a7d14de7cbed97e815ecc5f809b4fc94cba2066523d2ad7af0979388a61f71def2a07406c0c0", + "rlp" : "0xf901fcf901f7a094b96e1c94d4f3b822c6ac65f37b5702f8fd1994e7bae9efe35f79e7b3a08c3ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a6623b7af1b50fec6f00440ffb1bae5add128da884b8d5f3f732d274c4a67daba056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd88084561bc1b180a090e9a6201ada87540ccb52d927a84f8a3ceff4a55f1fd5698cdf99567040c0e788d9c38c615d3e8c1cc0c0", "transactions" : [ ], "uncleHeaders" : [ @@ -409,19 +409,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "6613312e2a79c8b546012596da253e1f9dc7919bc71181b551f1d23f857f2388", - "mixHash" : "4e60b302ad2f356a12bf3ce1a05b78db19ac79212ef9be1fbdcc25aede3e09a7", - "nonce" : "dbe4938e64842ecb", + "hash" : "b2b57cdc119038cc8da43cac3fbd88dfede580bf4b1a97c60074d2e01beaa0c3", + "mixHash" : "58e6bed3a52d2d3a4d72b5df78cc3fd81fb56764f1881e5a4c61862dafa45424", + "nonce" : "c0e3fb83e7699740", "number" : "0x03", - "parentHash" : "f7ed74b542b7efbce9e5e0051bc34faf1464c205b6d658ce09c7724c57e11404", + "parentHash" : "a3ab1ded2dd5436be251bdf952b680c1db03305f65d6f289acdccdf932779ed3", "receiptTrie" : "869a9b80dfc9922e47a784cbdc82d0ccd2275c206f4b9c8daa37e92c58285a0e", "stateRoot" : "e1edff36efc46379ad6ac9fb6d76f019a07d20a894b9f8131906bb00f1145de5", - "timestamp" : "0x55b7e3f9", + "timestamp" : "0x561bc1b3", "transactionsTrie" : "a3b73c56d71ff3a785663e8d8de96a75485e9079553acdcf6b001f65dd5c2e34", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90266f901f9a0f7ed74b542b7efbce9e5e0051bc34faf1464c205b6d658ce09c7724c57e11404a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e1edff36efc46379ad6ac9fb6d76f019a07d20a894b9f8131906bb00f1145de5a0a3b73c56d71ff3a785663e8d8de96a75485e9079553acdcf6b001f65dd5c2e34a0869a9b80dfc9922e47a784cbdc82d0ccd2275c206f4b9c8daa37e92c58285a0eb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd88252088455b7e3f980a04e60b302ad2f356a12bf3ce1a05b78db19ac79212ef9be1fbdcc25aede3e09a788dbe4938e64842ecbf867f865028405f5e100827aa894095e7baea6a6c7c4c2dfeb977efac326af552d87820190801ca0d5382bd365568f90fb51061ccadce21e2bbe24e5b302a2e039ed55a8b5df48b4a014805949a1dce6cceb285646345a2f7e4a46faf1da87955894a92efa8e5ed605c0", + "rlp" : "0xf90266f901f9a0a3ab1ded2dd5436be251bdf952b680c1db03305f65d6f289acdccdf932779ed3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e1edff36efc46379ad6ac9fb6d76f019a07d20a894b9f8131906bb00f1145de5a0a3b73c56d71ff3a785663e8d8de96a75485e9079553acdcf6b001f65dd5c2e34a0869a9b80dfc9922e47a784cbdc82d0ccd2275c206f4b9c8daa37e92c58285a0eb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd882520884561bc1b380a058e6bed3a52d2d3a4d72b5df78cc3fd81fb56764f1881e5a4c61862dafa4542488c0e3fb83e7699740f867f865028405f5e100827aa894095e7baea6a6c7c4c2dfeb977efac326af552d87820190801ca0d5382bd365568f90fb51061ccadce21e2bbe24e5b302a2e039ed55a8b5df48b4a014805949a1dce6cceb285646345a2f7e4a46faf1da87955894a92efa8e5ed605c0", "transactions" : [ { "data" : "0x", @@ -446,19 +446,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "ec368671b90f8bbf5652a11f656e8bdbc8868dcc87fd099d0be78fdc619e1aeb", - "mixHash" : "a25ddec48fa34dccb9af123e1c874240125061d9ef0d0ab034e68a7a3cc9f819", - "nonce" : "10c3205ccfed1ce7", + "hash" : "3de463cec919b166f4830ba0d1c4a18f2a02715dccf8c99e10fcddc6857a6193", + "mixHash" : "afd7de9cf4d8e751bf1fce7d4220f0686d1989cfa7aadab477c6e455a575e5e5", + "nonce" : "467b44568cc0a6e8", "number" : "0x04", - "parentHash" : "6613312e2a79c8b546012596da253e1f9dc7919bc71181b551f1d23f857f2388", + "parentHash" : "b2b57cdc119038cc8da43cac3fbd88dfede580bf4b1a97c60074d2e01beaa0c3", "receiptTrie" : "8dbd8c66586da63ce55e9f9845207eb8a287fe940a54a0b8bb4b7a83ca486f36", "stateRoot" : "3b0dfc93763fa163f1f243409c798c7534b499d66a87c2ad68704fed0c4e2939", - "timestamp" : "0x55b7e3fa", + "timestamp" : "0x561bc1b5", "transactionsTrie" : "c84eac8dc5379b4190a4e6085d2e021aae4c4e77118d22bffcdc70b8d85441c9", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf90263f901f9a06613312e2a79c8b546012596da253e1f9dc7919bc71181b551f1d23f857f2388a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a03b0dfc93763fa163f1f243409c798c7534b499d66a87c2ad68704fed0c4e2939a0c84eac8dc5379b4190a4e6085d2e021aae4c4e77118d22bffcdc70b8d85441c9a08dbd8c66586da63ce55e9f9845207eb8a287fe940a54a0b8bb4b7a83ca486f36b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd88252088455b7e3fa80a0a25ddec48fa34dccb9af123e1c874240125061d9ef0d0ab034e68a7a3cc9f8198810c3205ccfed1ce7f864f862030a8304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87820190801ba0ae8ba6107ac13302a79f585dbbeaa5b46c208ea43dc6b54ac1842e99d7f20ea1a02c9f98cf51ced987cf4f9aa011b259bbb104131fed8d14930c3419876bbc54c4c0", + "rlp" : "0xf90263f901f9a0b2b57cdc119038cc8da43cac3fbd88dfede580bf4b1a97c60074d2e01beaa0c3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a03b0dfc93763fa163f1f243409c798c7534b499d66a87c2ad68704fed0c4e2939a0c84eac8dc5379b4190a4e6085d2e021aae4c4e77118d22bffcdc70b8d85441c9a08dbd8c66586da63ce55e9f9845207eb8a287fe940a54a0b8bb4b7a83ca486f36b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd882520884561bc1b580a0afd7de9cf4d8e751bf1fce7d4220f0686d1989cfa7aadab477c6e455a575e5e588467b44568cc0a6e8f864f862030a8304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87820190801ba0ae8ba6107ac13302a79f585dbbeaa5b46c208ea43dc6b54ac1842e99d7f20ea1a02c9f98cf51ced987cf4f9aa011b259bbb104131fed8d14930c3419876bbc54c4c0", "transactions" : [ { "data" : "0x", @@ -483,9 +483,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "c6d9b261b911c48e5274bff91149682505b6dd8c56af24c9f7da1735141856ea", - "mixHash" : "4737abacb6065375e17babb067b3d4e98a650e2494d5b6af69d965b4c195f16e", - "nonce" : "ed63c9fc6e3b1099", + "hash" : "978d45b092a880b1eea0dd9de140f6b730eddc1e11fbf1d4b838e84543b908b7", + "mixHash" : "ef1be78f1c52892e4c94a4abf42162f931db9591727db195af449f962cc647a3", + "nonce" : "e2593eba19a637f8", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -494,8 +494,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a04737abacb6065375e17babb067b3d4e98a650e2494d5b6af69d965b4c195f16e88ed63c9fc6e3b1099c0c0", - "lastblockhash" : "bb5fa875abb5d654761ddd00addb9c23bc33599fdf0ebf6f23bf38f196749de5", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0ef1be78f1c52892e4c94a4abf42162f931db9591727db195af449f962cc647a388e2593eba19a637f8c0c0", + "lastblockhash" : "54b2745b4b3b723ed5beb2e5f7533942fa537e53a6b980ece12e174af0967be2", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x28", @@ -539,19 +539,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "e4d661b43457feb29a97318b9f518e86eaf3a48d00b0fe3088eaa342509aa76a", - "mixHash" : "a09e94cd5e3148dbb9158a4bba8d6687949f04889be32a761ee6228d2a14c81d", - "nonce" : "b00f267a790a6268", + "hash" : "a449f84576ecddeeabfb8ab4c860bc01641f99bb3a3ffa27b6e59e4b5c8cc822", + "mixHash" : "4f779d6925a2bda03ffeeb7381d391f7cb8d4178482c69184899b87dcb864a45", + "nonce" : "6c7de7c86437b326", "number" : "0x01", - "parentHash" : "d3730cddcf89a53c888f1aa9379d2db0dda1a23f3bcca18a29f0f750da819c9c", + "parentHash" : "2d80600e2489dcadda66656ebcceccbdbdb1d3b43b884e94434773e890c804d2", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e3fb", + "timestamp" : "0x561bc1b7", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "1", - "rlp" : "0xf90261f901f9a0d3730cddcf89a53c888f1aa9379d2db0dda1a23f3bcca18a29f0f750da819c9ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e3fb80a0a09e94cd5e3148dbb9158a4bba8d6687949f04889be32a761ee6228d2a14c81d88b00f267a790a6268f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a02d80600e2489dcadda66656ebcceccbdbdb1d3b43b884e94434773e890c804d2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc1b780a04f779d6925a2bda03ffeeb7381d391f7cb8d4178482c69184899b87dcb864a45886c7de7c86437b326f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -576,19 +576,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "38bc05b06e64d158ffdc80bb35ece9c2318003b9da3d0f0e73626939a9984b91", - "mixHash" : "f0330301f6ffbe5dc1cfe00f04ad3740f774f03023402b729e2ef0c38c358a19", - "nonce" : "ab089c800c48a73e", + "hash" : "26f3b33ed6c4ea6ddb65a594a69f39e7f3c0b62f2a12e8cd8b7750a093702fb9", + "mixHash" : "6ca85b869f381e0ce42c0c8534691619dbc36eb87ad4f811c4d8f17e29c3416b", + "nonce" : "65cbb80ddb104e8b", "number" : "0x02", - "parentHash" : "e4d661b43457feb29a97318b9f518e86eaf3a48d00b0fe3088eaa342509aa76a", + "parentHash" : "a449f84576ecddeeabfb8ab4c860bc01641f99bb3a3ffa27b6e59e4b5c8cc822", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e3fd", + "timestamp" : "0x561bc1bb", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "2", - "rlp" : "0xf90260f901f9a0e4d661b43457feb29a97318b9f518e86eaf3a48d00b0fe3088eaa342509aa76aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e3fd80a0f0330301f6ffbe5dc1cfe00f04ad3740f774f03023402b729e2ef0c38c358a1988ab089c800c48a73ef861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a0a449f84576ecddeeabfb8ab4c860bc01641f99bb3a3ffa27b6e59e4b5c8cc822a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc1bb80a06ca85b869f381e0ce42c0c8534691619dbc36eb87ad4f811c4d8f17e29c3416b8865cbb80ddb104e8bf861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -613,19 +613,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "41105a7acd7dbff9f552cf8fc1016143ee0a23dc51c88f3cd38c592beedb6a5f", - "mixHash" : "16539b537d9bec318d8f0affc82b15641d270a45d74a72763b5fceb62bdbe87b", - "nonce" : "fbb39a919e553391", + "hash" : "0e3296740957470df5019ffd4006404d4895cdc314102a12d70b8e03570cae4e", + "mixHash" : "27a3b08a4cf22ffdff766d92857265b5d5bcd00e826bf302da1cb1b5dc244988", + "nonce" : "228ddca583a21e76", "number" : "0x03", - "parentHash" : "38bc05b06e64d158ffdc80bb35ece9c2318003b9da3d0f0e73626939a9984b91", + "parentHash" : "26f3b33ed6c4ea6ddb65a594a69f39e7f3c0b62f2a12e8cd8b7750a093702fb9", "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", - "timestamp" : "0x55b7e3fe", + "timestamp" : "0x561bc1c0", "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90261f901f9a038bc05b06e64d158ffdc80bb35ece9c2318003b9da3d0f0e73626939a9984b91a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e3fe80a016539b537d9bec318d8f0affc82b15641d270a45d74a72763b5fceb62bdbe87b88fbb39a919e553391f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "rlp" : "0xf90261f901f9a026f3b33ed6c4ea6ddb65a594a69f39e7f3c0b62f2a12e8cd8b7750a093702fb9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc1c080a027a3b08a4cf22ffdff766d92857265b5d5bcd00e826bf302da1cb1b5dc24498888228ddca583a21e76f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", "transactions" : [ { "data" : "0x", @@ -650,19 +650,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "2b45bf9af7b01108e8748dfe4a7f367f13c653d3aa09ac0fe93b3a5d5f63d694", - "mixHash" : "c5c4433a4af3313951c5e81023b4435ea0cb9ca72a7da4029ca05bac43309578", - "nonce" : "1b792bb01e7c7974", + "hash" : "97355b53929bcd6ffef8ce8585a281e92a1e65cf3adf30a836b1a5b31e0d03f4", + "mixHash" : "a51cb0b3e9b56cde51edbb9263aae4bbf278d4af8e273b57ba71eb26014ff7b7", + "nonce" : "ebe8034906c435da", "number" : "0x04", - "parentHash" : "41105a7acd7dbff9f552cf8fc1016143ee0a23dc51c88f3cd38c592beedb6a5f", + "parentHash" : "0e3296740957470df5019ffd4006404d4895cdc314102a12d70b8e03570cae4e", "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", - "timestamp" : "0x55b7e400", + "timestamp" : "0x561bc1c3", "transactionsTrie" : "9735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf90261f901f9a041105a7acd7dbff9f552cf8fc1016143ee0a23dc51c88f3cd38c592beedb6a5fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88252088455b7e40080a0c5c4433a4af3313951c5e81023b4435ea0cb9ca72a7da4029ca05bac43309578881b792bb01e7c7974f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", + "rlp" : "0xf90261f901f9a00e3296740957470df5019ffd4006404d4895cdc314102a12d70b8e03570cae4ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc1c380a0a51cb0b3e9b56cde51edbb9263aae4bbf278d4af8e273b57ba71eb26014ff7b788ebe8034906c435daf862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", "transactions" : [ { "data" : "0x", @@ -687,19 +687,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "d33220a637097858a86a2f0fee1a059af03217504017f28523587ac54c3ce408", - "mixHash" : "64d2d4a9451a9672403f2cbd70c6d77e6b46bc029e7e44061d349db6baf1ca71", - "nonce" : "f5eadfb52a9e80c1", + "hash" : "8a44ec7053d44a15f7111b722dfa0311b5befb9fddd10f5883c0b929ba624208", + "mixHash" : "8db62382592175c35bff92ec3a52f1ac386b6844c49337c3d7459be56615274a", + "nonce" : "12b22809789b2961", "number" : "0x03", - "parentHash" : "38bc05b06e64d158ffdc80bb35ece9c2318003b9da3d0f0e73626939a9984b91", + "parentHash" : "26f3b33ed6c4ea6ddb65a594a69f39e7f3c0b62f2a12e8cd8b7750a093702fb9", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "f9c18298c8beb11c13bfe48b0ed5f227e7a4a7fc7ab1b8293f7d8264322306af", - "timestamp" : "0x55b7e401", + "timestamp" : "0x561bc1c5", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf901fcf901f7a038bc05b06e64d158ffdc80bb35ece9c2318003b9da3d0f0e73626939a9984b91a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f9c18298c8beb11c13bfe48b0ed5f227e7a4a7fc7ab1b8293f7d8264322306afa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd8808455b7e40180a064d2d4a9451a9672403f2cbd70c6d77e6b46bc029e7e44061d349db6baf1ca7188f5eadfb52a9e80c1c0c0", + "rlp" : "0xf901fcf901f7a026f3b33ed6c4ea6ddb65a594a69f39e7f3c0b62f2a12e8cd8b7750a093702fb9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f9c18298c8beb11c13bfe48b0ed5f227e7a4a7fc7ab1b8293f7d8264322306afa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88084561bc1c580a08db62382592175c35bff92ec3a52f1ac386b6844c49337c3d7459be56615274a8812b22809789b2961c0c0", "transactions" : [ ], "uncleHeaders" : [ @@ -713,19 +713,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "4f0b361ffe54750c25f3d9dfa1d58b1fe3f8437055e53401e18b3c0323930280", - "mixHash" : "8cc3c37f5b654295921927125dc1512ab72e489ab93779deb3e2a2802bbedffc", - "nonce" : "0bc340963f89eeec", + "hash" : "024be4739bcbb3b1be7a8852e3b2d45c9baa3e5c2ef5cdf9fda2b5811803fddd", + "mixHash" : "6c522dd48174f354f2d176f5999be8ddbe7b5d6e5c762484a75aca5b434586fa", + "nonce" : "8926ce474ae76555", "number" : "0x04", - "parentHash" : "d33220a637097858a86a2f0fee1a059af03217504017f28523587ac54c3ce408", + "parentHash" : "8a44ec7053d44a15f7111b722dfa0311b5befb9fddd10f5883c0b929ba624208", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "a6623b7af1b50fec6f00440ffb1bae5add128da884b8d5f3f732d274c4a67dab", - "timestamp" : "0x55b7e403", + "timestamp" : "0x561bc1cb", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf901fcf901f7a0d33220a637097858a86a2f0fee1a059af03217504017f28523587ac54c3ce408a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a6623b7af1b50fec6f00440ffb1bae5add128da884b8d5f3f732d274c4a67daba056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd8808455b7e40380a08cc3c37f5b654295921927125dc1512ab72e489ab93779deb3e2a2802bbedffc880bc340963f89eeecc0c0", + "rlp" : "0xf901fcf901f7a08a44ec7053d44a15f7111b722dfa0311b5befb9fddd10f5883c0b929ba624208a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a6623b7af1b50fec6f00440ffb1bae5add128da884b8d5f3f732d274c4a67daba056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88084561bc1cb80a06c522dd48174f354f2d176f5999be8ddbe7b5d6e5c762484a75aca5b434586fa888926ce474ae76555c0c0", "transactions" : [ ], "uncleHeaders" : [ @@ -735,23 +735,23 @@ "blockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020080", + "difficulty" : "0x020000", "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "1111583134c4d38198876ab3d8993fcea00de62643b318296e9d944dccdbfd93", - "mixHash" : "1b3b956b46f29fcd14d2c188893111b6a73ce1c5b2aba032a988164827ed6d66", - "nonce" : "add3db4f8a4d4ac1", + "hash" : "dd9149985c461da03137318730e9922d443c06a4a44238cf2662efd36baa40e8", + "mixHash" : "55f7bca404ed8e71f1b94056b61ad27662341c475fe6997c8a8f99cda5a07f00", + "nonce" : "1daaffdaf02b6310", "number" : "0x03", - "parentHash" : "38bc05b06e64d158ffdc80bb35ece9c2318003b9da3d0f0e73626939a9984b91", + "parentHash" : "26f3b33ed6c4ea6ddb65a594a69f39e7f3c0b62f2a12e8cd8b7750a093702fb9", "receiptTrie" : "82a61c371d777ef243b6dec5b581d8fd0dbebc07a3de54329598c5f8a226e056", "stateRoot" : "0f3d2f68dbe8c6381ef39c27cc0e4006a0d3d216b333c397c59f546cc40ad62e", - "timestamp" : "0x55b7e405", + "timestamp" : "0x561bc1cd", "transactionsTrie" : "072046258d0ca95c113aa82fd6f6b9c0ec185a48ebc25d3faec9de49ffd6215d", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90264f901f9a038bc05b06e64d158ffdc80bb35ece9c2318003b9da3d0f0e73626939a9984b91a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00f3d2f68dbe8c6381ef39c27cc0e4006a0d3d216b333c397c59f546cc40ad62ea0072046258d0ca95c113aa82fd6f6b9c0ec185a48ebc25d3faec9de49ffd6215da082a61c371d777ef243b6dec5b581d8fd0dbebc07a3de54329598c5f8a226e056b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e40580a01b3b956b46f29fcd14d2c188893111b6a73ce1c5b2aba032a988164827ed6d6688add3db4f8a4d4ac1f865f86302820d038304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8781c8801ca0ef0ce7166d296ce37ca5f553375dcf065f64593ab866b2a644fdfae88d138c92a061bcf1a04c234d3b8f1093597f82c222ba512f9d1525681df57dcd90335de427c0", + "rlp" : "0xf90264f901f9a026f3b33ed6c4ea6ddb65a594a69f39e7f3c0b62f2a12e8cd8b7750a093702fb9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00f3d2f68dbe8c6381ef39c27cc0e4006a0d3d216b333c397c59f546cc40ad62ea0072046258d0ca95c113aa82fd6f6b9c0ec185a48ebc25d3faec9de49ffd6215da082a61c371d777ef243b6dec5b581d8fd0dbebc07a3de54329598c5f8a226e056b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd882520884561bc1cd80a055f7bca404ed8e71f1b94056b61ad27662341c475fe6997c8a8f99cda5a07f00881daaffdaf02b6310f865f86302820d038304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8781c8801ca0ef0ce7166d296ce37ca5f553375dcf065f64593ab866b2a644fdfae88d138c92a061bcf1a04c234d3b8f1093597f82c222ba512f9d1525681df57dcd90335de427c0", "transactions" : [ { "data" : "0x", @@ -772,23 +772,23 @@ "blockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x0200c0", + "difficulty" : "0x020040", "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5318", - "hash" : "68f9656fe58a2c19ce581404336c2c7e8f63a4c6f1fcb144caf7828ccfe4d63a", - "mixHash" : "771a111cb5aeea2e45a55f54c3180c986d039de0cf02c43ae3aaa3e9cd819e70", - "nonce" : "1c5bb43ac7a131d0", + "hash" : "52739e32318048a7f2983897f079248928f69fb8f8c64c17c457b33404f8f903", + "mixHash" : "abcc2ec63a45683de351f21cc4cd0db4f38ee23408d57545af0afea4bdf7a805", + "nonce" : "2a6e2a4e6a63b509", "number" : "0x04", - "parentHash" : "1111583134c4d38198876ab3d8993fcea00de62643b318296e9d944dccdbfd93", + "parentHash" : "dd9149985c461da03137318730e9922d443c06a4a44238cf2662efd36baa40e8", "receiptTrie" : "f652d8fe780db9346ca7e0595e29cb94ba4a06d8f039fac4333eff25092e20cc", "stateRoot" : "dd01241e01c18ef580df49e57d9207bb8c873a91eb6274ad941ea11bafabff8f", - "timestamp" : "0x55b7e408", + "timestamp" : "0x561bc1cf", "transactionsTrie" : "ee51a9bfd102ea1edc3d5fae62373cdade733f7725f05ab4c03d0159e463678e", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf90266f901f9a01111583134c4d38198876ab3d8993fcea00de62643b318296e9d944dccdbfd93a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0dd01241e01c18ef580df49e57d9207bb8c873a91eb6274ad941ea11bafabff8fa0ee51a9bfd102ea1edc3d5fae62373cdade733f7725f05ab4c03d0159e463678ea0f652d8fe780db9346ca7e0595e29cb94ba4a06d8f039fac4333eff25092e20ccb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88253188455b7e40880a0771a111cb5aeea2e45a55f54c3180c986d039de0cf02c43ae3aaa3e9cd819e70881c5bb43ac7a131d0f867f86503018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8781c884446346341ba050dfd0a6d8ad080637aa6a6a70ddee4f0f6f099445afbe21f437fa3ba2edff9ea06d57c3fa59d837de61c2006223f125afb5ce62252d76c36c58cfaf948da8f2c6c0", + "rlp" : "0xf90266f901f9a0dd9149985c461da03137318730e9922d443c06a4a44238cf2662efd36baa40e8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0dd01241e01c18ef580df49e57d9207bb8c873a91eb6274ad941ea11bafabff8fa0ee51a9bfd102ea1edc3d5fae62373cdade733f7725f05ab4c03d0159e463678ea0f652d8fe780db9346ca7e0595e29cb94ba4a06d8f039fac4333eff25092e20ccb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd882531884561bc1cf80a0abcc2ec63a45683de351f21cc4cd0db4f38ee23408d57545af0afea4bdf7a805882a6e2a4e6a63b509f867f86503018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8781c884446346341ba050dfd0a6d8ad080637aa6a6a70ddee4f0f6f099445afbe21f437fa3ba2edff9ea06d57c3fa59d837de61c2006223f125afb5ce62252d76c36c58cfaf948da8f2c6c0", "transactions" : [ { "data" : "0x44634634", @@ -809,23 +809,23 @@ "blockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020080", + "difficulty" : "0x020000", "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "31700b1f35ecb9ef22548ef16d19952f3a57dc191b908e3e1f15f699c4dc25e7", - "mixHash" : "06da1a5b44ba9b40e133f0fb5de5955c0cd36d8b125aea087793f179fc6e0b03", - "nonce" : "10d48328dc164113", + "hash" : "f4ba7a1c1500e04ca1c7b5cf29b86df9f5cd06aedbfa84c65bd3884ada3c6ea4", + "mixHash" : "57018377e6244e311055a5becc37ceeada057b69291acd7caa89cbbe168247a0", + "nonce" : "b0d4c49f9bde95da", "number" : "0x03", - "parentHash" : "38bc05b06e64d158ffdc80bb35ece9c2318003b9da3d0f0e73626939a9984b91", + "parentHash" : "26f3b33ed6c4ea6ddb65a594a69f39e7f3c0b62f2a12e8cd8b7750a093702fb9", "receiptTrie" : "e717fb2be39da3e69db18c84baa4b9a59ecfa3454ed7e0946468a91b8e93d2ea", "stateRoot" : "f6dab66d4dd2727ba6c6bba0a434052435f3a82f68682af5d54093ccd81e4c40", - "timestamp" : "0x55b7e409", + "timestamp" : "0x561bc1d2", "transactionsTrie" : "8d4f70e47fd980bc4182bf6735e827a3ab98040b97bc27765aa69bedbc03aec1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90262f901f9a038bc05b06e64d158ffdc80bb35ece9c2318003b9da3d0f0e73626939a9984b91a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f6dab66d4dd2727ba6c6bba0a434052435f3a82f68682af5d54093ccd81e4c40a08d4f70e47fd980bc4182bf6735e827a3ab98040b97bc27765aa69bedbc03aec1a0e717fb2be39da3e69db18c84baa4b9a59ecfa3454ed7e0946468a91b8e93d2eab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e40980a006da1a5b44ba9b40e133f0fb5de5955c0cd36d8b125aea087793f179fc6e0b038810d48328dc164113f863f861020182795394095e7baea6a6c7c4c2dfeb977efac326af552d8782012c801ba02c0496b83cb527e403cb3900d83856644a2359e9cc79ca5fbcf508d8c6c1506ca030cedfd3b5105bbf823116d858790f1c48ab545751cb870ffda6ba3663d9261dc0", + "rlp" : "0xf90262f901f9a026f3b33ed6c4ea6ddb65a594a69f39e7f3c0b62f2a12e8cd8b7750a093702fb9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f6dab66d4dd2727ba6c6bba0a434052435f3a82f68682af5d54093ccd81e4c40a08d4f70e47fd980bc4182bf6735e827a3ab98040b97bc27765aa69bedbc03aec1a0e717fb2be39da3e69db18c84baa4b9a59ecfa3454ed7e0946468a91b8e93d2eab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd882520884561bc1d280a057018377e6244e311055a5becc37ceeada057b69291acd7caa89cbbe168247a088b0d4c49f9bde95daf863f861020182795394095e7baea6a6c7c4c2dfeb977efac326af552d8782012c801ba02c0496b83cb527e403cb3900d83856644a2359e9cc79ca5fbcf508d8c6c1506ca030cedfd3b5105bbf823116d858790f1c48ab545751cb870ffda6ba3663d9261dc0", "transactions" : [ { "data" : "0x", @@ -846,23 +846,23 @@ "blockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x0200c0", + "difficulty" : "0x020040", "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5318", - "hash" : "b467e8dab795e3a8f6641631c6153de29612734c49b2128867928b5ab8b3bf87", - "mixHash" : "07209f23a9ed470a0710c4d4114f266e2a90c6732a995928cff726b12798aa37", - "nonce" : "77ae501d101d6ab2", + "hash" : "fbdae4b61a698849517c52193038766be92ce849d53defeac92f3e803d93bf35", + "mixHash" : "6b205e2bc9766a7ad8bddbd1cbdc0bfb4cc777c02884f71ff9cae59638a4734d", + "nonce" : "60069d369dd4a0f6", "number" : "0x04", - "parentHash" : "31700b1f35ecb9ef22548ef16d19952f3a57dc191b908e3e1f15f699c4dc25e7", + "parentHash" : "f4ba7a1c1500e04ca1c7b5cf29b86df9f5cd06aedbfa84c65bd3884ada3c6ea4", "receiptTrie" : "7cb6bfa3e8e51d075e953b7306ae8e24a97212bc85c88495c9e6ea846f2498a1", "stateRoot" : "181367d4eb4ab410ae4445ea529a7eb076c818df88cd11a9970185d690f16b70", - "timestamp" : "0x55b7e40b", + "timestamp" : "0x561bc1d4", "transactionsTrie" : "a824e7e68b27913f80d5161edffda31a85446ed5088a9b3718ef975f88968195", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf90266f901f9a031700b1f35ecb9ef22548ef16d19952f3a57dc191b908e3e1f15f699c4dc25e7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0181367d4eb4ab410ae4445ea529a7eb076c818df88cd11a9970185d690f16b70a0a824e7e68b27913f80d5161edffda31a85446ed5088a9b3718ef975f88968195a07cb6bfa3e8e51d075e953b7306ae8e24a97212bc85c88495c9e6ea846f2498a1b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88253188455b7e40b80a007209f23a9ed470a0710c4d4114f266e2a90c6732a995928cff726b12798aa378877ae501d101d6ab2f867f8650301827b1594095e7baea6a6c7c4c2dfeb977efac326af552d8782012c84034534541ba0cd40a210ac0630db56ac26feb53cfa84d9ae86d43c2eb3e3735471c6a3fd2383a0572ef18095e34cc33dbd39bfac3e0ff1c247ffddb2dcc00848cc79706c0fdf65c0", + "rlp" : "0xf90266f901f9a0f4ba7a1c1500e04ca1c7b5cf29b86df9f5cd06aedbfa84c65bd3884ada3c6ea4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0181367d4eb4ab410ae4445ea529a7eb076c818df88cd11a9970185d690f16b70a0a824e7e68b27913f80d5161edffda31a85446ed5088a9b3718ef975f88968195a07cb6bfa3e8e51d075e953b7306ae8e24a97212bc85c88495c9e6ea846f2498a1b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd882531884561bc1d480a06b205e2bc9766a7ad8bddbd1cbdc0bfb4cc777c02884f71ff9cae59638a4734d8860069d369dd4a0f6f867f8650301827b1594095e7baea6a6c7c4c2dfeb977efac326af552d8782012c84034534541ba0cd40a210ac0630db56ac26feb53cfa84d9ae86d43c2eb3e3735471c6a3fd2383a0572ef18095e34cc33dbd39bfac3e0ff1c247ffddb2dcc00848cc79706c0fdf65c0", "transactions" : [ { "data" : "0x03453454", @@ -887,19 +887,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "1103f2dd4dd1edc34d72b1fc53f3806748ec1c0ccf2efa0a2588670f6b4ee2ec", - "mixHash" : "352f16bce473559f5b47d9b2bfd1e485b463c22c46ac3dd4d523e101e84a3a2f", - "nonce" : "5000caa0a6dd8ef5", + "hash" : "976360b012dac72b151216d5ff6848d8c943eaa3b9c78579a5484ec71904ac7f", + "mixHash" : "5984b975ac4ce0edbcdb1a6ba2af314da46076c244dec1b08f9389cfa1dfb3b1", + "nonce" : "0e06626feb16d8ef", "number" : "0x03", - "parentHash" : "38bc05b06e64d158ffdc80bb35ece9c2318003b9da3d0f0e73626939a9984b91", + "parentHash" : "26f3b33ed6c4ea6ddb65a594a69f39e7f3c0b62f2a12e8cd8b7750a093702fb9", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "f9c18298c8beb11c13bfe48b0ed5f227e7a4a7fc7ab1b8293f7d8264322306af", - "timestamp" : "0x55b7e40c", + "timestamp" : "0x561bc1d6", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf901fcf901f7a038bc05b06e64d158ffdc80bb35ece9c2318003b9da3d0f0e73626939a9984b91a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f9c18298c8beb11c13bfe48b0ed5f227e7a4a7fc7ab1b8293f7d8264322306afa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd8808455b7e40c80a0352f16bce473559f5b47d9b2bfd1e485b463c22c46ac3dd4d523e101e84a3a2f885000caa0a6dd8ef5c0c0", + "rlp" : "0xf901fcf901f7a026f3b33ed6c4ea6ddb65a594a69f39e7f3c0b62f2a12e8cd8b7750a093702fb9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f9c18298c8beb11c13bfe48b0ed5f227e7a4a7fc7ab1b8293f7d8264322306afa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd88084561bc1d680a05984b975ac4ce0edbcdb1a6ba2af314da46076c244dec1b08f9389cfa1dfb3b1880e06626feb16d8efc0c0", "transactions" : [ ], "uncleHeaders" : [ @@ -913,19 +913,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "8b99b7d3b6e9b679c77db94819917f6e50177254f4468988d1da5455436a9070", - "mixHash" : "798b17c2a9289bbc05c9393c72ede7a1f509c908ccdd28bf61e1e9f33412b20c", - "nonce" : "9453216573508ebe", + "hash" : "53320e130500f679ee0d8daeb0b674f698dd1cf6b8e0279ed0b1e0d16d1f43bc", + "mixHash" : "301727c075b69060a867caa41088397a64da30015bb36c9b88f67fb92c2fd0a9", + "nonce" : "4f92bcd0dea77a5e", "number" : "0x04", - "parentHash" : "1103f2dd4dd1edc34d72b1fc53f3806748ec1c0ccf2efa0a2588670f6b4ee2ec", + "parentHash" : "976360b012dac72b151216d5ff6848d8c943eaa3b9c78579a5484ec71904ac7f", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "a6623b7af1b50fec6f00440ffb1bae5add128da884b8d5f3f732d274c4a67dab", - "timestamp" : "0x55b7e40e", + "timestamp" : "0x561bc1d9", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf901fcf901f7a01103f2dd4dd1edc34d72b1fc53f3806748ec1c0ccf2efa0a2588670f6b4ee2eca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a6623b7af1b50fec6f00440ffb1bae5add128da884b8d5f3f732d274c4a67daba056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd8808455b7e40e80a0798b17c2a9289bbc05c9393c72ede7a1f509c908ccdd28bf61e1e9f33412b20c889453216573508ebec0c0", + "rlp" : "0xf901fcf901f7a0976360b012dac72b151216d5ff6848d8c943eaa3b9c78579a5484ec71904ac7fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a6623b7af1b50fec6f00440ffb1bae5add128da884b8d5f3f732d274c4a67daba056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd88084561bc1d980a0301727c075b69060a867caa41088397a64da30015bb36c9b88f67fb92c2fd0a9884f92bcd0dea77a5ec0c0", "transactions" : [ ], "uncleHeaders" : [ @@ -939,19 +939,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "b689ef8848ef3f5267302a73081847678c6d2cfe50ac07059c62dffef9ccd6b8", - "mixHash" : "526e851d42f3c29051257c990a6f62d8732f57d05cd14846f0a831f5b0586612", - "nonce" : "1475836bd9f5721c", + "hash" : "706b6afaacdca067154137af3fe33ed4402c1b471f35f3b5d7348527c1858f15", + "mixHash" : "a97caf4541310565b1041138b0c8dd163306b1aa1e23afdcb219ff69a83ea6a6", + "nonce" : "7fcdd1cdb6f567b5", "number" : "0x03", - "parentHash" : "38bc05b06e64d158ffdc80bb35ece9c2318003b9da3d0f0e73626939a9984b91", + "parentHash" : "26f3b33ed6c4ea6ddb65a594a69f39e7f3c0b62f2a12e8cd8b7750a093702fb9", "receiptTrie" : "869a9b80dfc9922e47a784cbdc82d0ccd2275c206f4b9c8daa37e92c58285a0e", "stateRoot" : "e1edff36efc46379ad6ac9fb6d76f019a07d20a894b9f8131906bb00f1145de5", - "timestamp" : "0x55b7e410", + "timestamp" : "0x561bc1db", "transactionsTrie" : "a3b73c56d71ff3a785663e8d8de96a75485e9079553acdcf6b001f65dd5c2e34", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90266f901f9a038bc05b06e64d158ffdc80bb35ece9c2318003b9da3d0f0e73626939a9984b91a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e1edff36efc46379ad6ac9fb6d76f019a07d20a894b9f8131906bb00f1145de5a0a3b73c56d71ff3a785663e8d8de96a75485e9079553acdcf6b001f65dd5c2e34a0869a9b80dfc9922e47a784cbdc82d0ccd2275c206f4b9c8daa37e92c58285a0eb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd88252088455b7e41080a0526e851d42f3c29051257c990a6f62d8732f57d05cd14846f0a831f5b0586612881475836bd9f5721cf867f865028405f5e100827aa894095e7baea6a6c7c4c2dfeb977efac326af552d87820190801ca0d5382bd365568f90fb51061ccadce21e2bbe24e5b302a2e039ed55a8b5df48b4a014805949a1dce6cceb285646345a2f7e4a46faf1da87955894a92efa8e5ed605c0", + "rlp" : "0xf90266f901f9a026f3b33ed6c4ea6ddb65a594a69f39e7f3c0b62f2a12e8cd8b7750a093702fb9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e1edff36efc46379ad6ac9fb6d76f019a07d20a894b9f8131906bb00f1145de5a0a3b73c56d71ff3a785663e8d8de96a75485e9079553acdcf6b001f65dd5c2e34a0869a9b80dfc9922e47a784cbdc82d0ccd2275c206f4b9c8daa37e92c58285a0eb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd882520884561bc1db80a0a97caf4541310565b1041138b0c8dd163306b1aa1e23afdcb219ff69a83ea6a6887fcdd1cdb6f567b5f867f865028405f5e100827aa894095e7baea6a6c7c4c2dfeb977efac326af552d87820190801ca0d5382bd365568f90fb51061ccadce21e2bbe24e5b302a2e039ed55a8b5df48b4a014805949a1dce6cceb285646345a2f7e4a46faf1da87955894a92efa8e5ed605c0", "transactions" : [ { "data" : "0x", @@ -976,19 +976,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "866417a71c760815427e6b2632b08612a9eb96bc51d1a1b71786bc048a135e71", - "mixHash" : "6becc64b9546968f88d20f7f2d90c950cf5ab90976a9482c14b4ffb6b4f76679", - "nonce" : "6c9d227291e8bbfc", + "hash" : "5865cfead9842b16003233cdb9239aef5c4613e7ba50c6f96baa47ccd9c868b8", + "mixHash" : "4469ca0f2146c6ab2c013a0cdbf82b1d29ada56fea1add6a9acf98106fe6ff99", + "nonce" : "c168756490a03afd", "number" : "0x04", - "parentHash" : "b689ef8848ef3f5267302a73081847678c6d2cfe50ac07059c62dffef9ccd6b8", + "parentHash" : "706b6afaacdca067154137af3fe33ed4402c1b471f35f3b5d7348527c1858f15", "receiptTrie" : "8dbd8c66586da63ce55e9f9845207eb8a287fe940a54a0b8bb4b7a83ca486f36", "stateRoot" : "3b0dfc93763fa163f1f243409c798c7534b499d66a87c2ad68704fed0c4e2939", - "timestamp" : "0x55b7e412", + "timestamp" : "0x561bc1df", "transactionsTrie" : "c84eac8dc5379b4190a4e6085d2e021aae4c4e77118d22bffcdc70b8d85441c9", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf90263f901f9a0b689ef8848ef3f5267302a73081847678c6d2cfe50ac07059c62dffef9ccd6b8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a03b0dfc93763fa163f1f243409c798c7534b499d66a87c2ad68704fed0c4e2939a0c84eac8dc5379b4190a4e6085d2e021aae4c4e77118d22bffcdc70b8d85441c9a08dbd8c66586da63ce55e9f9845207eb8a287fe940a54a0b8bb4b7a83ca486f36b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd88252088455b7e41280a06becc64b9546968f88d20f7f2d90c950cf5ab90976a9482c14b4ffb6b4f76679886c9d227291e8bbfcf864f862030a8304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87820190801ba0ae8ba6107ac13302a79f585dbbeaa5b46c208ea43dc6b54ac1842e99d7f20ea1a02c9f98cf51ced987cf4f9aa011b259bbb104131fed8d14930c3419876bbc54c4c0", + "rlp" : "0xf90263f901f9a0706b6afaacdca067154137af3fe33ed4402c1b471f35f3b5d7348527c1858f15a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a03b0dfc93763fa163f1f243409c798c7534b499d66a87c2ad68704fed0c4e2939a0c84eac8dc5379b4190a4e6085d2e021aae4c4e77118d22bffcdc70b8d85441c9a08dbd8c66586da63ce55e9f9845207eb8a287fe940a54a0b8bb4b7a83ca486f36b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd882520884561bc1df80a04469ca0f2146c6ab2c013a0cdbf82b1d29ada56fea1add6a9acf98106fe6ff9988c168756490a03afdf864f862030a8304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87820190801ba0ae8ba6107ac13302a79f585dbbeaa5b46c208ea43dc6b54ac1842e99d7f20ea1a02c9f98cf51ced987cf4f9aa011b259bbb104131fed8d14930c3419876bbc54c4c0", "transactions" : [ { "data" : "0x", @@ -1012,21 +1012,32 @@ "difficulty" : "0x020080", "extraData" : "0x", "gasLimit" : "0x2fefd8", - "gasUsed" : "0x00", - "hash" : "706b9931aadb0b50c1c17f810ec014ee3a762f7fc5f4ba5ca4e72cb0288a3c6b", - "mixHash" : "f15a807e4b6518d768f0d11c7fc9fd1ee713d17f34e2c971d7c3cfbb425b1587", - "nonce" : "3273984ea05d231c", + "gasUsed" : "0x5318", + "hash" : "6ee073b1f302f5b7d32a3d4a0d546274db1afa201d1419517bc087aa654dfbd4", + "mixHash" : "191e4bfe6982e847ce33d37389f9e9475f503b94be1fe2f834593dbab0eb7208", + "nonce" : "ca2b21c7049a575d", "number" : "0x05", - "parentHash" : "866417a71c760815427e6b2632b08612a9eb96bc51d1a1b71786bc048a135e71", - "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot" : "92f3545e77ff890e6a0bbc9681a7bd509ea6f65db4c8a265dc63c6ae98df77c6", - "timestamp" : "0x55b7e414", - "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "parentHash" : "5865cfead9842b16003233cdb9239aef5c4613e7ba50c6f96baa47ccd9c868b8", + "receiptTrie" : "b825dd3521afccf183f27d0c54fac0f6a462c69c150e224f93ff661e5f80c96a", + "stateRoot" : "30fd3a576cb63f14b5f1c894df21c031f70b152ef8d657b01a9faa8131f75d83", + "timestamp" : "0x561bc1e0", + "transactionsTrie" : "54c0b8e0b6a1fbaeb2e0749f4d4c4805f743dafd6252ec556f2afd18deb608dd", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "5", - "rlp" : "0xf901fcf901f7a0866417a71c760815427e6b2632b08612a9eb96bc51d1a1b71786bc048a135e71a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a092f3545e77ff890e6a0bbc9681a7bd509ea6f65db4c8a265dc63c6ae98df77c6a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008005832fefd8808455b7e41480a0f15a807e4b6518d768f0d11c7fc9fd1ee713d17f34e2c971d7c3cfbb425b1587883273984ea05d231cc0c0", + "rlp" : "0xf90267f901f9a05865cfead9842b16003233cdb9239aef5c4613e7ba50c6f96baa47ccd9c868b8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a030fd3a576cb63f14b5f1c894df21c031f70b152ef8d657b01a9faa8131f75d83a054c0b8e0b6a1fbaeb2e0749f4d4c4805f743dafd6252ec556f2afd18deb608dda0b825dd3521afccf183f27d0c54fac0f6a462c69c150e224f93ff661e5f80c96ab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008005832fefd882531884561bc1e080a0191e4bfe6982e847ce33d37389f9e9475f503b94be1fe2f834593dbab0eb720888ca2b21c7049a575df868f86604018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8782019084446346341ca06160d580dd7a783df297cf80f258eaca336f0fbecc140fd63ea9e92091dc0e08a019683e0c37dcb2991be2ba02eb8c27416471440aa9c5cf792206d3beb663bba3c0", "transactions" : [ + { + "data" : "0x44634634", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0x6160d580dd7a783df297cf80f258eaca336f0fbecc140fd63ea9e92091dc0e08", + "s" : "0x19683e0c37dcb2991be2ba02eb8c27416471440aa9c5cf792206d3beb663bba3", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0190" + } ], "uncleHeaders" : [ ] @@ -1039,9 +1050,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "d3730cddcf89a53c888f1aa9379d2db0dda1a23f3bcca18a29f0f750da819c9c", - "mixHash" : "284764e2243d282733e0adc5108d4a6a876637e457ebe792d1e21a5eba6aba6b", - "nonce" : "e9738b9f8559327a", + "hash" : "2d80600e2489dcadda66656ebcceccbdbdb1d3b43b884e94434773e890c804d2", + "mixHash" : "a910188d02a56ce79deda677a49218aa180fdc08c1ceaf21120cb63625184a85", + "nonce" : "6f12a20096038775", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1050,27 +1061,27 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0284764e2243d282733e0adc5108d4a6a876637e457ebe792d1e21a5eba6aba6b88e9738b9f8559327ac0c0", - "lastblockhash" : "706b9931aadb0b50c1c17f810ec014ee3a762f7fc5f4ba5ca4e72cb0288a3c6b", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0a910188d02a56ce79deda677a49218aa180fdc08c1ceaf21120cb63625184a85886f12a20096038775c0c0", + "lastblockhash" : "6ee073b1f302f5b7d32a3d4a0d546274db1afa201d1419517bc087aa654dfbd4", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x0334", + "balance" : "0x04c4", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "8888f1f195afa192cfee860698584c030f4c9db1" : { - "balance" : "0x015af1d9744a88e060", + "balance" : "0x015af1d9744a893378", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x072f5cadbc6c", + "balance" : "0x072f5cad67c4", "code" : "0x", - "nonce" : "0x04", + "nonce" : "0x05", "storage" : { } } @@ -1095,19 +1106,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "313f7a58c80b1d0336e41d48c7dbd2e813af4eca2992f8d76accfa588df78cf0", - "mixHash" : "424605c5bb62585691e6a083ce8b56bec007473e1d85dedb92fde0255a437158", - "nonce" : "fbf64e9e38d404fe", + "hash" : "d3e1bb191f9da74caa8809d62af00b8751dadbd5f3077f815a693bac66938bc8", + "mixHash" : "9177e244e06d6e1c99fa8b67d6126b63468a15921f7b3508afe299de3b8423bb", + "nonce" : "9964024f7a71f931", "number" : "0x01", - "parentHash" : "e8594af1358ad392c8d85c15230426062307f774b51e622fbe31f06a7ae5b79f", + "parentHash" : "b1e2e9244c290258fb8c017e818bac3398f1ad6880a7404760a9a17efb94fb2c", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e417", + "timestamp" : "0x561bc1e4", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "1", - "rlp" : "0xf90261f901f9a0e8594af1358ad392c8d85c15230426062307f774b51e622fbe31f06a7ae5b79fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e41780a0424605c5bb62585691e6a083ce8b56bec007473e1d85dedb92fde0255a43715888fbf64e9e38d404fef862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a0b1e2e9244c290258fb8c017e818bac3398f1ad6880a7404760a9a17efb94fb2ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc1e480a09177e244e06d6e1c99fa8b67d6126b63468a15921f7b3508afe299de3b8423bb889964024f7a71f931f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -1132,19 +1143,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "c59fea114eb9267b263156edec0087e34a2e5ec254447ef2e32e6639e550c9f5", - "mixHash" : "7f948e1c8b105c0182497683d65c693674e8a0e73d01e23ccb6b020b2d648f6a", - "nonce" : "1feada0fc8dac04b", + "hash" : "760b6feb76984990a28e5b9d2adb772d98f005275c6670a2415a50f9d75f3eab", + "mixHash" : "12df67882be96097cc0230617adb9a57f81044e74d5e62cd9374443cf51b6870", + "nonce" : "b6231f5c07c19b23", "number" : "0x02", - "parentHash" : "313f7a58c80b1d0336e41d48c7dbd2e813af4eca2992f8d76accfa588df78cf0", + "parentHash" : "d3e1bb191f9da74caa8809d62af00b8751dadbd5f3077f815a693bac66938bc8", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e418", + "timestamp" : "0x561bc1e6", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "2", - "rlp" : "0xf90260f901f9a0313f7a58c80b1d0336e41d48c7dbd2e813af4eca2992f8d76accfa588df78cf0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e41880a07f948e1c8b105c0182497683d65c693674e8a0e73d01e23ccb6b020b2d648f6a881feada0fc8dac04bf861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a0d3e1bb191f9da74caa8809d62af00b8751dadbd5f3077f815a693bac66938bc8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc1e680a012df67882be96097cc0230617adb9a57f81044e74d5e62cd9374443cf51b687088b6231f5c07c19b23f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -1169,19 +1180,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "15b7bcafb76cc4822baf617a6684876b8919b277ea248bb15f79fe10a96900ec", - "mixHash" : "15a9b2da375e42432a1d63c6c94b83e62df9590a0b027180e7770915f888daa0", - "nonce" : "d5d2e39f06e431c1", + "hash" : "edb53cc2fa26fcebfd0649d193602d89d5f11abd47591015b03d37ccdfccd97c", + "mixHash" : "5334573fb918b9b20489723d52d82a45dae6f08c34489b1616a9fb74aaffc25e", + "nonce" : "e3cb1f47e28bd45e", "number" : "0x03", - "parentHash" : "c59fea114eb9267b263156edec0087e34a2e5ec254447ef2e32e6639e550c9f5", + "parentHash" : "760b6feb76984990a28e5b9d2adb772d98f005275c6670a2415a50f9d75f3eab", "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", - "timestamp" : "0x55b7e41a", + "timestamp" : "0x561bc1ea", "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90261f901f9a0c59fea114eb9267b263156edec0087e34a2e5ec254447ef2e32e6639e550c9f5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e41a80a015a9b2da375e42432a1d63c6c94b83e62df9590a0b027180e7770915f888daa088d5d2e39f06e431c1f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "rlp" : "0xf90261f901f9a0760b6feb76984990a28e5b9d2adb772d98f005275c6670a2415a50f9d75f3eaba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc1ea80a05334573fb918b9b20489723d52d82a45dae6f08c34489b1616a9fb74aaffc25e88e3cb1f47e28bd45ef862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", "transactions" : [ { "data" : "0x", @@ -1206,19 +1217,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "c284c5a6c6be2df6ee564de9a7c52b25738997db2d92873189920471411d1493", - "mixHash" : "037cbba32c20fddee11d39f534396129a9b11bcbc45cc50abc954ae6037fedc3", - "nonce" : "fd2d7ca958cb1f8b", + "hash" : "5cd4b8659a4812b767063b7b7ca5e60ef012e3c0535b791046fab1ad623087a2", + "mixHash" : "695bfc5e171bec4a62fff5785ff415eef5835e79cf48bc93cc23de9cc7fe9470", + "nonce" : "9663da741e9dfa00", "number" : "0x04", - "parentHash" : "15b7bcafb76cc4822baf617a6684876b8919b277ea248bb15f79fe10a96900ec", + "parentHash" : "edb53cc2fa26fcebfd0649d193602d89d5f11abd47591015b03d37ccdfccd97c", "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", - "timestamp" : "0x55b7e41c", + "timestamp" : "0x561bc1ed", "transactionsTrie" : "9735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf90261f901f9a015b7bcafb76cc4822baf617a6684876b8919b277ea248bb15f79fe10a96900eca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88252088455b7e41c80a0037cbba32c20fddee11d39f534396129a9b11bcbc45cc50abc954ae6037fedc388fd2d7ca958cb1f8bf862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", + "rlp" : "0xf90261f901f9a0edb53cc2fa26fcebfd0649d193602d89d5f11abd47591015b03d37ccdfccd97ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc1ed80a0695bfc5e171bec4a62fff5785ff415eef5835e79cf48bc93cc23de9cc7fe9470889663da741e9dfa00f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", "transactions" : [ { "data" : "0x", @@ -1243,19 +1254,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "ef8a6246316be813c5d113bafc3dd01fc09052ab14d0568386aefec90e58708e", - "mixHash" : "0e0e8d245bb7f6de6e07daed3ff544b7ef88b22f36262015bb74a20e1337982a", - "nonce" : "ef9f8cf835d14870", + "hash" : "79e926b03d2b5b555e5de8f14121c6cf720dcf39f9267fa4f76d0437cac0f5d0", + "mixHash" : "892bd5a288091188d8939a7d07678b188551df49c55f20d97b71b121d2e8e2a9", + "nonce" : "066b89d50fd3fec0", "number" : "0x03", - "parentHash" : "c59fea114eb9267b263156edec0087e34a2e5ec254447ef2e32e6639e550c9f5", + "parentHash" : "760b6feb76984990a28e5b9d2adb772d98f005275c6670a2415a50f9d75f3eab", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "f9c18298c8beb11c13bfe48b0ed5f227e7a4a7fc7ab1b8293f7d8264322306af", - "timestamp" : "0x55b7e41e", + "timestamp" : "0x561bc1ef", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf901fcf901f7a0c59fea114eb9267b263156edec0087e34a2e5ec254447ef2e32e6639e550c9f5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f9c18298c8beb11c13bfe48b0ed5f227e7a4a7fc7ab1b8293f7d8264322306afa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd8808455b7e41e80a00e0e8d245bb7f6de6e07daed3ff544b7ef88b22f36262015bb74a20e1337982a88ef9f8cf835d14870c0c0", + "rlp" : "0xf901fcf901f7a0760b6feb76984990a28e5b9d2adb772d98f005275c6670a2415a50f9d75f3eaba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f9c18298c8beb11c13bfe48b0ed5f227e7a4a7fc7ab1b8293f7d8264322306afa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88084561bc1ef80a0892bd5a288091188d8939a7d07678b188551df49c55f20d97b71b121d2e8e2a988066b89d50fd3fec0c0c0", "transactions" : [ ], "uncleHeaders" : [ @@ -1269,19 +1280,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "9e93392fbe998e24a0d3c62510b73cd8da691291d5253e8cccad0bd1f50003d0", - "mixHash" : "b8e5c0126947de0827c91719480cc4ad47e5925d9dac08cfffcc964f370c271f", - "nonce" : "f4444e51addf6b20", + "hash" : "1b5edbc2f1a256b735c35e78aaf0efef1d5681b3dd344d15f47053f557a11bf2", + "mixHash" : "57413b623ca31777015c4979dc53fa234d8db6c4fa2995228f9fc75978f20c79", + "nonce" : "8dfe728decb3c735", "number" : "0x04", - "parentHash" : "ef8a6246316be813c5d113bafc3dd01fc09052ab14d0568386aefec90e58708e", + "parentHash" : "79e926b03d2b5b555e5de8f14121c6cf720dcf39f9267fa4f76d0437cac0f5d0", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "a6623b7af1b50fec6f00440ffb1bae5add128da884b8d5f3f732d274c4a67dab", - "timestamp" : "0x55b7e420", + "timestamp" : "0x561bc1f2", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf901fcf901f7a0ef8a6246316be813c5d113bafc3dd01fc09052ab14d0568386aefec90e58708ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a6623b7af1b50fec6f00440ffb1bae5add128da884b8d5f3f732d274c4a67daba056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd8808455b7e42080a0b8e5c0126947de0827c91719480cc4ad47e5925d9dac08cfffcc964f370c271f88f4444e51addf6b20c0c0", + "rlp" : "0xf901fcf901f7a079e926b03d2b5b555e5de8f14121c6cf720dcf39f9267fa4f76d0437cac0f5d0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a6623b7af1b50fec6f00440ffb1bae5add128da884b8d5f3f732d274c4a67daba056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88084561bc1f280a057413b623ca31777015c4979dc53fa234d8db6c4fa2995228f9fc75978f20c79888dfe728decb3c735c0c0", "transactions" : [ ], "uncleHeaders" : [ @@ -1291,23 +1302,23 @@ "blockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020080", + "difficulty" : "0x020000", "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "8a6cdc4ab14d6993bbcf20e9c24b18d9ede41e59980772303ef529206a918fe7", - "mixHash" : "e30d5d872091d66d821ae41af8e3d4b811051b6ac2e527d163924a137a4166ae", - "nonce" : "18b14dbde0c7112b", + "hash" : "69aa5a867d316af86db74b61c033e8bc432cf60322d7628f7b0eba9e1d33d9b3", + "mixHash" : "93284217f795840fbe76aab6b78f11752d78305bdb545713ca3fe23ccc1b1345", + "nonce" : "629e1e283dea255c", "number" : "0x03", - "parentHash" : "c59fea114eb9267b263156edec0087e34a2e5ec254447ef2e32e6639e550c9f5", + "parentHash" : "760b6feb76984990a28e5b9d2adb772d98f005275c6670a2415a50f9d75f3eab", "receiptTrie" : "82a61c371d777ef243b6dec5b581d8fd0dbebc07a3de54329598c5f8a226e056", "stateRoot" : "0f3d2f68dbe8c6381ef39c27cc0e4006a0d3d216b333c397c59f546cc40ad62e", - "timestamp" : "0x55b7e422", + "timestamp" : "0x561bc1f4", "transactionsTrie" : "072046258d0ca95c113aa82fd6f6b9c0ec185a48ebc25d3faec9de49ffd6215d", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90264f901f9a0c59fea114eb9267b263156edec0087e34a2e5ec254447ef2e32e6639e550c9f5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00f3d2f68dbe8c6381ef39c27cc0e4006a0d3d216b333c397c59f546cc40ad62ea0072046258d0ca95c113aa82fd6f6b9c0ec185a48ebc25d3faec9de49ffd6215da082a61c371d777ef243b6dec5b581d8fd0dbebc07a3de54329598c5f8a226e056b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e42280a0e30d5d872091d66d821ae41af8e3d4b811051b6ac2e527d163924a137a4166ae8818b14dbde0c7112bf865f86302820d038304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8781c8801ca0ef0ce7166d296ce37ca5f553375dcf065f64593ab866b2a644fdfae88d138c92a061bcf1a04c234d3b8f1093597f82c222ba512f9d1525681df57dcd90335de427c0", + "rlp" : "0xf90264f901f9a0760b6feb76984990a28e5b9d2adb772d98f005275c6670a2415a50f9d75f3eaba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00f3d2f68dbe8c6381ef39c27cc0e4006a0d3d216b333c397c59f546cc40ad62ea0072046258d0ca95c113aa82fd6f6b9c0ec185a48ebc25d3faec9de49ffd6215da082a61c371d777ef243b6dec5b581d8fd0dbebc07a3de54329598c5f8a226e056b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd882520884561bc1f480a093284217f795840fbe76aab6b78f11752d78305bdb545713ca3fe23ccc1b134588629e1e283dea255cf865f86302820d038304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8781c8801ca0ef0ce7166d296ce37ca5f553375dcf065f64593ab866b2a644fdfae88d138c92a061bcf1a04c234d3b8f1093597f82c222ba512f9d1525681df57dcd90335de427c0", "transactions" : [ { "data" : "0x", @@ -1328,23 +1339,23 @@ "blockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x0200c0", + "difficulty" : "0x020040", "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5318", - "hash" : "dd9536d8f464e263359932c51e03100b75621a3316a387077311daa855287e52", - "mixHash" : "ce3004d56116bd9e350c3cf4d52f031ac5665adf7540388cd6aefcf90b4adcfd", - "nonce" : "147cdf9ebaafbb5e", + "hash" : "5544beba1221cd1542cdff10ea4ea708c52e23c250279e0845cb4bb9b80466db", + "mixHash" : "786ef1a3048f0118db1d3e544f8344e39fa9bca98dedac915482caa7f9f3a7f8", + "nonce" : "86f84e172a7cd07a", "number" : "0x04", - "parentHash" : "8a6cdc4ab14d6993bbcf20e9c24b18d9ede41e59980772303ef529206a918fe7", + "parentHash" : "69aa5a867d316af86db74b61c033e8bc432cf60322d7628f7b0eba9e1d33d9b3", "receiptTrie" : "f652d8fe780db9346ca7e0595e29cb94ba4a06d8f039fac4333eff25092e20cc", "stateRoot" : "dd01241e01c18ef580df49e57d9207bb8c873a91eb6274ad941ea11bafabff8f", - "timestamp" : "0x55b7e425", + "timestamp" : "0x561bc1f5", "transactionsTrie" : "ee51a9bfd102ea1edc3d5fae62373cdade733f7725f05ab4c03d0159e463678e", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf90266f901f9a08a6cdc4ab14d6993bbcf20e9c24b18d9ede41e59980772303ef529206a918fe7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0dd01241e01c18ef580df49e57d9207bb8c873a91eb6274ad941ea11bafabff8fa0ee51a9bfd102ea1edc3d5fae62373cdade733f7725f05ab4c03d0159e463678ea0f652d8fe780db9346ca7e0595e29cb94ba4a06d8f039fac4333eff25092e20ccb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88253188455b7e42580a0ce3004d56116bd9e350c3cf4d52f031ac5665adf7540388cd6aefcf90b4adcfd88147cdf9ebaafbb5ef867f86503018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8781c884446346341ba050dfd0a6d8ad080637aa6a6a70ddee4f0f6f099445afbe21f437fa3ba2edff9ea06d57c3fa59d837de61c2006223f125afb5ce62252d76c36c58cfaf948da8f2c6c0", + "rlp" : "0xf90266f901f9a069aa5a867d316af86db74b61c033e8bc432cf60322d7628f7b0eba9e1d33d9b3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0dd01241e01c18ef580df49e57d9207bb8c873a91eb6274ad941ea11bafabff8fa0ee51a9bfd102ea1edc3d5fae62373cdade733f7725f05ab4c03d0159e463678ea0f652d8fe780db9346ca7e0595e29cb94ba4a06d8f039fac4333eff25092e20ccb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd882531884561bc1f580a0786ef1a3048f0118db1d3e544f8344e39fa9bca98dedac915482caa7f9f3a7f88886f84e172a7cd07af867f86503018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8781c884446346341ba050dfd0a6d8ad080637aa6a6a70ddee4f0f6f099445afbe21f437fa3ba2edff9ea06d57c3fa59d837de61c2006223f125afb5ce62252d76c36c58cfaf948da8f2c6c0", "transactions" : [ { "data" : "0x44634634", @@ -1365,24 +1376,35 @@ "blockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020100", + "difficulty" : "0x020080", "extraData" : "0x", "gasLimit" : "0x2fefd8", - "gasUsed" : "0x00", - "hash" : "7c39437ca582b9f99c6011dfa2fa540747fe716b4f3cefb720ff700551ee6351", - "mixHash" : "303de1ed2a8d006f0e67701d3e433f2581d9b469d4c34cf9af14fa50a1a8fcb6", - "nonce" : "a394b93f7815a25d", + "gasUsed" : "0x5318", + "hash" : "bfb71e7adcc77147699ce96532e92dbe9404c430ef3106abd27b38929e9db55e", + "mixHash" : "a6609efbe28cb87b3bc0b4d26a65c84a3f41629d50cd3252f8e63eca49ac3c4c", + "nonce" : "ba704c2d400f10a5", "number" : "0x05", - "parentHash" : "dd9536d8f464e263359932c51e03100b75621a3316a387077311daa855287e52", - "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot" : "36624d8f884426ea4b3cdae7609c6f517925be73c6c1552ea398df31969b8f71", - "timestamp" : "0x55b7e427", - "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "parentHash" : "5544beba1221cd1542cdff10ea4ea708c52e23c250279e0845cb4bb9b80466db", + "receiptTrie" : "ce4966ed6b268576c5e9619bbf6d4d2bcb1ed62654c82e5597effcb2316bb588", + "stateRoot" : "708b68a1246b4f07d43eb62eab199cc241b8dc7ebd38acfcd93765635ff96f55", + "timestamp" : "0x561bc1f7", + "transactionsTrie" : "e44a2510b3429eef44fdfb0dca553d52dfaf0cb6a8c1055e97ea3ea9d399b4f4", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "5", - "rlp" : "0xf901fcf901f7a0dd9536d8f464e263359932c51e03100b75621a3316a387077311daa855287e52a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a036624d8f884426ea4b3cdae7609c6f517925be73c6c1552ea398df31969b8f71a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd8808455b7e42780a0303de1ed2a8d006f0e67701d3e433f2581d9b469d4c34cf9af14fa50a1a8fcb688a394b93f7815a25dc0c0", + "rlp" : "0xf90266f901f9a05544beba1221cd1542cdff10ea4ea708c52e23c250279e0845cb4bb9b80466dba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0708b68a1246b4f07d43eb62eab199cc241b8dc7ebd38acfcd93765635ff96f55a0e44a2510b3429eef44fdfb0dca553d52dfaf0cb6a8c1055e97ea3ea9d399b4f4a0ce4966ed6b268576c5e9619bbf6d4d2bcb1ed62654c82e5597effcb2316bb588b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008005832fefd882531884561bc1f780a0a6609efbe28cb87b3bc0b4d26a65c84a3f41629d50cd3252f8e63eca49ac3c4c88ba704c2d400f10a5f867f86504018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8781c884446346341ba0a917691417a70c7c2a1a88dc53ba76de30ed0071542c4c5b1deb89405d691349a05c3549158fd5c70df70d5de50a37971747bd2424ec9bcfaf3010dd53acdd806ec0", "transactions" : [ + { + "data" : "0x44634634", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0xa917691417a70c7c2a1a88dc53ba76de30ed0071542c4c5b1deb89405d691349", + "s" : "0x5c3549158fd5c70df70d5de50a37971747bd2424ec9bcfaf3010dd53acdd806e", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0xc8" + } ], "uncleHeaders" : [ ] @@ -1395,19 +1417,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "e31c2b20d49bb3890d974571dfde41accf1b74ed3664793489d3731f1c89cb14", - "mixHash" : "b09cf17883b1463986c786432e16fd89f0db001136b16745d38d8e21af111f1d", - "nonce" : "6f24c90a8748831d", + "hash" : "f43e57b3a6ce588e5f4be57f89d0156f3f634b24ce346b84843d62f734670b5c", + "mixHash" : "a208895303937caaf98552cff70959b1c0b98a85563737976cce4f0460e4fbcb", + "nonce" : "7ab1d2674fce6e1d", "number" : "0x03", - "parentHash" : "c59fea114eb9267b263156edec0087e34a2e5ec254447ef2e32e6639e550c9f5", + "parentHash" : "760b6feb76984990a28e5b9d2adb772d98f005275c6670a2415a50f9d75f3eab", "receiptTrie" : "e717fb2be39da3e69db18c84baa4b9a59ecfa3454ed7e0946468a91b8e93d2ea", "stateRoot" : "f6dab66d4dd2727ba6c6bba0a434052435f3a82f68682af5d54093ccd81e4c40", - "timestamp" : "0x55b7e428", + "timestamp" : "0x561bc1f9", "transactionsTrie" : "8d4f70e47fd980bc4182bf6735e827a3ab98040b97bc27765aa69bedbc03aec1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90262f901f9a0c59fea114eb9267b263156edec0087e34a2e5ec254447ef2e32e6639e550c9f5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f6dab66d4dd2727ba6c6bba0a434052435f3a82f68682af5d54093ccd81e4c40a08d4f70e47fd980bc4182bf6735e827a3ab98040b97bc27765aa69bedbc03aec1a0e717fb2be39da3e69db18c84baa4b9a59ecfa3454ed7e0946468a91b8e93d2eab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd88252088455b7e42880a0b09cf17883b1463986c786432e16fd89f0db001136b16745d38d8e21af111f1d886f24c90a8748831df863f861020182795394095e7baea6a6c7c4c2dfeb977efac326af552d8782012c801ba02c0496b83cb527e403cb3900d83856644a2359e9cc79ca5fbcf508d8c6c1506ca030cedfd3b5105bbf823116d858790f1c48ab545751cb870ffda6ba3663d9261dc0", + "rlp" : "0xf90262f901f9a0760b6feb76984990a28e5b9d2adb772d98f005275c6670a2415a50f9d75f3eaba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f6dab66d4dd2727ba6c6bba0a434052435f3a82f68682af5d54093ccd81e4c40a08d4f70e47fd980bc4182bf6735e827a3ab98040b97bc27765aa69bedbc03aec1a0e717fb2be39da3e69db18c84baa4b9a59ecfa3454ed7e0946468a91b8e93d2eab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd882520884561bc1f980a0a208895303937caaf98552cff70959b1c0b98a85563737976cce4f0460e4fbcb887ab1d2674fce6e1df863f861020182795394095e7baea6a6c7c4c2dfeb977efac326af552d8782012c801ba02c0496b83cb527e403cb3900d83856644a2359e9cc79ca5fbcf508d8c6c1506ca030cedfd3b5105bbf823116d858790f1c48ab545751cb870ffda6ba3663d9261dc0", "transactions" : [ { "data" : "0x", @@ -1432,19 +1454,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5318", - "hash" : "95c7cce5f7d9cd459fa038b3a6368efb1ff32096ee891e57c46121d505e848af", - "mixHash" : "c0c4f35ce9215abb08b7f5d5b54c5a9d691870221382eda532a33790c5b66741", - "nonce" : "d25401094dfec768", + "hash" : "0ee7ed915c6287662befb53960ddf581e38c11edfec0e999f135bf05f9d3bc34", + "mixHash" : "f60fbdbb59cc958a948ab7b7188cc1880271048d9d54156b65331eda8ab3a4b5", + "nonce" : "4a9d268e44fd07be", "number" : "0x04", - "parentHash" : "e31c2b20d49bb3890d974571dfde41accf1b74ed3664793489d3731f1c89cb14", + "parentHash" : "f43e57b3a6ce588e5f4be57f89d0156f3f634b24ce346b84843d62f734670b5c", "receiptTrie" : "7cb6bfa3e8e51d075e953b7306ae8e24a97212bc85c88495c9e6ea846f2498a1", "stateRoot" : "181367d4eb4ab410ae4445ea529a7eb076c818df88cd11a9970185d690f16b70", - "timestamp" : "0x55b7e429", + "timestamp" : "0x561bc1fc", "transactionsTrie" : "a824e7e68b27913f80d5161edffda31a85446ed5088a9b3718ef975f88968195", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf90266f901f9a0e31c2b20d49bb3890d974571dfde41accf1b74ed3664793489d3731f1c89cb14a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0181367d4eb4ab410ae4445ea529a7eb076c818df88cd11a9970185d690f16b70a0a824e7e68b27913f80d5161edffda31a85446ed5088a9b3718ef975f88968195a07cb6bfa3e8e51d075e953b7306ae8e24a97212bc85c88495c9e6ea846f2498a1b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd88253188455b7e42980a0c0c4f35ce9215abb08b7f5d5b54c5a9d691870221382eda532a33790c5b6674188d25401094dfec768f867f8650301827b1594095e7baea6a6c7c4c2dfeb977efac326af552d8782012c84034534541ba0cd40a210ac0630db56ac26feb53cfa84d9ae86d43c2eb3e3735471c6a3fd2383a0572ef18095e34cc33dbd39bfac3e0ff1c247ffddb2dcc00848cc79706c0fdf65c0", + "rlp" : "0xf90266f901f9a0f43e57b3a6ce588e5f4be57f89d0156f3f634b24ce346b84843d62f734670b5ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0181367d4eb4ab410ae4445ea529a7eb076c818df88cd11a9970185d690f16b70a0a824e7e68b27913f80d5161edffda31a85446ed5088a9b3718ef975f88968195a07cb6bfa3e8e51d075e953b7306ae8e24a97212bc85c88495c9e6ea846f2498a1b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd882531884561bc1fc80a0f60fbdbb59cc958a948ab7b7188cc1880271048d9d54156b65331eda8ab3a4b5884a9d268e44fd07bef867f8650301827b1594095e7baea6a6c7c4c2dfeb977efac326af552d8782012c84034534541ba0cd40a210ac0630db56ac26feb53cfa84d9ae86d43c2eb3e3735471c6a3fd2383a0572ef18095e34cc33dbd39bfac3e0ff1c247ffddb2dcc00848cc79706c0fdf65c0", "transactions" : [ { "data" : "0x03453454", @@ -1469,19 +1491,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "e20952ed8f395c7d5a967a08c6e3cf417ed97edb753d9c6365534102f36f344c", - "mixHash" : "9bd45502087c60d875eb9de036ec188635abbe40e7d1a1697bfd2ce32aa1a1ed", - "nonce" : "1d5265e402fb0b5d", + "hash" : "f4c62ee767c696285eb6c4b726c6b1c7b17c88a6bef542777bea5d21b1cfe933", + "mixHash" : "2e9c97064e0408e5e9924439a180dbcbcfc71f14236228f219136112195d8670", + "nonce" : "f8d554cd6bd32b17", "number" : "0x03", - "parentHash" : "c59fea114eb9267b263156edec0087e34a2e5ec254447ef2e32e6639e550c9f5", + "parentHash" : "760b6feb76984990a28e5b9d2adb772d98f005275c6670a2415a50f9d75f3eab", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "f9c18298c8beb11c13bfe48b0ed5f227e7a4a7fc7ab1b8293f7d8264322306af", - "timestamp" : "0x55b7e42b", + "timestamp" : "0x561bc1ff", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf901fcf901f7a0c59fea114eb9267b263156edec0087e34a2e5ec254447ef2e32e6639e550c9f5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f9c18298c8beb11c13bfe48b0ed5f227e7a4a7fc7ab1b8293f7d8264322306afa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd8808455b7e42b80a09bd45502087c60d875eb9de036ec188635abbe40e7d1a1697bfd2ce32aa1a1ed881d5265e402fb0b5dc0c0", + "rlp" : "0xf901fcf901f7a0760b6feb76984990a28e5b9d2adb772d98f005275c6670a2415a50f9d75f3eaba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f9c18298c8beb11c13bfe48b0ed5f227e7a4a7fc7ab1b8293f7d8264322306afa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd88084561bc1ff80a02e9c97064e0408e5e9924439a180dbcbcfc71f14236228f219136112195d867088f8d554cd6bd32b17c0c0", "transactions" : [ ], "uncleHeaders" : [ @@ -1495,19 +1517,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "87d6b81a6d19844fecec0add5092c1256e7fe972d368f6356658d58306b864e7", - "mixHash" : "67cb478ab14fa5175d24250b1eecbb6602504f466375be6481d265efc2c1751e", - "nonce" : "abdb4de1bade313c", + "hash" : "96e2e0a8fc3be8b9d18b91ef5f6987a8037c86640bbd35d5988e820127ad8009", + "mixHash" : "db85a71f3b235492aee9923c11386e21f3ec4e726284b71459063034034a7f36", + "nonce" : "1b512c39f5690d6f", "number" : "0x04", - "parentHash" : "e20952ed8f395c7d5a967a08c6e3cf417ed97edb753d9c6365534102f36f344c", + "parentHash" : "f4c62ee767c696285eb6c4b726c6b1c7b17c88a6bef542777bea5d21b1cfe933", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "a6623b7af1b50fec6f00440ffb1bae5add128da884b8d5f3f732d274c4a67dab", - "timestamp" : "0x55b7e42c", + "timestamp" : "0x561bc201", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf901fcf901f7a0e20952ed8f395c7d5a967a08c6e3cf417ed97edb753d9c6365534102f36f344ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a6623b7af1b50fec6f00440ffb1bae5add128da884b8d5f3f732d274c4a67daba056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd8808455b7e42c80a067cb478ab14fa5175d24250b1eecbb6602504f466375be6481d265efc2c1751e88abdb4de1bade313cc0c0", + "rlp" : "0xf901fcf901f7a0f4c62ee767c696285eb6c4b726c6b1c7b17c88a6bef542777bea5d21b1cfe933a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a6623b7af1b50fec6f00440ffb1bae5add128da884b8d5f3f732d274c4a67daba056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd88084561bc20180a0db85a71f3b235492aee9923c11386e21f3ec4e726284b71459063034034a7f36881b512c39f5690d6fc0c0", "transactions" : [ ], "uncleHeaders" : [ @@ -1521,19 +1543,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "88b90f765930fa636c16f26fc959cf4e41e07c9db6e217cf3072cc87bf71e884", - "mixHash" : "ca6b45f8847e49bb0b232b360239cad7244c841170327c932fea128415773941", - "nonce" : "bd5fd68df906e087", + "hash" : "c6dca5fb687846fccfaa49fefcf323d134e87f8b773e55752db7ad52fa41cc33", + "mixHash" : "dd282189a031badd437efc889566e4f48d06d1183f159429d7615175d788cbc3", + "nonce" : "51aeaf51c71d3703", "number" : "0x03", - "parentHash" : "c59fea114eb9267b263156edec0087e34a2e5ec254447ef2e32e6639e550c9f5", + "parentHash" : "760b6feb76984990a28e5b9d2adb772d98f005275c6670a2415a50f9d75f3eab", "receiptTrie" : "869a9b80dfc9922e47a784cbdc82d0ccd2275c206f4b9c8daa37e92c58285a0e", "stateRoot" : "e1edff36efc46379ad6ac9fb6d76f019a07d20a894b9f8131906bb00f1145de5", - "timestamp" : "0x55b7e42e", + "timestamp" : "0x561bc203", "transactionsTrie" : "a3b73c56d71ff3a785663e8d8de96a75485e9079553acdcf6b001f65dd5c2e34", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90266f901f9a0c59fea114eb9267b263156edec0087e34a2e5ec254447ef2e32e6639e550c9f5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e1edff36efc46379ad6ac9fb6d76f019a07d20a894b9f8131906bb00f1145de5a0a3b73c56d71ff3a785663e8d8de96a75485e9079553acdcf6b001f65dd5c2e34a0869a9b80dfc9922e47a784cbdc82d0ccd2275c206f4b9c8daa37e92c58285a0eb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd88252088455b7e42e80a0ca6b45f8847e49bb0b232b360239cad7244c841170327c932fea12841577394188bd5fd68df906e087f867f865028405f5e100827aa894095e7baea6a6c7c4c2dfeb977efac326af552d87820190801ca0d5382bd365568f90fb51061ccadce21e2bbe24e5b302a2e039ed55a8b5df48b4a014805949a1dce6cceb285646345a2f7e4a46faf1da87955894a92efa8e5ed605c0", + "rlp" : "0xf90266f901f9a0760b6feb76984990a28e5b9d2adb772d98f005275c6670a2415a50f9d75f3eaba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e1edff36efc46379ad6ac9fb6d76f019a07d20a894b9f8131906bb00f1145de5a0a3b73c56d71ff3a785663e8d8de96a75485e9079553acdcf6b001f65dd5c2e34a0869a9b80dfc9922e47a784cbdc82d0ccd2275c206f4b9c8daa37e92c58285a0eb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd882520884561bc20380a0dd282189a031badd437efc889566e4f48d06d1183f159429d7615175d788cbc38851aeaf51c71d3703f867f865028405f5e100827aa894095e7baea6a6c7c4c2dfeb977efac326af552d87820190801ca0d5382bd365568f90fb51061ccadce21e2bbe24e5b302a2e039ed55a8b5df48b4a014805949a1dce6cceb285646345a2f7e4a46faf1da87955894a92efa8e5ed605c0", "transactions" : [ { "data" : "0x", @@ -1558,19 +1580,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "065bb51fc4f448c9b53dcce8900e7c892f929239114bf2a99b019eb9535d6923", - "mixHash" : "1ea972f2c743ef3abdae7236a3ea1f7e1d4ae3e4e662bffe4f6cc083ecd3ea53", - "nonce" : "b31b273e8d5798d8", + "hash" : "6ccb40ce63d59a1ec17b2d0a61e809dca307cfd38e1a55e55c6561b19062953e", + "mixHash" : "e610deb885bf93af005eaea0ce28193a22d7002f0b41937fa5817c9e802138f8", + "nonce" : "470f747909afeb4f", "number" : "0x04", - "parentHash" : "88b90f765930fa636c16f26fc959cf4e41e07c9db6e217cf3072cc87bf71e884", + "parentHash" : "c6dca5fb687846fccfaa49fefcf323d134e87f8b773e55752db7ad52fa41cc33", "receiptTrie" : "8dbd8c66586da63ce55e9f9845207eb8a287fe940a54a0b8bb4b7a83ca486f36", "stateRoot" : "3b0dfc93763fa163f1f243409c798c7534b499d66a87c2ad68704fed0c4e2939", - "timestamp" : "0x55b7e430", + "timestamp" : "0x561bc205", "transactionsTrie" : "c84eac8dc5379b4190a4e6085d2e021aae4c4e77118d22bffcdc70b8d85441c9", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf90263f901f9a088b90f765930fa636c16f26fc959cf4e41e07c9db6e217cf3072cc87bf71e884a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a03b0dfc93763fa163f1f243409c798c7534b499d66a87c2ad68704fed0c4e2939a0c84eac8dc5379b4190a4e6085d2e021aae4c4e77118d22bffcdc70b8d85441c9a08dbd8c66586da63ce55e9f9845207eb8a287fe940a54a0b8bb4b7a83ca486f36b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd88252088455b7e43080a01ea972f2c743ef3abdae7236a3ea1f7e1d4ae3e4e662bffe4f6cc083ecd3ea5388b31b273e8d5798d8f864f862030a8304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87820190801ba0ae8ba6107ac13302a79f585dbbeaa5b46c208ea43dc6b54ac1842e99d7f20ea1a02c9f98cf51ced987cf4f9aa011b259bbb104131fed8d14930c3419876bbc54c4c0", + "rlp" : "0xf90263f901f9a0c6dca5fb687846fccfaa49fefcf323d134e87f8b773e55752db7ad52fa41cc33a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a03b0dfc93763fa163f1f243409c798c7534b499d66a87c2ad68704fed0c4e2939a0c84eac8dc5379b4190a4e6085d2e021aae4c4e77118d22bffcdc70b8d85441c9a08dbd8c66586da63ce55e9f9845207eb8a287fe940a54a0b8bb4b7a83ca486f36b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd882520884561bc20580a0e610deb885bf93af005eaea0ce28193a22d7002f0b41937fa5817c9e802138f888470f747909afeb4ff864f862030a8304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d87820190801ba0ae8ba6107ac13302a79f585dbbeaa5b46c208ea43dc6b54ac1842e99d7f20ea1a02c9f98cf51ced987cf4f9aa011b259bbb104131fed8d14930c3419876bbc54c4c0", "transactions" : [ { "data" : "0x", @@ -1595,9 +1617,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "e8594af1358ad392c8d85c15230426062307f774b51e622fbe31f06a7ae5b79f", - "mixHash" : "54a523c2e952c52aca2d7f31d6f6f1c2ff4f20e3365fd1cd550b3ddb48427cb2", - "nonce" : "54cc647557b37f75", + "hash" : "b1e2e9244c290258fb8c017e818bac3398f1ad6880a7404760a9a17efb94fb2c", + "mixHash" : "9f801984b19244baf36f42827d427d041deb9310fc9c404bf852bcacf29a81ca", + "nonce" : "0a5dab219c8e5d58", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1606,27 +1628,27 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a054a523c2e952c52aca2d7f31d6f6f1c2ff4f20e3365fd1cd550b3ddb48427cb28854cc647557b37f75c0c0", - "lastblockhash" : "7c39437ca582b9f99c6011dfa2fa540747fe716b4f3cefb720ff700551ee6351", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a09f801984b19244baf36f42827d427d041deb9310fc9c404bf852bcacf29a81ca880a5dab219c8e5d58c0c0", + "lastblockhash" : "bfb71e7adcc77147699ce96532e92dbe9404c430ef3106abd27b38929e9db55e", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x01a4", + "balance" : "0x026c", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "8888f1f195afa192cfee860698584c030f4c9db1" : { - "balance" : "0x015af1d78b5cf05540", + "balance" : "0x015af1d78b5cf0a858", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x09184a46491c", + "balance" : "0x09184a45f53c", "code" : "0x", - "nonce" : "0x04", + "nonce" : "0x05", "storage" : { } } @@ -1651,19 +1673,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "7de93beaf7fe004b7a7f543d52e37c040c2b8253e8f8bcdda1ba6d422154c943", - "mixHash" : "059dc78212e4f4495fcc0963d4fe234aeaadd6b80ddd50c2b4125d73a21b7915", - "nonce" : "10628f1a713b7242", + "hash" : "58026849a2a0dc538f9a04b93cc9d0707b0557d14a6d2e7eb1387dce9d566bb4", + "mixHash" : "9a4775ed85f2385992fcf923ba210da9c2cedad01adbf7bae103fb13621a0708", + "nonce" : "6e8c369e0a46caa5", "number" : "0x01", - "parentHash" : "39039603052a31ceda578dddbc5ac6b463659a2187995595cc65b4a741d9cd16", + "parentHash" : "1856d9f8449ec0fe18f46cbcb1bad4aff2e881d359d52d188f10c1580bf69c17", "receiptTrie" : "c33d5d84a33942c74b426f27eccb4a1f17d5e3be16bb970163de74c6625779fa", "stateRoot" : "017670ea1ae30b8cee6f45ec7b23214d5b2abd2147f777dca42721c8d64a33b4", - "timestamp" : "0x55b7e436", + "timestamp" : "0x561bc207", "transactionsTrie" : "21ca11429aca1bd82ce042ca3f678e5851d4d40dd6ba1ba9676d828977745adc", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "1", - "rlp" : "0xf90261f901f9a039039603052a31ceda578dddbc5ac6b463659a2187995595cc65b4a741d9cd16a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0017670ea1ae30b8cee6f45ec7b23214d5b2abd2147f777dca42721c8d64a33b4a021ca11429aca1bd82ce042ca3f678e5851d4d40dd6ba1ba9676d828977745adca0c33d5d84a33942c74b426f27eccb4a1f17d5e3be16bb970163de74c6625779fab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e43680a0059dc78212e4f4495fcc0963d4fe234aeaadd6b80ddd50c2b4125d73a21b79158810628f1a713b7242f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8780801ca0d8c3d8bdd11779b7fa8b672699646f6c62e7637f90ae50216936688cd060d5aca013c873b28a04a51026e9692c93e0f20d69109ba1972d58057d1e3a195f41a727c0", + "rlp" : "0xf90261f901f9a01856d9f8449ec0fe18f46cbcb1bad4aff2e881d359d52d188f10c1580bf69c17a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0017670ea1ae30b8cee6f45ec7b23214d5b2abd2147f777dca42721c8d64a33b4a021ca11429aca1bd82ce042ca3f678e5851d4d40dd6ba1ba9676d828977745adca0c33d5d84a33942c74b426f27eccb4a1f17d5e3be16bb970163de74c6625779fab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc20780a09a4775ed85f2385992fcf923ba210da9c2cedad01adbf7bae103fb13621a0708886e8c369e0a46caa5f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8780801ca0d8c3d8bdd11779b7fa8b672699646f6c62e7637f90ae50216936688cd060d5aca013c873b28a04a51026e9692c93e0f20d69109ba1972d58057d1e3a195f41a727c0", "transactions" : [ { "data" : "0x", @@ -1688,19 +1710,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "5bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552f", - "mixHash" : "4898c10eaab7d3a9bf387e967db0e5eb2e64d672286de3d21dfecd99a7038fa1", - "nonce" : "9ac43cf0ac4778bf", + "hash" : "e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25", + "mixHash" : "4b8f45657046465c84a48b92c2d57ef637e1bd58bf9fe3a6640fac9cca618d20", + "nonce" : "01ef80ec6bbaed97", "number" : "0x02", - "parentHash" : "7de93beaf7fe004b7a7f543d52e37c040c2b8253e8f8bcdda1ba6d422154c943", + "parentHash" : "58026849a2a0dc538f9a04b93cc9d0707b0557d14a6d2e7eb1387dce9d566bb4", "receiptTrie" : "392278019ab7e7d5155f6ab7ee5dc7b9c14feb9a2a14ba188cd84e79a379dcfb", "stateRoot" : "07879c329fe641406f3d83e627ccdaa05643bc724a5f0fdaac583aa119e75426", - "timestamp" : "0x55b7e438", + "timestamp" : "0x561bc20a", "transactionsTrie" : "0abf4a9e610582d29ac505c389230c598d54e74441f481954249ddc39fe7f9af", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "2", - "rlp" : "0xf90261f901f9a07de93beaf7fe004b7a7f543d52e37c040c2b8253e8f8bcdda1ba6d422154c943a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a007879c329fe641406f3d83e627ccdaa05643bc724a5f0fdaac583aa119e75426a00abf4a9e610582d29ac505c389230c598d54e74441f481954249ddc39fe7f9afa0392278019ab7e7d5155f6ab7ee5dc7b9c14feb9a2a14ba188cd84e79a379dcfbb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e43880a04898c10eaab7d3a9bf387e967db0e5eb2e64d672286de3d21dfecd99a7038fa1889ac43cf0ac4778bff862f86001018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8780801ba0604ff269abdc5f9caafae2deb24c15d0596033e4e32023f152ea3143dc3faeeaa04f704a5b7f09d0ab97254ad3b21fd53560f18f4d76e6eae2adadcc634320e7b4c0", + "rlp" : "0xf90261f901f9a058026849a2a0dc538f9a04b93cc9d0707b0557d14a6d2e7eb1387dce9d566bb4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a007879c329fe641406f3d83e627ccdaa05643bc724a5f0fdaac583aa119e75426a00abf4a9e610582d29ac505c389230c598d54e74441f481954249ddc39fe7f9afa0392278019ab7e7d5155f6ab7ee5dc7b9c14feb9a2a14ba188cd84e79a379dcfbb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc20a80a04b8f45657046465c84a48b92c2d57ef637e1bd58bf9fe3a6640fac9cca618d208801ef80ec6bbaed97f862f86001018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8780801ba0604ff269abdc5f9caafae2deb24c15d0596033e4e32023f152ea3143dc3faeeaa04f704a5b7f09d0ab97254ad3b21fd53560f18f4d76e6eae2adadcc634320e7b4c0", "transactions" : [ { "data" : "0x", @@ -1725,19 +1747,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "13547106aff23941eaff1359db9c244ec13d4b6304f52d8b1f62205757d81a24", - "mixHash" : "8e74fc98778a7f14729fee7386f34a5210e71a6aacd2ab4677d545e63ee579d3", - "nonce" : "688e911d2de80f53", + "hash" : "b01433b410bcce69dfbfa2f2f4129babbac7c27a1d2d2faa23a5a82b2f0fc6a6", + "mixHash" : "b458a4fac3dc51ddc4d67ff00e02a07a4f5240396297d55246a0651b7beeb69a", + "nonce" : "c61b0d8a4666878f", "number" : "0x03", - "parentHash" : "5bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552f", + "parentHash" : "e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25", "receiptTrie" : "d07e7847ab8782afeeface76ca1b745783ff64595773c69e3c1ac8c7124a4474", "stateRoot" : "54daa645fb2025875bcc75f056c50c02d1c69ab322251f0f7f460dcfd801dce0", - "timestamp" : "0x55b7e43a", + "timestamp" : "0x561bc20c", "transactionsTrie" : "80d4b46e8fe207267e6c285a3dda9ec5ced32396da0061816fc9c663ec9e378e", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90261f901f9a05bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a054daa645fb2025875bcc75f056c50c02d1c69ab322251f0f7f460dcfd801dce0a080d4b46e8fe207267e6c285a3dda9ec5ced32396da0061816fc9c663ec9e378ea0d07e7847ab8782afeeface76ca1b745783ff64595773c69e3c1ac8c7124a4474b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e43a80a08e74fc98778a7f14729fee7386f34a5210e71a6aacd2ab4677d545e63ee579d388688e911d2de80f53f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8701801ca049c097ec19a9bb679b0e274d28ac550908402a04d5d5e97704248d2018cc52dba06372a58cd7c606d7fb0183d4d80b43a385cf7cfb2f0ad21edde9900753c03d60c0", + "rlp" : "0xf90261f901f9a0e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a054daa645fb2025875bcc75f056c50c02d1c69ab322251f0f7f460dcfd801dce0a080d4b46e8fe207267e6c285a3dda9ec5ced32396da0061816fc9c663ec9e378ea0d07e7847ab8782afeeface76ca1b745783ff64595773c69e3c1ac8c7124a4474b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc20c80a0b458a4fac3dc51ddc4d67ff00e02a07a4f5240396297d55246a0651b7beeb69a88c61b0d8a4666878ff862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8701801ca049c097ec19a9bb679b0e274d28ac550908402a04d5d5e97704248d2018cc52dba06372a58cd7c606d7fb0183d4d80b43a385cf7cfb2f0ad21edde9900753c03d60c0", "transactions" : [ { "data" : "0x", @@ -1762,19 +1784,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "43f5793c82242705932d189ab44b6e0a197ad2857e9f8cafcc974f635ad0721f", - "mixHash" : "9aea8bac139930e9f263e1a851a2771c40044912967eea535e4a8196839f2594", - "nonce" : "3f41e7da581e70cd", + "hash" : "21f72535b7a3fa12bc8878b9c6691b9302c132add8865ef68e334f49de163cc5", + "mixHash" : "b449a33e1e20462489b2f67368a639d2cd0203d2dc2ff9d9d6f7a6948551c7fa", + "nonce" : "3469a1641af0b2ad", "number" : "0x03", - "parentHash" : "5bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552f", + "parentHash" : "e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "81b0845b53aa9937f1b90d82edca4ed6e87c00c5fc6321c65814d65231a1cb05", - "timestamp" : "0x55b7e43b", + "timestamp" : "0x561bc20f", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf901fcf901f7a05bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a081b0845b53aa9937f1b90d82edca4ed6e87c00c5fc6321c65814d65231a1cb05a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd8808455b7e43b80a09aea8bac139930e9f263e1a851a2771c40044912967eea535e4a8196839f2594883f41e7da581e70cdc0c0", + "rlp" : "0xf901fcf901f7a0e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a081b0845b53aa9937f1b90d82edca4ed6e87c00c5fc6321c65814d65231a1cb05a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88084561bc20f80a0b449a33e1e20462489b2f67368a639d2cd0203d2dc2ff9d9d6f7a6948551c7fa883469a1641af0b2adc0c0", "transactions" : [ ], "uncleHeaders" : [ @@ -1788,19 +1810,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "2a75978677fc2ffa6ed1a3c60b2f3453f4f536edd593b711f4b96cf378259ca6", - "mixHash" : "023fcb4d1adc4d1a9d72044bb36205022659fe4fb7c931c9e3ea83fdd81ce747", - "nonce" : "94d958875fd91b59", + "hash" : "4f03893e417bf6683a812dc67fe316b916bff931bdbb1f02fba1845b351a20da", + "mixHash" : "2533014f9d17fc42a98abf7a4ee789759e6dea611ee62e49443cfb9f0c501947", + "nonce" : "5317e1da4d1f7642", "number" : "0x03", - "parentHash" : "5bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552f", + "parentHash" : "e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "81b0845b53aa9937f1b90d82edca4ed6e87c00c5fc6321c65814d65231a1cb05", - "timestamp" : "0x55b7e43d", + "timestamp" : "0x561bc212", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf901fcf901f7a05bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a081b0845b53aa9937f1b90d82edca4ed6e87c00c5fc6321c65814d65231a1cb05a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd8808455b7e43d80a0023fcb4d1adc4d1a9d72044bb36205022659fe4fb7c931c9e3ea83fdd81ce7478894d958875fd91b59c0c0", + "rlp" : "0xf901fcf901f7a0e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a081b0845b53aa9937f1b90d82edca4ed6e87c00c5fc6321c65814d65231a1cb05a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88084561bc21280a02533014f9d17fc42a98abf7a4ee789759e6dea611ee62e49443cfb9f0c501947885317e1da4d1f7642c0c0", "transactions" : [ ], "uncleHeaders" : [ @@ -1814,19 +1836,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "07891e3b21597a940364a4d922a29e23e66fa06d3c6976a3038af7eb677d43b3", - "mixHash" : "9d91412a86a791e432df098d5fbb54daa0549a19b8cbeaea78846e2880256d42", - "nonce" : "c302d9692ef35e26", + "hash" : "a17acf3bc88c627e508727750618ae44f31228aaf66b2b72ec2dd9a26fc6b657", + "mixHash" : "6fc334be8abe368a025d80d2e992bc590afe3cf8bf6c08b60b4c8188e9b11271", + "nonce" : "9358c4f805ed2e6d", "number" : "0x03", - "parentHash" : "5bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552f", + "parentHash" : "e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25", "receiptTrie" : "fdd5e550fb599ac936167b22b08b05a25c7606a88adf8c317722cad890b1590c", "stateRoot" : "6d68a768b78bb69fc791d9822a2b1c630abaf480aa3edd6d710d12e946ad6d17", - "timestamp" : "0x55b7e43e", + "timestamp" : "0x561bc214", "transactionsTrie" : "6248badbff65ed9910fe53dc4368a1d8db872f00d9b32713d4e876763a5fe96c", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90263f901f9a05bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a06d68a768b78bb69fc791d9822a2b1c630abaf480aa3edd6d710d12e946ad6d17a06248badbff65ed9910fe53dc4368a1d8db872f00d9b32713d4e876763a5fe96ca0fdd5e550fb599ac936167b22b08b05a25c7606a88adf8c317722cad890b1590cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e43e80a09d91412a86a791e432df098d5fbb54daa0549a19b8cbeaea78846e2880256d4288c302d9692ef35e26f864f86202820d038304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8704801ba0fc2548515447aee1b15e9e2f1c1889caa5c43b55a04fd83b6fa6febc865816bba0128812d72c943c7bfd17545c2b353d28712534bda7e362c09b9dcff77c774f9ec0", + "rlp" : "0xf90263f901f9a0e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a06d68a768b78bb69fc791d9822a2b1c630abaf480aa3edd6d710d12e946ad6d17a06248badbff65ed9910fe53dc4368a1d8db872f00d9b32713d4e876763a5fe96ca0fdd5e550fb599ac936167b22b08b05a25c7606a88adf8c317722cad890b1590cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc21480a06fc334be8abe368a025d80d2e992bc590afe3cf8bf6c08b60b4c8188e9b11271889358c4f805ed2e6df864f86202820d038304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8704801ba0fc2548515447aee1b15e9e2f1c1889caa5c43b55a04fd83b6fa6febc865816bba0128812d72c943c7bfd17545c2b353d28712534bda7e362c09b9dcff77c774f9ec0", "transactions" : [ { "data" : "0x", @@ -1851,19 +1873,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5318", - "hash" : "a26c1c84e4888ffe9921cb874431a93895f3360920a68f14a14d91339d75d0c7", - "mixHash" : "85da5a94abe52925773ffce638bd00459e951e81dba10d5a7ab1921ecd6c3768", - "nonce" : "eb90874916922560", + "hash" : "e182f639908bdfe65b08223bebf55a14cf619e6c11698b8f3fe06a3f2ce90e26", + "mixHash" : "548e33013f0f4db6d41de88ce96233eda94db4be9a46bdb379f66ed6366a5d9c", + "nonce" : "1a369744fa324f0c", "number" : "0x03", - "parentHash" : "5bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552f", + "parentHash" : "e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25", "receiptTrie" : "bd13961322396ab342ee5b8eb2ca5aee1c617b1d361fd127d0933deb4fcb6a22", "stateRoot" : "eb17adfacb8d5bae9c78de53953c0c1778f57d8d8efeeab448be9d364c07940b", - "timestamp" : "0x55b7e440", + "timestamp" : "0x561bc216", "transactionsTrie" : "15f7fc6985115c0094cdb4d454c1cf7925c0bbfede919337af9d2f67e8460f88", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90265f901f9a05bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0eb17adfacb8d5bae9c78de53953c0c1778f57d8d8efeeab448be9d364c07940ba015f7fc6985115c0094cdb4d454c1cf7925c0bbfede919337af9d2f67e8460f88a0bd13961322396ab342ee5b8eb2ca5aee1c617b1d361fd127d0933deb4fcb6a22b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88253188455b7e44080a085da5a94abe52925773ffce638bd00459e951e81dba10d5a7ab1921ecd6c376888eb90874916922560f866f86402018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870584446346341ba038bb0b4c094d0f4e3ad6ea586f78321b8199330a3399a9121e91e7b7b36c199fa010f625e63324d66a3cbe2296d1d1d435a01384d060d8e66f9ddad186a25171a5c0", + "rlp" : "0xf90265f901f9a0e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0eb17adfacb8d5bae9c78de53953c0c1778f57d8d8efeeab448be9d364c07940ba015f7fc6985115c0094cdb4d454c1cf7925c0bbfede919337af9d2f67e8460f88a0bd13961322396ab342ee5b8eb2ca5aee1c617b1d361fd127d0933deb4fcb6a22b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882531884561bc21680a0548e33013f0f4db6d41de88ce96233eda94db4be9a46bdb379f66ed6366a5d9c881a369744fa324f0cf866f86402018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870584446346341ba038bb0b4c094d0f4e3ad6ea586f78321b8199330a3399a9121e91e7b7b36c199fa010f625e63324d66a3cbe2296d1d1d435a01384d060d8e66f9ddad186a25171a5c0", "transactions" : [ { "data" : "0x44634634", @@ -1884,23 +1906,23 @@ "blockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020080", + "difficulty" : "0x020000", "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "fe67a281cdcce11e5efa21e3ada1a6309495ce124592bc09426643a84dd0d56f", - "mixHash" : "1e84510e553a93aea13f691f89d5a0f0b8dea169e0116ef0923924576ebc2257", - "nonce" : "6965bf49a9afdc71", + "hash" : "a7750229b970e1306df48a281965a872967075b2f827ce3b9d79240df403db2d", + "mixHash" : "7554aa675839836829c2718445bf719580ccc6d9db256b40086234250d69d350", + "nonce" : "be31a01cc859d863", "number" : "0x03", - "parentHash" : "5bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552f", + "parentHash" : "e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25", "receiptTrie" : "289d762387d87171ff77e960d22595a9d8eec76b2f92d205f60a9e85b96b7ec0", "stateRoot" : "20251976327c063b8f07e9659872c8017129158e989be444329b23baa98c7579", - "timestamp" : "0x55b7e441", + "timestamp" : "0x561bc217", "transactionsTrie" : "75fbaa0d21261c250d72804548590a0dcaf3f1849fcb9036eae67a1ea1328de3", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90260f901f9a05bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a020251976327c063b8f07e9659872c8017129158e989be444329b23baa98c7579a075fbaa0d21261c250d72804548590a0dcaf3f1849fcb9036eae67a1ea1328de3a0289d762387d87171ff77e960d22595a9d8eec76b2f92d205f60a9e85b96b7ec0b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e44180a01e84510e553a93aea13f691f89d5a0f0b8dea169e0116ef0923924576ebc2257886965bf49a9afdc71f861f85f020182795394095e7baea6a6c7c4c2dfeb977efac326af552d8706801ba0f0270ab1d37cefd527be86ad9914256506d919c1da6b825044ece7bb7f32b6bda0347c1adf10978e380be412dfb3f9e44d834aa17536abf14f15f61692ca60b24dc0", + "rlp" : "0xf90260f901f9a0e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a020251976327c063b8f07e9659872c8017129158e989be444329b23baa98c7579a075fbaa0d21261c250d72804548590a0dcaf3f1849fcb9036eae67a1ea1328de3a0289d762387d87171ff77e960d22595a9d8eec76b2f92d205f60a9e85b96b7ec0b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd882520884561bc21780a07554aa675839836829c2718445bf719580ccc6d9db256b40086234250d69d35088be31a01cc859d863f861f85f020182795394095e7baea6a6c7c4c2dfeb977efac326af552d8706801ba0f0270ab1d37cefd527be86ad9914256506d919c1da6b825044ece7bb7f32b6bda0347c1adf10978e380be412dfb3f9e44d834aa17536abf14f15f61692ca60b24dc0", "transactions" : [ { "data" : "0x", @@ -1921,23 +1943,23 @@ "blockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020080", + "difficulty" : "0x020000", "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5318", - "hash" : "6da875c9e4e03fa18b1b365ae0e720d776174cb092b646663381a4b12108d880", - "mixHash" : "bea74ac3a2fa0fe96631e7602dccda23079aafa59726a590951ecc009b461c75", - "nonce" : "6db3c926e54f6325", + "hash" : "063797176c8fd5e24f2af042b84430506706ec3d4ee85074dc975903ff2f7bc5", + "mixHash" : "d47abf75c5882ef56123cb08374cda7f9dfcf6408da57f7f681adae43bf684fc", + "nonce" : "08afdff7cbd22648", "number" : "0x03", - "parentHash" : "5bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552f", + "parentHash" : "e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25", "receiptTrie" : "34f1252d86e8aba201964388f413bf3c3cea49a050afc8619af008b753c2aee6", "stateRoot" : "57c45807955dc4d7b4af7f71cc0783f120b286071685574b8d1ed59973454902", - "timestamp" : "0x55b7e443", + "timestamp" : "0x561bc21a", "transactionsTrie" : "75d5c86c5df5c1f4c94949be25969bed5d9d14da91b84812e5771da9b71dc06f", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90264f901f9a05bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a057c45807955dc4d7b4af7f71cc0783f120b286071685574b8d1ed59973454902a075d5c86c5df5c1f4c94949be25969bed5d9d14da91b84812e5771da9b71dc06fa034f1252d86e8aba201964388f413bf3c3cea49a050afc8619af008b753c2aee6b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88253188455b7e44380a0bea74ac3a2fa0fe96631e7602dccda23079aafa59726a590951ecc009b461c75886db3c926e54f6325f865f8630201827b1594095e7baea6a6c7c4c2dfeb977efac326af552d870784034534541ba07492cd918b55c697c17b16a250b21e08a1d76a8b2a57adbb17be2cb0f5a7de91a04b3e28d7d9950a3e32683f7b008a632146c591080c941c2d21551de9849afbe9c0", + "rlp" : "0xf90264f901f9a0e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a057c45807955dc4d7b4af7f71cc0783f120b286071685574b8d1ed59973454902a075d5c86c5df5c1f4c94949be25969bed5d9d14da91b84812e5771da9b71dc06fa034f1252d86e8aba201964388f413bf3c3cea49a050afc8619af008b753c2aee6b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd882531884561bc21a80a0d47abf75c5882ef56123cb08374cda7f9dfcf6408da57f7f681adae43bf684fc8808afdff7cbd22648f865f8630201827b1594095e7baea6a6c7c4c2dfeb977efac326af552d870784034534541ba07492cd918b55c697c17b16a250b21e08a1d76a8b2a57adbb17be2cb0f5a7de91a04b3e28d7d9950a3e32683f7b008a632146c591080c941c2d21551de9849afbe9c0", "transactions" : [ { "data" : "0x03453454", @@ -1962,19 +1984,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "0a5f81efc393c27cbb2dead51632aa66ad3a11e4a83a3d5270ec831f2fdd416a", - "mixHash" : "44608310d52d0afb7f402f49b21bad9666e71602bf63fd2524ef7672eb779d1b", - "nonce" : "5a3c4c649a1471b7", + "hash" : "a8ff9a821bb2f753eb3ef95411d86dc1c534f8681ac4d0755e05ac6d00b64684", + "mixHash" : "c78d7d54e63c1900444010a485801a4e6a8677615326633a9db97c907131a74e", + "nonce" : "fc8c59cb376a16b4", "number" : "0x03", - "parentHash" : "5bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552f", + "parentHash" : "e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "81b0845b53aa9937f1b90d82edca4ed6e87c00c5fc6321c65814d65231a1cb05", - "timestamp" : "0x55b7e445", + "timestamp" : "0x561bc21c", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf901fcf901f7a05bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a081b0845b53aa9937f1b90d82edca4ed6e87c00c5fc6321c65814d65231a1cb05a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd8808455b7e44580a044608310d52d0afb7f402f49b21bad9666e71602bf63fd2524ef7672eb779d1b885a3c4c649a1471b7c0c0", + "rlp" : "0xf901fcf901f7a0e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a081b0845b53aa9937f1b90d82edca4ed6e87c00c5fc6321c65814d65231a1cb05a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd88084561bc21c80a0c78d7d54e63c1900444010a485801a4e6a8677615326633a9db97c907131a74e88fc8c59cb376a16b4c0c0", "transactions" : [ ], "uncleHeaders" : [ @@ -1988,19 +2010,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "c2f340e9a08bdbc42333d3924e3158fbf1b1eecc28cd3728a4f4534314867260", - "mixHash" : "b2813eaf13f166d5ca45edfc72a611c284d39c9786f4d99bea74f85d067df664", - "nonce" : "57bf6578edf5a9ed", + "hash" : "26def719b1b32b0c3a6f5d6b1068c005ba4eefe654d7270f9f68b0b0f9d71f98", + "mixHash" : "fb0a3139ab1a4f086e48c1f92411cce68442091da8406845856bdebfaea36f17", + "nonce" : "104803fa47fdbba3", "number" : "0x03", - "parentHash" : "5bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552f", + "parentHash" : "e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25", "receiptTrie" : "9b786c2406fce6c88620ea5b1589307332c7072bd6120c0bad43ed933f602e7b", "stateRoot" : "c88849a4d0cb6415b4610e255c4830ba281154f79cef69635531f25a8b15bbfc", - "timestamp" : "0x55b7e446", + "timestamp" : "0x561bc21e", "transactionsTrie" : "eee8da1032d67fdbdd8a06aae4be0dd76a950314a182b72e9a741e82e7bb3c1b", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90261f901f9a05bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c88849a4d0cb6415b4610e255c4830ba281154f79cef69635531f25a8b15bbfca0eee8da1032d67fdbdd8a06aae4be0dd76a950314a182b72e9a741e82e7bb3c1ba09b786c2406fce6c88620ea5b1589307332c7072bd6120c0bad43ed933f602e7bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd88252088455b7e44680a0b2813eaf13f166d5ca45edfc72a611c284d39c9786f4d99bea74f85d067df6648857bf6578edf5a9edf862f86002018304cb2f94795e7baea6a6c7c4c2dfeb977efac326af552d8709801ba09aebe65f630416e9f8d0b6d2767f6f7247fcd91a975ffb43f0cd4ad70c271f26a066deb8ae753107c19abb0cbe97b3252334dc17a985c5d02b490146caf21c8133c0", + "rlp" : "0xf90261f901f9a0e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c88849a4d0cb6415b4610e255c4830ba281154f79cef69635531f25a8b15bbfca0eee8da1032d67fdbdd8a06aae4be0dd76a950314a182b72e9a741e82e7bb3c1ba09b786c2406fce6c88620ea5b1589307332c7072bd6120c0bad43ed933f602e7bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd882520884561bc21e80a0fb0a3139ab1a4f086e48c1f92411cce68442091da8406845856bdebfaea36f1788104803fa47fdbba3f862f86002018304cb2f94795e7baea6a6c7c4c2dfeb977efac326af552d8709801ba09aebe65f630416e9f8d0b6d2767f6f7247fcd91a975ffb43f0cd4ad70c271f26a066deb8ae753107c19abb0cbe97b3252334dc17a985c5d02b490146caf21c8133c0", "transactions" : [ { "data" : "0x", @@ -2025,19 +2047,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "be9107264f3500a1cf48ec35e2105bd3d5958a9d018f8925e65e80fa1a6f7fed", - "mixHash" : "351b911a1a12fefbead4e7ba56cf6084aa487763e9da10c71d12744c056ed1dd", - "nonce" : "037a942a41e41191", + "hash" : "0056020d2547acdb2c2fac4ab5f404eee4e0c9125894429e898ed37e3e86e817", + "mixHash" : "6f99d55b7f42d1ff6b2a4e64a7d1f189e465edcfbcc17a4d3567ea4ff89b4144", + "nonce" : "651d75428bd2f303", "number" : "0x03", - "parentHash" : "5bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552f", + "parentHash" : "e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "81b0845b53aa9937f1b90d82edca4ed6e87c00c5fc6321c65814d65231a1cb05", - "timestamp" : "0x55b7e448", + "timestamp" : "0x561bc220", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf901fcf901f7a05bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a081b0845b53aa9937f1b90d82edca4ed6e87c00c5fc6321c65814d65231a1cb05a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd8808455b7e44880a0351b911a1a12fefbead4e7ba56cf6084aa487763e9da10c71d12744c056ed1dd88037a942a41e41191c0c0", + "rlp" : "0xf901fcf901f7a0e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a081b0845b53aa9937f1b90d82edca4ed6e87c00c5fc6321c65814d65231a1cb05a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd88084561bc22080a06f99d55b7f42d1ff6b2a4e64a7d1f189e465edcfbcc17a4d3567ea4ff89b414488651d75428bd2f303c0c0", "transactions" : [ ], "uncleHeaders" : [ @@ -2051,19 +2073,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "7b39ad29eee1b53c2e079ecac9e849583c013e99d9ac34e7b3546cd2951b83ea", - "mixHash" : "db02d7bab8d70a08227f339477689f85e051d010512b41c11cc15963509d9542", - "nonce" : "11d944dc94c9acfc", + "hash" : "181e7bd5f554955c25fc6709929a41eaf043fbfbcd77b58f9f3c7c824dcc851e", + "mixHash" : "1086990c4856c3db051c6a3d7ebd1e41facf5219a7c2f57e234c82cb3d36ab1b", + "nonce" : "be76f8c7a739a0e4", "number" : "0x03", - "parentHash" : "5bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552f", + "parentHash" : "e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25", "receiptTrie" : "1373050e9cbacbcf1ba4a8367c00491589ecef6503d505283e584f4ee6d7a24c", "stateRoot" : "50a0aa732e930de9941a500fae4977d22941f6a05e5e3b78c85b94c2ba99a990", - "timestamp" : "0x55b7e449", + "timestamp" : "0x561bc222", "transactionsTrie" : "4aecda80a762615dbd4ba2ae6c0634b9042a6efb10aa841b59370258b7f226b5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90261f901f9a05bb7f8cbfefef210b96c510c7e8a2727e6a11708dc48bb315b974e3d1943552fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a050a0aa732e930de9941a500fae4977d22941f6a05e5e3b78c85b94c2ba99a990a04aecda80a762615dbd4ba2ae6c0634b9042a6efb10aa841b59370258b7f226b5a01373050e9cbacbcf1ba4a8367c00491589ecef6503d505283e584f4ee6d7a24cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd88252088455b7e44980a0db02d7bab8d70a08227f339477689f85e051d010512b41c11cc15963509d95428811d944dc94c9acfcf862f860020a8304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870b801ba09a5a25de70854a14113a86ce21d085b82198187e82576ef02ebd97598f47a917a07f718d34b77e73aa1ffdcd53da9c609bc4e551d13dc5d6afdfed23dcaf843e4bc0", + "rlp" : "0xf90261f901f9a0e512f2da6448b57d0e7137f689729e5331f11b0ed1f641f28963e199c1003c25a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a050a0aa732e930de9941a500fae4977d22941f6a05e5e3b78c85b94c2ba99a990a04aecda80a762615dbd4ba2ae6c0634b9042a6efb10aa841b59370258b7f226b5a01373050e9cbacbcf1ba4a8367c00491589ecef6503d505283e584f4ee6d7a24cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000003832fefd882520884561bc22280a01086990c4856c3db051c6a3d7ebd1e41facf5219a7c2f57e234c82cb3d36ab1b88be76f8c7a739a0e4f862f860020a8304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870b801ba09a5a25de70854a14113a86ce21d085b82198187e82576ef02ebd97598f47a917a07f718d34b77e73aa1ffdcd53da9c609bc4e551d13dc5d6afdfed23dcaf843e4bc0", "transactions" : [ { "data" : "0x", @@ -2088,9 +2110,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "39039603052a31ceda578dddbc5ac6b463659a2187995595cc65b4a741d9cd16", - "mixHash" : "0ed5c935bca91c90c71913a7df52f26058186f4a2377e2a9d9cba651082f6ae9", - "nonce" : "0791a6c57377d188", + "hash" : "1856d9f8449ec0fe18f46cbcb1bad4aff2e881d359d52d188f10c1580bf69c17", + "mixHash" : "e28aa796634afe66596911cf259653074a4827bb8be5b14311a5f3bec1f73490", + "nonce" : "73b4b44f0c251fc3", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -2099,8 +2121,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a00ed5c935bca91c90c71913a7df52f26058186f4a2377e2a9d9cba651082f6ae9880791a6c57377d188c0c0", - "lastblockhash" : "13547106aff23941eaff1359db9c244ec13d4b6304f52d8b1f62205757d81a24", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0e28aa796634afe66596911cf259653074a4827bb8be5b14311a5f3bec1f734908873b4b44f0c251fc3c0c0", + "lastblockhash" : "b01433b410bcce69dfbfa2f2f4129babbac7c27a1d2d2faa23a5a82b2f0fc6a6", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x01", @@ -2134,7 +2156,7 @@ } } }, - "sideChainWithMoreTransactions" : { + "newChainFrom4Block" : { "blocks" : [ { "blockHeader" : { @@ -2144,19 +2166,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "6eef58dbbce09940946195090a4b748d2a228edfdcf48b49673ac5fbddd1b46a", - "mixHash" : "87efb40ea4ff1fadfae180198fcc487c68f36e293dcd8c6cf4153c6930b711ec", - "nonce" : "101509ef6d1640c0", + "hash" : "4e8ba3e32b1d780a7d0c35a807dfbc0607bd865737443438ff7ebe5e0a066570", + "mixHash" : "40bf6e7a6c45aad2163045e5ea5c3b9fb4a98b66acd426dd4f07450ad168dddb", + "nonce" : "01515b49e1d56cf3", "number" : "0x01", - "parentHash" : "021e9d86a15698c755c5b56cc116baacc249f971f6a87a9c9e6d5feb2e668993", + "parentHash" : "1a996e6586675a019ff88d65b254a796ec385ae4d84da27cf436ff463096b6df", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e44c", + "timestamp" : "0x561bc224", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "1", - "rlp" : "0xf90261f901f9a0021e9d86a15698c755c5b56cc116baacc249f971f6a87a9c9e6d5feb2e668993a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e44c80a087efb40ea4ff1fadfae180198fcc487c68f36e293dcd8c6cf4153c6930b711ec88101509ef6d1640c0f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a01a996e6586675a019ff88d65b254a796ec385ae4d84da27cf436ff463096b6dfa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc22480a040bf6e7a6c45aad2163045e5ea5c3b9fb4a98b66acd426dd4f07450ad168dddb8801515b49e1d56cf3f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -2181,19 +2203,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "07e700f8dd052176066755b9d80e12cd20744d64090d9f0196207c9dccdbb803", - "mixHash" : "daea9ef62ba9d409c3666841861a35f9817bb4e826d184c3b7cc725a75d616bb", - "nonce" : "f09d33003d33c9b9", + "hash" : "5b0021e8bf4e0f6a72e88ba0d95f674514c0cc347c86c93deb44ca508cf7babb", + "mixHash" : "a0f79bd35c07f8918b777ef0229ec7f89964601dff3c12508f82e20b96462fa9", + "nonce" : "4dd95e1e9a0b56fc", "number" : "0x02", - "parentHash" : "6eef58dbbce09940946195090a4b748d2a228edfdcf48b49673ac5fbddd1b46a", + "parentHash" : "4e8ba3e32b1d780a7d0c35a807dfbc0607bd865737443438ff7ebe5e0a066570", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e44d", + "timestamp" : "0x561bc227", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "2", - "rlp" : "0xf90260f901f9a06eef58dbbce09940946195090a4b748d2a228edfdcf48b49673ac5fbddd1b46aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e44d80a0daea9ef62ba9d409c3666841861a35f9817bb4e826d184c3b7cc725a75d616bb88f09d33003d33c9b9f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a04e8ba3e32b1d780a7d0c35a807dfbc0607bd865737443438ff7ebe5e0a066570a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc22780a0a0f79bd35c07f8918b777ef0229ec7f89964601dff3c12508f82e20b96462fa9884dd95e1e9a0b56fcf861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -2218,19 +2240,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "5d851ab7891048a28b8f7f4e754273b5c19661060a59dbaa1576bd7eed3349e0", - "mixHash" : "4fd68d76d0e2805c1d209249cb04003e12c89e439c3104bca83aeaa91281cc8d", - "nonce" : "79180ab404805858", + "hash" : "4da7e3b30f35a969aa045a92ec28b07fb36e096542c26a993e84d42b33169347", + "mixHash" : "c39ba4ab04f1da6783930a4c744e837bc77c5438a2e011270edd894536177bdf", + "nonce" : "06bd1266a0a4f9c5", "number" : "0x03", - "parentHash" : "07e700f8dd052176066755b9d80e12cd20744d64090d9f0196207c9dccdbb803", + "parentHash" : "5b0021e8bf4e0f6a72e88ba0d95f674514c0cc347c86c93deb44ca508cf7babb", "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", - "timestamp" : "0x55b7e44e", + "timestamp" : "0x561bc229", "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90261f901f9a007e700f8dd052176066755b9d80e12cd20744d64090d9f0196207c9dccdbb803a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e44e80a04fd68d76d0e2805c1d209249cb04003e12c89e439c3104bca83aeaa91281cc8d8879180ab404805858f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "rlp" : "0xf90261f901f9a05b0021e8bf4e0f6a72e88ba0d95f674514c0cc347c86c93deb44ca508cf7babba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc22980a0c39ba4ab04f1da6783930a4c744e837bc77c5438a2e011270edd894536177bdf8806bd1266a0a4f9c5f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", "transactions" : [ { "data" : "0x", @@ -2255,19 +2277,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "c2af886cc1ef9e8a42830961909e37d73821870e3a78814a39921f2c10aaca2d", - "mixHash" : "2970fea7f1dc517375a7c12a98b934052c18725dcc81d74a00b71487d2929f2f", - "nonce" : "7d37defe1aad41a4", + "hash" : "d4bcaacaa450f128110fa9d9160bd72c7cd18ada1479ea2138d403bcd5dd59c3", + "mixHash" : "fcf0f2a25d5dadee12e30804995a5c6cb1eed5052e31bbe032f9861923a44260", + "nonce" : "64d75e7ab7cb5542", "number" : "0x04", - "parentHash" : "5d851ab7891048a28b8f7f4e754273b5c19661060a59dbaa1576bd7eed3349e0", + "parentHash" : "4da7e3b30f35a969aa045a92ec28b07fb36e096542c26a993e84d42b33169347", "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", - "timestamp" : "0x55b7e450", + "timestamp" : "0x561bc22b", "transactionsTrie" : "9735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf90261f901f9a05d851ab7891048a28b8f7f4e754273b5c19661060a59dbaa1576bd7eed3349e0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88252088455b7e45080a02970fea7f1dc517375a7c12a98b934052c18725dcc81d74a00b71487d2929f2f887d37defe1aad41a4f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", + "rlp" : "0xf90261f901f9a04da7e3b30f35a969aa045a92ec28b07fb36e096542c26a993e84d42b33169347a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc22b80a0fcf0f2a25d5dadee12e30804995a5c6cb1eed5052e31bbe032f9861923a442608864d75e7ab7cb5542f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", "transactions" : [ { "data" : "0x", @@ -2288,34 +2310,34 @@ "blockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020080", + "difficulty" : "0x020100", "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "d9c82fa7ce7c1b29d1dbf2a65b3887ddbaeac34780911fe528957cc31a635d9d", - "mixHash" : "a9037e533768ef474a281005bd113e756c08d42c7796a49f89de4f831cdba8d5", - "nonce" : "366747ec1a7c7480", - "number" : "0x03", - "parentHash" : "07e700f8dd052176066755b9d80e12cd20744d64090d9f0196207c9dccdbb803", - "receiptTrie" : "e717fb2be39da3e69db18c84baa4b9a59ecfa3454ed7e0946468a91b8e93d2ea", - "stateRoot" : "f6dab66d4dd2727ba6c6bba0a434052435f3a82f68682af5d54093ccd81e4c40", - "timestamp" : "0x55b7e451", - "transactionsTrie" : "8d4f70e47fd980bc4182bf6735e827a3ab98040b97bc27765aa69bedbc03aec1", + "hash" : "abc2267f50df0d7cd9ac9bb175d37e60945fe5523e463b276b8e51ab57bae649", + "mixHash" : "6c1278524ecc12de4b36f3a2f558e296e6482106b9ecd5b6feb52d6a65bb82be", + "nonce" : "9891e98a81d56155", + "number" : "0x05", + "parentHash" : "d4bcaacaa450f128110fa9d9160bd72c7cd18ada1479ea2138d403bcd5dd59c3", + "receiptTrie" : "e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9", + "stateRoot" : "72f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19", + "timestamp" : "0x561bc22d", + "transactionsTrie" : "14217a41be7dfaf94ad49120843e0a075b86dc17510fedfdf27a4683d3781669", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "blocknumber" : "3", - "rlp" : "0xf90262f901f9a007e700f8dd052176066755b9d80e12cd20744d64090d9f0196207c9dccdbb803a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f6dab66d4dd2727ba6c6bba0a434052435f3a82f68682af5d54093ccd81e4c40a08d4f70e47fd980bc4182bf6735e827a3ab98040b97bc27765aa69bedbc03aec1a0e717fb2be39da3e69db18c84baa4b9a59ecfa3454ed7e0946468a91b8e93d2eab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e45180a0a9037e533768ef474a281005bd113e756c08d42c7796a49f89de4f831cdba8d588366747ec1a7c7480f863f861020182795394095e7baea6a6c7c4c2dfeb977efac326af552d8782012c801ba02c0496b83cb527e403cb3900d83856644a2359e9cc79ca5fbcf508d8c6c1506ca030cedfd3b5105bbf823116d858790f1c48ab545751cb870ffda6ba3663d9261dc0", + "blocknumber" : "5", + "rlp" : "0xf90260f901f9a0d4bcaacaa450f128110fa9d9160bd72c7cd18ada1479ea2138d403bcd5dd59c3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a014217a41be7dfaf94ad49120843e0a075b86dc17510fedfdf27a4683d3781669a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bc22d80a06c1278524ecc12de4b36f3a2f558e296e6482106b9ecd5b6feb52d6a65bb82be889891e98a81d56155f861f85f040182795394095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ca92f7049c33e209b369c82bd5abad523585095f7825cce9b96fe239c75cf0eca04b995e7c3737fe206646fc0177492cdb383a4de76a531b562be4acf4163cd858c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0x7953", "gasPrice" : "0x01", - "nonce" : "0x02", - "r" : "0x2c0496b83cb527e403cb3900d83856644a2359e9cc79ca5fbcf508d8c6c1506c", - "s" : "0x30cedfd3b5105bbf823116d858790f1c48ab545751cb870ffda6ba3663d9261d", + "nonce" : "0x04", + "r" : "0xca92f7049c33e209b369c82bd5abad523585095f7825cce9b96fe239c75cf0ec", + "s" : "0x4b995e7c3737fe206646fc0177492cdb383a4de76a531b562be4acf4163cd858", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "v" : "0x1b", - "value" : "0x012c" + "value" : "0x0a" } ], "uncleHeaders" : [ @@ -2325,138 +2347,71 @@ "blockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x0200c0", + "difficulty" : "0x020140", "extraData" : "0x", "gasLimit" : "0x2fefd8", - "gasUsed" : "0xa520", - "hash" : "46d4267f0c1bc4fa881ee73e4202b327f7145923f16ed360a34fd7c59d9aa635", - "mixHash" : "9789c043a49bd7cf544c8d9404df554780bdf2bd4b7157a8c29a4219fb334530", - "nonce" : "dd615faec665ef6f", - "number" : "0x04", - "parentHash" : "d9c82fa7ce7c1b29d1dbf2a65b3887ddbaeac34780911fe528957cc31a635d9d", - "receiptTrie" : "368484ef2c8bdcafb5d2e340a17d83b82d50c29c91f268051de96a5bf5f16dfd", - "stateRoot" : "27a720e49b1e3c02dec03b9bfaa2273da60749d5c1231e9b2288dd1a0e3990fe", - "timestamp" : "0x55b7e452", - "transactionsTrie" : "18878c3d8dd8cb593b98cacaf25ecdba2efb1a93d5597b2ca23d06f34f7fec4c", + "gasUsed" : "0x5318", + "hash" : "8db046cf47a470a02ac09a433df6f76723aac6c46bf6bb247858f6149716a772", + "mixHash" : "c4a9545a23d35c064cd2e9f75cfec208bdfc72210e46fdefc3f0c1ac40a10895", + "nonce" : "985cec955574210e", + "number" : "0x06", + "parentHash" : "abc2267f50df0d7cd9ac9bb175d37e60945fe5523e463b276b8e51ab57bae649", + "receiptTrie" : "c3e558d9538cfa56cdb3e521db3030c991409b886a0cd93084cc80b1bad89c71", + "stateRoot" : "81fd7c6bc64d69dabf0c49c3895cd935717e18c950e9814aa7ccaacf4db5e096", + "timestamp" : "0x561bc22f", + "transactionsTrie" : "b2fcdfb40e3ba5486ec06a7afc9151467a1f06643e7b4ca400a237fe1922908e", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "blocknumber" : "4", - "rlp" : "0xf902c9f901f9a0d9c82fa7ce7c1b29d1dbf2a65b3887ddbaeac34780911fe528957cc31a635d9da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a027a720e49b1e3c02dec03b9bfaa2273da60749d5c1231e9b2288dd1a0e3990fea018878c3d8dd8cb593b98cacaf25ecdba2efb1a93d5597b2ca23d06f34f7fec4ca0368484ef2c8bdcafb5d2e340a17d83b82d50c29c91f268051de96a5bf5f16dfdb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882a5208455b7e45280a09789c043a49bd7cf544c8d9404df554780bdf2bd4b7157a8c29a4219fb33453088dd615faec665ef6ff8caf8650301827b1594095e7baea6a6c7c4c2dfeb977efac326af552d8782012c84034534541ba0cd40a210ac0630db56ac26feb53cfa84d9ae86d43c2eb3e3735471c6a3fd2383a0572ef18095e34cc33dbd39bfac3e0ff1c247ffddb2dcc00848cc79706c0fdf65f8610401827b1594195e7baea6a6c7c4c2dfeb977efac326af552d8782012c801ca0f38917a475a084e24157a3e7891a1f53dacccab6a356e572cba058acefdafbb4a078d191c413c17012ee28e17be529cc1136bb1ca8736de3df6856a3a26bf7135fc0", + "blocknumber" : "6", + "rlp" : "0xf90264f901f9a0abc2267f50df0d7cd9ac9bb175d37e60945fe5523e463b276b8e51ab57bae649a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a081fd7c6bc64d69dabf0c49c3895cd935717e18c950e9814aa7ccaacf4db5e096a0b2fcdfb40e3ba5486ec06a7afc9151467a1f06643e7b4ca400a237fe1922908ea0c3e558d9538cfa56cdb3e521db3030c991409b886a0cd93084cc80b1bad89c71b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882531884561bc22f80a0c4a9545a23d35c064cd2e9f75cfec208bdfc72210e46fdefc3f0c1ac40a1089588985cec955574210ef865f8630501827b1594095e7baea6a6c7c4c2dfeb977efac326af552d870a84034534541ca0fc99d3f36a9f63f22aa8818291acd9e11ceddcb43a5340923fa6e3ef1230e300a0494b2a8cd700566325f117e34bc0fb076f54462f9302624f7c8f299fd09c6c58c0", "transactions" : [ { "data" : "0x03453454", "gasLimit" : "0x7b15", "gasPrice" : "0x01", - "nonce" : "0x03", - "r" : "0xcd40a210ac0630db56ac26feb53cfa84d9ae86d43c2eb3e3735471c6a3fd2383", - "s" : "0x572ef18095e34cc33dbd39bfac3e0ff1c247ffddb2dcc00848cc79706c0fdf65", + "nonce" : "0x05", + "r" : "0xfc99d3f36a9f63f22aa8818291acd9e11ceddcb43a5340923fa6e3ef1230e300", + "s" : "0x494b2a8cd700566325f117e34bc0fb076f54462f9302624f7c8f299fd09c6c58", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1b", - "value" : "0x012c" - }, - { - "data" : "0x", - "gasLimit" : "0x7b15", - "gasPrice" : "0x01", - "nonce" : "0x04", - "r" : "0xf38917a475a084e24157a3e7891a1f53dacccab6a356e572cba058acefdafbb4", - "s" : "0x78d191c413c17012ee28e17be529cc1136bb1ca8736de3df6856a3a26bf7135f", - "to" : "195e7baea6a6c7c4c2dfeb977efac326af552d87", "v" : "0x1c", - "value" : "0x012c" + "value" : "0x0a" } ], "uncleHeaders" : [ ] - } - ], - "genesisBlockHeader" : { - "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020000", - "extraData" : "0x42", - "gasLimit" : "0x2fefd8", - "gasUsed" : "0x00", - "hash" : "021e9d86a15698c755c5b56cc116baacc249f971f6a87a9c9e6d5feb2e668993", - "mixHash" : "b25bc0df6e00c0c384ab1127167f909ae1d46f073d863ad17a3afcc57faa5a65", - "nonce" : "1446ea5d4743a838", - "number" : "0x00", - "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", - "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", - "timestamp" : "0x54c98c81", - "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0b25bc0df6e00c0c384ab1127167f909ae1d46f073d863ad17a3afcc57faa5a65881446ea5d4743a838c0c0", - "lastblockhash" : "c2af886cc1ef9e8a42830961909e37d73821870e3a78814a39921f2c10aaca2d", - "postState" : { - "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x28", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } }, - "8888f1f195afa192cfee860698584c030f4c9db1" : { - "balance" : "0x01158e460913d14820", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x09184e7157b8", - "code" : "0x", - "nonce" : "0x04", - "storage" : { - } - } - }, - "pre" : { - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x09184e72a000", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - } - } - }, - "sideChainWithNewMaxDifficultyStartingFromBlock3AfterBlock4" : { - "blocks" : [ { "blockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020000", + "difficulty" : "0x020180", "extraData" : "0x", "gasLimit" : "0x2fefd8", - "gasUsed" : "0x5208", - "hash" : "fb7e3ee52a40bb7665efbacb89a363a0f19e3cab491a0c032cea6a0e73883e93", - "mixHash" : "57aee3cc77443d277719f3c3976fea2d01eed8ab3fe9612c61ace84ecd49303a", - "nonce" : "d23d4c8532435195", - "number" : "0x01", - "parentHash" : "8bea506bd3c2e99a744d2bf402e30a2a65d54a68ae9088b1596caec530714fa3", - "receiptTrie" : "358f2486c1c65fc5b23db7b5523b64a24debf697e23ef45c8cd1c86775d924c2", - "stateRoot" : "df1828588eefd69fe6fd029dfdfe0d0a669559b3d4143f3c3bfd76a838c73a23", - "timestamp" : "0x55b7e454", - "transactionsTrie" : "1539b31ea0fa548996a2f64f4d86cadb9c97f2c9ca7923218fe0d38ea5ba1c75", + "gasUsed" : "0x5318", + "hash" : "df2cfbfa7dc9cd8e9335efdec0f5a2a475b572292f4c210bdae65b08be922373", + "mixHash" : "da1d9413a5e35fddff51155f0ff96b0fd3f745958da3c66f7ffd90c0bdd43b0a", + "nonce" : "2f08e6337592035a", + "number" : "0x07", + "parentHash" : "8db046cf47a470a02ac09a433df6f76723aac6c46bf6bb247858f6149716a772", + "receiptTrie" : "6beefe0da225d0b4fd8bd847b6bc5e5064de6735ebeeaeff557b4cd679dd4a24", + "stateRoot" : "a311c8d5642f84ecdfe7485cf921284131060d43db4e0378ad9660f5c25faa2a", + "timestamp" : "0x561bc230", + "transactionsTrie" : "be61cd748cc8ceec06da67670ed10e7e1cbc655d4cf4c9cea25fb0f5b818d169", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "blocknumber" : "1", - "rlp" : "0xf90261f901f9a08bea506bd3c2e99a744d2bf402e30a2a65d54a68ae9088b1596caec530714fa3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0df1828588eefd69fe6fd029dfdfe0d0a669559b3d4143f3c3bfd76a838c73a23a01539b31ea0fa548996a2f64f4d86cadb9c97f2c9ca7923218fe0d38ea5ba1c75a0358f2486c1c65fc5b23db7b5523b64a24debf697e23ef45c8cd1c86775d924c2b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e45480a057aee3cc77443d277719f3c3976fea2d01eed8ab3fe9612c61ace84ecd49303a88d23d4c8532435195f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8701801ca0f95ddcbc36fb927c225810016715b2ebb5478efcdeb241ee8816e590c1e42559a051012cc60ee68f0d042f6e148550acafb3f306a381e69d003909c30acb15ff56c0", + "blocknumber" : "7", + "rlp" : "0xf90264f901f9a08db046cf47a470a02ac09a433df6f76723aac6c46bf6bb247858f6149716a772a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a311c8d5642f84ecdfe7485cf921284131060d43db4e0378ad9660f5c25faa2aa0be61cd748cc8ceec06da67670ed10e7e1cbc655d4cf4c9cea25fb0f5b818d169a06beefe0da225d0b4fd8bd847b6bc5e5064de6735ebeeaeff557b4cd679dd4a24b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882531884561bc23080a0da1d9413a5e35fddff51155f0ff96b0fd3f745958da3c66f7ffd90c0bdd43b0a882f08e6337592035af865f8630601827b1594095e7baea6a6c7c4c2dfeb977efac326af552d870a84034534541ca0a770a28025ab47c5d68f49f5d8f94bdd8a8be2fc9c4733f1034a02aeeaa55233a04eee4c7bf4c3ad4f229cf71522af457b3e714a96a19398673a237826f4ed56c7c0", "transactions" : [ { - "data" : "0x", - "gasLimit" : "0x04cb2f", + "data" : "0x03453454", + "gasLimit" : "0x7b15", "gasPrice" : "0x01", - "nonce" : "0x00", - "r" : "0xf95ddcbc36fb927c225810016715b2ebb5478efcdeb241ee8816e590c1e42559", - "s" : "0x51012cc60ee68f0d042f6e148550acafb3f306a381e69d003909c30acb15ff56", + "nonce" : "0x06", + "r" : "0xa770a28025ab47c5d68f49f5d8f94bdd8a8be2fc9c4733f1034a02aeeaa55233", + "s" : "0x4eee4c7bf4c3ad4f229cf71522af457b3e714a96a19398673a237826f4ed56c7", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "v" : "0x1c", - "value" : "0x01" + "value" : "0x0a" } ], "uncleHeaders" : [ @@ -2466,34 +2421,34 @@ "blockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020040", + "difficulty" : "0x0201c0", "extraData" : "0x", "gasLimit" : "0x2fefd8", - "gasUsed" : "0x5208", - "hash" : "31999cf10e3cbb881b722d4a1fa9230e1c928057eae1d6f19dbef6a4aa456f5d", - "mixHash" : "7f53ed90509d1851d0ab767ee1e492b4b3afaecfc3d70505eaea0ae129500848", - "nonce" : "e4fdc2790a253e12", - "number" : "0x02", - "parentHash" : "fb7e3ee52a40bb7665efbacb89a363a0f19e3cab491a0c032cea6a0e73883e93", - "receiptTrie" : "4a4d62f18220fc8184296c5b41f9396c0fbf7ae13aa723e3d7bf2b0998f11585", - "stateRoot" : "0b8ede77b7e7d9be057bbf41fc02acbb84a4f934848ff63b53b61347544eae7e", - "timestamp" : "0x55b7e456", - "transactionsTrie" : "1dc43d9a5f5fefc8664903164d46adf3a98248d858a885558916dd8d73f5166c", + "gasUsed" : "0x5318", + "hash" : "b7b50bff06eacc9b90afcced52cb3ecf292cafbad8b525e5219d615292ce85ae", + "mixHash" : "c917dc082d00b604555c67bb7716e40143687761c688fb124c2b2f4e63a0cee0", + "nonce" : "7679612c486400bd", + "number" : "0x08", + "parentHash" : "df2cfbfa7dc9cd8e9335efdec0f5a2a475b572292f4c210bdae65b08be922373", + "receiptTrie" : "166564a5f23f110c605e76a02c0a26f92ae5e6a99105fb44882fdbc8c266f961", + "stateRoot" : "62688deab834e2ceb8c61fa31b82d203c059f2253062ec9c0fae5c604d2ec640", + "timestamp" : "0x561bc234", + "transactionsTrie" : "85810aeef9b32f4b5be185ef7ce5030c4c8dd6051ece354644c52752c683049c", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "blocknumber" : "2", - "rlp" : "0xf90261f901f9a0fb7e3ee52a40bb7665efbacb89a363a0f19e3cab491a0c032cea6a0e73883e93a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00b8ede77b7e7d9be057bbf41fc02acbb84a4f934848ff63b53b61347544eae7ea01dc43d9a5f5fefc8664903164d46adf3a98248d858a885558916dd8d73f5166ca04a4d62f18220fc8184296c5b41f9396c0fbf7ae13aa723e3d7bf2b0998f11585b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e45680a07f53ed90509d1851d0ab767ee1e492b4b3afaecfc3d70505eaea0ae12950084888e4fdc2790a253e12f862f86001018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8703801ba028fc37782401456825e0faa1a1f8e1e034d8047f29cf44d21d29f55ce0b8159ea00cac7f7c3e6e141c14e9465a9f1e11705f17f93d637996c9a19f82f69f2aafb8c0", + "blocknumber" : "8", + "rlp" : "0xf90264f901f9a0df2cfbfa7dc9cd8e9335efdec0f5a2a475b572292f4c210bdae65b08be922373a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a062688deab834e2ceb8c61fa31b82d203c059f2253062ec9c0fae5c604d2ec640a085810aeef9b32f4b5be185ef7ce5030c4c8dd6051ece354644c52752c683049ca0166564a5f23f110c605e76a02c0a26f92ae5e6a99105fb44882fdbc8c266f961b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd882531884561bc23480a0c917dc082d00b604555c67bb7716e40143687761c688fb124c2b2f4e63a0cee0887679612c486400bdf865f8630701827b1594095e7baea6a6c7c4c2dfeb977efac326af552d870a84034534541ba0d4d9e924ed058fe16a92794fb0db33ff7e4f300ee759a7ff63f05ab8eab325fea07bfdb22598739976178ba8ad8f4d0b289c3f41b78c752cbc84632f7df0bdbc39c0", "transactions" : [ { - "data" : "0x", - "gasLimit" : "0x04cb2f", + "data" : "0x03453454", + "gasLimit" : "0x7b15", "gasPrice" : "0x01", - "nonce" : "0x01", - "r" : "0x28fc37782401456825e0faa1a1f8e1e034d8047f29cf44d21d29f55ce0b8159e", - "s" : "0x0cac7f7c3e6e141c14e9465a9f1e11705f17f93d637996c9a19f82f69f2aafb8", + "nonce" : "0x07", + "r" : "0xd4d9e924ed058fe16a92794fb0db33ff7e4f300ee759a7ff63f05ab8eab325fe", + "s" : "0x7bfdb22598739976178ba8ad8f4d0b289c3f41b78c752cbc84632f7df0bdbc39", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "v" : "0x1b", - "value" : "0x03" + "value" : "0x0a" } ], "uncleHeaders" : [ @@ -2503,34 +2458,34 @@ "blockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020080", + "difficulty" : "0x020200", "extraData" : "0x", "gasLimit" : "0x2fefd8", - "gasUsed" : "0x5208", - "hash" : "32fc01152b5855a27426345bd4911e422d928517c593f00dc7639abe504a2d24", - "mixHash" : "458a8ca9c7dca15b9d4d1daea6c9e21335df35fb1ead4f913b564ed85dbe152c", - "nonce" : "5f5f7b329a813f06", - "number" : "0x03", - "parentHash" : "31999cf10e3cbb881b722d4a1fa9230e1c928057eae1d6f19dbef6a4aa456f5d", - "receiptTrie" : "73416e6c3adc0c359a37e3b067cac1794519ce3e1ff2ef159039994ac096778b", - "stateRoot" : "1fda723d5d44c3e1bf4f9f624d804ad1d39a60e26c1b190ffb8a90974752a686", - "timestamp" : "0x55b7e457", - "transactionsTrie" : "8978964c37007b0091eb3e3489639ea5a5adbf295b717ab9f0c01895f97f5147", + "gasUsed" : "0x5318", + "hash" : "19edc66e05fca185e67057d4fb8cc1d05e7dd59322bf79a76516a2beb2d19d75", + "mixHash" : "7e2f659a5f69a33b179dba557db70b33b5350f00525c7b27089388068920334c", + "nonce" : "94f0be05788f1803", + "number" : "0x09", + "parentHash" : "b7b50bff06eacc9b90afcced52cb3ecf292cafbad8b525e5219d615292ce85ae", + "receiptTrie" : "4f9a304371d75768dc7ced19e2d304c6b01c4dac85ffae837f565236f61d236d", + "stateRoot" : "001f529748c24ad5d11e358369bbd0903eb2d12f6205138e60bf8722e442cf4c", + "timestamp" : "0x561bc236", + "transactionsTrie" : "f44a15ae5e333f487766055ff74a1777ae440871c13d77f5c1d04446b04bdae3", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "blocknumber" : "3", - "rlp" : "0xf90261f901f9a031999cf10e3cbb881b722d4a1fa9230e1c928057eae1d6f19dbef6a4aa456f5da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01fda723d5d44c3e1bf4f9f624d804ad1d39a60e26c1b190ffb8a90974752a686a08978964c37007b0091eb3e3489639ea5a5adbf295b717ab9f0c01895f97f5147a073416e6c3adc0c359a37e3b067cac1794519ce3e1ff2ef159039994ac096778bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e45780a0458a8ca9c7dca15b9d4d1daea6c9e21335df35fb1ead4f913b564ed85dbe152c885f5f7b329a813f06f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8705801ca06b1c1f6f2ac96f1d898113dbc02465001044fb7330cf7554d569ffec31c14839a0737e986047bf3d15120f8ed04a414bb827237a6346b52a90745ae0ae6334e4a1c0", + "blocknumber" : "9", + "rlp" : "0xf90264f901f9a0b7b50bff06eacc9b90afcced52cb3ecf292cafbad8b525e5219d615292ce85aea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0001f529748c24ad5d11e358369bbd0903eb2d12f6205138e60bf8722e442cf4ca0f44a15ae5e333f487766055ff74a1777ae440871c13d77f5c1d04446b04bdae3a04f9a304371d75768dc7ced19e2d304c6b01c4dac85ffae837f565236f61d236db90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd882531884561bc23680a07e2f659a5f69a33b179dba557db70b33b5350f00525c7b27089388068920334c8894f0be05788f1803f865f8630801827b1594095e7baea6a6c7c4c2dfeb977efac326af552d870a84034534541ca0346855b3a6759bbd12f2976f157ed59ec39f360b9e31ba98c8bfcacde9352f0ea05fb7cc6e829949385b1aeb0b7cc228e5ee170a32668d55831816fd0453d6b584c0", "transactions" : [ { - "data" : "0x", - "gasLimit" : "0x04cb2f", + "data" : "0x03453454", + "gasLimit" : "0x7b15", "gasPrice" : "0x01", - "nonce" : "0x02", - "r" : "0x6b1c1f6f2ac96f1d898113dbc02465001044fb7330cf7554d569ffec31c14839", - "s" : "0x737e986047bf3d15120f8ed04a414bb827237a6346b52a90745ae0ae6334e4a1", + "nonce" : "0x08", + "r" : "0x346855b3a6759bbd12f2976f157ed59ec39f360b9e31ba98c8bfcacde9352f0e", + "s" : "0x5fb7cc6e829949385b1aeb0b7cc228e5ee170a32668d55831816fd0453d6b584", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "v" : "0x1c", - "value" : "0x05" + "value" : "0x0a" } ], "uncleHeaders" : [ @@ -2540,34 +2495,34 @@ "blockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x0200c0", + "difficulty" : "0x020240", "extraData" : "0x", "gasLimit" : "0x2fefd8", - "gasUsed" : "0x5208", - "hash" : "44257d5b1f46775263f872feee4d2a872b4ad37f292d9ba4836e5c4642bc7051", - "mixHash" : "26ffae9932ea9e91e10a49a5d875c480a88621d82cc8ed94e086b0c5017dcaf6", - "nonce" : "d79d22c2af1db8c4", - "number" : "0x04", - "parentHash" : "32fc01152b5855a27426345bd4911e422d928517c593f00dc7639abe504a2d24", - "receiptTrie" : "ef55770d8ac39dec224cffb218f0646ff38af156a5d7fd6688b23dd8b93e045f", - "stateRoot" : "118a6f21ecc1afbf9cb8eed3b617b0fe095dc58fa4fbd6d0c5ff904c2ad393be", - "timestamp" : "0x55b7e459", - "transactionsTrie" : "472ec692bb3085e4cb95a0f735a96a99c7dba39ed499aa8ebe6094b38e11d8d7", + "gasUsed" : "0x5318", + "hash" : "7a1cbf4082a716a6c1e3ce35f792ae880aa59f0620b60125ad3893611947805f", + "mixHash" : "bc14a712c957ab5f677aad056892702c6a473b99973b8c56b2c664134e2884a9", + "nonce" : "499b06895b793cd2", + "number" : "0x0a", + "parentHash" : "19edc66e05fca185e67057d4fb8cc1d05e7dd59322bf79a76516a2beb2d19d75", + "receiptTrie" : "f63dd37b5ac8e2cc39b39b62eb9d652f8c0041c27ff89fd8d9f12f35d7a33c1d", + "stateRoot" : "abce31ee2477a6362fad4a93a23137faf809631912b6fac8df385a133204c7b2", + "timestamp" : "0x561bc23a", + "transactionsTrie" : "b700724a2634d46db92edcd2a1277cfe4b6236ae27cbb75fca6a6039fe1dae4c", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "blocknumber" : "4", - "rlp" : "0xf90261f901f9a032fc01152b5855a27426345bd4911e422d928517c593f00dc7639abe504a2d24a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0118a6f21ecc1afbf9cb8eed3b617b0fe095dc58fa4fbd6d0c5ff904c2ad393bea0472ec692bb3085e4cb95a0f735a96a99c7dba39ed499aa8ebe6094b38e11d8d7a0ef55770d8ac39dec224cffb218f0646ff38af156a5d7fd6688b23dd8b93e045fb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88252088455b7e45980a026ffae9932ea9e91e10a49a5d875c480a88621d82cc8ed94e086b0c5017dcaf688d79d22c2af1db8c4f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8707801ba0637dd537e29027117edf445a1df18adc0278572bc64de022178c472bcb8d5f7da00dc10a14a485398302b79274c128505d7dca344fb343cbcf827d1689b0dfbe16c0", + "blocknumber" : "10", + "rlp" : "0xf90264f901f9a019edc66e05fca185e67057d4fb8cc1d05e7dd59322bf79a76516a2beb2d19d75a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0abce31ee2477a6362fad4a93a23137faf809631912b6fac8df385a133204c7b2a0b700724a2634d46db92edcd2a1277cfe4b6236ae27cbb75fca6a6039fe1dae4ca0f63dd37b5ac8e2cc39b39b62eb9d652f8c0041c27ff89fd8d9f12f35d7a33c1db9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd882531884561bc23a80a0bc14a712c957ab5f677aad056892702c6a473b99973b8c56b2c664134e2884a988499b06895b793cd2f865f8630901827b1594095e7baea6a6c7c4c2dfeb977efac326af552d870a84034534541ba06bdf4ec5a20ca679b9301462343ebe95c765303423fb3918ab674e74f6a4a513a00abc0ae18c8d62313c8d45c7f90e10d985d330439d237090b8c5876828530e19c0", "transactions" : [ { - "data" : "0x", - "gasLimit" : "0x04cb2f", + "data" : "0x03453454", + "gasLimit" : "0x7b15", "gasPrice" : "0x01", - "nonce" : "0x03", - "r" : "0x637dd537e29027117edf445a1df18adc0278572bc64de022178c472bcb8d5f7d", - "s" : "0x0dc10a14a485398302b79274c128505d7dca344fb343cbcf827d1689b0dfbe16", + "nonce" : "0x09", + "r" : "0x6bdf4ec5a20ca679b9301462343ebe95c765303423fb3918ab674e74f6a4a513", + "s" : "0x0abc0ae18c8d62313c8d45c7f90e10d985d330439d237090b8c5876828530e19", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "v" : "0x1b", - "value" : "0x07" + "value" : "0x0a" } ], "uncleHeaders" : [ @@ -2577,89 +2532,2211 @@ "blockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020080", + "difficulty" : "0x020040", "extraData" : "0x", "gasLimit" : "0x2fefd8", - "gasUsed" : "0x5208", - "hash" : "7f24fe856f67781a5bb6090aa8ae4c5b462f1173de759123b726f673917227a9", - "mixHash" : "00ccf54cb4f8e4bf4a4309757aa6d555825939ada45af9939a2b3b7a78349ede", - "nonce" : "c39186e7f32e77ee", - "number" : "0x03", - "parentHash" : "31999cf10e3cbb881b722d4a1fa9230e1c928057eae1d6f19dbef6a4aa456f5d", - "receiptTrie" : "b509a6d52c12a901e194a4f9906884db9f651b1ee9b71b8db41c872ab0cefb5c", - "stateRoot" : "5a5dcb969a89633a885faa82a44c0dd5faf29c6c8acb86002af977495a8106ba", - "timestamp" : "0x55b7e45c", - "transactionsTrie" : "a6bdd911d7876852cafbc02d1dd6bf45abb3ce084b5dd46e6efd0dc415814e74", - "uncleHash" : "f3c22aa39c89cb557af3de36c389fabb66d0f28aa1da5c8ba302ef40f5a3064b" + "gasUsed" : "0x5318", + "hash" : "38f8ed1d9d1980fd1abf197f364b36f8694beb4b69146169f0337f160288ef8a", + "mixHash" : "00bebf446cfa215b6c2ae31dee28195ac437d2012358d5a7a3f90c445c326895", + "nonce" : "056d357a02948911", + "number" : "0x04", + "parentHash" : "4da7e3b30f35a969aa045a92ec28b07fb36e096542c26a993e84d42b33169347", + "receiptTrie" : "2f5024bfb9d4d20cffa9a5ba9f2f481896d54dbb27fdf4358943b6f816fee793", + "stateRoot" : "700283fc3bea2459970cdb81e3fcc6ef21aa07880603015195ccdb6a78b37af1", + "timestamp" : "0x561bc23d", + "transactionsTrie" : "1bce548e5e3e490fe8304bb4e423cd1eeeb8e12580b116c9c879dc508cb327c6", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "blocknumber" : "3", - "rlp" : "0xf9045df901f9a031999cf10e3cbb881b722d4a1fa9230e1c928057eae1d6f19dbef6a4aa456f5da0f3c22aa39c89cb557af3de36c389fabb66d0f28aa1da5c8ba302ef40f5a3064b948888f1f195afa192cfee860698584c030f4c9db1a05a5dcb969a89633a885faa82a44c0dd5faf29c6c8acb86002af977495a8106baa0a6bdd911d7876852cafbc02d1dd6bf45abb3ce084b5dd46e6efd0dc415814e74a0b509a6d52c12a901e194a4f9906884db9f651b1ee9b71b8db41c872ab0cefb5cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e45c80a000ccf54cb4f8e4bf4a4309757aa6d555825939ada45af9939a2b3b7a78349ede88c39186e7f32e77eef862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870b801ba0fde0167802eedb87f14f12e0cf0cac4315a027121905b8ca75a3360dcbac6d39a02d51ecf5ed68b453c3f264a396dfe15e790c8e8121acbd701e81aac9f08435f6f901faf901f7a0fb7e3ee52a40bb7665efbacb89a363a0f19e3cab491a0c032cea6a0e73883e93a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0df1828588eefd69fe6fd029dfdfe0d0a669559b3d4143f3c3bfd76a838c73a23a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e45c80a035e48332dacd0a31f3ca148efe165684eb79687dbf4818a342ac9ad6aabafc7c88235a6dfd1bba0ace", + "blocknumber" : "4", + "rlp" : "0xf90264f901f9a04da7e3b30f35a969aa045a92ec28b07fb36e096542c26a993e84d42b33169347a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0700283fc3bea2459970cdb81e3fcc6ef21aa07880603015195ccdb6a78b37af1a01bce548e5e3e490fe8304bb4e423cd1eeeb8e12580b116c9c879dc508cb327c6a02f5024bfb9d4d20cffa9a5ba9f2f481896d54dbb27fdf4358943b6f816fee793b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004004832fefd882531884561bc23d80a000bebf446cfa215b6c2ae31dee28195ac437d2012358d5a7a3f90c445c32689588056d357a02948911f865f8630301827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca00d82309f2333de4c654b3d8d7cc413d23002ebf997c7a11d9c19974e168b097da01053eb1cf60bd295644c9913a9d04e77c8cf1e22147c60618ed6e41ece69375ec0", "transactions" : [ { - "data" : "0x", - "gasLimit" : "0x04cb2f", + "data" : "0x03453454", + "gasLimit" : "0x7b15", "gasPrice" : "0x01", - "nonce" : "0x02", - "r" : "0xfde0167802eedb87f14f12e0cf0cac4315a027121905b8ca75a3360dcbac6d39", - "s" : "0x2d51ecf5ed68b453c3f264a396dfe15e790c8e8121acbd701e81aac9f08435f6", + "nonce" : "0x03", + "r" : "0x0d82309f2333de4c654b3d8d7cc413d23002ebf997c7a11d9c19974e168b097d", + "s" : "0x1053eb1cf60bd295644c9913a9d04e77c8cf1e22147c60618ed6e41ece69375e", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1b", - "value" : "0x0b" + "v" : "0x1c", + "value" : "0x64" } ], "uncleHeaders" : [ - { - "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020040", - "extraData" : "0x", - "gasLimit" : "0x2fefd8", - "gasUsed" : "0x00", - "hash" : "f14c4bf52cd045f68db2d95c29de0a33fb91bf96f5fa319b28e80e30dafe7362", - "mixHash" : "35e48332dacd0a31f3ca148efe165684eb79687dbf4818a342ac9ad6aabafc7c", - "nonce" : "235a6dfd1bba0ace", - "number" : "0x02", - "parentHash" : "fb7e3ee52a40bb7665efbacb89a363a0f19e3cab491a0c032cea6a0e73883e93", - "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot" : "df1828588eefd69fe6fd029dfdfe0d0a669559b3d4143f3c3bfd76a838c73a23", - "timestamp" : "0x55b7e45c", - "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - } ] }, { "blockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x0200c0", + "difficulty" : "0x020080", "extraData" : "0x", "gasLimit" : "0x2fefd8", - "gasUsed" : "0x5208", - "hash" : "d1f07592f48468bdc77f1eee1f02050bbd4bac964d481384b2c3a52dde3b9535", - "mixHash" : "96b11c01caf05d900c2bdf71e8e7b1bdf593afae850f56afab7504fc2520f20a", - "nonce" : "d06f0107c13e5348", - "number" : "0x04", - "parentHash" : "7f24fe856f67781a5bb6090aa8ae4c5b462f1173de759123b726f673917227a9", - "receiptTrie" : "732827d2b1988defb09d7bd06572896fa4e432f5bc0ea387a4f7d145fc372f39", - "stateRoot" : "04f33e93e0f8658c4dae2af4744302e38e29299092bbccf8e7397d9dc2aa45a4", - "timestamp" : "0x55b7e460", - "transactionsTrie" : "2ea1b286d8985b5a51ada486c04468a9e4733af268dc8667fad4e9d912f6dbbb", + "gasUsed" : "0x5318", + "hash" : "df73ec341bfc286499f7a13455880cb6fc5dd40b130f052b9315617525af6645", + "mixHash" : "9aa33fe4c472acbb7ea0e9c2f24d0efc22d10e06d1577ce7554fc9830f029e8c", + "nonce" : "b60f25d5089a6863", + "number" : "0x05", + "parentHash" : "38f8ed1d9d1980fd1abf197f364b36f8694beb4b69146169f0337f160288ef8a", + "receiptTrie" : "7f1d69244399474e69048ab28c3340ef2dcdff7f969843c64635004d21fa63ec", + "stateRoot" : "cc095838cc385e216960c5b0595e66e54dff2f1017186f2ad641c928b8d8e0f6", + "timestamp" : "0x561bc23f", + "transactionsTrie" : "33a3cdb62f4f616e05f23ba111a4c8b7f3ea3acdb0dc27a6279cd7ca457b3adc", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "blocknumber" : "4", - "rlp" : "0xf90261f901f9a07f24fe856f67781a5bb6090aa8ae4c5b462f1173de759123b726f673917227a9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a004f33e93e0f8658c4dae2af4744302e38e29299092bbccf8e7397d9dc2aa45a4a02ea1b286d8985b5a51ada486c04468a9e4733af268dc8667fad4e9d912f6dbbba0732827d2b1988defb09d7bd06572896fa4e432f5bc0ea387a4f7d145fc372f39b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88252088455b7e46080a096b11c01caf05d900c2bdf71e8e7b1bdf593afae850f56afab7504fc2520f20a88d06f0107c13e5348f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870d801ca06ec8a6a7c895c11dcbf20a46592bbeaed5bdf99539a25066d487a537333b25ada01897973d6b3c42009986d08ddbdd3a964677f1cd3eb2648bd7471a657701077dc0", + "blocknumber" : "5", + "rlp" : "0xf90264f901f9a038f8ed1d9d1980fd1abf197f364b36f8694beb4b69146169f0337f160288ef8aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cc095838cc385e216960c5b0595e66e54dff2f1017186f2ad641c928b8d8e0f6a033a3cdb62f4f616e05f23ba111a4c8b7f3ea3acdb0dc27a6279cd7ca457b3adca07f1d69244399474e69048ab28c3340ef2dcdff7f969843c64635004d21fa63ecb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008005832fefd882531884561bc23f80a09aa33fe4c472acbb7ea0e9c2f24d0efc22d10e06d1577ce7554fc9830f029e8c88b60f25d5089a6863f865f8630401827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ba043ae1102461563fe721f71bea1a33a67083787fbad97fdd6fa4e018a9913024ea0735db8a3e3f9ee70ce3fc01b3b9bdbb99b950b1e4d1b5f4a9be12e05a2548be0c0", "transactions" : [ { - "data" : "0x", - "gasLimit" : "0x04cb2f", + "data" : "0x03453454", + "gasLimit" : "0x7b15", "gasPrice" : "0x01", - "nonce" : "0x03", - "r" : "0x6ec8a6a7c895c11dcbf20a46592bbeaed5bdf99539a25066d487a537333b25ad", - "s" : "0x1897973d6b3c42009986d08ddbdd3a964677f1cd3eb2648bd7471a657701077d", + "nonce" : "0x04", + "r" : "0x43ae1102461563fe721f71bea1a33a67083787fbad97fdd6fa4e018a9913024e", + "s" : "0x735db8a3e3f9ee70ce3fc01b3b9bdbb99b950b1e4d1b5f4a9be12e05a2548be0", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1c", - "value" : "0x0d" + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "c256f0c6a3430524ce9fb07c4e912de7101502914fd05eb29a3cd50f60b04912", + "mixHash" : "cb5284b67d1011d0c5ececbcd3814106b1d9982251a8c7c4e3ef20375564790c", + "nonce" : "e1365acc07707928", + "number" : "0x06", + "parentHash" : "df73ec341bfc286499f7a13455880cb6fc5dd40b130f052b9315617525af6645", + "receiptTrie" : "3e773b1fb95518ca670fb434cf7ad58aee5b0084fc1f963d089c525396b826a7", + "stateRoot" : "42a0f6566b20984a303de18d4732995c2c4600d394da21e0518a13712c343733", + "timestamp" : "0x561bc242", + "transactionsTrie" : "5f31e2e5a30a7b18521d0e07a2ab4108d2f4d784fb881c6b6636438749421889", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "rlp" : "0xf90264f901f9a0df73ec341bfc286499f7a13455880cb6fc5dd40b130f052b9315617525af6645a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a042a0f6566b20984a303de18d4732995c2c4600d394da21e0518a13712c343733a05f31e2e5a30a7b18521d0e07a2ab4108d2f4d784fb881c6b6636438749421889a03e773b1fb95518ca670fb434cf7ad58aee5b0084fc1f963d089c525396b826a7b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c006832fefd882531884561bc24280a0cb5284b67d1011d0c5ececbcd3814106b1d9982251a8c7c4e3ef20375564790c88e1365acc07707928f865f8630501827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca06cd8730922f0365c029f9f9ac93572648d63828b79f73089fcad4a0d5cbd3a40a009ef5a554c5bcbcfc08f74cff5c792ab00ab6c5381879d38dd82c2869f0c46abc0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0x6cd8730922f0365c029f9f9ac93572648d63828b79f73089fcad4a0d5cbd3a40", + "s" : "0x09ef5a554c5bcbcfc08f74cff5c792ab00ab6c5381879d38dd82c2869f0c46ab", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "69f1850ded92abc2113ccb78927514443d2467d2e04f1938b4ccbb774b8895d3", + "mixHash" : "5855a7163bda2f58c0fba2a046efac1ee6d77f45a5cd06d90851232936eeb404", + "nonce" : "c3a664ab5cae387f", + "number" : "0x07", + "parentHash" : "c256f0c6a3430524ce9fb07c4e912de7101502914fd05eb29a3cd50f60b04912", + "receiptTrie" : "cb6ade33619da8e7e252d5f617c80e9862f2d2abdb0efef7c2aef2b385d99b9a", + "stateRoot" : "f91fd3efb01434dc73c542dc1a27cd237c3a3c75d45dbc9bc38190fc7a643d49", + "timestamp" : "0x561bc243", + "transactionsTrie" : "147f49846280e400cae822f2af1bb784da8425f54a19fd7e0935a19490f7fb2d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "7", + "rlp" : "0xf90264f901f9a0c256f0c6a3430524ce9fb07c4e912de7101502914fd05eb29a3cd50f60b04912a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f91fd3efb01434dc73c542dc1a27cd237c3a3c75d45dbc9bc38190fc7a643d49a0147f49846280e400cae822f2af1bb784da8425f54a19fd7e0935a19490f7fb2da0cb6ade33619da8e7e252d5f617c80e9862f2d2abdb0efef7c2aef2b385d99b9ab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010007832fefd882531884561bc24380a05855a7163bda2f58c0fba2a046efac1ee6d77f45a5cd06d90851232936eeb40488c3a664ab5cae387ff865f8630601827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca07e70acee84a42818d84f28f786a98b5c33c7653b790a7944d099d3aa3b3c7021a041265590d491defd2958cf6f4f1aca208b5d8990e10d854d010c848bd7e46625c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x06", + "r" : "0x7e70acee84a42818d84f28f786a98b5c33c7653b790a7944d099d3aa3b3c7021", + "s" : "0x41265590d491defd2958cf6f4f1aca208b5d8990e10d854d010c848bd7e46625", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "8952972a3737b0244ae1afea208bdd3f225d063e2b8cd5fba92938a6777a2a10", + "mixHash" : "6517f8156774af6d6a793b61c45b9a1516ecab46a6b7bf0696d747cf80b75a2d", + "nonce" : "e1d3f9367dcc4818", + "number" : "0x08", + "parentHash" : "69f1850ded92abc2113ccb78927514443d2467d2e04f1938b4ccbb774b8895d3", + "receiptTrie" : "2cad9529230fa059806ee4aab2e7306d499d8b09f88bdfaa67d41b3920d5ab75", + "stateRoot" : "77c07a49d30b808eb33be66f7fe7d5e9aa9a80295f5c9bfc26d0468327d81563", + "timestamp" : "0x561bc246", + "transactionsTrie" : "495ea8ab7d66db446e7d3838217f79b4124f308e5ff3efc8d134c4cb58f4f7b8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "8", + "rlp" : "0xf90264f901f9a069f1850ded92abc2113ccb78927514443d2467d2e04f1938b4ccbb774b8895d3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a077c07a49d30b808eb33be66f7fe7d5e9aa9a80295f5c9bfc26d0468327d81563a0495ea8ab7d66db446e7d3838217f79b4124f308e5ff3efc8d134c4cb58f4f7b8a02cad9529230fa059806ee4aab2e7306d499d8b09f88bdfaa67d41b3920d5ab75b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014008832fefd882531884561bc24680a06517f8156774af6d6a793b61c45b9a1516ecab46a6b7bf0696d747cf80b75a2d88e1d3f9367dcc4818f865f8630701827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca01d5aae4f5a300783d45f11113815602443f4302dea304a86c02162184b0afe5ea04b9185f4227a2fd0d787cfee518771ac7d77c9976f4dc9f0ae5668fc3c04290cc0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x07", + "r" : "0x1d5aae4f5a300783d45f11113815602443f4302dea304a86c02162184b0afe5e", + "s" : "0x4b9185f4227a2fd0d787cfee518771ac7d77c9976f4dc9f0ae5668fc3c04290c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020180", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "9a73eee9ae5f0be526addb695a4fcef69fce3457ddcf0d570c05c23ef3b82355", + "mixHash" : "aedbd31582f6adfe8ed90a9250dc5cb69fb5d927d86c0ff5feb283d1a5c2d49a", + "nonce" : "313c4185533332f6", + "number" : "0x09", + "parentHash" : "8952972a3737b0244ae1afea208bdd3f225d063e2b8cd5fba92938a6777a2a10", + "receiptTrie" : "b6b036420aa321f40f8cc395ea958ce587007e1b8331cbeb9d92f3568131802d", + "stateRoot" : "beda29e335499d35b4cc6e467abec474fc5dbe796e1b1e0e2f9ba7c0ffe4be65", + "timestamp" : "0x561bc249", + "transactionsTrie" : "4860e1bee2bcad0d4006df7886f6d10b6f3a80511de6239a9bd775d0e904794f", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "9", + "rlp" : "0xf90264f901f9a08952972a3737b0244ae1afea208bdd3f225d063e2b8cd5fba92938a6777a2a10a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0beda29e335499d35b4cc6e467abec474fc5dbe796e1b1e0e2f9ba7c0ffe4be65a04860e1bee2bcad0d4006df7886f6d10b6f3a80511de6239a9bd775d0e904794fa0b6b036420aa321f40f8cc395ea958ce587007e1b8331cbeb9d92f3568131802db90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018009832fefd882531884561bc24980a0aedbd31582f6adfe8ed90a9250dc5cb69fb5d927d86c0ff5feb283d1a5c2d49a88313c4185533332f6f865f8630801827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca0238f2a43eaf64015941feedfb794589368680a6cfd2cdeb2bfeb7795bf791955a07deb40c6c9a8f1cc22c464d44a5bb1aea5b2d6866d601b2d17e02c95f5fa0889c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x08", + "r" : "0x238f2a43eaf64015941feedfb794589368680a6cfd2cdeb2bfeb7795bf791955", + "s" : "0x7deb40c6c9a8f1cc22c464d44a5bb1aea5b2d6866d601b2d17e02c95f5fa0889", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0201c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "b6bfb6b27951ab14c3b03ed1da9ac8469e5affeef93b8c7aa99302cf6b87a9cb", + "mixHash" : "403b4c4d8568addfaf9803b017cc78c63e9c78095a26cb436fa9ee6f53ffc921", + "nonce" : "551ecdd03b129cba", + "number" : "0x0a", + "parentHash" : "9a73eee9ae5f0be526addb695a4fcef69fce3457ddcf0d570c05c23ef3b82355", + "receiptTrie" : "a543d45fe387e150ec2800fb3817d1bdcc738e61eb154ab1c711270d13ae3886", + "stateRoot" : "0b0b9d65a6b8cc2fa3d4ac2b04e1446b7f127e7f481de217c402086b756d9045", + "timestamp" : "0x561bc24b", + "transactionsTrie" : "1a4aee7a35738518c79f4116bbb30db856f70a6639fed5328369363c037e1efe", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "10", + "rlp" : "0xf90264f901f9a09a73eee9ae5f0be526addb695a4fcef69fce3457ddcf0d570c05c23ef3b82355a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00b0b9d65a6b8cc2fa3d4ac2b04e1446b7f127e7f481de217c402086b756d9045a01a4aee7a35738518c79f4116bbb30db856f70a6639fed5328369363c037e1efea0a543d45fe387e150ec2800fb3817d1bdcc738e61eb154ab1c711270d13ae3886b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c00a832fefd882531884561bc24b80a0403b4c4d8568addfaf9803b017cc78c63e9c78095a26cb436fa9ee6f53ffc92188551ecdd03b129cbaf865f8630901827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca039d9b193b7ee9b6fc52327c6a00d7889bd2e83ecdd21b62e43eb6372d5c73ee1a01f50df7b28e14bd8cf9fdc0b9844cf2f4829bc3849895335dde1b9868e971b8ec0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x09", + "r" : "0x39d9b193b7ee9b6fc52327c6a00d7889bd2e83ecdd21b62e43eb6372d5c73ee1", + "s" : "0x1f50df7b28e14bd8cf9fdc0b9844cf2f4829bc3849895335dde1b9868e971b8e", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020200", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "c11d5e12dfc35c0659f9bb6c7fa797b6af47968e684c6d6573cc87ca7ec2102b", + "mixHash" : "f7f1c0327f1c47e118e7105263cf8beaa60cfb3429c1b0707fcf397e17f07dd2", + "nonce" : "e30c6af959cb4626", + "number" : "0x0b", + "parentHash" : "b6bfb6b27951ab14c3b03ed1da9ac8469e5affeef93b8c7aa99302cf6b87a9cb", + "receiptTrie" : "f3089e641d5afcd11fc4e7b3d13e0ad1b532e74d5ce725b52a0d6896aaa0cd76", + "stateRoot" : "6e736a64dea3535af304d633c22514fb1d77db3da82827ccbf6dcecf1dacc2fc", + "timestamp" : "0x561bc24d", + "transactionsTrie" : "3c2fec7bc846c734618532ef4e993a5fda92432194de347d53f5cef76d30c1e0", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "11", + "rlp" : "0xf90264f901f9a0b6bfb6b27951ab14c3b03ed1da9ac8469e5affeef93b8c7aa99302cf6b87a9cba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a06e736a64dea3535af304d633c22514fb1d77db3da82827ccbf6dcecf1dacc2fca03c2fec7bc846c734618532ef4e993a5fda92432194de347d53f5cef76d30c1e0a0f3089e641d5afcd11fc4e7b3d13e0ad1b532e74d5ce725b52a0d6896aaa0cd76b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202000b832fefd882531884561bc24d80a0f7f1c0327f1c47e118e7105263cf8beaa60cfb3429c1b0707fcf397e17f07dd288e30c6af959cb4626f865f8630a01827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca07d8351788f4169e5624bd2ed423f82ea082b4c37c242bf7add0987f71c8770b0a04aa4274c635f76b4e7f9947ceb69cdd1ff6043b25f55b03eb29deff6eb1c2a89c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x0a", + "r" : "0x7d8351788f4169e5624bd2ed423f82ea082b4c37c242bf7add0987f71c8770b0", + "s" : "0x4aa4274c635f76b4e7f9947ceb69cdd1ff6043b25f55b03eb29deff6eb1c2a89", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "1a996e6586675a019ff88d65b254a796ec385ae4d84da27cf436ff463096b6df", + "mixHash" : "4cba03890605bdbe23243861857e3fb4cf4a512bdf7de6ee254c2cb58e0688e0", + "nonce" : "d052279a29b8af7f", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a04cba03890605bdbe23243861857e3fb4cf4a512bdf7de6ee254c2cb58e0688e088d052279a29b8af7fc0c0", + "lastblockhash" : "c11d5e12dfc35c0659f9bb6c7fa797b6af47968e684c6d6573cc87ca7ec2102b", + "postState" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x033e", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x02fb474098f67f8ed8", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e6f0dea", + "code" : "0x", + "nonce" : "0x0b", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e72a000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "newChainFrom5Block" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "1465c699841716dc19d17fccd9ad5b4c7d1daf7a683165e4c13b3d383a32f33f", + "mixHash" : "34aeea4791b78b9b1f29245d968315f19ef8309351bda63be8b4096cb8d54515", + "nonce" : "6f06227a98049dbe", + "number" : "0x01", + "parentHash" : "fc0c62493000cbf3252628272fe7093dbe61f1c9f906ac014a04e3e59ecfccb3", + "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", + "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", + "timestamp" : "0x561bc250", + "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "rlp" : "0xf90261f901f9a0fc0c62493000cbf3252628272fe7093dbe61f1c9f906ac014a04e3e59ecfccb3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc25080a034aeea4791b78b9b1f29245d968315f19ef8309351bda63be8b4096cb8d54515886f06227a98049dbef862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x77c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8", + "s" : "0x3f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "47c3eee35aa0760e3b3cb0a46e2cc63a27158258f02d007dcbdc6a5d67edfeae", + "mixHash" : "fa4ff095a4ac0bc30d04dfccfb876d72fc62fe462e50d264aa5e201689878cb8", + "nonce" : "4349442b3e14f87a", + "number" : "0x02", + "parentHash" : "1465c699841716dc19d17fccd9ad5b4c7d1daf7a683165e4c13b3d383a32f33f", + "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", + "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", + "timestamp" : "0x561bc252", + "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "rlp" : "0xf90260f901f9a01465c699841716dc19d17fccd9ad5b4c7d1daf7a683165e4c13b3d383a32f33fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc25280a0fa4ff095a4ac0bc30d04dfccfb876d72fc62fe462e50d264aa5e201689878cb8884349442b3e14f87af861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x33c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f23", + "s" : "0x1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cf", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "66362d5cda48224ccd75d30d115dcbfae9ff9163569d4a76dc63b29183952ff3", + "mixHash" : "ed3d6d10914a670ca555730bf1389d0a60aa1b7eb0f269305ce88aff5d4d7cb7", + "nonce" : "f84175f35c855a58", + "number" : "0x03", + "parentHash" : "47c3eee35aa0760e3b3cb0a46e2cc63a27158258f02d007dcbdc6a5d67edfeae", + "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", + "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", + "timestamp" : "0x561bc254", + "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "rlp" : "0xf90261f901f9a047c3eee35aa0760e3b3cb0a46e2cc63a27158258f02d007dcbdc6a5d67edfeaea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc25480a0ed3d6d10914a670ca555730bf1389d0a60aa1b7eb0f269305ce88aff5d4d7cb788f84175f35c855a58f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x15eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0ee", + "s" : "0x5d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "d7afbc09590a6d5d57629b9a4f238f54877acf49b767213e36f432882fb4d1cd", + "mixHash" : "596c1ecb3ea66ceca188cd7c0c915ab73d7e1c757daaffaa8d09afe8b2def52c", + "nonce" : "df234144820bdda1", + "number" : "0x04", + "parentHash" : "66362d5cda48224ccd75d30d115dcbfae9ff9163569d4a76dc63b29183952ff3", + "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", + "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", + "timestamp" : "0x561bc258", + "transactionsTrie" : "9735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "rlp" : "0xf90261f901f9a066362d5cda48224ccd75d30d115dcbfae9ff9163569d4a76dc63b29183952ff3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc25880a0596c1ecb3ea66ceca188cd7c0c915ab73d7e1c757daaffaa8d09afe8b2def52c88df234144820bdda1f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0xa7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840d", + "s" : "0x2078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "14a7bda5b6c9e1036a617acada05d43a6e62fb28b9036496ccae844a48fc4790", + "mixHash" : "e8547cf95bbc67aba5cb0b4262b0ebb73e7b120216f6b82c474b2561628e08e5", + "nonce" : "75f149ce6be52586", + "number" : "0x05", + "parentHash" : "d7afbc09590a6d5d57629b9a4f238f54877acf49b767213e36f432882fb4d1cd", + "receiptTrie" : "e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9", + "stateRoot" : "72f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19", + "timestamp" : "0x561bc25a", + "transactionsTrie" : "14217a41be7dfaf94ad49120843e0a075b86dc17510fedfdf27a4683d3781669", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "5", + "rlp" : "0xf90260f901f9a0d7afbc09590a6d5d57629b9a4f238f54877acf49b767213e36f432882fb4d1cda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a014217a41be7dfaf94ad49120843e0a075b86dc17510fedfdf27a4683d3781669a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bc25a80a0e8547cf95bbc67aba5cb0b4262b0ebb73e7b120216f6b82c474b2561628e08e58875f149ce6be52586f861f85f040182795394095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ca92f7049c33e209b369c82bd5abad523585095f7825cce9b96fe239c75cf0eca04b995e7c3737fe206646fc0177492cdb383a4de76a531b562be4acf4163cd858c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0xca92f7049c33e209b369c82bd5abad523585095f7825cce9b96fe239c75cf0ec", + "s" : "0x4b995e7c3737fe206646fc0177492cdb383a4de76a531b562be4acf4163cd858", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "bc230e97bc105fbe908bf6d279aad747e2222c3072ba7fd2eee4c495e009550b", + "mixHash" : "15c8edeedd6527a5fa8b9fd6455fd61afc6fe31a26565df5f88c40875bae58c6", + "nonce" : "447b15844fa2e1ca", + "number" : "0x06", + "parentHash" : "14a7bda5b6c9e1036a617acada05d43a6e62fb28b9036496ccae844a48fc4790", + "receiptTrie" : "c3e558d9538cfa56cdb3e521db3030c991409b886a0cd93084cc80b1bad89c71", + "stateRoot" : "81fd7c6bc64d69dabf0c49c3895cd935717e18c950e9814aa7ccaacf4db5e096", + "timestamp" : "0x561bc25b", + "transactionsTrie" : "b2fcdfb40e3ba5486ec06a7afc9151467a1f06643e7b4ca400a237fe1922908e", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "rlp" : "0xf90264f901f9a014a7bda5b6c9e1036a617acada05d43a6e62fb28b9036496ccae844a48fc4790a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a081fd7c6bc64d69dabf0c49c3895cd935717e18c950e9814aa7ccaacf4db5e096a0b2fcdfb40e3ba5486ec06a7afc9151467a1f06643e7b4ca400a237fe1922908ea0c3e558d9538cfa56cdb3e521db3030c991409b886a0cd93084cc80b1bad89c71b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882531884561bc25b80a015c8edeedd6527a5fa8b9fd6455fd61afc6fe31a26565df5f88c40875bae58c688447b15844fa2e1caf865f8630501827b1594095e7baea6a6c7c4c2dfeb977efac326af552d870a84034534541ca0fc99d3f36a9f63f22aa8818291acd9e11ceddcb43a5340923fa6e3ef1230e300a0494b2a8cd700566325f117e34bc0fb076f54462f9302624f7c8f299fd09c6c58c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0xfc99d3f36a9f63f22aa8818291acd9e11ceddcb43a5340923fa6e3ef1230e300", + "s" : "0x494b2a8cd700566325f117e34bc0fb076f54462f9302624f7c8f299fd09c6c58", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020180", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "9b6d7b0af89ec11e1bed38a93c40ef840e0fbce31d788cb3c3eebd0e40f2ad28", + "mixHash" : "0e11ff2a7b99ea7c6350da7daadd3693ac7e301b16687b48aa4041634f9ed821", + "nonce" : "350e320bb7ac3560", + "number" : "0x07", + "parentHash" : "bc230e97bc105fbe908bf6d279aad747e2222c3072ba7fd2eee4c495e009550b", + "receiptTrie" : "6beefe0da225d0b4fd8bd847b6bc5e5064de6735ebeeaeff557b4cd679dd4a24", + "stateRoot" : "a311c8d5642f84ecdfe7485cf921284131060d43db4e0378ad9660f5c25faa2a", + "timestamp" : "0x561bc25f", + "transactionsTrie" : "be61cd748cc8ceec06da67670ed10e7e1cbc655d4cf4c9cea25fb0f5b818d169", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "7", + "rlp" : "0xf90264f901f9a0bc230e97bc105fbe908bf6d279aad747e2222c3072ba7fd2eee4c495e009550ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a311c8d5642f84ecdfe7485cf921284131060d43db4e0378ad9660f5c25faa2aa0be61cd748cc8ceec06da67670ed10e7e1cbc655d4cf4c9cea25fb0f5b818d169a06beefe0da225d0b4fd8bd847b6bc5e5064de6735ebeeaeff557b4cd679dd4a24b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882531884561bc25f80a00e11ff2a7b99ea7c6350da7daadd3693ac7e301b16687b48aa4041634f9ed82188350e320bb7ac3560f865f8630601827b1594095e7baea6a6c7c4c2dfeb977efac326af552d870a84034534541ca0a770a28025ab47c5d68f49f5d8f94bdd8a8be2fc9c4733f1034a02aeeaa55233a04eee4c7bf4c3ad4f229cf71522af457b3e714a96a19398673a237826f4ed56c7c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x06", + "r" : "0xa770a28025ab47c5d68f49f5d8f94bdd8a8be2fc9c4733f1034a02aeeaa55233", + "s" : "0x4eee4c7bf4c3ad4f229cf71522af457b3e714a96a19398673a237826f4ed56c7", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0201c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "0cc960c432bbc35eae22f83b5defdda1414bc8dffacceba47e43ae53a340fd01", + "mixHash" : "2d9c5ba3af1607c547b167eefedd0dced395dfc161cd816c2223c2a1dbbe8a92", + "nonce" : "eff7e0deb238a219", + "number" : "0x08", + "parentHash" : "9b6d7b0af89ec11e1bed38a93c40ef840e0fbce31d788cb3c3eebd0e40f2ad28", + "receiptTrie" : "166564a5f23f110c605e76a02c0a26f92ae5e6a99105fb44882fdbc8c266f961", + "stateRoot" : "62688deab834e2ceb8c61fa31b82d203c059f2253062ec9c0fae5c604d2ec640", + "timestamp" : "0x561bc261", + "transactionsTrie" : "85810aeef9b32f4b5be185ef7ce5030c4c8dd6051ece354644c52752c683049c", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "8", + "rlp" : "0xf90264f901f9a09b6d7b0af89ec11e1bed38a93c40ef840e0fbce31d788cb3c3eebd0e40f2ad28a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a062688deab834e2ceb8c61fa31b82d203c059f2253062ec9c0fae5c604d2ec640a085810aeef9b32f4b5be185ef7ce5030c4c8dd6051ece354644c52752c683049ca0166564a5f23f110c605e76a02c0a26f92ae5e6a99105fb44882fdbc8c266f961b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd882531884561bc26180a02d9c5ba3af1607c547b167eefedd0dced395dfc161cd816c2223c2a1dbbe8a9288eff7e0deb238a219f865f8630701827b1594095e7baea6a6c7c4c2dfeb977efac326af552d870a84034534541ba0d4d9e924ed058fe16a92794fb0db33ff7e4f300ee759a7ff63f05ab8eab325fea07bfdb22598739976178ba8ad8f4d0b289c3f41b78c752cbc84632f7df0bdbc39c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x07", + "r" : "0xd4d9e924ed058fe16a92794fb0db33ff7e4f300ee759a7ff63f05ab8eab325fe", + "s" : "0x7bfdb22598739976178ba8ad8f4d0b289c3f41b78c752cbc84632f7df0bdbc39", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020200", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "7103d9072dfc754874af23e0df8fbd3631b44781613e872e8253430f712cca53", + "mixHash" : "b1a0e560755efa8c87892fb939cb43966545532e3275d3abb683457fb464f73b", + "nonce" : "6e3b0a175e6f03c6", + "number" : "0x09", + "parentHash" : "0cc960c432bbc35eae22f83b5defdda1414bc8dffacceba47e43ae53a340fd01", + "receiptTrie" : "4f9a304371d75768dc7ced19e2d304c6b01c4dac85ffae837f565236f61d236d", + "stateRoot" : "001f529748c24ad5d11e358369bbd0903eb2d12f6205138e60bf8722e442cf4c", + "timestamp" : "0x561bc264", + "transactionsTrie" : "f44a15ae5e333f487766055ff74a1777ae440871c13d77f5c1d04446b04bdae3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "9", + "rlp" : "0xf90264f901f9a00cc960c432bbc35eae22f83b5defdda1414bc8dffacceba47e43ae53a340fd01a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0001f529748c24ad5d11e358369bbd0903eb2d12f6205138e60bf8722e442cf4ca0f44a15ae5e333f487766055ff74a1777ae440871c13d77f5c1d04446b04bdae3a04f9a304371d75768dc7ced19e2d304c6b01c4dac85ffae837f565236f61d236db90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd882531884561bc26480a0b1a0e560755efa8c87892fb939cb43966545532e3275d3abb683457fb464f73b886e3b0a175e6f03c6f865f8630801827b1594095e7baea6a6c7c4c2dfeb977efac326af552d870a84034534541ca0346855b3a6759bbd12f2976f157ed59ec39f360b9e31ba98c8bfcacde9352f0ea05fb7cc6e829949385b1aeb0b7cc228e5ee170a32668d55831816fd0453d6b584c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x08", + "r" : "0x346855b3a6759bbd12f2976f157ed59ec39f360b9e31ba98c8bfcacde9352f0e", + "s" : "0x5fb7cc6e829949385b1aeb0b7cc228e5ee170a32668d55831816fd0453d6b584", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020240", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "52a3056e5cc5882009646613edefff0a4092644eb52fd3a564ad94b2c78d3f52", + "mixHash" : "3021ad5bf14446ef55fef796e8b74f4f98492c63503b7978a5a5e610e26f69dc", + "nonce" : "2bada4563b883941", + "number" : "0x0a", + "parentHash" : "7103d9072dfc754874af23e0df8fbd3631b44781613e872e8253430f712cca53", + "receiptTrie" : "f63dd37b5ac8e2cc39b39b62eb9d652f8c0041c27ff89fd8d9f12f35d7a33c1d", + "stateRoot" : "abce31ee2477a6362fad4a93a23137faf809631912b6fac8df385a133204c7b2", + "timestamp" : "0x561bc267", + "transactionsTrie" : "b700724a2634d46db92edcd2a1277cfe4b6236ae27cbb75fca6a6039fe1dae4c", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "10", + "rlp" : "0xf90264f901f9a07103d9072dfc754874af23e0df8fbd3631b44781613e872e8253430f712cca53a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0abce31ee2477a6362fad4a93a23137faf809631912b6fac8df385a133204c7b2a0b700724a2634d46db92edcd2a1277cfe4b6236ae27cbb75fca6a6039fe1dae4ca0f63dd37b5ac8e2cc39b39b62eb9d652f8c0041c27ff89fd8d9f12f35d7a33c1db9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd882531884561bc26780a03021ad5bf14446ef55fef796e8b74f4f98492c63503b7978a5a5e610e26f69dc882bada4563b883941f865f8630901827b1594095e7baea6a6c7c4c2dfeb977efac326af552d870a84034534541ba06bdf4ec5a20ca679b9301462343ebe95c765303423fb3918ab674e74f6a4a513a00abc0ae18c8d62313c8d45c7f90e10d985d330439d237090b8c5876828530e19c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x09", + "r" : "0x6bdf4ec5a20ca679b9301462343ebe95c765303423fb3918ab674e74f6a4a513", + "s" : "0x0abc0ae18c8d62313c8d45c7f90e10d985d330439d237090b8c5876828530e19", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "36238f94a6172ec327af5cde504e8ca32ad364ca51fc93a4f5e1a5d055acae76", + "mixHash" : "eb2d50bcce43073ef8423ffceec6b25caeb2341f719d772fdf2e19dab15a564e", + "nonce" : "ede2b60ddc55c9cb", + "number" : "0x05", + "parentHash" : "d7afbc09590a6d5d57629b9a4f238f54877acf49b767213e36f432882fb4d1cd", + "receiptTrie" : "cee0838471576007b7917c36050073092ab3c58ec7f95f4a9b5cfc44fd2b0914", + "stateRoot" : "9139f5d47948033423b5ef05a82a4f184bdb24d942c101d2c018ba3600b5100f", + "timestamp" : "0x561bc26c", + "transactionsTrie" : "33a3cdb62f4f616e05f23ba111a4c8b7f3ea3acdb0dc27a6279cd7ca457b3adc", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "5", + "rlp" : "0xf90264f901f9a0d7afbc09590a6d5d57629b9a4f238f54877acf49b767213e36f432882fb4d1cda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a09139f5d47948033423b5ef05a82a4f184bdb24d942c101d2c018ba3600b5100fa033a3cdb62f4f616e05f23ba111a4c8b7f3ea3acdb0dc27a6279cd7ca457b3adca0cee0838471576007b7917c36050073092ab3c58ec7f95f4a9b5cfc44fd2b0914b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008005832fefd882531884561bc26c80a0eb2d50bcce43073ef8423ffceec6b25caeb2341f719d772fdf2e19dab15a564e88ede2b60ddc55c9cbf865f8630401827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ba043ae1102461563fe721f71bea1a33a67083787fbad97fdd6fa4e018a9913024ea0735db8a3e3f9ee70ce3fc01b3b9bdbb99b950b1e4d1b5f4a9be12e05a2548be0c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0x43ae1102461563fe721f71bea1a33a67083787fbad97fdd6fa4e018a9913024e", + "s" : "0x735db8a3e3f9ee70ce3fc01b3b9bdbb99b950b1e4d1b5f4a9be12e05a2548be0", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "9c1064ac27612b968521f47db2620434ed2fa1206ee343f6f05d94fd959f7573", + "mixHash" : "7e9abc82048ffb8c46dac6b8e6ba7dfd94e6bae1bacd17ba46010e8a33170f71", + "nonce" : "f6597afe9f9ecd15", + "number" : "0x06", + "parentHash" : "36238f94a6172ec327af5cde504e8ca32ad364ca51fc93a4f5e1a5d055acae76", + "receiptTrie" : "cf7ae276350d6ca8b77407b983566c6276bd00c49cd6b859d32d2716aae7868c", + "stateRoot" : "351af13c3150ade4edd2d80bd5216fdb37f722c6276ce4bae6571fc744806e2b", + "timestamp" : "0x561bc26e", + "transactionsTrie" : "5f31e2e5a30a7b18521d0e07a2ab4108d2f4d784fb881c6b6636438749421889", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "rlp" : "0xf90264f901f9a036238f94a6172ec327af5cde504e8ca32ad364ca51fc93a4f5e1a5d055acae76a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0351af13c3150ade4edd2d80bd5216fdb37f722c6276ce4bae6571fc744806e2ba05f31e2e5a30a7b18521d0e07a2ab4108d2f4d784fb881c6b6636438749421889a0cf7ae276350d6ca8b77407b983566c6276bd00c49cd6b859d32d2716aae7868cb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c006832fefd882531884561bc26e80a07e9abc82048ffb8c46dac6b8e6ba7dfd94e6bae1bacd17ba46010e8a33170f7188f6597afe9f9ecd15f865f8630501827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca06cd8730922f0365c029f9f9ac93572648d63828b79f73089fcad4a0d5cbd3a40a009ef5a554c5bcbcfc08f74cff5c792ab00ab6c5381879d38dd82c2869f0c46abc0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0x6cd8730922f0365c029f9f9ac93572648d63828b79f73089fcad4a0d5cbd3a40", + "s" : "0x09ef5a554c5bcbcfc08f74cff5c792ab00ab6c5381879d38dd82c2869f0c46ab", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "8c85304d3fda8c809305b0965bbd6a1ee0b5cef1ff2a11486dd8ef10d6f27041", + "mixHash" : "6b908bc7023d83baaf662cf93e8fed09022f41a912b623a053193204b9f5b5b9", + "nonce" : "e9d05f2e01a5890d", + "number" : "0x07", + "parentHash" : "9c1064ac27612b968521f47db2620434ed2fa1206ee343f6f05d94fd959f7573", + "receiptTrie" : "30cf13d5a0bf45576d83b33aa4e9efb10ef35930a383f2e122ba81387cf7be39", + "stateRoot" : "1488979fc48094377238c63634f7d2a307075ed1974802af60f1b3c8d1671ff3", + "timestamp" : "0x561bc270", + "transactionsTrie" : "147f49846280e400cae822f2af1bb784da8425f54a19fd7e0935a19490f7fb2d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "7", + "rlp" : "0xf90264f901f9a09c1064ac27612b968521f47db2620434ed2fa1206ee343f6f05d94fd959f7573a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01488979fc48094377238c63634f7d2a307075ed1974802af60f1b3c8d1671ff3a0147f49846280e400cae822f2af1bb784da8425f54a19fd7e0935a19490f7fb2da030cf13d5a0bf45576d83b33aa4e9efb10ef35930a383f2e122ba81387cf7be39b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010007832fefd882531884561bc27080a06b908bc7023d83baaf662cf93e8fed09022f41a912b623a053193204b9f5b5b988e9d05f2e01a5890df865f8630601827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca07e70acee84a42818d84f28f786a98b5c33c7653b790a7944d099d3aa3b3c7021a041265590d491defd2958cf6f4f1aca208b5d8990e10d854d010c848bd7e46625c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x06", + "r" : "0x7e70acee84a42818d84f28f786a98b5c33c7653b790a7944d099d3aa3b3c7021", + "s" : "0x41265590d491defd2958cf6f4f1aca208b5d8990e10d854d010c848bd7e46625", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "15e93a183f6640b375e89116866e1b3f9372f422ab4aa21042e4aca454a9a2b4", + "mixHash" : "7576d83dd0da572197a39bc3c69a23f35ee614848af9bfb443b3c21a58beec10", + "nonce" : "ca1a87ccc0389d6f", + "number" : "0x08", + "parentHash" : "8c85304d3fda8c809305b0965bbd6a1ee0b5cef1ff2a11486dd8ef10d6f27041", + "receiptTrie" : "74aebc67efd63059194401134258c349d712dd5b0dc9b3dd577b5e38655273fa", + "stateRoot" : "428f956de50a58f5199bd397e14a95bbd64e73398b7fb41bc218bbc4d40efd07", + "timestamp" : "0x561bc272", + "transactionsTrie" : "495ea8ab7d66db446e7d3838217f79b4124f308e5ff3efc8d134c4cb58f4f7b8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "8", + "rlp" : "0xf90264f901f9a08c85304d3fda8c809305b0965bbd6a1ee0b5cef1ff2a11486dd8ef10d6f27041a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0428f956de50a58f5199bd397e14a95bbd64e73398b7fb41bc218bbc4d40efd07a0495ea8ab7d66db446e7d3838217f79b4124f308e5ff3efc8d134c4cb58f4f7b8a074aebc67efd63059194401134258c349d712dd5b0dc9b3dd577b5e38655273fab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014008832fefd882531884561bc27280a07576d83dd0da572197a39bc3c69a23f35ee614848af9bfb443b3c21a58beec1088ca1a87ccc0389d6ff865f8630701827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca01d5aae4f5a300783d45f11113815602443f4302dea304a86c02162184b0afe5ea04b9185f4227a2fd0d787cfee518771ac7d77c9976f4dc9f0ae5668fc3c04290cc0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x07", + "r" : "0x1d5aae4f5a300783d45f11113815602443f4302dea304a86c02162184b0afe5e", + "s" : "0x4b9185f4227a2fd0d787cfee518771ac7d77c9976f4dc9f0ae5668fc3c04290c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020180", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "c07c20e6b75bf1d1a38f84a61dd3712dc1c36efde9ac340ae8a81242b5676f39", + "mixHash" : "204378193343c85a5644a8bb3aae6e5350d1e0e7e5314c9f6f7d78d853b38ae8", + "nonce" : "bd571d2c8318374a", + "number" : "0x09", + "parentHash" : "15e93a183f6640b375e89116866e1b3f9372f422ab4aa21042e4aca454a9a2b4", + "receiptTrie" : "1be1cbd4aa87d20f5837625d512e08847eb892bd7043115f50f0d3dc4d4eded0", + "stateRoot" : "a975ed7b639d19e614e8839573d9ceb6f879b461f14775d964705347b70a4e6c", + "timestamp" : "0x561bc274", + "transactionsTrie" : "4860e1bee2bcad0d4006df7886f6d10b6f3a80511de6239a9bd775d0e904794f", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "9", + "rlp" : "0xf90264f901f9a015e93a183f6640b375e89116866e1b3f9372f422ab4aa21042e4aca454a9a2b4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a975ed7b639d19e614e8839573d9ceb6f879b461f14775d964705347b70a4e6ca04860e1bee2bcad0d4006df7886f6d10b6f3a80511de6239a9bd775d0e904794fa01be1cbd4aa87d20f5837625d512e08847eb892bd7043115f50f0d3dc4d4eded0b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018009832fefd882531884561bc27480a0204378193343c85a5644a8bb3aae6e5350d1e0e7e5314c9f6f7d78d853b38ae888bd571d2c8318374af865f8630801827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca0238f2a43eaf64015941feedfb794589368680a6cfd2cdeb2bfeb7795bf791955a07deb40c6c9a8f1cc22c464d44a5bb1aea5b2d6866d601b2d17e02c95f5fa0889c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x08", + "r" : "0x238f2a43eaf64015941feedfb794589368680a6cfd2cdeb2bfeb7795bf791955", + "s" : "0x7deb40c6c9a8f1cc22c464d44a5bb1aea5b2d6866d601b2d17e02c95f5fa0889", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0201c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "2ef59fa121f113390fb2a86e00a58982010ac4aa854ecbbb4d0141757235c25a", + "mixHash" : "7e04951e9216d4de33734fa2644794911b9516d0eb37546cb6512ba15af57d85", + "nonce" : "07afcbb9f2a6ee0c", + "number" : "0x0a", + "parentHash" : "c07c20e6b75bf1d1a38f84a61dd3712dc1c36efde9ac340ae8a81242b5676f39", + "receiptTrie" : "72de3418cd115f92d6f0f4f08dd868855a9fe71689d5e0176c1a10bdbec2881d", + "stateRoot" : "7f8f90125ee4ceabd0943bf4fb53423aae1dcb737ad9b8c832879720d13f3eef", + "timestamp" : "0x561bc276", + "transactionsTrie" : "1a4aee7a35738518c79f4116bbb30db856f70a6639fed5328369363c037e1efe", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "10", + "rlp" : "0xf90264f901f9a0c07c20e6b75bf1d1a38f84a61dd3712dc1c36efde9ac340ae8a81242b5676f39a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07f8f90125ee4ceabd0943bf4fb53423aae1dcb737ad9b8c832879720d13f3eefa01a4aee7a35738518c79f4116bbb30db856f70a6639fed5328369363c037e1efea072de3418cd115f92d6f0f4f08dd868855a9fe71689d5e0176c1a10bdbec2881db9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c00a832fefd882531884561bc27680a07e04951e9216d4de33734fa2644794911b9516d0eb37546cb6512ba15af57d858807afcbb9f2a6ee0cf865f8630901827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca039d9b193b7ee9b6fc52327c6a00d7889bd2e83ecdd21b62e43eb6372d5c73ee1a01f50df7b28e14bd8cf9fdc0b9844cf2f4829bc3849895335dde1b9868e971b8ec0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x09", + "r" : "0x39d9b193b7ee9b6fc52327c6a00d7889bd2e83ecdd21b62e43eb6372d5c73ee1", + "s" : "0x1f50df7b28e14bd8cf9fdc0b9844cf2f4829bc3849895335dde1b9868e971b8e", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020200", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "2da0d82f940ed021e13651ec25ac94ed1bc842d2dafbc18b750217a07be1c3e7", + "mixHash" : "557f2d70750f57a8553ef0b79d421efca5917f08ebbf3063a536802d0927007e", + "nonce" : "6259581e921ebb0f", + "number" : "0x0b", + "parentHash" : "2ef59fa121f113390fb2a86e00a58982010ac4aa854ecbbb4d0141757235c25a", + "receiptTrie" : "1fb8df576cf3e1fca371b67e7e6f015caf89780b1f5717c6c2008f72724abf59", + "stateRoot" : "ef8f21f6d7d50752cd52c0490e47b28f6357ec8c808b3acb98f9bd5a06420d82", + "timestamp" : "0x561bc278", + "transactionsTrie" : "3c2fec7bc846c734618532ef4e993a5fda92432194de347d53f5cef76d30c1e0", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "11", + "rlp" : "0xf90264f901f9a02ef59fa121f113390fb2a86e00a58982010ac4aa854ecbbb4d0141757235c25aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ef8f21f6d7d50752cd52c0490e47b28f6357ec8c808b3acb98f9bd5a06420d82a03c2fec7bc846c734618532ef4e993a5fda92432194de347d53f5cef76d30c1e0a01fb8df576cf3e1fca371b67e7e6f015caf89780b1f5717c6c2008f72724abf59b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202000b832fefd882531884561bc27880a0557f2d70750f57a8553ef0b79d421efca5917f08ebbf3063a536802d0927007e886259581e921ebb0ff865f8630a01827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca07d8351788f4169e5624bd2ed423f82ea082b4c37c242bf7add0987f71c8770b0a04aa4274c635f76b4e7f9947ceb69cdd1ff6043b25f55b03eb29deff6eb1c2a89c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x0a", + "r" : "0x7d8351788f4169e5624bd2ed423f82ea082b4c37c242bf7add0987f71c8770b0", + "s" : "0x4aa4274c635f76b4e7f9947ceb69cdd1ff6043b25f55b03eb29deff6eb1c2a89", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "fc0c62493000cbf3252628272fe7093dbe61f1c9f906ac014a04e3e59ecfccb3", + "mixHash" : "cb9abf3f1002f6c7e8cbd8e4c0c64e592a3eaf278b89b597c98d65175f5b90c0", + "nonce" : "fafb44bc79048a52", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0cb9abf3f1002f6c7e8cbd8e4c0c64e592a3eaf278b89b597c98d65175f5b90c088fafb44bc79048a52c0c0", + "lastblockhash" : "2da0d82f940ed021e13651ec25ac94ed1bc842d2dafbc18b750217a07be1c3e7", + "postState" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x02e4", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x02fb474098f67f8dc8", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e6f0f54", + "code" : "0x", + "nonce" : "0x0b", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e72a000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "newChainFrom6Block" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "779c7331b55c7c8549e5f58510d177878dd5f215c6bed39a58d8e86f718ddb7e", + "mixHash" : "1132fb94d28689565e268fc45bf491e1bbdb09b811bff3a747d60642c91eda85", + "nonce" : "915c7457850b5519", + "number" : "0x01", + "parentHash" : "16ebd564e7a999047c4eb0ec47ad0a1d74d4e2f7c49163451c862eb9e7002c77", + "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", + "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", + "timestamp" : "0x561bc27b", + "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "rlp" : "0xf90261f901f9a016ebd564e7a999047c4eb0ec47ad0a1d74d4e2f7c49163451c862eb9e7002c77a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc27b80a01132fb94d28689565e268fc45bf491e1bbdb09b811bff3a747d60642c91eda8588915c7457850b5519f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x77c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8", + "s" : "0x3f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "285067e970d168cde7f42281d9ef256d9d9094be74869a811ba2a9797f460c40", + "mixHash" : "afba235e0bebd891f084214cff8073930325b217a64362a5f93374beda89809d", + "nonce" : "977cca6532cfa4e3", + "number" : "0x02", + "parentHash" : "779c7331b55c7c8549e5f58510d177878dd5f215c6bed39a58d8e86f718ddb7e", + "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", + "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", + "timestamp" : "0x561bc27e", + "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "rlp" : "0xf90260f901f9a0779c7331b55c7c8549e5f58510d177878dd5f215c6bed39a58d8e86f718ddb7ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc27e80a0afba235e0bebd891f084214cff8073930325b217a64362a5f93374beda89809d88977cca6532cfa4e3f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x33c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f23", + "s" : "0x1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cf", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "aafc72e0dcd903ee258c1dcf429cfb231c4ec2636b6d0a8fa3b11a8923a50d06", + "mixHash" : "25710be2fe2b62eb64c6c1d7c97f9c5d206187e5713b7e0719543094cd45eccf", + "nonce" : "7224990260181587", + "number" : "0x03", + "parentHash" : "285067e970d168cde7f42281d9ef256d9d9094be74869a811ba2a9797f460c40", + "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", + "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", + "timestamp" : "0x561bc280", + "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "rlp" : "0xf90261f901f9a0285067e970d168cde7f42281d9ef256d9d9094be74869a811ba2a9797f460c40a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc28080a025710be2fe2b62eb64c6c1d7c97f9c5d206187e5713b7e0719543094cd45eccf887224990260181587f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x15eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0ee", + "s" : "0x5d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "413ba7b39a7479409ef9affeda5386802595953abf797509c4a698b3ae78fe0d", + "mixHash" : "1e1d523c21ac6eb106c8055cb2d049d383f4052db01e0b98d8d1f68aeba913a5", + "nonce" : "ac9c4fff23e0f855", + "number" : "0x04", + "parentHash" : "aafc72e0dcd903ee258c1dcf429cfb231c4ec2636b6d0a8fa3b11a8923a50d06", + "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", + "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", + "timestamp" : "0x561bc281", + "transactionsTrie" : "9735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "rlp" : "0xf90261f901f9a0aafc72e0dcd903ee258c1dcf429cfb231c4ec2636b6d0a8fa3b11a8923a50d06a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc28180a01e1d523c21ac6eb106c8055cb2d049d383f4052db01e0b98d8d1f68aeba913a588ac9c4fff23e0f855f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0xa7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840d", + "s" : "0x2078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020100", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "fbedf21a34748486fe2a38f0bc0c6dbccbcd98c63b9d3d61ff8d78d2de84d40e", + "mixHash" : "5962c3a21a6a44fe371b0d118cf0bd96100357c6a65654b30d81b49e5e79bbd4", + "nonce" : "d80de2fed31b3850", + "number" : "0x05", + "parentHash" : "413ba7b39a7479409ef9affeda5386802595953abf797509c4a698b3ae78fe0d", + "receiptTrie" : "e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9", + "stateRoot" : "72f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19", + "timestamp" : "0x561bc284", + "transactionsTrie" : "14217a41be7dfaf94ad49120843e0a075b86dc17510fedfdf27a4683d3781669", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "5", + "rlp" : "0xf90260f901f9a0413ba7b39a7479409ef9affeda5386802595953abf797509c4a698b3ae78fe0da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a014217a41be7dfaf94ad49120843e0a075b86dc17510fedfdf27a4683d3781669a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bc28480a05962c3a21a6a44fe371b0d118cf0bd96100357c6a65654b30d81b49e5e79bbd488d80de2fed31b3850f861f85f040182795394095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ca92f7049c33e209b369c82bd5abad523585095f7825cce9b96fe239c75cf0eca04b995e7c3737fe206646fc0177492cdb383a4de76a531b562be4acf4163cd858c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0xca92f7049c33e209b369c82bd5abad523585095f7825cce9b96fe239c75cf0ec", + "s" : "0x4b995e7c3737fe206646fc0177492cdb383a4de76a531b562be4acf4163cd858", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "f3e0b0b34c51ac6a778df4d200a39170e5d00d9caba1bfd96bbe2312a51da397", + "mixHash" : "89f8ed74024681c3d489caf5ac89d01542f86710d51ee02927b45dd9c5927fab", + "nonce" : "960836f3aab342b6", + "number" : "0x06", + "parentHash" : "fbedf21a34748486fe2a38f0bc0c6dbccbcd98c63b9d3d61ff8d78d2de84d40e", + "receiptTrie" : "c3e558d9538cfa56cdb3e521db3030c991409b886a0cd93084cc80b1bad89c71", + "stateRoot" : "81fd7c6bc64d69dabf0c49c3895cd935717e18c950e9814aa7ccaacf4db5e096", + "timestamp" : "0x561bc286", + "transactionsTrie" : "b2fcdfb40e3ba5486ec06a7afc9151467a1f06643e7b4ca400a237fe1922908e", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "rlp" : "0xf90264f901f9a0fbedf21a34748486fe2a38f0bc0c6dbccbcd98c63b9d3d61ff8d78d2de84d40ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a081fd7c6bc64d69dabf0c49c3895cd935717e18c950e9814aa7ccaacf4db5e096a0b2fcdfb40e3ba5486ec06a7afc9151467a1f06643e7b4ca400a237fe1922908ea0c3e558d9538cfa56cdb3e521db3030c991409b886a0cd93084cc80b1bad89c71b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882531884561bc28680a089f8ed74024681c3d489caf5ac89d01542f86710d51ee02927b45dd9c5927fab88960836f3aab342b6f865f8630501827b1594095e7baea6a6c7c4c2dfeb977efac326af552d870a84034534541ca0fc99d3f36a9f63f22aa8818291acd9e11ceddcb43a5340923fa6e3ef1230e300a0494b2a8cd700566325f117e34bc0fb076f54462f9302624f7c8f299fd09c6c58c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0xfc99d3f36a9f63f22aa8818291acd9e11ceddcb43a5340923fa6e3ef1230e300", + "s" : "0x494b2a8cd700566325f117e34bc0fb076f54462f9302624f7c8f299fd09c6c58", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020180", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "6b286c46fa3888e20732da8df5af379261822fa79e867f7fcae30f9650f70a0a", + "mixHash" : "13a6d773e4624226c494e62c9e56d7b0b7fb1c2f5d71282c9c3b4891457413cb", + "nonce" : "2863be0a99ef7048", + "number" : "0x07", + "parentHash" : "f3e0b0b34c51ac6a778df4d200a39170e5d00d9caba1bfd96bbe2312a51da397", + "receiptTrie" : "6beefe0da225d0b4fd8bd847b6bc5e5064de6735ebeeaeff557b4cd679dd4a24", + "stateRoot" : "a311c8d5642f84ecdfe7485cf921284131060d43db4e0378ad9660f5c25faa2a", + "timestamp" : "0x561bc288", + "transactionsTrie" : "be61cd748cc8ceec06da67670ed10e7e1cbc655d4cf4c9cea25fb0f5b818d169", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "7", + "rlp" : "0xf90264f901f9a0f3e0b0b34c51ac6a778df4d200a39170e5d00d9caba1bfd96bbe2312a51da397a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a311c8d5642f84ecdfe7485cf921284131060d43db4e0378ad9660f5c25faa2aa0be61cd748cc8ceec06da67670ed10e7e1cbc655d4cf4c9cea25fb0f5b818d169a06beefe0da225d0b4fd8bd847b6bc5e5064de6735ebeeaeff557b4cd679dd4a24b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882531884561bc28880a013a6d773e4624226c494e62c9e56d7b0b7fb1c2f5d71282c9c3b4891457413cb882863be0a99ef7048f865f8630601827b1594095e7baea6a6c7c4c2dfeb977efac326af552d870a84034534541ca0a770a28025ab47c5d68f49f5d8f94bdd8a8be2fc9c4733f1034a02aeeaa55233a04eee4c7bf4c3ad4f229cf71522af457b3e714a96a19398673a237826f4ed56c7c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x06", + "r" : "0xa770a28025ab47c5d68f49f5d8f94bdd8a8be2fc9c4733f1034a02aeeaa55233", + "s" : "0x4eee4c7bf4c3ad4f229cf71522af457b3e714a96a19398673a237826f4ed56c7", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0201c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "269bf430a3e8e52e112244b7dbd0efecb5f9e41f0adcf94892f12c9be56148ce", + "mixHash" : "0d45cb747e451b47eda08be449cce3cf1565b3aae5c795160efe1ff3945b0ff1", + "nonce" : "e303c5d8ff1f1c4d", + "number" : "0x08", + "parentHash" : "6b286c46fa3888e20732da8df5af379261822fa79e867f7fcae30f9650f70a0a", + "receiptTrie" : "166564a5f23f110c605e76a02c0a26f92ae5e6a99105fb44882fdbc8c266f961", + "stateRoot" : "62688deab834e2ceb8c61fa31b82d203c059f2253062ec9c0fae5c604d2ec640", + "timestamp" : "0x561bc289", + "transactionsTrie" : "85810aeef9b32f4b5be185ef7ce5030c4c8dd6051ece354644c52752c683049c", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "8", + "rlp" : "0xf90264f901f9a06b286c46fa3888e20732da8df5af379261822fa79e867f7fcae30f9650f70a0aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a062688deab834e2ceb8c61fa31b82d203c059f2253062ec9c0fae5c604d2ec640a085810aeef9b32f4b5be185ef7ce5030c4c8dd6051ece354644c52752c683049ca0166564a5f23f110c605e76a02c0a26f92ae5e6a99105fb44882fdbc8c266f961b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd882531884561bc28980a00d45cb747e451b47eda08be449cce3cf1565b3aae5c795160efe1ff3945b0ff188e303c5d8ff1f1c4df865f8630701827b1594095e7baea6a6c7c4c2dfeb977efac326af552d870a84034534541ba0d4d9e924ed058fe16a92794fb0db33ff7e4f300ee759a7ff63f05ab8eab325fea07bfdb22598739976178ba8ad8f4d0b289c3f41b78c752cbc84632f7df0bdbc39c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x07", + "r" : "0xd4d9e924ed058fe16a92794fb0db33ff7e4f300ee759a7ff63f05ab8eab325fe", + "s" : "0x7bfdb22598739976178ba8ad8f4d0b289c3f41b78c752cbc84632f7df0bdbc39", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020200", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "5fad94781e2f625f3578413f1270b7246305379b7a2626801a6d46f5d295ad71", + "mixHash" : "ddb23dfdc3d7cb4d04c728d8510fbc6ac1c7515bb222cf1e4e2992b10adce137", + "nonce" : "a33995066564b609", + "number" : "0x09", + "parentHash" : "269bf430a3e8e52e112244b7dbd0efecb5f9e41f0adcf94892f12c9be56148ce", + "receiptTrie" : "4f9a304371d75768dc7ced19e2d304c6b01c4dac85ffae837f565236f61d236d", + "stateRoot" : "001f529748c24ad5d11e358369bbd0903eb2d12f6205138e60bf8722e442cf4c", + "timestamp" : "0x561bc28c", + "transactionsTrie" : "f44a15ae5e333f487766055ff74a1777ae440871c13d77f5c1d04446b04bdae3", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "9", + "rlp" : "0xf90264f901f9a0269bf430a3e8e52e112244b7dbd0efecb5f9e41f0adcf94892f12c9be56148cea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0001f529748c24ad5d11e358369bbd0903eb2d12f6205138e60bf8722e442cf4ca0f44a15ae5e333f487766055ff74a1777ae440871c13d77f5c1d04446b04bdae3a04f9a304371d75768dc7ced19e2d304c6b01c4dac85ffae837f565236f61d236db90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd882531884561bc28c80a0ddb23dfdc3d7cb4d04c728d8510fbc6ac1c7515bb222cf1e4e2992b10adce13788a33995066564b609f865f8630801827b1594095e7baea6a6c7c4c2dfeb977efac326af552d870a84034534541ca0346855b3a6759bbd12f2976f157ed59ec39f360b9e31ba98c8bfcacde9352f0ea05fb7cc6e829949385b1aeb0b7cc228e5ee170a32668d55831816fd0453d6b584c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x08", + "r" : "0x346855b3a6759bbd12f2976f157ed59ec39f360b9e31ba98c8bfcacde9352f0e", + "s" : "0x5fb7cc6e829949385b1aeb0b7cc228e5ee170a32668d55831816fd0453d6b584", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020240", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "d174f383917920e98d62d81ad3dfd7f708d7908fd6c2a9a7bf8ab4502a8be703", + "mixHash" : "2a817c442b81a66ef57585bbe6957eaeeac005e9879af6c4dd27cdf345a55a97", + "nonce" : "6a0f999fdb545968", + "number" : "0x0a", + "parentHash" : "5fad94781e2f625f3578413f1270b7246305379b7a2626801a6d46f5d295ad71", + "receiptTrie" : "f63dd37b5ac8e2cc39b39b62eb9d652f8c0041c27ff89fd8d9f12f35d7a33c1d", + "stateRoot" : "abce31ee2477a6362fad4a93a23137faf809631912b6fac8df385a133204c7b2", + "timestamp" : "0x561bc28e", + "transactionsTrie" : "b700724a2634d46db92edcd2a1277cfe4b6236ae27cbb75fca6a6039fe1dae4c", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "10", + "rlp" : "0xf90264f901f9a05fad94781e2f625f3578413f1270b7246305379b7a2626801a6d46f5d295ad71a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0abce31ee2477a6362fad4a93a23137faf809631912b6fac8df385a133204c7b2a0b700724a2634d46db92edcd2a1277cfe4b6236ae27cbb75fca6a6039fe1dae4ca0f63dd37b5ac8e2cc39b39b62eb9d652f8c0041c27ff89fd8d9f12f35d7a33c1db9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd882531884561bc28e80a02a817c442b81a66ef57585bbe6957eaeeac005e9879af6c4dd27cdf345a55a97886a0f999fdb545968f865f8630901827b1594095e7baea6a6c7c4c2dfeb977efac326af552d870a84034534541ba06bdf4ec5a20ca679b9301462343ebe95c765303423fb3918ab674e74f6a4a513a00abc0ae18c8d62313c8d45c7f90e10d985d330439d237090b8c5876828530e19c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x09", + "r" : "0x6bdf4ec5a20ca679b9301462343ebe95c765303423fb3918ab674e74f6a4a513", + "s" : "0x0abc0ae18c8d62313c8d45c7f90e10d985d330439d237090b8c5876828530e19", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020140", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "c78590ae4eb4fba7983a7e977c690d83905bb2bb80fbbd5d746ad51961cc4ad0", + "mixHash" : "b48694f5124f79b8e75b9e4352a1b419bf7a3fb05dc3570e2882732429ef0259", + "nonce" : "d4efc962319dcda8", + "number" : "0x06", + "parentHash" : "fbedf21a34748486fe2a38f0bc0c6dbccbcd98c63b9d3d61ff8d78d2de84d40e", + "receiptTrie" : "09dc807de130592aa96b0d5893bab04708e50dc0883d3b111979dacef962af75", + "stateRoot" : "ca72c4f313be8880e105bfc0268f0c20454eebe3a7d0caa95d34289dbcbe02e3", + "timestamp" : "0x561bc290", + "transactionsTrie" : "5f31e2e5a30a7b18521d0e07a2ab4108d2f4d784fb881c6b6636438749421889", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "6", + "rlp" : "0xf90264f901f9a0fbedf21a34748486fe2a38f0bc0c6dbccbcd98c63b9d3d61ff8d78d2de84d40ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ca72c4f313be8880e105bfc0268f0c20454eebe3a7d0caa95d34289dbcbe02e3a05f31e2e5a30a7b18521d0e07a2ab4108d2f4d784fb881c6b6636438749421889a009dc807de130592aa96b0d5893bab04708e50dc0883d3b111979dacef962af75b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882531884561bc29080a0b48694f5124f79b8e75b9e4352a1b419bf7a3fb05dc3570e2882732429ef025988d4efc962319dcda8f865f8630501827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca06cd8730922f0365c029f9f9ac93572648d63828b79f73089fcad4a0d5cbd3a40a009ef5a554c5bcbcfc08f74cff5c792ab00ab6c5381879d38dd82c2869f0c46abc0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x05", + "r" : "0x6cd8730922f0365c029f9f9ac93572648d63828b79f73089fcad4a0d5cbd3a40", + "s" : "0x09ef5a554c5bcbcfc08f74cff5c792ab00ab6c5381879d38dd82c2869f0c46ab", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020180", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "4076ab509b6ce1cf7ea2422ed353cec70fd6cb7105a2d6316ce6fa512b041d20", + "mixHash" : "109d2bec84f810141aae72c85051c2382da14194f2e7c67d26ed2246d7272f73", + "nonce" : "fb8d4a5974be6cb0", + "number" : "0x07", + "parentHash" : "c78590ae4eb4fba7983a7e977c690d83905bb2bb80fbbd5d746ad51961cc4ad0", + "receiptTrie" : "b3f90aefb7645e005d3460a25d593ef869c2b9f572fe747bf5b86c24a348fe96", + "stateRoot" : "e1609c0c8a3a685149baab60ddf248112db1ca7a3388d64c28c2bcab39f044be", + "timestamp" : "0x561bc293", + "transactionsTrie" : "147f49846280e400cae822f2af1bb784da8425f54a19fd7e0935a19490f7fb2d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "7", + "rlp" : "0xf90264f901f9a0c78590ae4eb4fba7983a7e977c690d83905bb2bb80fbbd5d746ad51961cc4ad0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e1609c0c8a3a685149baab60ddf248112db1ca7a3388d64c28c2bcab39f044bea0147f49846280e400cae822f2af1bb784da8425f54a19fd7e0935a19490f7fb2da0b3f90aefb7645e005d3460a25d593ef869c2b9f572fe747bf5b86c24a348fe96b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882531884561bc29380a0109d2bec84f810141aae72c85051c2382da14194f2e7c67d26ed2246d7272f7388fb8d4a5974be6cb0f865f8630601827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca07e70acee84a42818d84f28f786a98b5c33c7653b790a7944d099d3aa3b3c7021a041265590d491defd2958cf6f4f1aca208b5d8990e10d854d010c848bd7e46625c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x06", + "r" : "0x7e70acee84a42818d84f28f786a98b5c33c7653b790a7944d099d3aa3b3c7021", + "s" : "0x41265590d491defd2958cf6f4f1aca208b5d8990e10d854d010c848bd7e46625", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0201c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "5b4264b15cffe2a540f81be3a5fa5b1d5ba769c763d85f62b589e9deded76149", + "mixHash" : "e11a51cd9f634c49cd3561da308507fcbf0c5955f6e6fd5cba8e16a02e750c5f", + "nonce" : "554c406a7ef0dab5", + "number" : "0x08", + "parentHash" : "4076ab509b6ce1cf7ea2422ed353cec70fd6cb7105a2d6316ce6fa512b041d20", + "receiptTrie" : "29a860c3eb7e6ff402609383614bd45bd11e9da4d8911e6aee4f5dc9d25f15e3", + "stateRoot" : "b45c2ff147d35b4129e25c9de330e4ae1bb4ce910948fcc87af66872d17bfc4b", + "timestamp" : "0x561bc296", + "transactionsTrie" : "495ea8ab7d66db446e7d3838217f79b4124f308e5ff3efc8d134c4cb58f4f7b8", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "8", + "rlp" : "0xf90264f901f9a04076ab509b6ce1cf7ea2422ed353cec70fd6cb7105a2d6316ce6fa512b041d20a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b45c2ff147d35b4129e25c9de330e4ae1bb4ce910948fcc87af66872d17bfc4ba0495ea8ab7d66db446e7d3838217f79b4124f308e5ff3efc8d134c4cb58f4f7b8a029a860c3eb7e6ff402609383614bd45bd11e9da4d8911e6aee4f5dc9d25f15e3b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd882531884561bc29680a0e11a51cd9f634c49cd3561da308507fcbf0c5955f6e6fd5cba8e16a02e750c5f88554c406a7ef0dab5f865f8630701827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca01d5aae4f5a300783d45f11113815602443f4302dea304a86c02162184b0afe5ea04b9185f4227a2fd0d787cfee518771ac7d77c9976f4dc9f0ae5668fc3c04290cc0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x07", + "r" : "0x1d5aae4f5a300783d45f11113815602443f4302dea304a86c02162184b0afe5e", + "s" : "0x4b9185f4227a2fd0d787cfee518771ac7d77c9976f4dc9f0ae5668fc3c04290c", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020200", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "d97a3efe8a1f2135450a2400a26f01635569d27bac630271eaed29cd3878963c", + "mixHash" : "56226e96e2607a7fff9381c594e317c20b22a12fbf6e0a62b09ba4054871ed25", + "nonce" : "511c814a065bec57", + "number" : "0x09", + "parentHash" : "5b4264b15cffe2a540f81be3a5fa5b1d5ba769c763d85f62b589e9deded76149", + "receiptTrie" : "824ab1b9444ff8080befa9df976eb91281175798a451ed93adf79e032a1fc586", + "stateRoot" : "e9b62127f4d472e777b75455dc4d794d41423d5e60e6ee7b0047a33604de875c", + "timestamp" : "0x561bc298", + "transactionsTrie" : "4860e1bee2bcad0d4006df7886f6d10b6f3a80511de6239a9bd775d0e904794f", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "9", + "rlp" : "0xf90264f901f9a05b4264b15cffe2a540f81be3a5fa5b1d5ba769c763d85f62b589e9deded76149a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e9b62127f4d472e777b75455dc4d794d41423d5e60e6ee7b0047a33604de875ca04860e1bee2bcad0d4006df7886f6d10b6f3a80511de6239a9bd775d0e904794fa0824ab1b9444ff8080befa9df976eb91281175798a451ed93adf79e032a1fc586b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd882531884561bc29880a056226e96e2607a7fff9381c594e317c20b22a12fbf6e0a62b09ba4054871ed2588511c814a065bec57f865f8630801827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca0238f2a43eaf64015941feedfb794589368680a6cfd2cdeb2bfeb7795bf791955a07deb40c6c9a8f1cc22c464d44a5bb1aea5b2d6866d601b2d17e02c95f5fa0889c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x08", + "r" : "0x238f2a43eaf64015941feedfb794589368680a6cfd2cdeb2bfeb7795bf791955", + "s" : "0x7deb40c6c9a8f1cc22c464d44a5bb1aea5b2d6866d601b2d17e02c95f5fa0889", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020240", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "56b1bac0e01fbad0c3048c510a94c774852e2a3b05f2d526ddd208c4cef5f678", + "mixHash" : "310a286733322d36fd039c7b92a4a5ed4cc13bc2f673abf9d8e5fccf53550ac3", + "nonce" : "6022a934ad1e28e2", + "number" : "0x0a", + "parentHash" : "d97a3efe8a1f2135450a2400a26f01635569d27bac630271eaed29cd3878963c", + "receiptTrie" : "18de9a2a00b2786af1e7de40b0c4265051e6a74bd1bb062cf772b548aebf645c", + "stateRoot" : "8265bcf82a68a5a4229645817dd84c02192a22229f1c96791987a178f6724cdb", + "timestamp" : "0x561bc299", + "transactionsTrie" : "1a4aee7a35738518c79f4116bbb30db856f70a6639fed5328369363c037e1efe", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "10", + "rlp" : "0xf90264f901f9a0d97a3efe8a1f2135450a2400a26f01635569d27bac630271eaed29cd3878963ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08265bcf82a68a5a4229645817dd84c02192a22229f1c96791987a178f6724cdba01a4aee7a35738518c79f4116bbb30db856f70a6639fed5328369363c037e1efea018de9a2a00b2786af1e7de40b0c4265051e6a74bd1bb062cf772b548aebf645cb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202400a832fefd882531884561bc29980a0310a286733322d36fd039c7b92a4a5ed4cc13bc2f673abf9d8e5fccf53550ac3886022a934ad1e28e2f865f8630901827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca039d9b193b7ee9b6fc52327c6a00d7889bd2e83ecdd21b62e43eb6372d5c73ee1a01f50df7b28e14bd8cf9fdc0b9844cf2f4829bc3849895335dde1b9868e971b8ec0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x09", + "r" : "0x39d9b193b7ee9b6fc52327c6a00d7889bd2e83ecdd21b62e43eb6372d5c73ee1", + "s" : "0x1f50df7b28e14bd8cf9fdc0b9844cf2f4829bc3849895335dde1b9868e971b8e", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020280", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5318", + "hash" : "92b0e92c7efebb4133f8cc5dadfdd8b150f66cc847265ffaddbd5c5ffe3a12ee", + "mixHash" : "9fc50180fb31201c4847ffd734649d102a2e3cbfbbfe73a729935acf6154bfca", + "nonce" : "1ab78880ef2395f9", + "number" : "0x0b", + "parentHash" : "56b1bac0e01fbad0c3048c510a94c774852e2a3b05f2d526ddd208c4cef5f678", + "receiptTrie" : "854889b909064364e484068a3087df44a99a124b400999d10f178caaa75ebbd9", + "stateRoot" : "44bb64baeda2b9cfe17c6f83e5edb8363c560a99852bf83e91bbaf3331cc9a10", + "timestamp" : "0x561bc29b", + "transactionsTrie" : "3c2fec7bc846c734618532ef4e993a5fda92432194de347d53f5cef76d30c1e0", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "11", + "rlp" : "0xf90264f901f9a056b1bac0e01fbad0c3048c510a94c774852e2a3b05f2d526ddd208c4cef5f678a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a044bb64baeda2b9cfe17c6f83e5edb8363c560a99852bf83e91bbaf3331cc9a10a03c2fec7bc846c734618532ef4e993a5fda92432194de347d53f5cef76d30c1e0a0854889b909064364e484068a3087df44a99a124b400999d10f178caaa75ebbd9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830202800b832fefd882531884561bc29b80a09fc50180fb31201c4847ffd734649d102a2e3cbfbbfe73a729935acf6154bfca881ab78880ef2395f9f865f8630a01827b1594095e7baea6a6c7c4c2dfeb977efac326af552d876484034534541ca07d8351788f4169e5624bd2ed423f82ea082b4c37c242bf7add0987f71c8770b0a04aa4274c635f76b4e7f9947ceb69cdd1ff6043b25f55b03eb29deff6eb1c2a89c0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x0a", + "r" : "0x7d8351788f4169e5624bd2ed423f82ea082b4c37c242bf7add0987f71c8770b0", + "s" : "0x4aa4274c635f76b4e7f9947ceb69cdd1ff6043b25f55b03eb29deff6eb1c2a89", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "16ebd564e7a999047c4eb0ec47ad0a1d74d4e2f7c49163451c862eb9e7002c77", + "mixHash" : "afdb3d489c1d07261943aba4962bda94c7372a427fcdd3f278fb329422d10b00", + "nonce" : "d3004badda221c8a", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0afdb3d489c1d07261943aba4962bda94c7372a427fcdd3f278fb329422d10b0088d3004badda221c8ac0c0", + "lastblockhash" : "92b0e92c7efebb4133f8cc5dadfdd8b150f66cc847265ffaddbd5c5ffe3a12ee", + "postState" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x028a", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x02fb474098f67f8cb8", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e6f10be", + "code" : "0x", + "nonce" : "0x0b", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e72a000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "sideChainWithMoreTransactions" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "80e8fbd6650adb12e3bbd9afbb818a88b085a1d6c51ce11cde1eac6b852f4a99", + "mixHash" : "ccf67f2617cd495bac2d0eeff99e9a35bae1ddbad5df29cb40f54e39775e504c", + "nonce" : "11b3122297cb1085", + "number" : "0x01", + "parentHash" : "b18e95d173beca340e5a4ee668805118fec055cf351dea6968d3981bb20d562b", + "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", + "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", + "timestamp" : "0x561bc29e", + "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "rlp" : "0xf90261f901f9a0b18e95d173beca340e5a4ee668805118fec055cf351dea6968d3981bb20d562ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc29e80a0ccf67f2617cd495bac2d0eeff99e9a35bae1ddbad5df29cb40f54e39775e504c8811b3122297cb1085f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x77c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8", + "s" : "0x3f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "3aa7ab886f8a1a8e075b51a65b3056616ee4b789aebb0326ef77e9ea7e3be61c", + "mixHash" : "31c3af6d9ad3f8a0bcf00080af864435b794d3b682d39df10b78ab57ae9efe57", + "nonce" : "2f76fd1a90f36fab", + "number" : "0x02", + "parentHash" : "80e8fbd6650adb12e3bbd9afbb818a88b085a1d6c51ce11cde1eac6b852f4a99", + "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", + "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", + "timestamp" : "0x561bc29f", + "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "rlp" : "0xf90260f901f9a080e8fbd6650adb12e3bbd9afbb818a88b085a1d6c51ce11cde1eac6b852f4a99a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc29f80a031c3af6d9ad3f8a0bcf00080af864435b794d3b682d39df10b78ab57ae9efe57882f76fd1a90f36fabf861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x33c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f23", + "s" : "0x1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cf", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "b1a98905fb5b9a564ffbc88d4e024eca7cb436e99875c055cd298580a5060eac", + "mixHash" : "1c2fb84975881d1730174447c27e7bfa4538623b1fc5f83fc10f27d3e317f850", + "nonce" : "6bfda34df23ea886", + "number" : "0x03", + "parentHash" : "3aa7ab886f8a1a8e075b51a65b3056616ee4b789aebb0326ef77e9ea7e3be61c", + "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", + "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", + "timestamp" : "0x561bc2a1", + "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "rlp" : "0xf90261f901f9a03aa7ab886f8a1a8e075b51a65b3056616ee4b789aebb0326ef77e9ea7e3be61ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc2a180a01c2fb84975881d1730174447c27e7bfa4538623b1fc5f83fc10f27d3e317f850886bfda34df23ea886f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x15eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0ee", + "s" : "0x5d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "fba63982e69572ef97a82f5eb194bfd7cffcbe19311934bae198e672a95711da", + "mixHash" : "a6efcbbf8236a0a6d110af8a3a8bf414f0f1f165e5717f618db77793ca688919", + "nonce" : "2f905a93f492ac4c", + "number" : "0x04", + "parentHash" : "b1a98905fb5b9a564ffbc88d4e024eca7cb436e99875c055cd298580a5060eac", + "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", + "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", + "timestamp" : "0x561bc2a3", + "transactionsTrie" : "9735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "rlp" : "0xf90261f901f9a0b1a98905fb5b9a564ffbc88d4e024eca7cb436e99875c055cd298580a5060eaca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc2a380a0a6efcbbf8236a0a6d110af8a3a8bf414f0f1f165e5717f618db77793ca688919882f905a93f492ac4cf862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0xa7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840d", + "s" : "0x2078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "7d878fcbffb04ad5f4e03be1a3fa92552097fbc4208fad458d19eb74aadb6f6f", + "mixHash" : "2a75899e2d8eaaab8eecff491854fae9cc248bda2ba295919560d5c92e3f3e95", + "nonce" : "c1ce06a3c9dc3a70", + "number" : "0x03", + "parentHash" : "3aa7ab886f8a1a8e075b51a65b3056616ee4b789aebb0326ef77e9ea7e3be61c", + "receiptTrie" : "e717fb2be39da3e69db18c84baa4b9a59ecfa3454ed7e0946468a91b8e93d2ea", + "stateRoot" : "f6dab66d4dd2727ba6c6bba0a434052435f3a82f68682af5d54093ccd81e4c40", + "timestamp" : "0x561bc2a5", + "transactionsTrie" : "8d4f70e47fd980bc4182bf6735e827a3ab98040b97bc27765aa69bedbc03aec1", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "rlp" : "0xf90262f901f9a03aa7ab886f8a1a8e075b51a65b3056616ee4b789aebb0326ef77e9ea7e3be61ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f6dab66d4dd2727ba6c6bba0a434052435f3a82f68682af5d54093ccd81e4c40a08d4f70e47fd980bc4182bf6735e827a3ab98040b97bc27765aa69bedbc03aec1a0e717fb2be39da3e69db18c84baa4b9a59ecfa3454ed7e0946468a91b8e93d2eab90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc2a580a02a75899e2d8eaaab8eecff491854fae9cc248bda2ba295919560d5c92e3f3e9588c1ce06a3c9dc3a70f863f861020182795394095e7baea6a6c7c4c2dfeb977efac326af552d8782012c801ba02c0496b83cb527e403cb3900d83856644a2359e9cc79ca5fbcf508d8c6c1506ca030cedfd3b5105bbf823116d858790f1c48ab545751cb870ffda6ba3663d9261dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x7953", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x2c0496b83cb527e403cb3900d83856644a2359e9cc79ca5fbcf508d8c6c1506c", + "s" : "0x30cedfd3b5105bbf823116d858790f1c48ab545751cb870ffda6ba3663d9261d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x012c" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0xa520", + "hash" : "dbfb11bb61198ac18fe07fcf14905d267e8653381be1fc20d16c1745d5d8726c", + "mixHash" : "8a42ac836d64a501594783d0bcfe68f650f86cb22f1896aac79a6abfbc7bfd62", + "nonce" : "91505a95971d67e8", + "number" : "0x04", + "parentHash" : "7d878fcbffb04ad5f4e03be1a3fa92552097fbc4208fad458d19eb74aadb6f6f", + "receiptTrie" : "368484ef2c8bdcafb5d2e340a17d83b82d50c29c91f268051de96a5bf5f16dfd", + "stateRoot" : "27a720e49b1e3c02dec03b9bfaa2273da60749d5c1231e9b2288dd1a0e3990fe", + "timestamp" : "0x561bc2a7", + "transactionsTrie" : "18878c3d8dd8cb593b98cacaf25ecdba2efb1a93d5597b2ca23d06f34f7fec4c", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "rlp" : "0xf902c9f901f9a07d878fcbffb04ad5f4e03be1a3fa92552097fbc4208fad458d19eb74aadb6f6fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a027a720e49b1e3c02dec03b9bfaa2273da60749d5c1231e9b2288dd1a0e3990fea018878c3d8dd8cb593b98cacaf25ecdba2efb1a93d5597b2ca23d06f34f7fec4ca0368484ef2c8bdcafb5d2e340a17d83b82d50c29c91f268051de96a5bf5f16dfdb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882a52084561bc2a780a08a42ac836d64a501594783d0bcfe68f650f86cb22f1896aac79a6abfbc7bfd628891505a95971d67e8f8caf8650301827b1594095e7baea6a6c7c4c2dfeb977efac326af552d8782012c84034534541ba0cd40a210ac0630db56ac26feb53cfa84d9ae86d43c2eb3e3735471c6a3fd2383a0572ef18095e34cc33dbd39bfac3e0ff1c247ffddb2dcc00848cc79706c0fdf65f8610401827b1594195e7baea6a6c7c4c2dfeb977efac326af552d8782012c801ca0f38917a475a084e24157a3e7891a1f53dacccab6a356e572cba058acefdafbb4a078d191c413c17012ee28e17be529cc1136bb1ca8736de3df6856a3a26bf7135fc0", + "transactions" : [ + { + "data" : "0x03453454", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0xcd40a210ac0630db56ac26feb53cfa84d9ae86d43c2eb3e3735471c6a3fd2383", + "s" : "0x572ef18095e34cc33dbd39bfac3e0ff1c247ffddb2dcc00848cc79706c0fdf65", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x012c" + }, + { + "data" : "0x", + "gasLimit" : "0x7b15", + "gasPrice" : "0x01", + "nonce" : "0x04", + "r" : "0xf38917a475a084e24157a3e7891a1f53dacccab6a356e572cba058acefdafbb4", + "s" : "0x78d191c413c17012ee28e17be529cc1136bb1ca8736de3df6856a3a26bf7135f", + "to" : "195e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x012c" + } + ], + "uncleHeaders" : [ + ] + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "b18e95d173beca340e5a4ee668805118fec055cf351dea6968d3981bb20d562b", + "mixHash" : "13b2996a8e385ca1602b574e7b80df8439786fa7083ba950bd7d08cf1cc1ed05", + "nonce" : "135f5b9eeea5c8a7", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a013b2996a8e385ca1602b574e7b80df8439786fa7083ba950bd7d08cf1cc1ed0588135f5b9eeea5c8a7c0c0", + "lastblockhash" : "fba63982e69572ef97a82f5eb194bfd7cffcbe19311934bae198e672a95711da", + "postState" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x28", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x01158e460913d14820", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e7157b8", + "code" : "0x", + "nonce" : "0x04", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e72a000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "sideChainWithNewMaxDifficultyStartingFromBlock3AfterBlock4" : { + "blocks" : [ + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "1a67e038e3aaf18fc50c81a8f0515969588e07a6fdadf9d021c77dc314cf1819", + "mixHash" : "29c72554b10550842e4281c7a9e73e18bae70007b3f3a6a8877644535932b91f", + "nonce" : "b298b230472ae036", + "number" : "0x01", + "parentHash" : "2d20092a519e2a339f5e5f3f7b1d870f0b70fcb2cef1755aefb6214e1b91d15f", + "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", + "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", + "timestamp" : "0x561bc2a9", + "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "1", + "rlp" : "0xf90261f901f9a02d20092a519e2a339f5e5f3f7b1d870f0b70fcb2cef1755aefb6214e1b91d15fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc2a980a029c72554b10550842e4281c7a9e73e18bae70007b3f3a6a8877644535932b91f88b298b230472ae036f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x00", + "r" : "0x77c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8", + "s" : "0x3f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288d", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "bdf133aef4c92c3dbafcad6dca45575e1865fc5e1b29c9d2fd005d0bf79c4555", + "mixHash" : "5b91f7c91089941d6bc4c2f508130dbd0806f571d8c3e5cca4d384466df974de", + "nonce" : "6171b8aa45083bed", + "number" : "0x02", + "parentHash" : "1a67e038e3aaf18fc50c81a8f0515969588e07a6fdadf9d021c77dc314cf1819", + "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", + "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", + "timestamp" : "0x561bc2ab", + "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "2", + "rlp" : "0xf90260f901f9a01a67e038e3aaf18fc50c81a8f0515969588e07a6fdadf9d021c77dc314cf1819a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc2ab80a05b91f7c91089941d6bc4c2f508130dbd0806f571d8c3e5cca4d384466df974de886171b8aa45083bedf861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x33c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f23", + "s" : "0x1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cf", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "31c8a896c183706fca5a9f5ebad56b40680fbe60a6f3ced93234bfeeae289573", + "mixHash" : "d79c0e5649c2eb0952a6ad9bd6d71414b163624ca25b7529e0b18f717fcafab0", + "nonce" : "e251e4fd4fe6f798", + "number" : "0x03", + "parentHash" : "bdf133aef4c92c3dbafcad6dca45575e1865fc5e1b29c9d2fd005d0bf79c4555", + "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", + "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", + "timestamp" : "0x561bc2ad", + "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "3", + "rlp" : "0xf90261f901f9a0bdf133aef4c92c3dbafcad6dca45575e1865fc5e1b29c9d2fd005d0bf79c4555a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc2ad80a0d79c0e5649c2eb0952a6ad9bd6d71414b163624ca25b7529e0b18f717fcafab088e251e4fd4fe6f798f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x15eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0ee", + "s" : "0x5d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1c", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "cbefee8aa8badf4c5962ac3e501160a92ca6358ed68894520868bf5ce61b6b5a", + "mixHash" : "f832ab813f35e7527eb710d145b40aefecde4f35153cc994685e84b68cd0436c", + "nonce" : "c5787e01d2e1f9e1", + "number" : "0x04", + "parentHash" : "31c8a896c183706fca5a9f5ebad56b40680fbe60a6f3ced93234bfeeae289573", + "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", + "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", + "timestamp" : "0x561bc2af", + "transactionsTrie" : "9735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "rlp" : "0xf90261f901f9a031c8a896c183706fca5a9f5ebad56b40680fbe60a6f3ced93234bfeeae289573a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc2af80a0f832ab813f35e7527eb710d145b40aefecde4f35153cc994685e84b68cd0436c88c5787e01d2e1f9e1f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0xa7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840d", + "s" : "0x2078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x0a" + } + ], + "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020080", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "5b94997c5c90a45f6fe9bceba0fdea359c2e06587be816cdb23c8eb1910e51bd", + "mixHash" : "3915a32b307dbf9b59d0061fdce653d85460808bfc61c48169222bc4e0ccce85", + "nonce" : "c15c20bbb53e2d5a", + "number" : "0x03", + "parentHash" : "bdf133aef4c92c3dbafcad6dca45575e1865fc5e1b29c9d2fd005d0bf79c4555", + "receiptTrie" : "1a75f7353da817d5fa53a92b71ded6c674c81bb476cecb9e420f7344cb5640df", + "stateRoot" : "d0efb45df115aff7ee8ea325f6c2fbda2f7aa5169029bac0bd6c357f8291a51e", + "timestamp" : "0x561bc2b3", + "transactionsTrie" : "c49b79ff0d5d6d01c6647e54b273de59aee2a05dc5e4fd06f6c7752637cab353", + "uncleHash" : "eedb5f698bb3572539211f3daf4d2b8c12f33b1c89936e433b4cc6adec092c29" + }, + "blocknumber" : "3", + "rlp" : "0xf9045df901f9a0bdf133aef4c92c3dbafcad6dca45575e1865fc5e1b29c9d2fd005d0bf79c4555a0eedb5f698bb3572539211f3daf4d2b8c12f33b1c89936e433b4cc6adec092c29948888f1f195afa192cfee860698584c030f4c9db1a0d0efb45df115aff7ee8ea325f6c2fbda2f7aa5169029bac0bd6c357f8291a51ea0c49b79ff0d5d6d01c6647e54b273de59aee2a05dc5e4fd06f6c7752637cab353a01a75f7353da817d5fa53a92b71ded6c674c81bb476cecb9e420f7344cb5640dfb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc2b380a03915a32b307dbf9b59d0061fdce653d85460808bfc61c48169222bc4e0ccce8588c15c20bbb53e2d5af862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0276bcc58edef1b711670d795666908f912e27482081cd017313ba92b935a19c1a00e2dd822223a07eac2384486ef2cf68a7ae2817aa1e884cc6c2c4728e48eb2fbf901faf901f7a01a67e038e3aaf18fc50c81a8f0515969588e07a6fdadf9d021c77dc314cf1819a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc2b180a09be83ed24de4fd5326a8924ad194c09ef10ec79eae4d2e237bc04417f6d0163688cb8ab31a069b45f9", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x02", + "r" : "0x276bcc58edef1b711670d795666908f912e27482081cd017313ba92b935a19c1", + "s" : "0x0e2dd822223a07eac2384486ef2cf68a7ae2817aa1e884cc6c2c4728e48eb2fb", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" + } + ], + "uncleHeaders" : [ + { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "0000000000000000000000000000000000000000", + "difficulty" : "0x020040", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "7316afcaaf1a02affe9c627023aab1d18f281f43bfd533cce252cb8e22c937ee", + "mixHash" : "9be83ed24de4fd5326a8924ad194c09ef10ec79eae4d2e237bc04417f6d01636", + "nonce" : "cb8ab31a069b45f9", + "number" : "0x02", + "parentHash" : "1a67e038e3aaf18fc50c81a8f0515969588e07a6fdadf9d021c77dc314cf1819", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", + "timestamp" : "0x561bc2b1", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + } + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0200c0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "2e6e869ced61aa0b803037b43f809648b4db44deb78dc2ae71bb329be08b9ef3", + "mixHash" : "e2006cdc21c61049b0a5f5db89bfef7d5da6a9b42b2e6edf4d6345cac7f80148", + "nonce" : "10a04d8325678f82", + "number" : "0x04", + "parentHash" : "5b94997c5c90a45f6fe9bceba0fdea359c2e06587be816cdb23c8eb1910e51bd", + "receiptTrie" : "624aeafaccf0a5ea7f74b2b54bde552f972333fac26ee9abfd974869833ffcfb", + "stateRoot" : "da2527131761beffd56ab13ee4c5acbd4148a5306ea8bd49ca326c4e8779e545", + "timestamp" : "0x561bc2b4", + "transactionsTrie" : "1747033ae8b28f1e0ab563a95deb7aec0fc0bc6d26f200c536b0a8b386e4802d", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "blocknumber" : "4", + "rlp" : "0xf90261f901f9a05b94997c5c90a45f6fe9bceba0fdea359c2e06587be816cdb23c8eb1910e51bda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0da2527131761beffd56ab13ee4c5acbd4148a5306ea8bd49ca326c4e8779e545a01747033ae8b28f1e0ab563a95deb7aec0fc0bc6d26f200c536b0a8b386e4802da0624aeafaccf0a5ea7f74b2b54bde552f972333fac26ee9abfd974869833ffcfbb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc2b480a0e2006cdc21c61049b0a5f5db89bfef7d5da6a9b42b2e6edf4d6345cac7f801488810a04d8325678f82f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ba0f3de61997e78562f49a99817d170c3c3061b953dac12464c4b78c778f8c46f30a06a2bd676f1b4d3bc9e3749907fe120acbb266cc61a064e81a6614398fd3f35cdc0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x03", + "r" : "0xf3de61997e78562f49a99817d170c3c3061b953dac12464c4b78c778f8c46f30", + "s" : "0x6a2bd676f1b4d3bc9e3749907fe120acbb266cc61a064e81a6614398fd3f35cd", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x64" } ], "uncleHeaders" : [ @@ -2673,30 +4750,30 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "6e71a0017eef7ae579f13ada9a122ca40af285bb2730ed68865c2dcd80671602", - "mixHash" : "53bfb60acab1bdf035d6b7a086f70eae26e90b6b8d943afb2c7d6260dc19c6e5", - "nonce" : "925732b679cfce63", + "hash" : "6ca87825c7b214f2bd81ae8c2dc08a608da4fde9e952f732fbfdacd5b160c860", + "mixHash" : "3f0e61dea5563ab83e0d67147e550e8079369a2d6f7960eb47f82c66de10aad9", + "nonce" : "e7c2d4309ec81ebb", "number" : "0x05", - "parentHash" : "d1f07592f48468bdc77f1eee1f02050bbd4bac964d481384b2c3a52dde3b9535", - "receiptTrie" : "db8efe763f716f102342a8cd97967e46efbc88a624d881c510a635a0b00e4b6d", - "stateRoot" : "04a6ee3e7ac94383e9dc8f8a44374396bdcfbbfd878e7be001a71048214215e2", - "timestamp" : "0x55b7e462", - "transactionsTrie" : "af8cefaa1a81b1492cb53a024b9caf2f2af609c3e89ccf56b846cfe337c2a358", + "parentHash" : "2e6e869ced61aa0b803037b43f809648b4db44deb78dc2ae71bb329be08b9ef3", + "receiptTrie" : "14faa1ec75b57806abb6cadf38afb9d3b42dbc4eceeeded515bdc0ed85e5141d", + "stateRoot" : "dee2e13ec81e27c6292d084d7e747b85ef52c1de4d35fd532e701e4648f09d56", + "timestamp" : "0x561bc2b6", + "transactionsTrie" : "43fc7d2de0ca811ddc51ed5920389da581815ba28e3fee2336896f5fc2464e08", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "5", - "rlp" : "0xf90261f901f9a0d1f07592f48468bdc77f1eee1f02050bbd4bac964d481384b2c3a52dde3b9535a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a004a6ee3e7ac94383e9dc8f8a44374396bdcfbbfd878e7be001a71048214215e2a0af8cefaa1a81b1492cb53a024b9caf2f2af609c3e89ccf56b846cfe337c2a358a0db8efe763f716f102342a8cd97967e46efbc88a624d881c510a635a0b00e4b6db90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd88252088455b7e46280a053bfb60acab1bdf035d6b7a086f70eae26e90b6b8d943afb2c7d6260dc19c6e588925732b679cfce63f862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8711801ca063ba3a1308f172a9ced8bd00003bfda5d62337f794edb9c7616297860ec2b8a7a0276036bb52d95999352c6ab7fcfcc54b6394a783d6e9cbed746da33c6010def7c0", + "rlp" : "0xf90261f901f9a02e6e869ced61aa0b803037b43f809648b4db44deb78dc2ae71bb329be08b9ef3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0dee2e13ec81e27c6292d084d7e747b85ef52c1de4d35fd532e701e4648f09d56a043fc7d2de0ca811ddc51ed5920389da581815ba28e3fee2336896f5fc2464e08a014faa1ec75b57806abb6cadf38afb9d3b42dbc4eceeeded515bdc0ed85e5141db90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bc2b680a03f0e61dea5563ab83e0d67147e550e8079369a2d6f7960eb47f82c66de10aad988e7c2d4309ec81ebbf862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8764801ca0dafc491980deb11e0a1100f6dd35f677f425a2c2bea9cc4412e81ff1ca126d93a042f5a5e0453b6e5e1e73d78a3f73b41be1655611341e76f47ac0a7b163607108c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0x04cb2f", "gasPrice" : "0x01", "nonce" : "0x04", - "r" : "0x63ba3a1308f172a9ced8bd00003bfda5d62337f794edb9c7616297860ec2b8a7", - "s" : "0x276036bb52d95999352c6ab7fcfcc54b6394a783d6e9cbed746da33c6010def7", + "r" : "0xdafc491980deb11e0a1100f6dd35f677f425a2c2bea9cc4412e81ff1ca126d93", + "s" : "0x42f5a5e0453b6e5e1e73d78a3f73b41be1655611341e76f47ac0a7b163607108", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "v" : "0x1c", - "value" : "0x11" + "value" : "0x64" } ], "uncleHeaders" : [ @@ -2710,9 +4787,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "8bea506bd3c2e99a744d2bf402e30a2a65d54a68ae9088b1596caec530714fa3", - "mixHash" : "6f594dcb82aab2e5ba1b7dae8211807146c03ffc864f0971577c93de08d8d9f2", - "nonce" : "affd6ecd3b284756", + "hash" : "2d20092a519e2a339f5e5f3f7b1d870f0b70fcb2cef1755aefb6214e1b91d15f", + "mixHash" : "7d52c2a8fa0ddf0ecca1262a3966df55e5652f217459ca6a8c3adc89cd0bad0b", + "nonce" : "76b73a4363e50e2c", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -2721,25 +4798,32 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a06f594dcb82aab2e5ba1b7dae8211807146c03ffc864f0971577c93de08d8d9f288affd6ecd3b284756c0c0", - "lastblockhash" : "6e71a0017eef7ae579f13ada9a122ca40af285bb2730ed68865c2dcd80671602", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a07d52c2a8fa0ddf0ecca1262a3966df55e5652f217459ca6a8c3adc89cd0bad0b8876b73a4363e50e2cc0c0", + "lastblockhash" : "6ca87825c7b214f2bd81ae8c2dc08a608da4fde9e952f732fbfdacd5b160c860", "postState" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0x3cb71f51fc558000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x2d", + "balance" : "0x0140", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "8888f1f195afa192cfee860698584c030f4c9db1" : { - "balance" : "0x0199d413696742ba28", + "balance" : "0x015d1cf4176aed3a28", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x09184e7105ab", + "balance" : "0x09184e710498", "code" : "0x", "nonce" : "0x05", "storage" : { @@ -2766,19 +4850,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "95e95342c30d888857c7f33c15bf748a2404793fe80f970fb8ba01803262a993", - "mixHash" : "8c62aa956ca37d3320528a730c39544e1c15cc9d0606e3f318e1dbe2b2e3f648", - "nonce" : "c02249bddeee9ac9", + "hash" : "2bc42f762ccbe65c374070a41a1f45f0c61e42b32d83e29521e8daf4c78372a4", + "mixHash" : "f8bdf4cb3cb45ce1759a02aebb8e185ff0acebf30e6af41220718403d3c7e1e5", + "nonce" : "19c1b5493577d552", "number" : "0x01", - "parentHash" : "60af7acdde0034c7731526e811cd99e15859f9e5ba2f237d35acdd494b521719", + "parentHash" : "f1ee7baa8bd141bc61dc8fb699115b9177a684b5a7caad720fe9ccb5a97ddd0f", "receiptTrie" : "358f2486c1c65fc5b23db7b5523b64a24debf697e23ef45c8cd1c86775d924c2", "stateRoot" : "df1828588eefd69fe6fd029dfdfe0d0a669559b3d4143f3c3bfd76a838c73a23", - "timestamp" : "0x55b7e465", + "timestamp" : "0x561bc2bb", "transactionsTrie" : "1539b31ea0fa548996a2f64f4d86cadb9c97f2c9ca7923218fe0d38ea5ba1c75", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "1", - "rlp" : "0xf90261f901f9a060af7acdde0034c7731526e811cd99e15859f9e5ba2f237d35acdd494b521719a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0df1828588eefd69fe6fd029dfdfe0d0a669559b3d4143f3c3bfd76a838c73a23a01539b31ea0fa548996a2f64f4d86cadb9c97f2c9ca7923218fe0d38ea5ba1c75a0358f2486c1c65fc5b23db7b5523b64a24debf697e23ef45c8cd1c86775d924c2b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e46580a08c62aa956ca37d3320528a730c39544e1c15cc9d0606e3f318e1dbe2b2e3f64888c02249bddeee9ac9f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8701801ca0f95ddcbc36fb927c225810016715b2ebb5478efcdeb241ee8816e590c1e42559a051012cc60ee68f0d042f6e148550acafb3f306a381e69d003909c30acb15ff56c0", + "rlp" : "0xf90261f901f9a0f1ee7baa8bd141bc61dc8fb699115b9177a684b5a7caad720fe9ccb5a97ddd0fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0df1828588eefd69fe6fd029dfdfe0d0a669559b3d4143f3c3bfd76a838c73a23a01539b31ea0fa548996a2f64f4d86cadb9c97f2c9ca7923218fe0d38ea5ba1c75a0358f2486c1c65fc5b23db7b5523b64a24debf697e23ef45c8cd1c86775d924c2b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc2bb80a0f8bdf4cb3cb45ce1759a02aebb8e185ff0acebf30e6af41220718403d3c7e1e58819c1b5493577d552f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8701801ca0f95ddcbc36fb927c225810016715b2ebb5478efcdeb241ee8816e590c1e42559a051012cc60ee68f0d042f6e148550acafb3f306a381e69d003909c30acb15ff56c0", "transactions" : [ { "data" : "0x", @@ -2803,19 +4887,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "2ab1a85c252fdd793eb9ce67dadfe372947570770e6324285309d052b4b2af78", - "mixHash" : "60ed034d6df447a83d8a513d5f4821f240941d404e32dc50ca3e3f1f04439068", - "nonce" : "ca59d006d6a00dc5", + "hash" : "1c9a505b12e1bdf2228c69bd3071e2fafebc5b6a7bb17c1e32aab7534551b3ba", + "mixHash" : "3cac099f8d09c8f2c11877004664966538aee4657967808fc6f52d9939c13662", + "nonce" : "583a4d3228090889", "number" : "0x02", - "parentHash" : "95e95342c30d888857c7f33c15bf748a2404793fe80f970fb8ba01803262a993", + "parentHash" : "2bc42f762ccbe65c374070a41a1f45f0c61e42b32d83e29521e8daf4c78372a4", "receiptTrie" : "4a4d62f18220fc8184296c5b41f9396c0fbf7ae13aa723e3d7bf2b0998f11585", "stateRoot" : "0b8ede77b7e7d9be057bbf41fc02acbb84a4f934848ff63b53b61347544eae7e", - "timestamp" : "0x55b7e467", + "timestamp" : "0x561bc2be", "transactionsTrie" : "1dc43d9a5f5fefc8664903164d46adf3a98248d858a885558916dd8d73f5166c", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "2", - "rlp" : "0xf90261f901f9a095e95342c30d888857c7f33c15bf748a2404793fe80f970fb8ba01803262a993a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00b8ede77b7e7d9be057bbf41fc02acbb84a4f934848ff63b53b61347544eae7ea01dc43d9a5f5fefc8664903164d46adf3a98248d858a885558916dd8d73f5166ca04a4d62f18220fc8184296c5b41f9396c0fbf7ae13aa723e3d7bf2b0998f11585b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e46780a060ed034d6df447a83d8a513d5f4821f240941d404e32dc50ca3e3f1f0443906888ca59d006d6a00dc5f862f86001018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8703801ba028fc37782401456825e0faa1a1f8e1e034d8047f29cf44d21d29f55ce0b8159ea00cac7f7c3e6e141c14e9465a9f1e11705f17f93d637996c9a19f82f69f2aafb8c0", + "rlp" : "0xf90261f901f9a02bc42f762ccbe65c374070a41a1f45f0c61e42b32d83e29521e8daf4c78372a4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00b8ede77b7e7d9be057bbf41fc02acbb84a4f934848ff63b53b61347544eae7ea01dc43d9a5f5fefc8664903164d46adf3a98248d858a885558916dd8d73f5166ca04a4d62f18220fc8184296c5b41f9396c0fbf7ae13aa723e3d7bf2b0998f11585b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc2be80a03cac099f8d09c8f2c11877004664966538aee4657967808fc6f52d9939c1366288583a4d3228090889f862f86001018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8703801ba028fc37782401456825e0faa1a1f8e1e034d8047f29cf44d21d29f55ce0b8159ea00cac7f7c3e6e141c14e9465a9f1e11705f17f93d637996c9a19f82f69f2aafb8c0", "transactions" : [ { "data" : "0x", @@ -2840,19 +4924,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "563c60a882739e1cc305af44f4e368051d24b23fd332f323adf6364d7b76482d", - "mixHash" : "3fc800c34db50abd75c53d386f7df017790edb086304ccb5fc9d663575e3f424", - "nonce" : "4f25df19c20dadfa", + "hash" : "c41d29e7e1799ecab155501d37e8aa24af474874db32c71d404a7901b718d772", + "mixHash" : "beb30856c2ef70d99cfe31825f17faa12993e0bba78345e8b6674be6b973659a", + "nonce" : "eccde6ee800cc4ee", "number" : "0x03", - "parentHash" : "2ab1a85c252fdd793eb9ce67dadfe372947570770e6324285309d052b4b2af78", + "parentHash" : "1c9a505b12e1bdf2228c69bd3071e2fafebc5b6a7bb17c1e32aab7534551b3ba", "receiptTrie" : "73416e6c3adc0c359a37e3b067cac1794519ce3e1ff2ef159039994ac096778b", "stateRoot" : "1fda723d5d44c3e1bf4f9f624d804ad1d39a60e26c1b190ffb8a90974752a686", - "timestamp" : "0x55b7e468", + "timestamp" : "0x561bc2bf", "transactionsTrie" : "8978964c37007b0091eb3e3489639ea5a5adbf295b717ab9f0c01895f97f5147", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90261f901f9a02ab1a85c252fdd793eb9ce67dadfe372947570770e6324285309d052b4b2af78a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01fda723d5d44c3e1bf4f9f624d804ad1d39a60e26c1b190ffb8a90974752a686a08978964c37007b0091eb3e3489639ea5a5adbf295b717ab9f0c01895f97f5147a073416e6c3adc0c359a37e3b067cac1794519ce3e1ff2ef159039994ac096778bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e46880a03fc800c34db50abd75c53d386f7df017790edb086304ccb5fc9d663575e3f424884f25df19c20dadfaf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8705801ca06b1c1f6f2ac96f1d898113dbc02465001044fb7330cf7554d569ffec31c14839a0737e986047bf3d15120f8ed04a414bb827237a6346b52a90745ae0ae6334e4a1c0", + "rlp" : "0xf90261f901f9a01c9a505b12e1bdf2228c69bd3071e2fafebc5b6a7bb17c1e32aab7534551b3baa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01fda723d5d44c3e1bf4f9f624d804ad1d39a60e26c1b190ffb8a90974752a686a08978964c37007b0091eb3e3489639ea5a5adbf295b717ab9f0c01895f97f5147a073416e6c3adc0c359a37e3b067cac1794519ce3e1ff2ef159039994ac096778bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc2bf80a0beb30856c2ef70d99cfe31825f17faa12993e0bba78345e8b6674be6b973659a88eccde6ee800cc4eef862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8705801ca06b1c1f6f2ac96f1d898113dbc02465001044fb7330cf7554d569ffec31c14839a0737e986047bf3d15120f8ed04a414bb827237a6346b52a90745ae0ae6334e4a1c0", "transactions" : [ { "data" : "0x", @@ -2877,19 +4961,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "b9fd99093fa73fa9398f29f84b6058d497ea041326a4b808fc8f43a904e7c1b0", - "mixHash" : "dcee4fb88eaa940efbb05d6b76952fe83171be8cffdef1841425d05abb01765f", - "nonce" : "817ab22e7446969c", + "hash" : "28b9f51c52d25fc41f8ad25d2bfee161f68f5a0942481534d3e01d6365f2befb", + "mixHash" : "f1857a058b87f740fc2522bd508a88a8bca2e4d1cc9943a3b48c4808f508f1ac", + "nonce" : "9a2031d5ea13ed49", "number" : "0x03", - "parentHash" : "2ab1a85c252fdd793eb9ce67dadfe372947570770e6324285309d052b4b2af78", + "parentHash" : "1c9a505b12e1bdf2228c69bd3071e2fafebc5b6a7bb17c1e32aab7534551b3ba", "receiptTrie" : "bf3b7a39595e2196e8be802213fa44618edab9b33a2f0717fb904b34a06430dc", - "stateRoot" : "985f850fb72b698a98c84c097dccc4cf2e8c031be0643c7f0418c3e40ff0f6e7", - "timestamp" : "0x55b7e46a", + "stateRoot" : "6f7b6e4df52ac19eab4d587cf860ddaa8816f4c45c2bc7ec58d75ddf41cfc02b", + "timestamp" : "0x561bc2c6", "transactionsTrie" : "582d246aa9271772d565ffde8a2f76929622ccc2e73c1fa9f6fc5d1ce7209fb7", - "uncleHash" : "64ef831ba4f72c3fa5af891132bb741ee2a305ad724ae2c7505db63a863281c3" + "uncleHash" : "20572b3c9b62981ce29c1de7fc07a83d6af3290dfd7eb34a852c5b6284097c37" }, "blocknumber" : "3", - "rlp" : "0xf9045df901f9a02ab1a85c252fdd793eb9ce67dadfe372947570770e6324285309d052b4b2af78a064ef831ba4f72c3fa5af891132bb741ee2a305ad724ae2c7505db63a863281c3948888f1f195afa192cfee860698584c030f4c9db1a0985f850fb72b698a98c84c097dccc4cf2e8c031be0643c7f0418c3e40ff0f6e7a0582d246aa9271772d565ffde8a2f76929622ccc2e73c1fa9f6fc5d1ce7209fb7a0bf3b7a39595e2196e8be802213fa44618edab9b33a2f0717fb904b34a06430dcb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e46a80a0dcee4fb88eaa940efbb05d6b76952fe83171be8cffdef1841425d05abb01765f88817ab22e7446969cf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8707801ba0b2f92882853ce993eb018d89be06502b909e5374412b252703f291b1e0ddac33a073cf199dd59fb906fc88f9dfaa0efe1ad58c6bbcf6c98472eddd24b08544134df901faf901f7a095e95342c30d888857c7f33c15bf748a2404793fe80f970fb8ba01803262a993a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0df1828588eefd69fe6fd029dfdfe0d0a669559b3d4143f3c3bfd76a838c73a23a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e46a80a0cee8a15c1bd01a7ced83b015f14df6f8900b90fa20f9c1ab2089ddae34ed96cc88fa223c8cfc4d184a", + "rlp" : "0xf9045df901f9a01c9a505b12e1bdf2228c69bd3071e2fafebc5b6a7bb17c1e32aab7534551b3baa020572b3c9b62981ce29c1de7fc07a83d6af3290dfd7eb34a852c5b6284097c37948888f1f195afa192cfee860698584c030f4c9db1a06f7b6e4df52ac19eab4d587cf860ddaa8816f4c45c2bc7ec58d75ddf41cfc02ba0582d246aa9271772d565ffde8a2f76929622ccc2e73c1fa9f6fc5d1ce7209fb7a0bf3b7a39595e2196e8be802213fa44618edab9b33a2f0717fb904b34a06430dcb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc2c680a0f1857a058b87f740fc2522bd508a88a8bca2e4d1cc9943a3b48c4808f508f1ac889a2031d5ea13ed49f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8707801ba0b2f92882853ce993eb018d89be06502b909e5374412b252703f291b1e0ddac33a073cf199dd59fb906fc88f9dfaa0efe1ad58c6bbcf6c98472eddd24b08544134df901faf901f7a02bc42f762ccbe65c374070a41a1f45f0c61e42b32d83e29521e8daf4c78372a4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0df1828588eefd69fe6fd029dfdfe0d0a669559b3d4143f3c3bfd76a838c73a23a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc2c280a0b191498dcb597866edf350063f80f3c4ebd8dd58c4928ee521b4f23f79b1a2088880b508ab548552dd", "transactions" : [ { "data" : "0x", @@ -2906,19 +4990,19 @@ "uncleHeaders" : [ { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "coinbase" : "0000000000000000000000000000000000000000", "difficulty" : "0x020040", "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "d0b3b093a16e0ef748e636230cff11f9d26f03609244dd8b9e50c47fa4ffbb3f", - "mixHash" : "cee8a15c1bd01a7ced83b015f14df6f8900b90fa20f9c1ab2089ddae34ed96cc", - "nonce" : "fa223c8cfc4d184a", + "hash" : "b2d252b6ca798929d013b853c76b2e0728e4546d160b540246ce34b7c048192c", + "mixHash" : "b191498dcb597866edf350063f80f3c4ebd8dd58c4928ee521b4f23f79b1a208", + "nonce" : "80b508ab548552dd", "number" : "0x02", - "parentHash" : "95e95342c30d888857c7f33c15bf748a2404793fe80f970fb8ba01803262a993", + "parentHash" : "2bc42f762ccbe65c374070a41a1f45f0c61e42b32d83e29521e8daf4c78372a4", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "df1828588eefd69fe6fd029dfdfe0d0a669559b3d4143f3c3bfd76a838c73a23", - "timestamp" : "0x55b7e46a", + "timestamp" : "0x561bc2c2", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" } @@ -2932,9 +5016,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "60af7acdde0034c7731526e811cd99e15859f9e5ba2f237d35acdd494b521719", - "mixHash" : "416fac18386db9467da8f1768669fa6a2bdc5b3c76675fcafae36f1755944c00", - "nonce" : "b8283eda28a37ece", + "hash" : "f1ee7baa8bd141bc61dc8fb699115b9177a684b5a7caad720fe9ccb5a97ddd0f", + "mixHash" : "56a6da7f343a1101755253d44a94996d8cb808c259c1a3036cb10df68177a587", + "nonce" : "80ba92c250fdcfc5", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -2943,8 +5027,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0416fac18386db9467da8f1768669fa6a2bdc5b3c76675fcafae36f1755944c0088b8283eda28a37ecec0c0", - "lastblockhash" : "563c60a882739e1cc305af44f4e368051d24b23fd332f323adf6364d7b76482d", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a056a6da7f343a1101755253d44a94996d8cb808c259c1a3036cb10df68177a5878880ba92c250fdcfc5c0c0", + "lastblockhash" : "c41d29e7e1799ecab155501d37e8aa24af474874db32c71d404a7901b718d772", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x09", @@ -2988,19 +5072,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "fe68f1d9f46e4befb6ef6b73295114cea228e998d9ee4dfdac9742d758e117ba", - "mixHash" : "7aca0dd055502d60103d31ea9fbdfba5c49405429e7ad4573528025b52c282ff", - "nonce" : "8b0a21bf85403d98", + "hash" : "c5e597ca5275ab838eacf8952a432ebe5228fc75bf9a1a087edd09723164457d", + "mixHash" : "c94c96ff002cca946cf2ccc845c5ccf36b31adb3dceea7f2f1cad3ad99b428bf", + "nonce" : "e7855985c112a869", "number" : "0x01", - "parentHash" : "8d62a34bdaf6dfb3c6965ea05778f1df42ae39fe6994f5b67c8787ca5141c2ea", + "parentHash" : "78a911d86cd5d46a4eeb5a0c619de761717e53a43af52540b8475af171a66052", "receiptTrie" : "358f2486c1c65fc5b23db7b5523b64a24debf697e23ef45c8cd1c86775d924c2", "stateRoot" : "df1828588eefd69fe6fd029dfdfe0d0a669559b3d4143f3c3bfd76a838c73a23", - "timestamp" : "0x55b7e46d", + "timestamp" : "0x561bc2c9", "transactionsTrie" : "1539b31ea0fa548996a2f64f4d86cadb9c97f2c9ca7923218fe0d38ea5ba1c75", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "1", - "rlp" : "0xf90261f901f9a08d62a34bdaf6dfb3c6965ea05778f1df42ae39fe6994f5b67c8787ca5141c2eaa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0df1828588eefd69fe6fd029dfdfe0d0a669559b3d4143f3c3bfd76a838c73a23a01539b31ea0fa548996a2f64f4d86cadb9c97f2c9ca7923218fe0d38ea5ba1c75a0358f2486c1c65fc5b23db7b5523b64a24debf697e23ef45c8cd1c86775d924c2b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e46d80a07aca0dd055502d60103d31ea9fbdfba5c49405429e7ad4573528025b52c282ff888b0a21bf85403d98f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8701801ca0f95ddcbc36fb927c225810016715b2ebb5478efcdeb241ee8816e590c1e42559a051012cc60ee68f0d042f6e148550acafb3f306a381e69d003909c30acb15ff56c0", + "rlp" : "0xf90261f901f9a078a911d86cd5d46a4eeb5a0c619de761717e53a43af52540b8475af171a66052a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0df1828588eefd69fe6fd029dfdfe0d0a669559b3d4143f3c3bfd76a838c73a23a01539b31ea0fa548996a2f64f4d86cadb9c97f2c9ca7923218fe0d38ea5ba1c75a0358f2486c1c65fc5b23db7b5523b64a24debf697e23ef45c8cd1c86775d924c2b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc2c980a0c94c96ff002cca946cf2ccc845c5ccf36b31adb3dceea7f2f1cad3ad99b428bf88e7855985c112a869f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8701801ca0f95ddcbc36fb927c225810016715b2ebb5478efcdeb241ee8816e590c1e42559a051012cc60ee68f0d042f6e148550acafb3f306a381e69d003909c30acb15ff56c0", "transactions" : [ { "data" : "0x", @@ -3025,19 +5109,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "4580fb08d5230ca934d9a73421f1c5da1da8f2c70a052e50bc6d9cbe9075d23e", - "mixHash" : "30ebc8e9b5cde464233365984e23840ee3b3e64cfc99363008b797a3f0c06eb8", - "nonce" : "ab90a089e70a3c54", + "hash" : "ebe9f37a19be3c29c3557066d5c1bb1f251b8a4157b9d6fd00b9eaf00d6c0d5f", + "mixHash" : "71a4cade62459767b104b8c432836f51d5828acdd76a28b5d18a13c6ea354f4d", + "nonce" : "18d42738b671e277", "number" : "0x02", - "parentHash" : "fe68f1d9f46e4befb6ef6b73295114cea228e998d9ee4dfdac9742d758e117ba", + "parentHash" : "c5e597ca5275ab838eacf8952a432ebe5228fc75bf9a1a087edd09723164457d", "receiptTrie" : "4a4d62f18220fc8184296c5b41f9396c0fbf7ae13aa723e3d7bf2b0998f11585", "stateRoot" : "0b8ede77b7e7d9be057bbf41fc02acbb84a4f934848ff63b53b61347544eae7e", - "timestamp" : "0x55b7e46f", + "timestamp" : "0x561bc2cc", "transactionsTrie" : "1dc43d9a5f5fefc8664903164d46adf3a98248d858a885558916dd8d73f5166c", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "2", - "rlp" : "0xf90261f901f9a0fe68f1d9f46e4befb6ef6b73295114cea228e998d9ee4dfdac9742d758e117baa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00b8ede77b7e7d9be057bbf41fc02acbb84a4f934848ff63b53b61347544eae7ea01dc43d9a5f5fefc8664903164d46adf3a98248d858a885558916dd8d73f5166ca04a4d62f18220fc8184296c5b41f9396c0fbf7ae13aa723e3d7bf2b0998f11585b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e46f80a030ebc8e9b5cde464233365984e23840ee3b3e64cfc99363008b797a3f0c06eb888ab90a089e70a3c54f862f86001018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8703801ba028fc37782401456825e0faa1a1f8e1e034d8047f29cf44d21d29f55ce0b8159ea00cac7f7c3e6e141c14e9465a9f1e11705f17f93d637996c9a19f82f69f2aafb8c0", + "rlp" : "0xf90261f901f9a0c5e597ca5275ab838eacf8952a432ebe5228fc75bf9a1a087edd09723164457da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00b8ede77b7e7d9be057bbf41fc02acbb84a4f934848ff63b53b61347544eae7ea01dc43d9a5f5fefc8664903164d46adf3a98248d858a885558916dd8d73f5166ca04a4d62f18220fc8184296c5b41f9396c0fbf7ae13aa723e3d7bf2b0998f11585b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc2cc80a071a4cade62459767b104b8c432836f51d5828acdd76a28b5d18a13c6ea354f4d8818d42738b671e277f862f86001018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8703801ba028fc37782401456825e0faa1a1f8e1e034d8047f29cf44d21d29f55ce0b8159ea00cac7f7c3e6e141c14e9465a9f1e11705f17f93d637996c9a19f82f69f2aafb8c0", "transactions" : [ { "data" : "0x", @@ -3062,19 +5146,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "88981a1cae2d5897d87c44850380d7da6e03f2270269b379c862c6d44790c785", - "mixHash" : "8fd4e5295ffc97bbb41c919100cf181ece82437f38d289f9781fe3b443af1658", - "nonce" : "8de60fc3d2a0c8fa", + "hash" : "506b3a710084b5422300a6e0b0744a8b96dc0fa027c31ab75e1880297536c445", + "mixHash" : "b5cef3ed36a19d0ec3e9e7c6dd0838e31d1cb28870002f9004ea14ae3a4e7f3e", + "nonce" : "524679a1fec9503e", "number" : "0x03", - "parentHash" : "4580fb08d5230ca934d9a73421f1c5da1da8f2c70a052e50bc6d9cbe9075d23e", + "parentHash" : "ebe9f37a19be3c29c3557066d5c1bb1f251b8a4157b9d6fd00b9eaf00d6c0d5f", "receiptTrie" : "73416e6c3adc0c359a37e3b067cac1794519ce3e1ff2ef159039994ac096778b", "stateRoot" : "1fda723d5d44c3e1bf4f9f624d804ad1d39a60e26c1b190ffb8a90974752a686", - "timestamp" : "0x55b7e470", + "timestamp" : "0x561bc2cf", "transactionsTrie" : "8978964c37007b0091eb3e3489639ea5a5adbf295b717ab9f0c01895f97f5147", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "3", - "rlp" : "0xf90261f901f9a04580fb08d5230ca934d9a73421f1c5da1da8f2c70a052e50bc6d9cbe9075d23ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01fda723d5d44c3e1bf4f9f624d804ad1d39a60e26c1b190ffb8a90974752a686a08978964c37007b0091eb3e3489639ea5a5adbf295b717ab9f0c01895f97f5147a073416e6c3adc0c359a37e3b067cac1794519ce3e1ff2ef159039994ac096778bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e47080a08fd4e5295ffc97bbb41c919100cf181ece82437f38d289f9781fe3b443af1658888de60fc3d2a0c8faf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8705801ca06b1c1f6f2ac96f1d898113dbc02465001044fb7330cf7554d569ffec31c14839a0737e986047bf3d15120f8ed04a414bb827237a6346b52a90745ae0ae6334e4a1c0", + "rlp" : "0xf90261f901f9a0ebe9f37a19be3c29c3557066d5c1bb1f251b8a4157b9d6fd00b9eaf00d6c0d5fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a01fda723d5d44c3e1bf4f9f624d804ad1d39a60e26c1b190ffb8a90974752a686a08978964c37007b0091eb3e3489639ea5a5adbf295b717ab9f0c01895f97f5147a073416e6c3adc0c359a37e3b067cac1794519ce3e1ff2ef159039994ac096778bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc2cf80a0b5cef3ed36a19d0ec3e9e7c6dd0838e31d1cb28870002f9004ea14ae3a4e7f3e88524679a1fec9503ef862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8705801ca06b1c1f6f2ac96f1d898113dbc02465001044fb7330cf7554d569ffec31c14839a0737e986047bf3d15120f8ed04a414bb827237a6346b52a90745ae0ae6334e4a1c0", "transactions" : [ { "data" : "0x", @@ -3099,19 +5183,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "230d7d617b5ec814dcc3ad6927539db881ecef62cd7ae70b3e84bb2ff909e0ca", - "mixHash" : "2eb689b4f1c209b487b75815bf32ccbc5d51b93008797c3a3cd27e50ac4e115c", - "nonce" : "89a2cff01cedd1a1", + "hash" : "0c71405e012baacd44917c47aeafaeb94fa0b652eeef78c0a153496c5ae71c4b", + "mixHash" : "29cb54ed6f872de24c1e84961e94081e6a88e7001827f8acd8466fbbbe57bc89", + "nonce" : "0d4421ffded78769", "number" : "0x04", - "parentHash" : "88981a1cae2d5897d87c44850380d7da6e03f2270269b379c862c6d44790c785", + "parentHash" : "506b3a710084b5422300a6e0b0744a8b96dc0fa027c31ab75e1880297536c445", "receiptTrie" : "ef55770d8ac39dec224cffb218f0646ff38af156a5d7fd6688b23dd8b93e045f", "stateRoot" : "118a6f21ecc1afbf9cb8eed3b617b0fe095dc58fa4fbd6d0c5ff904c2ad393be", - "timestamp" : "0x55b7e472", + "timestamp" : "0x561bc2d1", "transactionsTrie" : "472ec692bb3085e4cb95a0f735a96a99c7dba39ed499aa8ebe6094b38e11d8d7", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "blocknumber" : "4", - "rlp" : "0xf90261f901f9a088981a1cae2d5897d87c44850380d7da6e03f2270269b379c862c6d44790c785a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0118a6f21ecc1afbf9cb8eed3b617b0fe095dc58fa4fbd6d0c5ff904c2ad393bea0472ec692bb3085e4cb95a0f735a96a99c7dba39ed499aa8ebe6094b38e11d8d7a0ef55770d8ac39dec224cffb218f0646ff38af156a5d7fd6688b23dd8b93e045fb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88252088455b7e47280a02eb689b4f1c209b487b75815bf32ccbc5d51b93008797c3a3cd27e50ac4e115c8889a2cff01cedd1a1f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8707801ba0637dd537e29027117edf445a1df18adc0278572bc64de022178c472bcb8d5f7da00dc10a14a485398302b79274c128505d7dca344fb343cbcf827d1689b0dfbe16c0", + "rlp" : "0xf90261f901f9a0506b3a710084b5422300a6e0b0744a8b96dc0fa027c31ab75e1880297536c445a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0118a6f21ecc1afbf9cb8eed3b617b0fe095dc58fa4fbd6d0c5ff904c2ad393bea0472ec692bb3085e4cb95a0f735a96a99c7dba39ed499aa8ebe6094b38e11d8d7a0ef55770d8ac39dec224cffb218f0646ff38af156a5d7fd6688b23dd8b93e045fb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc2d180a029cb54ed6f872de24c1e84961e94081e6a88e7001827f8acd8466fbbbe57bc89880d4421ffded78769f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d8707801ba0637dd537e29027117edf445a1df18adc0278572bc64de022178c472bcb8d5f7da00dc10a14a485398302b79274c128505d7dca344fb343cbcf827d1689b0dfbe16c0", "transactions" : [ { "data" : "0x", @@ -3136,19 +5220,19 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "33a6603e0b0be32419f64b2688b709bd4b17fed928afd210884a67da71e2b545", - "mixHash" : "4d8785acd37f05ce63b0e058fbf5f2cae613399f60e587362598a2d49f4d42ce", - "nonce" : "f9ea2d434bfc5d4c", + "hash" : "f88930f870308f8e0167914c382273a25a30a32f25c68a7a1981fe182b397769", + "mixHash" : "47c7e9e1acc7abc7b164704475a4d77a32723d1394f33ab0df27479fec005c4a", + "nonce" : "80fa27d2db21b917", "number" : "0x03", - "parentHash" : "4580fb08d5230ca934d9a73421f1c5da1da8f2c70a052e50bc6d9cbe9075d23e", + "parentHash" : "ebe9f37a19be3c29c3557066d5c1bb1f251b8a4157b9d6fd00b9eaf00d6c0d5f", "receiptTrie" : "b509a6d52c12a901e194a4f9906884db9f651b1ee9b71b8db41c872ab0cefb5c", - "stateRoot" : "5a5dcb969a89633a885faa82a44c0dd5faf29c6c8acb86002af977495a8106ba", - "timestamp" : "0x55b7e473", + "stateRoot" : "f95af003bf3d6547cf7ff0983b19bdccb7495c1ca6ff4edd18120b2f1aac01e8", + "timestamp" : "0x561bc2d4", "transactionsTrie" : "a6bdd911d7876852cafbc02d1dd6bf45abb3ce084b5dd46e6efd0dc415814e74", - "uncleHash" : "c2495c5c2c6de1748eeb8bbb1a84eda763e9af3f2ebe5502977f48f2a806c895" + "uncleHash" : "f1f1a1a922a2a8eee6de0353fea24df9bf33738c52a7b4d0d0adb383e700b9fa" }, "blocknumber" : "3", - "rlp" : "0xf9045df901f9a04580fb08d5230ca934d9a73421f1c5da1da8f2c70a052e50bc6d9cbe9075d23ea0c2495c5c2c6de1748eeb8bbb1a84eda763e9af3f2ebe5502977f48f2a806c895948888f1f195afa192cfee860698584c030f4c9db1a05a5dcb969a89633a885faa82a44c0dd5faf29c6c8acb86002af977495a8106baa0a6bdd911d7876852cafbc02d1dd6bf45abb3ce084b5dd46e6efd0dc415814e74a0b509a6d52c12a901e194a4f9906884db9f651b1ee9b71b8db41c872ab0cefb5cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e47380a04d8785acd37f05ce63b0e058fbf5f2cae613399f60e587362598a2d49f4d42ce88f9ea2d434bfc5d4cf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870b801ba0fde0167802eedb87f14f12e0cf0cac4315a027121905b8ca75a3360dcbac6d39a02d51ecf5ed68b453c3f264a396dfe15e790c8e8121acbd701e81aac9f08435f6f901faf901f7a0fe68f1d9f46e4befb6ef6b73295114cea228e998d9ee4dfdac9742d758e117baa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0df1828588eefd69fe6fd029dfdfe0d0a669559b3d4143f3c3bfd76a838c73a23a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e47380a047fb133e5abd2dd18fe5fe6ec08e3018e91a5aec3919f5170863a10d600692268853217befe7266e79", + "rlp" : "0xf9045df901f9a0ebe9f37a19be3c29c3557066d5c1bb1f251b8a4157b9d6fd00b9eaf00d6c0d5fa0f1f1a1a922a2a8eee6de0353fea24df9bf33738c52a7b4d0d0adb383e700b9fa948888f1f195afa192cfee860698584c030f4c9db1a0f95af003bf3d6547cf7ff0983b19bdccb7495c1ca6ff4edd18120b2f1aac01e8a0a6bdd911d7876852cafbc02d1dd6bf45abb3ce084b5dd46e6efd0dc415814e74a0b509a6d52c12a901e194a4f9906884db9f651b1ee9b71b8db41c872ab0cefb5cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc2d480a047c7e9e1acc7abc7b164704475a4d77a32723d1394f33ab0df27479fec005c4a8880fa27d2db21b917f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870b801ba0fde0167802eedb87f14f12e0cf0cac4315a027121905b8ca75a3360dcbac6d39a02d51ecf5ed68b453c3f264a396dfe15e790c8e8121acbd701e81aac9f08435f6f901faf901f7a0c5e597ca5275ab838eacf8952a432ebe5228fc75bf9a1a087edd09723164457da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0df1828588eefd69fe6fd029dfdfe0d0a669559b3d4143f3c3bfd76a838c73a23a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc2d380a053d02a3ff681b39bb9b7ce48eaefdcb0dcf61c06773b130b9c67bf9ab20782ba884c55f5fc94b84501", "transactions" : [ { "data" : "0x", @@ -3165,19 +5249,19 @@ "uncleHeaders" : [ { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "coinbase" : "0000000000000000000000000000000000000000", "difficulty" : "0x020040", "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "12cfea59c3d77942817b5f09f2f50be7d1dd91266f6fa874838d0fecbe1f843f", - "mixHash" : "47fb133e5abd2dd18fe5fe6ec08e3018e91a5aec3919f5170863a10d60069226", - "nonce" : "53217befe7266e79", + "hash" : "10ed03d770f0b97934bb5de5e07df3d935122cb84a92a1b5a3db76ed752da008", + "mixHash" : "53d02a3ff681b39bb9b7ce48eaefdcb0dcf61c06773b130b9c67bf9ab20782ba", + "nonce" : "4c55f5fc94b84501", "number" : "0x02", - "parentHash" : "fe68f1d9f46e4befb6ef6b73295114cea228e998d9ee4dfdac9742d758e117ba", + "parentHash" : "c5e597ca5275ab838eacf8952a432ebe5228fc75bf9a1a087edd09723164457d", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "df1828588eefd69fe6fd029dfdfe0d0a669559b3d4143f3c3bfd76a838c73a23", - "timestamp" : "0x55b7e473", + "timestamp" : "0x561bc2d3", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" } @@ -3191,9 +5275,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "8d62a34bdaf6dfb3c6965ea05778f1df42ae39fe6994f5b67c8787ca5141c2ea", - "mixHash" : "9f2daa15f545e512d0092b9cebec109ccd71b3dd8a9cbf4a4fafcf46f68a7efa", - "nonce" : "43c78ab61a3544f1", + "hash" : "78a911d86cd5d46a4eeb5a0c619de761717e53a43af52540b8475af171a66052", + "mixHash" : "3642593d06dab4d060e7972d29bc52706dbd473e42f8fc8a3e54c78e8f6fa93e", + "nonce" : "4c8f505d21647899", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -3202,8 +5286,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a09f2daa15f545e512d0092b9cebec109ccd71b3dd8a9cbf4a4fafcf46f68a7efa8843c78ab61a3544f1c0c0", - "lastblockhash" : "230d7d617b5ec814dcc3ad6927539db881ecef62cd7ae70b3e84bb2ff909e0ca", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a03642593d06dab4d060e7972d29bc52706dbd473e42f8fc8a3e54c78e8f6fa93e884c8f505d21647899c0c0", + "lastblockhash" : "0c71405e012baacd44917c47aeafaeb94fa0b652eeef78c0a153496c5ae71c4b", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x10", diff --git a/tests/files/BlockchainTests/bcUncleHeaderValiditiy.json b/tests/files/BlockchainTests/bcUncleHeaderValiditiy.json index 3f3cfa133..bb26b80f3 100644 --- a/tests/files/BlockchainTests/bcUncleHeaderValiditiy.json +++ b/tests/files/BlockchainTests/bcUncleHeaderValiditiy.json @@ -9,18 +9,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "89f1420c33a7345eff8beed7ad4da66e29a8790c5cdf049b432fc7e0443e5588", - "mixHash" : "a9249450b7fcd729cd1ac1d5951d470f8f80e09c097d153654dad104363bd1a7", - "nonce" : "641ad2165554f8d6", + "hash" : "f268690b26c7c61a5abfbf4be7a179c9648fcc72d48f9dc7e5c9563854f60e6c", + "mixHash" : "74a0a663d82ad8168f24de86a795a78c14c224c64662244658020e901c3d75d4", + "nonce" : "b8069aed74f14444", "number" : "0x01", - "parentHash" : "71922013282c5fe091f7b333c1823f0467ef9cf8636197ed2d4e431c6fe59a20", + "parentHash" : "3feb2870e878b7ffd9c620020f3e7256e91da162638b8eb49f7c743039442762", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b87dde", + "timestamp" : "0x561bc51d", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a071922013282c5fe091f7b333c1823f0467ef9cf8636197ed2d4e431c6fe59a20a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b87dde80a0a9249450b7fcd729cd1ac1d5951d470f8f80e09c097d153654dad104363bd1a788641ad2165554f8d6f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a03feb2870e878b7ffd9c620020f3e7256e91da162638b8eb49f7c743039442762a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc51d80a074a0a663d82ad8168f24de86a795a78c14c224c64662244658020e901c3d75d488b8069aed74f14444f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -45,18 +45,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "d5e40f6ae7116f08c45e44bbc5ee14c8a7c2ed7e7cec09ad98bff7d281d6121a", - "mixHash" : "7d9c32decc675b26c5b0853ea4e5f4755dcd6c31794c733844ec825cb8c0ebe7", - "nonce" : "6456f7e0b8484ae5", + "hash" : "1e4ea5a2f4db56c5723dc58ccd91da9a8e6d6b53459d9f49427c0a5508987794", + "mixHash" : "b51317f804b536654becfcff36a46e29be28696877916184d21ff094b7a9183d", + "nonce" : "e5ac97b33588f3f5", "number" : "0x02", - "parentHash" : "89f1420c33a7345eff8beed7ad4da66e29a8790c5cdf049b432fc7e0443e5588", + "parentHash" : "f268690b26c7c61a5abfbf4be7a179c9648fcc72d48f9dc7e5c9563854f60e6c", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b87de0", + "timestamp" : "0x561bc51f", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a089f1420c33a7345eff8beed7ad4da66e29a8790c5cdf049b432fc7e0443e5588a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b87de080a07d9c32decc675b26c5b0853ea4e5f4755dcd6c31794c733844ec825cb8c0ebe7886456f7e0b8484ae5f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a0f268690b26c7c61a5abfbf4be7a179c9648fcc72d48f9dc7e5c9563854f60e6ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc51f80a0b51317f804b536654becfcff36a46e29be28696877916184d21ff094b7a9183d88e5ac97b33588f3f5f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -81,18 +81,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "3e95f51e3f385fb4cd8e36bfbfe7161db342c027e18c9c8216ec67476b97dbdd", - "mixHash" : "8401befe11cf27f2b725542d1be504da2f051a51adc9429fcb2455949d17d145", - "nonce" : "31571c1b0cb3c061", + "hash" : "c39ca0142b0415692d74542dafbccc72fb9ba63c5f645975a5c5e5d08ad99c95", + "mixHash" : "dc1f27bae974540a2ee938a714c2fadda4113f5eb439c68b978a6770154d7f4e", + "nonce" : "96bd91edaabda272", "number" : "0x03", - "parentHash" : "d5e40f6ae7116f08c45e44bbc5ee14c8a7c2ed7e7cec09ad98bff7d281d6121a", + "parentHash" : "1e4ea5a2f4db56c5723dc58ccd91da9a8e6d6b53459d9f49427c0a5508987794", "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", - "stateRoot" : "0fef2da3c39a5451092ca067c67abbaff9ecf5232a09bec1e431899f1167376c", - "timestamp" : "0x55b87de1", + "stateRoot" : "77f96f4c766c10cd0207e2672b1b747c741ed75bc94e7be7abacb71cdca3c8fb", + "timestamp" : "0x561bc522", "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", - "uncleHash" : "2624c88b46230090557808915166d519fdff325069a223b04b4fcda4f8634a7d" + "uncleHash" : "06b77de4fe2fdc49b008794893fea1134f9cc83fff3504bf3164dd900c3f6957" }, - "rlp" : "0xf9045df901f9a0d5e40f6ae7116f08c45e44bbc5ee14c8a7c2ed7e7cec09ad98bff7d281d6121aa02624c88b46230090557808915166d519fdff325069a223b04b4fcda4f8634a7d948888f1f195afa192cfee860698584c030f4c9db1a00fef2da3c39a5451092ca067c67abbaff9ecf5232a09bec1e431899f1167376ca01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b87de180a08401befe11cf27f2b725542d1be504da2f051a51adc9429fcb2455949d17d1458831571c1b0cb3c061f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a089f1420c33a7345eff8beed7ad4da66e29a8790c5cdf049b432fc7e0443e5588a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794acde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b87de180a039011f83be3e24184125b083c33e7b41d864bc854c557e7c5b3a00d7f94ce18288e53d93b3aeb2a7a5", + "rlp" : "0xf9045df901f9a01e4ea5a2f4db56c5723dc58ccd91da9a8e6d6b53459d9f49427c0a5508987794a006b77de4fe2fdc49b008794893fea1134f9cc83fff3504bf3164dd900c3f6957948888f1f195afa192cfee860698584c030f4c9db1a077f96f4c766c10cd0207e2672b1b747c741ed75bc94e7be7abacb71cdca3c8fba01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc52280a0dc1f27bae974540a2ee938a714c2fadda4113f5eb439c68b978a6770154d7f4e8896bd91edaabda272f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0f268690b26c7c61a5abfbf4be7a179c9648fcc72d48f9dc7e5c9563854f60e6ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc52080a0774791d217d6de2ae6df77321c5d68aeba65ba025f2d415d3aa96be24c9032698890c5f844e221ca5f", "transactions" : [ { "data" : "0x", @@ -109,19 +109,19 @@ "uncleHeaders" : [ { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "acde5374fce5edbc8e2a8697c15331677e6ebf0b", + "coinbase" : "0000000000000000000000000000000000000000", "difficulty" : "0x020040", "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "20ae66168364462397e2f37d0adff419ee459194bb281ff33ca4f4e302bfa9bb", - "mixHash" : "39011f83be3e24184125b083c33e7b41d864bc854c557e7c5b3a00d7f94ce182", - "nonce" : "e53d93b3aeb2a7a5", + "hash" : "5c878994f58f1dcb401eba2e7d595f78a6b2b56cd12804b805ad4b06c194bbff", + "mixHash" : "774791d217d6de2ae6df77321c5d68aeba65ba025f2d415d3aa96be24c903269", + "nonce" : "90c5f844e221ca5f", "number" : "0x02", - "parentHash" : "89f1420c33a7345eff8beed7ad4da66e29a8790c5cdf049b432fc7e0443e5588", + "parentHash" : "f268690b26c7c61a5abfbf4be7a179c9648fcc72d48f9dc7e5c9563854f60e6c", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b87de1", + "timestamp" : "0x561bc520", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" } @@ -135,9 +135,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "71922013282c5fe091f7b333c1823f0467ef9cf8636197ed2d4e431c6fe59a20", - "mixHash" : "404536a654acdcc10b35fc4f67ad1d63aa220ab101a32e94fe1db3b1c3dc1c88", - "nonce" : "598dba6d6126e546", + "hash" : "3feb2870e878b7ffd9c620020f3e7256e91da162638b8eb49f7c743039442762", + "mixHash" : "cfe1d271285a7fd4cdeb94f4bc18e6d05efd157b25b55ecb41a87bfda43026d7", + "nonce" : "a63526023246e1b0", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -146,9 +146,16 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0404536a654acdcc10b35fc4f67ad1d63aa220ab101a32e94fe1db3b1c3dc1c8888598dba6d6126e546c0c0", - "lastblockhash" : "3e95f51e3f385fb4cd8e36bfbfe7161db342c027e18c9c8216ec67476b97dbdd", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0cfe1d271285a7fd4cdeb94f4bc18e6d05efd157b25b55ecb41a87bfda43026d788a63526023246e1b0c0c0", + "lastblockhash" : "c39ca0142b0415692d74542dafbccc72fb9ba63c5f645975a5c5e5d08ad99c95", "postState" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0x3cb71f51fc558000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x1e", "code" : "0x", @@ -169,13 +176,6 @@ "nonce" : "0x03", "storage" : { } - }, - "acde5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x3cb71f51fc558000", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } } }, "pre" : { @@ -198,18 +198,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "7080337baefcf8dc669a7c5e2eac2366bf6847b2dd2c851a3513d20f118d838c", - "mixHash" : "becaffcdbdca77feebaf3af27a5f1a363ec25b4df266823b3885c30449aea31a", - "nonce" : "53494b3567218497", + "hash" : "a58a31167e039f465cb61499f1afd2562c3ad3ffc1e91e28b0d8f6bcbf493df4", + "mixHash" : "a988fe65da702d240961b412e51e3bc5ebe0063f4b77da4aa7d279b42b28fb21", + "nonce" : "9c430982e10b520b", "number" : "0x01", - "parentHash" : "e46f3fca3787d4f2d569f09e7b89060347520c5e5c1d31c628c21d8f6292121f", + "parentHash" : "aeed5a9f72b6afcacf86d29ae004b05470dddf1b61ed040cd56e421a4c5cedc8", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b87de6", + "timestamp" : "0x561bc524", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0e46f3fca3787d4f2d569f09e7b89060347520c5e5c1d31c628c21d8f6292121fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b87de680a0becaffcdbdca77feebaf3af27a5f1a363ec25b4df266823b3885c30449aea31a8853494b3567218497f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a0aeed5a9f72b6afcacf86d29ae004b05470dddf1b61ed040cd56e421a4c5cedc8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc52480a0a988fe65da702d240961b412e51e3bc5ebe0063f4b77da4aa7d279b42b28fb21889c430982e10b520bf862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -234,27 +234,27 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "ff3262d3518ddeb3de059d153513c9e10cca4bd08974ec0ce651cf98e8d97444", - "mixHash" : "ccce1f81a8c360161446cc00f9ddca456b058a6e550b8a359b3ea902be8354a7", - "nonce" : "1322662148566c38", + "hash" : "ce1feea24e697242e7f7ecff67c9958367ba9da8abe3b97c7b5f4023c860d64d", + "mixHash" : "43c0d4af7fbc5d55d35c8d8945b7717a09b49fd73c6e71c59a8eb7333c7e3d87", + "nonce" : "aac97ef97edd0229", "number" : "0x02", - "parentHash" : "7080337baefcf8dc669a7c5e2eac2366bf6847b2dd2c851a3513d20f118d838c", - "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", - "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b87de8", - "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", + "parentHash" : "a58a31167e039f465cb61499f1afd2562c3ad3ffc1e91e28b0d8f6bcbf493df4", + "receiptTrie" : "c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49", + "stateRoot" : "c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8", + "timestamp" : "0x561bc526", + "transactionsTrie" : "acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a07080337baefcf8dc669a7c5e2eac2366bf6847b2dd2c851a3513d20f118d838ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b87de880a0ccce1f81a8c360161446cc00f9ddca456b058a6e550b8a359b3ea902be8354a7881322662148566c38f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90261f901f9a0a58a31167e039f465cb61499f1afd2562c3ad3ffc1e91e28b0d8f6bcbf493df4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8a0acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1a0c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc52680a043c0d4af7fbc5d55d35c8d8945b7717a09b49fd73c6e71c59a8eb7333c7e3d8788aac97ef97edd0229f862f86001018304cb2f9400000000000000000000000000000000000000000a801ba04979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32eaa024b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0x04cb2f", "gasPrice" : "0x01", "nonce" : "0x01", - "r" : "0x33c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f23", - "s" : "0x1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cf", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "r" : "0x4979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32ea", + "s" : "0x24b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57", + "to" : "0000000000000000000000000000000000000000", "v" : "0x1b", "value" : "0x0a" } @@ -263,7 +263,7 @@ ] }, { - "rlp" : "0xf9045df901f9a0ff3262d3518ddeb3de059d153513c9e10cca4bd08974ec0ce651cf98e8d97444a064507a038400584df4bd2eecfaf81565cb1fb1054c63739d2aedda21525f7cbb948888f1f195afa192cfee860698584c030f4c9db1a00fef2da3c39a5451092ca067c67abbaff9ecf5232a09bec1e431899f1167376ca01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b87dea80a0b835f209c8f7c90a3926b06892d44c1633d59f9333aec41ca102a3aca20d651488d026cef5d9ac5b01f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a07080337baefcf8dc669a7c5e2eac2366bf6847b2dd2c851a3513d20f118d838ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794acde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000102832fefd8808455b87dea80a0a80426adb02b095d25e70979ad2ed8019c50280815b3a3b77d5abacffeb08ca5886bfd22bdcd2bb3d9" + "rlp" : "0xf9045df901f9a0ce1feea24e697242e7f7ecff67c9958367ba9da8abe3b97c7b5f4023c860d64da0d6d9affcf505a8b3eda4b77b1817c1ede57cb78db0f656cbad8f1b5c2d035160948888f1f195afa192cfee860698584c030f4c9db1a07004f6faa7968b3116c68ab805974d2db1ac7de9f5c01d7f5e7e27110f632562a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa032795354855550136c418b34a04f38dfda5aaeb46271f434f1ce57ab24831fe3b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc52b80a092464dd6df8d864546694a74060f0aff6e2c95a73c06f2f94ce4169ef267b752886b1715cdfcdcf48cf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0a58a31167e039f465cb61499f1afd2562c3ad3ffc1e91e28b0d8f6bcbf493df4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000102832fefd88084561bc52980a03eeb6b04722acd42f7be2f20ffaa13c13bfd5c220ef07e087b5629c0110be56c880a4e58ad7d662dc2" } ], "genesisBlockHeader" : { @@ -273,9 +273,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "e46f3fca3787d4f2d569f09e7b89060347520c5e5c1d31c628c21d8f6292121f", - "mixHash" : "a83d81143a226a6a1c0b47a47b1e4bec4c42a0a94bca8f21e6a449dd01e67f72", - "nonce" : "63a011f4a4d1eb93", + "hash" : "aeed5a9f72b6afcacf86d29ae004b05470dddf1b61ed040cd56e421a4c5cedc8", + "mixHash" : "52535d598c185720528929b0661b5207aff93e291bad7adbf612aa3874a907b3", + "nonce" : "e9756dbc28c7acff", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -284,11 +284,18 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0a83d81143a226a6a1c0b47a47b1e4bec4c42a0a94bca8f21e6a449dd01e67f728863a011f4a4d1eb93c0c0", - "lastblockhash" : "ff3262d3518ddeb3de059d153513c9e10cca4bd08974ec0ce651cf98e8d97444", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a052535d598c185720528929b0661b5207aff93e291bad7adbf612aa3874a907b388e9756dbc28c7acffc0c0", + "lastblockhash" : "ce1feea24e697242e7f7ecff67c9958367ba9da8abe3b97c7b5f4023c860d64d", "postState" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0x0a", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x14", + "balance" : "0x0a", "code" : "0x", "nonce" : "0x00", "storage" : { @@ -329,18 +336,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "17aae5bd18229d63a2661adba59a17614274fa65168ac61db53d17d9411ad573", - "mixHash" : "3ab6903ef870e2eb98cedd879ac85426bc1fc0622563a15cab4b51b2485d006c", - "nonce" : "8480b4f42313435c", + "hash" : "4fc5f67d1c68c724d501456bc48f3ab25fd4e4bf514f9d678c580c7ec2e95af1", + "mixHash" : "85ad1811c8e6282ce1e856ddf1c84b3e10b366affd8cec78d156a0ffb929d36b", + "nonce" : "3a65ed40dd6bd690", "number" : "0x01", - "parentHash" : "f0e888b8f5cd464044d18ae9b608e456c4ef52c270b45288991d39595be976de", + "parentHash" : "c1593f250971a6a0ceb0286beb4155eab3fcec0a2432f7a3d9cf7c9e4ad3db2e", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b87df0", + "timestamp" : "0x561bc52d", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0f0e888b8f5cd464044d18ae9b608e456c4ef52c270b45288991d39595be976dea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b87df080a03ab6903ef870e2eb98cedd879ac85426bc1fc0622563a15cab4b51b2485d006c888480b4f42313435cf862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a0c1593f250971a6a0ceb0286beb4155eab3fcec0a2432f7a3d9cf7c9e4ad3db2ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc52d80a085ad1811c8e6282ce1e856ddf1c84b3e10b366affd8cec78d156a0ffb929d36b883a65ed40dd6bd690f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -365,27 +372,27 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "29a80014de83a81fa8cd3a85a9cd388ef972836dc20160189a03e69e76a3d006", - "mixHash" : "f2f1e8a704c03e6db3696dbdb25051cc6d1b650f89e3646dbb07e6bf0287e40f", - "nonce" : "e7af4d28024c260b", + "hash" : "21604587cab1e5a91e912f3deff8f1b29d0fabdca55e00b4304588982b816e62", + "mixHash" : "781107e5557efbfb459b40496cc59545ef858cbdc2068f2a15ab15dbd2787c71", + "nonce" : "efce851cd88403c4", "number" : "0x02", - "parentHash" : "17aae5bd18229d63a2661adba59a17614274fa65168ac61db53d17d9411ad573", - "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", - "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b87df3", - "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", + "parentHash" : "4fc5f67d1c68c724d501456bc48f3ab25fd4e4bf514f9d678c580c7ec2e95af1", + "receiptTrie" : "c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49", + "stateRoot" : "c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8", + "timestamp" : "0x561bc52e", + "transactionsTrie" : "acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a017aae5bd18229d63a2661adba59a17614274fa65168ac61db53d17d9411ad573a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b87df380a0f2f1e8a704c03e6db3696dbdb25051cc6d1b650f89e3646dbb07e6bf0287e40f88e7af4d28024c260bf861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90261f901f9a04fc5f67d1c68c724d501456bc48f3ab25fd4e4bf514f9d678c580c7ec2e95af1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8a0acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1a0c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc52e80a0781107e5557efbfb459b40496cc59545ef858cbdc2068f2a15ab15dbd2787c7188efce851cd88403c4f862f86001018304cb2f9400000000000000000000000000000000000000000a801ba04979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32eaa024b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0x04cb2f", "gasPrice" : "0x01", "nonce" : "0x01", - "r" : "0x33c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f23", - "s" : "0x1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cf", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "r" : "0x4979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32ea", + "s" : "0x24b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57", + "to" : "0000000000000000000000000000000000000000", "v" : "0x1b", "value" : "0x0a" } @@ -394,7 +401,7 @@ ] }, { - "rlp" : "0xf9045df901f9a029a80014de83a81fa8cd3a85a9cd388ef972836dc20160189a03e69e76a3d006a051c22ee7fb45691d19592ce131d3c16058fee066f43af2a886b07822b4ee09ca948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b87df580a076109287e2c7eeb80452555314352a3fca14fcd52af8fe5eee001071696fd737886fef4ecafe616d2ff862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a017aae5bd18229d63a2661adba59a17614274fa65168ac61db53d17d9411ad573a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794acde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008301ffff02832fefd8808455b87df580a0ad427444d92acb468eaa889a3108058b30c1dd8186ea9c78582ef86f14ae1d3a88ad7ec6f23029042f" + "rlp" : "0xf9045df901f9a021604587cab1e5a91e912f3deff8f1b29d0fabdca55e00b4304588982b816e62a035e62aa5674a485cfca4160fb7fbf53db12c84e5f87d03154c4b0f48c0d5f4d0948888f1f195afa192cfee860698584c030f4c9db1a07004f6faa7968b3116c68ab805974d2db1ac7de9f5c01d7f5e7e27110f632562a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa032795354855550136c418b34a04f38dfda5aaeb46271f434f1ce57ab24831fe3b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc53480a02a689c3d1877019ce55e9dd29c372b8b72f6dbf71deda9404789c1180a76a1b1887d2fc8642a2acaaaf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a04fc5f67d1c68c724d501456bc48f3ab25fd4e4bf514f9d678c580c7ec2e95af1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008301ffff02832fefd88084561bc53280a0b515d12067ddaebff67e4e4fa94600ff3acd7aec1ea39ea6a2946b5bec20d4b188606a03eea6c48fd6" } ], "genesisBlockHeader" : { @@ -404,9 +411,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "f0e888b8f5cd464044d18ae9b608e456c4ef52c270b45288991d39595be976de", - "mixHash" : "98cc7ba4ce2f9fda6e22d54433a91b24f7fa082599673b8e8596ae057d753085", - "nonce" : "76ef9318a900df85", + "hash" : "c1593f250971a6a0ceb0286beb4155eab3fcec0a2432f7a3d9cf7c9e4ad3db2e", + "mixHash" : "70092b04a1e897194433ade311ee138fb4bebec86d5f5f35123440ab50248b30", + "nonce" : "5b95a01744f19401", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -415,11 +422,18 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a098cc7ba4ce2f9fda6e22d54433a91b24f7fa082599673b8e8596ae057d7530858876ef9318a900df85c0c0", - "lastblockhash" : "29a80014de83a81fa8cd3a85a9cd388ef972836dc20160189a03e69e76a3d006", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a070092b04a1e897194433ade311ee138fb4bebec86d5f5f35123440ab50248b30885b95a01744f19401c0c0", + "lastblockhash" : "21604587cab1e5a91e912f3deff8f1b29d0fabdca55e00b4304588982b816e62", "postState" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0x0a", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x14", + "balance" : "0x0a", "code" : "0x", "nonce" : "0x00", "storage" : { @@ -460,18 +474,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "842e6d317ac07cd0ed1d4385f0616473c894237e2546000304d703d9c7a1f786", - "mixHash" : "805bb4e2769e28330fce4adf30f67f03d4e5d977f6fab580149f814071af5d6a", - "nonce" : "04f817dfb805a0f0", + "hash" : "9feb0fc84f783dc788297363f7833aee8cb9f5502cef75841552e872e5f9e5c0", + "mixHash" : "9bf1796a2a60ce7082285320939a0494f0e054d2e80fc8435fff92d751df1112", + "nonce" : "f5d4804e60b8b936", "number" : "0x01", - "parentHash" : "2bfbd2cfed7507238922ccc12850676e89543313c4584bd2463b4dcf9c741d0f", + "parentHash" : "196a60a4d71664a30f26f654a53a7b3f0a6fc196b267e8070c1b495f5230c55f", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b87df9", + "timestamp" : "0x561bc537", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a02bfbd2cfed7507238922ccc12850676e89543313c4584bd2463b4dcf9c741d0fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd88252088455b87df980a0805bb4e2769e28330fce4adf30f67f03d4e5d977f6fab580149f814071af5d6a8804f817dfb805a0f0f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a0196a60a4d71664a30f26f654a53a7b3f0a6fc196b267e8070c1b495f5230c55fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd882520884561bc53780a09bf1796a2a60ce7082285320939a0494f0e054d2e80fc8435fff92d751df111288f5d4804e60b8b936f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -496,27 +510,27 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "4df569d7edd36726e0d5a1a924c2eb9972beabb602fe6775d324882d445b669c", - "mixHash" : "7d5f2aa198ead4ee2f71b9201a0b68f3d1386beedf95bd2454b31a286c3df944", - "nonce" : "126b608423819fef", + "hash" : "ee1adc50de8ac1e9c31575a0cd209139c66221eeab796cd9e953bcea7a0a616d", + "mixHash" : "93a502097b117d5d5d7f9e5576fba397fe772ed232fe9ddf6d07e1486206957a", + "nonce" : "893998678d65fb79", "number" : "0x02", - "parentHash" : "842e6d317ac07cd0ed1d4385f0616473c894237e2546000304d703d9c7a1f786", - "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", - "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b87dfc", - "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", + "parentHash" : "9feb0fc84f783dc788297363f7833aee8cb9f5502cef75841552e872e5f9e5c0", + "receiptTrie" : "c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49", + "stateRoot" : "c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8", + "timestamp" : "0x561bc53b", + "transactionsTrie" : "acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0842e6d317ac07cd0ed1d4385f0616473c894237e2546000304d703d9c7a1f786a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd88252088455b87dfc80a07d5f2aa198ead4ee2f71b9201a0b68f3d1386beedf95bd2454b31a286c3df94488126b608423819feff861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90261f901f9a09feb0fc84f783dc788297363f7833aee8cb9f5502cef75841552e872e5f9e5c0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8a0acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1a0c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd882520884561bc53b80a093a502097b117d5d5d7f9e5576fba397fe772ed232fe9ddf6d07e1486206957a88893998678d65fb79f862f86001018304cb2f9400000000000000000000000000000000000000000a801ba04979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32eaa024b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0x04cb2f", "gasPrice" : "0x01", "nonce" : "0x01", - "r" : "0x33c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f23", - "s" : "0x1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cf", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "r" : "0x4979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32ea", + "s" : "0x24b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57", + "to" : "0000000000000000000000000000000000000000", "v" : "0x1b", "value" : "0x0a" } @@ -525,7 +539,7 @@ ] }, { - "rlp" : "0xf9045df901f9a04df569d7edd36726e0d5a1a924c2eb9972beabb602fe6775d324882d445b669ca06d2b7780a5edfd0118b4defebe80eacd47ac337eb8f4d86183b12a8db7a9a0ea948888f1f195afa192cfee860698584c030f4c9db1a00fef2da3c39a5451092ca067c67abbaff9ecf5232a09bec1e431899f1167376ca01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd88252088455b87dff80a04bae2615ad1d75e0509c879362b6c47c98e131b1231cb980bc3b4fee2f3a59bb88c3bbe1bd80d49928f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0842e6d317ac07cd0ed1d4385f0616473c894237e2546000304d703d9c7a1f786a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794acde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830385bf02832fefd8808455b87dff80a017abb6305ad759d6b21a27eafee75fd4c1b96e73ba505f347102d80e9b268a7c88c02dd43b44ff25a8" + "rlp" : "0xf9045df901f9a0ee1adc50de8ac1e9c31575a0cd209139c66221eeab796cd9e953bcea7a0a616da057cefa44dfe5240e3d8edd2ea325fbc8d41dabe6b3581d170b3b35c55551d317948888f1f195afa192cfee860698584c030f4c9db1a07004f6faa7968b3116c68ab805974d2db1ac7de9f5c01d7f5e7e27110f632562a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa032795354855550136c418b34a04f38dfda5aaeb46271f434f1ce57ab24831fe3b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd882520884561bc54280a0e3cdd666fd6a2ff1bbf7db897ce3633aa35026b8f4af41eeaa7a93ec5b199d3f885da9097d4f811096f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a09feb0fc84f783dc788297363f7833aee8cb9f5502cef75841552e872e5f9e5c0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830385bf02832fefd88084561bc54180a0269d71ab720b4fe1c4761a0b8fd4f6d937d25562d2ac4240cd58d09c5499db17881b64aa4265ed0a76" } ], "genesisBlockHeader" : { @@ -535,9 +549,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "2bfbd2cfed7507238922ccc12850676e89543313c4584bd2463b4dcf9c741d0f", - "mixHash" : "f98bafa1436d7502d63239fbb93a5a95247a37141c4807b9f4f3137723afc8ab", - "nonce" : "850f4d323d02c606", + "hash" : "196a60a4d71664a30f26f654a53a7b3f0a6fc196b267e8070c1b495f5230c55f", + "mixHash" : "3bc632a170dba154352b58368967481d6216b681f004232f022b178d4c3703b1", + "nonce" : "49e97f3d691d853e", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -546,11 +560,18 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0f98bafa1436d7502d63239fbb93a5a95247a37141c4807b9f4f3137723afc8ab88850f4d323d02c606c0c0", - "lastblockhash" : "4df569d7edd36726e0d5a1a924c2eb9972beabb602fe6775d324882d445b669c", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a03bc632a170dba154352b58368967481d6216b681f004232f022b178d4c3703b18849e97f3d691d853ec0c0", + "lastblockhash" : "ee1adc50de8ac1e9c31575a0cd209139c66221eeab796cd9e953bcea7a0a616d", "postState" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0x0a", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x14", + "balance" : "0x0a", "code" : "0x", "nonce" : "0x00", "storage" : { @@ -591,18 +612,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "d3e14a417237f9fa8b5be64227c66c81fe80072ed518239d825f942803097268", - "mixHash" : "060d6fddac05cbf668e4f428f16df5a80c4be620042f0a5c477bbc66db663f55", - "nonce" : "e31f1555badfdf41", + "hash" : "4c06307d5b68714c438d8eaadcd330684f07f6a3e44fabec1fe2bd6da2e00131", + "mixHash" : "2f671474859a2c011e7969e394960dc396e209fe9014ee14851d70774eb0e141", + "nonce" : "ed8d27ad736a3021", "number" : "0x01", - "parentHash" : "b2c6f9822ca0ecf036d2a00e69f75783e3f882f0312354f0e123b7e9b93ae018", + "parentHash" : "7c76e54919a7eb2bf5c8e1e860bebe2c4310cad9f3c8cf0e33f630746985e0cd", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b87e02", + "timestamp" : "0x561bc545", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0b2c6f9822ca0ecf036d2a00e69f75783e3f882f0312354f0e123b7e9b93ae018a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd88252088455b87e0280a0060d6fddac05cbf668e4f428f16df5a80c4be620042f0a5c477bbc66db663f5588e31f1555badfdf41f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a07c76e54919a7eb2bf5c8e1e860bebe2c4310cad9f3c8cf0e33f630746985e0cda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd882520884561bc54580a02f671474859a2c011e7969e394960dc396e209fe9014ee14851d70774eb0e14188ed8d27ad736a3021f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -627,27 +648,27 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "7ef55f63f950872396416929a1d41a4bd2c8e438910aeb8012fc1bfbdefb0def", - "mixHash" : "7b836e7c5188d772300ea9497d5a05029ff7fa7b5dbd4497f7094dad725e273a", - "nonce" : "a5c29d812ec1f84b", + "hash" : "bbb5b08f5e4df3c1d08ed3e446b4bc123341f9e06117672b2d1668df1ec71b6a", + "mixHash" : "e0c13b91616062f6377514ff522275ae28c0f9dbff06d193105d97e0d2012ee8", + "nonce" : "de2a79b4b85e93d9", "number" : "0x02", - "parentHash" : "d3e14a417237f9fa8b5be64227c66c81fe80072ed518239d825f942803097268", - "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", - "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b87e04", - "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", + "parentHash" : "4c06307d5b68714c438d8eaadcd330684f07f6a3e44fabec1fe2bd6da2e00131", + "receiptTrie" : "c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49", + "stateRoot" : "c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8", + "timestamp" : "0x561bc54c", + "transactionsTrie" : "acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0d3e14a417237f9fa8b5be64227c66c81fe80072ed518239d825f942803097268a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd88252088455b87e0480a07b836e7c5188d772300ea9497d5a05029ff7fa7b5dbd4497f7094dad725e273a88a5c29d812ec1f84bf861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90261f901f9a04c06307d5b68714c438d8eaadcd330684f07f6a3e44fabec1fe2bd6da2e00131a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8a0acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1a0c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd882520884561bc54c80a0e0c13b91616062f6377514ff522275ae28c0f9dbff06d193105d97e0d2012ee888de2a79b4b85e93d9f862f86001018304cb2f9400000000000000000000000000000000000000000a801ba04979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32eaa024b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0x04cb2f", "gasPrice" : "0x01", "nonce" : "0x01", - "r" : "0x33c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f23", - "s" : "0x1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cf", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "r" : "0x4979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32ea", + "s" : "0x24b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57", + "to" : "0000000000000000000000000000000000000000", "v" : "0x1b", "value" : "0x0a" } @@ -655,59 +676,146 @@ "uncleHeaders" : [ ] }, + { + "rlp" : "0xf9045df901f9a0bbb5b08f5e4df3c1d08ed3e446b4bc123341f9e06117672b2d1668df1ec71b6aa0f16e9bc51093053db6378cb62ea060f62ded84cbb90492a474e816dbb61a94c7948888f1f195afa192cfee860698584c030f4c9db1a07004f6faa7968b3116c68ab805974d2db1ac7de9f5c01d7f5e7e27110f632562a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa032795354855550136c418b34a04f38dfda5aaeb46271f434f1ce57ab24831fe3b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd882520884561bc55580a09d5c5c52d25e7f2c6af2d98813ede006342bd100b6158d3e61a2416e8501a1b9880af16eacf6c4350cf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a04c06307d5b68714c438d8eaadcd330684f07f6a3e44fabec1fe2bd6da2e00131a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830385c00283c886598084561bc55380a05463741a2216a6aedefb00ec34d97a2b094455b3f1e6d552848d30b5ecb338d888daca43fdf968d589" + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0386a0", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "7c76e54919a7eb2bf5c8e1e860bebe2c4310cad9f3c8cf0e33f630746985e0cd", + "mixHash" : "e846eff733491420bf891db10e37e4dd5e244cd6ebc03da18e53b0b958fff36d", + "nonce" : "25544d6812a81930", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0e846eff733491420bf891db10e37e4dd5e244cd6ebc03da18e53b0b958fff36d8825544d6812a81930c0c0", + "lastblockhash" : "bbb5b08f5e4df3c1d08ed3e446b4bc123341f9e06117672b2d1668df1ec71b6a", + "postState" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0x0a", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x0a", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x8ac7230489e8a410", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e71fbdc", + "code" : "0x", + "nonce" : "0x02", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e72a000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "gasLimitTooHighExactBound" : { + "blocks" : [ { "blockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x038710", + "difficulty" : "0x038630", "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "cb39cf7735205ed418056ea8c0290f80c41334cff0456c3ae6666c34cd4886c9", - "mixHash" : "1ac7158b3af2fd5b85529cd0ad86be3a43cd6d3aaee1e2d81b140ace3fe45a3f", - "nonce" : "220cef3d04cae723", - "number" : "0x03", - "parentHash" : "7ef55f63f950872396416929a1d41a4bd2c8e438910aeb8012fc1bfbdefb0def", - "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", - "stateRoot" : "0fef2da3c39a5451092ca067c67abbaff9ecf5232a09bec1e431899f1167376c", - "timestamp" : "0x55b87e06", - "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", - "uncleHash" : "fbf501a9538d3ed446388616850b836a363f88bd89b615b939aaab41b906007d" + "hash" : "065caa432440b786e09b1530ded873f9936b760146b73294066c611a97a99f0e", + "mixHash" : "08dca07090dd44a3b103aff51e9ade75ee6600f9e6c2c6954b99449a11b5795a", + "nonce" : "a44fc0a3899aefe3", + "number" : "0x01", + "parentHash" : "3d9cade96be6d28aba7bd999525a97b7ea18e76d03e88f355630178f516cba27", + "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", + "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", + "timestamp" : "0x561bc558", + "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf9045df901f9a07ef55f63f950872396416929a1d41a4bd2c8e438910aeb8012fc1bfbdefb0defa0fbf501a9538d3ed446388616850b836a363f88bd89b615b939aaab41b906007d948888f1f195afa192cfee860698584c030f4c9db1a00fef2da3c39a5451092ca067c67abbaff9ecf5232a09bec1e431899f1167376ca01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd88252088455b87e0680a01ac7158b3af2fd5b85529cd0ad86be3a43cd6d3aaee1e2d81b140ace3fe45a3f88220cef3d04cae723f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0d3e14a417237f9fa8b5be64227c66c81fe80072ed518239d825f942803097268a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794acde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd9808455b87e0680a00484034554fa1afef81e575f607525e8b4e9e043840c149eeb142aeec8ec4d3788b62cf941a2cd1c3c", + "rlp" : "0xf90261f901f9a03d9cade96be6d28aba7bd999525a97b7ea18e76d03e88f355630178f516cba27a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd882520884561bc55880a008dca07090dd44a3b103aff51e9ade75ee6600f9e6c2c6954b99449a11b5795a88a44fc0a3899aefe3f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", "gasLimit" : "0x04cb2f", "gasPrice" : "0x01", - "nonce" : "0x02", - "r" : "0x15eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0ee", - "s" : "0x5d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38", + "nonce" : "0x00", + "r" : "0x77c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8", + "s" : "0x3f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288d", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1c", + "v" : "0x1b", "value" : "0x0a" } ], "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0386a0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "a3a8fc3575e492293232ba136297e4de04460b1ea5a4452e01fe42d3332c8d18", + "mixHash" : "8fe7de6b44c86877244a24022375edd0571672482fdd314578202f02191e5606", + "nonce" : "36023534479ecbce", + "number" : "0x02", + "parentHash" : "065caa432440b786e09b1530ded873f9936b760146b73294066c611a97a99f0e", + "receiptTrie" : "c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49", + "stateRoot" : "c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8", + "timestamp" : "0x561bc55a", + "transactionsTrie" : "acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf90261f901f9a0065caa432440b786e09b1530ded873f9936b760146b73294066c611a97a99f0ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8a0acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1a0c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd882520884561bc55a80a08fe7de6b44c86877244a24022375edd0571672482fdd314578202f02191e56068836023534479ecbcef862f86001018304cb2f9400000000000000000000000000000000000000000a801ba04979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32eaa024b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57c0", + "transactions" : [ { - "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "acde5374fce5edbc8e2a8697c15331677e6ebf0b", - "difficulty" : "0x0386a0", - "extraData" : "0x", - "gasLimit" : "0x2fefd9", - "gasUsed" : "0x00", - "hash" : "bcad88baadc367e670de68e1e55019cd27ee37a627f372c0c7d9019e93b572b4", - "mixHash" : "0484034554fa1afef81e575f607525e8b4e9e043840c149eeb142aeec8ec4d37", - "nonce" : "b62cf941a2cd1c3c", - "number" : "0x02", - "parentHash" : "d3e14a417237f9fa8b5be64227c66c81fe80072ed518239d825f942803097268", - "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b87e06", - "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x4979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32ea", + "s" : "0x24b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57", + "to" : "0000000000000000000000000000000000000000", + "v" : "0x1b", + "value" : "0x0a" } + ], + "uncleHeaders" : [ ] + }, + { + "rlp" : "0xf9045df901f9a0a3a8fc3575e492293232ba136297e4de04460b1ea5a4452e01fe42d3332c8d18a074419ab1357604c4b5272d22cd4795125bf37e20ab9493bae6e4209bc5997adc948888f1f195afa192cfee860698584c030f4c9db1a07004f6faa7968b3116c68ab805974d2db1ac7de9f5c01d7f5e7e27110f632562a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa032795354855550136c418b34a04f38dfda5aaeb46271f434f1ce57ab24831fe3b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd882520884561bc55f80a0337e8dc2829fa213b406f877d5215cf87f58f991ccfe1a6049388a1ac9089e7588d1927a27917d1564f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0065caa432440b786e09b1530ded873f9936b760146b73294066c611a97a99f0ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832ffbd48084561bc55c80a0e2d5f3d8e913e8af2c2e45f98b8559b095e9a2339c8be32cdf922e1b26c48e3388c3200045ecbfd7c5" } ], "genesisBlockHeader" : { @@ -717,9 +825,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "b2c6f9822ca0ecf036d2a00e69f75783e3f882f0312354f0e123b7e9b93ae018", - "mixHash" : "ce2a9ded3684d1fd19c32589b8fa42b0589d3e8b3849242360265fd2afe641f8", - "nonce" : "84e4b13d3164ebc4", + "hash" : "3d9cade96be6d28aba7bd999525a97b7ea18e76d03e88f355630178f516cba27", + "mixHash" : "e71379a37c645b048d95cac2d9bcbd70f997de1ae8aa6d62bb569a6f555a372b", + "nonce" : "8b7e1f6ee3b0ec69", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -728,34 +836,34 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0ce2a9ded3684d1fd19c32589b8fa42b0589d3e8b3849242360265fd2afe641f88884e4b13d3164ebc4c0c0", - "lastblockhash" : "cb39cf7735205ed418056ea8c0290f80c41334cff0456c3ae6666c34cd4886c9", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0e71379a37c645b048d95cac2d9bcbd70f997de1ae8aa6d62bb569a6f555a372b888b7e1f6ee3b0ec69c0c0", + "lastblockhash" : "a3a8fc3575e492293232ba136297e4de04460b1ea5a4452e01fe42d3332c8d18", "postState" : { - "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x1e", + "0000000000000000000000000000000000000000" : { + "balance" : "0x0a", "code" : "0x", "nonce" : "0x00", "storage" : { } }, - "8888f1f195afa192cfee860698584c030f4c9db1" : { - "balance" : "0xd255d112e1049618", + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x0a", "code" : "0x", "nonce" : "0x00", "storage" : { } }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x09184e71a9ca", + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x8ac7230489e8a410", "code" : "0x", - "nonce" : "0x03", + "nonce" : "0x00", "storage" : { } }, - "acde5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x3cb71f51fc558000", + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e71fbdc", "code" : "0x", - "nonce" : "0x00", + "nonce" : "0x02", "storage" : { } } @@ -780,18 +888,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "a1e32afef40e02631bcadb4e3c94b20bec714d69e13a33b332e5c4f310e3a1b3", - "mixHash" : "ae8800068ac0fa17734c28f6730cc1d6f5a585b9226681d1f1aa521a5f206cd0", - "nonce" : "e3e7e72b7c388d84", + "hash" : "a97464cc7bffabb5e7f1c38a8b05f98ab5ecc1d390275627f352c57b0450c08c", + "mixHash" : "40428929704875b427e92ec2a3f9c060aafb04f6753ea5b5dffe699cc6b39d02", + "nonce" : "b3ba0cae3fc78ded", "number" : "0x01", - "parentHash" : "a5274435711b2ceaf1750d745f87a58ef8ca8f3bd1353047107ed59cfa038902", + "parentHash" : "2dcf426a3612e533467c83e475c8c2b9593cd7b5fe9f79ca98b8c0cb53900409", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b87e0c", + "timestamp" : "0x561bc561", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0a5274435711b2ceaf1750d745f87a58ef8ca8f3bd1353047107ed59cfa038902a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd88252088455b87e0c80a0ae8800068ac0fa17734c28f6730cc1d6f5a585b9226681d1f1aa521a5f206cd088e3e7e72b7c388d84f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a02dcf426a3612e533467c83e475c8c2b9593cd7b5fe9f79ca98b8c0cb53900409a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd882520884561bc56180a040428929704875b427e92ec2a3f9c060aafb04f6753ea5b5dffe699cc6b39d0288b3ba0cae3fc78dedf862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -816,27 +924,27 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "8562e7f179a5957c328810534f11bbecd5089a8deebdae7af422ad2bdf47fee4", - "mixHash" : "65774df4e8ba4352aea3465fea01139416324e71491481ba32a3fbe10f5a827d", - "nonce" : "c3a64cf5a973d920", + "hash" : "99e5201c98c1d0fe782abd58ad54b4a1a63182ac21ce7027b902c0bb151b9a4e", + "mixHash" : "09a02d2f40575d8ea4992f50b3b425646ae4bbe730ff7d518bc52c9288668ac1", + "nonce" : "eb9346c80ac6b23b", "number" : "0x02", - "parentHash" : "a1e32afef40e02631bcadb4e3c94b20bec714d69e13a33b332e5c4f310e3a1b3", - "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", - "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b87e0d", - "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", + "parentHash" : "a97464cc7bffabb5e7f1c38a8b05f98ab5ecc1d390275627f352c57b0450c08c", + "receiptTrie" : "c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49", + "stateRoot" : "c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8", + "timestamp" : "0x561bc563", + "transactionsTrie" : "acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0a1e32afef40e02631bcadb4e3c94b20bec714d69e13a33b332e5c4f310e3a1b3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd88252088455b87e0d80a065774df4e8ba4352aea3465fea01139416324e71491481ba32a3fbe10f5a827d88c3a64cf5a973d920f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90261f901f9a0a97464cc7bffabb5e7f1c38a8b05f98ab5ecc1d390275627f352c57b0450c08ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8a0acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1a0c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd882520884561bc56380a009a02d2f40575d8ea4992f50b3b425646ae4bbe730ff7d518bc52c9288668ac188eb9346c80ac6b23bf862f86001018304cb2f9400000000000000000000000000000000000000000a801ba04979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32eaa024b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0x04cb2f", "gasPrice" : "0x01", "nonce" : "0x01", - "r" : "0x33c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f23", - "s" : "0x1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cf", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "r" : "0x4979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32ea", + "s" : "0x24b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57", + "to" : "0000000000000000000000000000000000000000", "v" : "0x1b", "value" : "0x0a" } @@ -844,59 +952,146 @@ "uncleHeaders" : [ ] }, + { + "rlp" : "0xf9045df901f9a099e5201c98c1d0fe782abd58ad54b4a1a63182ac21ce7027b902c0bb151b9a4ea01b952899b583f82d2fbbce4b7cf172cdd2e554e2cf119ff319c592e4e8835e94948888f1f195afa192cfee860698584c030f4c9db1a07004f6faa7968b3116c68ab805974d2db1ac7de9f5c01d7f5e7e27110f632562a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa032795354855550136c418b34a04f38dfda5aaeb46271f434f1ce57ab24831fe3b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd882520884561bc56880a01542e6352601eb130c789f7471d0f9b58fffe70ca1ab794067736d4dd60481e08815a4a8be4449b2a6f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0a97464cc7bffabb5e7f1c38a8b05f98ab5ecc1d390275627f352c57b0450c08ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fe3dc8084561bc56680a0cebd84e33d1eec54af38cc5f154eef153090900bd9d64b0e5ecb5f81c106ccb1888046a9f4f57b95fb" + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0386a0", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "2dcf426a3612e533467c83e475c8c2b9593cd7b5fe9f79ca98b8c0cb53900409", + "mixHash" : "cd47e7436d8c43e24773cde92cb30625ad7ce7f9ff7b18c31c8afee35ae2a9fd", + "nonce" : "2c2707d7d4db690b", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0cd47e7436d8c43e24773cde92cb30625ad7ce7f9ff7b18c31c8afee35ae2a9fd882c2707d7d4db690bc0c0", + "lastblockhash" : "99e5201c98c1d0fe782abd58ad54b4a1a63182ac21ce7027b902c0bb151b9a4e", + "postState" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0x0a", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x0a", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x8ac7230489e8a410", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e71fbdc", + "code" : "0x", + "nonce" : "0x02", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e72a000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "gasLimitTooLowExactBound" : { + "blocks" : [ { "blockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x038710", + "difficulty" : "0x038630", "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "201f83e94186cdd7ce52b0bb14a3864270f2c998d63459e2596adbfda001605a", - "mixHash" : "e3c59e9ee78751e702750417d6514c7e6dddc70cb6b276d9c9f764db069e4412", - "nonce" : "f9b1b5986e1a4138", - "number" : "0x03", - "parentHash" : "8562e7f179a5957c328810534f11bbecd5089a8deebdae7af422ad2bdf47fee4", - "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", - "stateRoot" : "0fef2da3c39a5451092ca067c67abbaff9ecf5232a09bec1e431899f1167376c", - "timestamp" : "0x55b87e0f", - "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", - "uncleHash" : "19b453eafd7577ebf5cced0c3a06982a8317b717640e25fb43c6d6a8f07a1628" + "hash" : "10ac5c096439e712e86619cef0e0984b0e28ecc26ea37768b5e5a5bcb68ae134", + "mixHash" : "40de78e9389c2e8f6418fc0c7317cc728de2a3b73ec2e862b1010e9714fe897e", + "nonce" : "c2ba0acdc00faf06", + "number" : "0x01", + "parentHash" : "25c892a09a91854f43210c50d8e15a982aa93085479c51a0cf3596e9dd99c693", + "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", + "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", + "timestamp" : "0x561bc56c", + "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf9045df901f9a08562e7f179a5957c328810534f11bbecd5089a8deebdae7af422ad2bdf47fee4a019b453eafd7577ebf5cced0c3a06982a8317b717640e25fb43c6d6a8f07a1628948888f1f195afa192cfee860698584c030f4c9db1a00fef2da3c39a5451092ca067c67abbaff9ecf5232a09bec1e431899f1167376ca01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd88252088455b87e0f80a0e3c59e9ee78751e702750417d6514c7e6dddc70cb6b276d9c9f764db069e441288f9b1b5986e1a4138f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0a1e32afef40e02631bcadb4e3c94b20bec714d69e13a33b332e5c4f310e3a1b3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794acde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd7808455b87e0f80a07c35a3db5abc1f1e7c10bcbd7d83ea832870911f930833a8ab8fdc912a73319788d0614fea4e6d2579", + "rlp" : "0xf90261f901f9a025c892a09a91854f43210c50d8e15a982aa93085479c51a0cf3596e9dd99c693a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd882520884561bc56c80a040de78e9389c2e8f6418fc0c7317cc728de2a3b73ec2e862b1010e9714fe897e88c2ba0acdc00faf06f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", "gasLimit" : "0x04cb2f", "gasPrice" : "0x01", - "nonce" : "0x02", - "r" : "0x15eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0ee", - "s" : "0x5d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38", + "nonce" : "0x00", + "r" : "0x77c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8", + "s" : "0x3f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288d", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1c", + "v" : "0x1b", "value" : "0x0a" } ], "uncleHeaders" : [ + ] + }, + { + "blockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x0386a0", + "extraData" : "0x", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x5208", + "hash" : "d971aab28f00dd8951f4ed7ba2795bb3192e69d1df6b707a0fa9d704f76f37aa", + "mixHash" : "9ea3d78354f64398f619689d18a9d1eacba22f606b89cdd9a2f62a44f1b33f92", + "nonce" : "a3ddffaf4eda5e57", + "number" : "0x02", + "parentHash" : "10ac5c096439e712e86619cef0e0984b0e28ecc26ea37768b5e5a5bcb68ae134", + "receiptTrie" : "c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49", + "stateRoot" : "c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8", + "timestamp" : "0x561bc56f", + "transactionsTrie" : "acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf90261f901f9a010ac5c096439e712e86619cef0e0984b0e28ecc26ea37768b5e5a5bcb68ae134a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8a0acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1a0c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd882520884561bc56f80a09ea3d78354f64398f619689d18a9d1eacba22f606b89cdd9a2f62a44f1b33f9288a3ddffaf4eda5e57f862f86001018304cb2f9400000000000000000000000000000000000000000a801ba04979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32eaa024b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57c0", + "transactions" : [ { - "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "acde5374fce5edbc8e2a8697c15331677e6ebf0b", - "difficulty" : "0x0386a0", - "extraData" : "0x", - "gasLimit" : "0x2fefd7", - "gasUsed" : "0x00", - "hash" : "a0c48500dde5f5c7c16d1174e7a9696a2238aa10c413ce5b4453d33f18f0a77d", - "mixHash" : "7c35a3db5abc1f1e7c10bcbd7d83ea832870911f930833a8ab8fdc912a733197", - "nonce" : "d0614fea4e6d2579", - "number" : "0x02", - "parentHash" : "a1e32afef40e02631bcadb4e3c94b20bec714d69e13a33b332e5c4f310e3a1b3", - "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b87e0f", - "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + "data" : "0x", + "gasLimit" : "0x04cb2f", + "gasPrice" : "0x01", + "nonce" : "0x01", + "r" : "0x4979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32ea", + "s" : "0x24b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57", + "to" : "0000000000000000000000000000000000000000", + "v" : "0x1b", + "value" : "0x0a" } + ], + "uncleHeaders" : [ ] + }, + { + "rlp" : "0xf9045df901f9a0d971aab28f00dd8951f4ed7ba2795bb3192e69d1df6b707a0fa9d704f76f37aaa012073cf00a4a030fc724866bc7768f14a5a7438336c04830dd5493ef99b3b5dc948888f1f195afa192cfee860698584c030f4c9db1a07004f6faa7968b3116c68ab805974d2db1ac7de9f5c01d7f5e7e27110f632562a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa032795354855550136c418b34a04f38dfda5aaeb46271f434f1ce57ab24831fe3b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd882520884561bc57580a02ee7485e323d6c95207a11bfac9f9a05004ccc0b41377dc9454663b1cc01cb9888a37e5ff1f7f528f1f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a010ac5c096439e712e86619cef0e0984b0e28ecc26ea37768b5e5a5bcb68ae134a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002830229178084561bc57380a019d47d65ad571d02b177d21372419b648577db0f3063dede9b058d5eec74e44a88d58d551a290ce587" } ], "genesisBlockHeader" : { @@ -906,9 +1101,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "a5274435711b2ceaf1750d745f87a58ef8ca8f3bd1353047107ed59cfa038902", - "mixHash" : "ecb722ca227761cc4ee57c2fc4214d83854cbd2cd9e3dc6c763f705cb0427f3f", - "nonce" : "09b163569f6970d2", + "hash" : "25c892a09a91854f43210c50d8e15a982aa93085479c51a0cf3596e9dd99c693", + "mixHash" : "ec4ad80917c431dcb60d076a39aaa80b0683e833b4561766a64857e209b653ff", + "nonce" : "4fd02b9de9f5cda3", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -917,34 +1112,34 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0ecb722ca227761cc4ee57c2fc4214d83854cbd2cd9e3dc6c763f705cb0427f3f8809b163569f6970d2c0c0", - "lastblockhash" : "201f83e94186cdd7ce52b0bb14a3864270f2c998d63459e2596adbfda001605a", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0ec4ad80917c431dcb60d076a39aaa80b0683e833b4561766a64857e209b653ff884fd02b9de9f5cda3c0c0", + "lastblockhash" : "d971aab28f00dd8951f4ed7ba2795bb3192e69d1df6b707a0fa9d704f76f37aa", "postState" : { - "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x1e", + "0000000000000000000000000000000000000000" : { + "balance" : "0x0a", "code" : "0x", "nonce" : "0x00", "storage" : { } }, - "8888f1f195afa192cfee860698584c030f4c9db1" : { - "balance" : "0xd255d112e1049618", + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x0a", "code" : "0x", "nonce" : "0x00", "storage" : { } }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x09184e71a9ca", + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x8ac7230489e8a410", "code" : "0x", - "nonce" : "0x03", + "nonce" : "0x00", "storage" : { } }, - "acde5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x3cb71f51fc558000", + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x09184e71fbdc", "code" : "0x", - "nonce" : "0x00", + "nonce" : "0x02", "storage" : { } } @@ -969,18 +1164,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "388985295246de25a5431c60278e91f80516f6adc9d9056ae16b72f105006d7a", - "mixHash" : "6f69dff17ecbc0b1a877b5a8477679e3c5b9ff3868192dbbb48e485294cea387", - "nonce" : "b874722798fe78fa", + "hash" : "873e3bec9d884279ea36e009375e7543ab42e61a950fe79a557b8266130561ad", + "mixHash" : "34d90ef393982950b4686840a0aeb9bb9ae10fa9b894a64e5aa344cbc3bae354", + "nonce" : "74d8f1a994869358", "number" : "0x01", - "parentHash" : "adfb4b823d6196e65e4a16d2fd56a66ecc62df2b1cb380a6bae0be1a73329856", + "parentHash" : "5b40e5455ad61aa593e2419cb91756a5803a1f4856128dbdee832d6f22c86f9c", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b87e14", + "timestamp" : "0x561bc57c", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0adfb4b823d6196e65e4a16d2fd56a66ecc62df2b1cb380a6bae0be1a73329856a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd88252088455b87e1480a06f69dff17ecbc0b1a877b5a8477679e3c5b9ff3868192dbbb48e485294cea38788b874722798fe78faf862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a05b40e5455ad61aa593e2419cb91756a5803a1f4856128dbdee832d6f22c86f9ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd882520884561bc57c80a034d90ef393982950b4686840a0aeb9bb9ae10fa9b894a64e5aa344cbc3bae3548874d8f1a994869358f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -1005,27 +1200,27 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "ace0d175934d26e14597179d9c924a1fcc91c5da3a6b227406fc5495b14f3290", - "mixHash" : "373893a1c99fa552e4d7753ca46b56af09467440eb3564b0eff189a730aa7b81", - "nonce" : "cf786a90c6d4e68e", + "hash" : "ac3be75776ec4e8e2c66625a8c236e2604a7d8aef4c52429f0f6b0f03edaab61", + "mixHash" : "e2d2306fd73ce842ea0f09f8f4bb7576affbc257612927f55b6257b62ad2e65d", + "nonce" : "51b42f1a37452841", "number" : "0x02", - "parentHash" : "388985295246de25a5431c60278e91f80516f6adc9d9056ae16b72f105006d7a", - "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", - "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b87e16", - "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", + "parentHash" : "873e3bec9d884279ea36e009375e7543ab42e61a950fe79a557b8266130561ad", + "receiptTrie" : "c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49", + "stateRoot" : "c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8", + "timestamp" : "0x561bc57e", + "transactionsTrie" : "acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0388985295246de25a5431c60278e91f80516f6adc9d9056ae16b72f105006d7aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd88252088455b87e1680a0373893a1c99fa552e4d7753ca46b56af09467440eb3564b0eff189a730aa7b8188cf786a90c6d4e68ef861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90261f901f9a0873e3bec9d884279ea36e009375e7543ab42e61a950fe79a557b8266130561ada01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8a0acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1a0c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd882520884561bc57e80a0e2d2306fd73ce842ea0f09f8f4bb7576affbc257612927f55b6257b62ad2e65d8851b42f1a37452841f862f86001018304cb2f9400000000000000000000000000000000000000000a801ba04979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32eaa024b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0x04cb2f", "gasPrice" : "0x01", "nonce" : "0x01", - "r" : "0x33c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f23", - "s" : "0x1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cf", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "r" : "0x4979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32ea", + "s" : "0x24b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57", + "to" : "0000000000000000000000000000000000000000", "v" : "0x1b", "value" : "0x0a" } @@ -1034,7 +1229,7 @@ ] }, { - "rlp" : "0xf9045df901f9a0ace0d175934d26e14597179d9c924a1fcc91c5da3a6b227406fc5495b14f3290a0031279ad09c1b6cfb20a02621bf7964b918cc0794b59ff2529c637b2cc79c06c948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd88252088455b87e1880a0b83be019e9dc920c3f9d8c546b27bbc274a620dad507b2ebd9631b7d3ebba976883abda7831f00e583f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0388985295246de25a5431c60278e91f80516f6adc9d9056ae16b72f105006d7aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794acde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd8808455b87e1880a00c72ac254b1080526e3ef8a814c1e518ed8786e2179c98e44f8b93f51cd26ab188bad524c1790fa83b" + "rlp" : "0xf9045df901f9a0ac3be75776ec4e8e2c66625a8c236e2604a7d8aef4c52429f0f6b0f03edaab61a08991c6cfa26a47f684e663438405e2b8476d3a889cfdc8a2f0cb09de4dfaea39948888f1f195afa192cfee860698584c030f4c9db1a07004f6faa7968b3116c68ab805974d2db1ac7de9f5c01d7f5e7e27110f632562a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa032795354855550136c418b34a04f38dfda5aaeb46271f434f1ce57ab24831fe3b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd882520884561bc58180a0648bf732dc2f3600a811e3e16a5fa0018d906919ec17533b9cde64b7c8dabf09888a9a059b3289f80bf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0873e3bec9d884279ea36e009375e7543ab42e61a950fe79a557b8266130561ada01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd88084561bc58080a0000000000000000000000000000000000000000000000000000000000000000088bad524c1790fa83b" } ], "genesisBlockHeader" : { @@ -1044,9 +1239,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "adfb4b823d6196e65e4a16d2fd56a66ecc62df2b1cb380a6bae0be1a73329856", - "mixHash" : "c43051ad808b906fc4c66c8d5ca369caf1e89951162565f7b3c9032329017b99", - "nonce" : "01f2efad8ecef22d", + "hash" : "5b40e5455ad61aa593e2419cb91756a5803a1f4856128dbdee832d6f22c86f9c", + "mixHash" : "0513446e620024326cda8052ee5030cc35ccd516be6ce04f0bc450b4918a9940", + "nonce" : "204bcf521c09df1b", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1055,11 +1250,18 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0c43051ad808b906fc4c66c8d5ca369caf1e89951162565f7b3c9032329017b998801f2efad8ecef22dc0c0", - "lastblockhash" : "ace0d175934d26e14597179d9c924a1fcc91c5da3a6b227406fc5495b14f3290", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a00513446e620024326cda8052ee5030cc35ccd516be6ce04f0bc450b4918a994088204bcf521c09df1bc0c0", + "lastblockhash" : "ac3be75776ec4e8e2c66625a8c236e2604a7d8aef4c52429f0f6b0f03edaab61", "postState" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0x0a", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x14", + "balance" : "0x0a", "code" : "0x", "nonce" : "0x00", "storage" : { @@ -1100,18 +1302,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "12f2d2c82c86036ba4d7983dbd0169f5371376dffcecfb9b821c1aec6b467c06", - "mixHash" : "1950b793b182c2587b8baee50ddcab76c4b76741cd8d94597d4c9405f117f09b", - "nonce" : "9fbc5632c2d8da8b", + "hash" : "ae11e545642620f2ae12a95630845b7aa288c65354a680b33642860de8a1e085", + "mixHash" : "6159747848fc430a09cbf18e958a94b9c78b82c9b0530b9def1383a2442fa6d9", + "nonce" : "fcb32ec372520312", "number" : "0x01", - "parentHash" : "cf1858ed35710e9ac830b80a72058d0cb8429f257bb2037e7e15edb2c55c5e89", + "parentHash" : "f9890c4fdbb45ca114501ef424255febb425818dc353da76ff85600a2d4cb517", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b87e1e", + "timestamp" : "0x561bc584", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0cf1858ed35710e9ac830b80a72058d0cb8429f257bb2037e7e15edb2c55c5e89a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd88252088455b87e1e80a01950b793b182c2587b8baee50ddcab76c4b76741cd8d94597d4c9405f117f09b889fbc5632c2d8da8bf862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a0f9890c4fdbb45ca114501ef424255febb425818dc353da76ff85600a2d4cb517a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd882520884561bc58480a06159747848fc430a09cbf18e958a94b9c78b82c9b0530b9def1383a2442fa6d988fcb32ec372520312f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -1136,27 +1338,27 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "8034035d39a082a313b6b36899aa092809ae1742b7f7081aec5bf1383c7b217b", - "mixHash" : "97e26570288664377581fd1d2645a8f9de94910c9d7a83fab273a7ef875a086b", - "nonce" : "dafb78c7ff1858c1", + "hash" : "7e24511d066ac68ec1c099399d4316c08297f73712cba8d7a177142bc741d1b1", + "mixHash" : "fc8fa7612987f43f802eff7bc4592e26ddc9c9943215c2b7fae427071c7808f2", + "nonce" : "08ed323dadb03a5d", "number" : "0x02", - "parentHash" : "12f2d2c82c86036ba4d7983dbd0169f5371376dffcecfb9b821c1aec6b467c06", - "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", - "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b87e1f", - "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", + "parentHash" : "ae11e545642620f2ae12a95630845b7aa288c65354a680b33642860de8a1e085", + "receiptTrie" : "c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49", + "stateRoot" : "c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8", + "timestamp" : "0x561bc587", + "transactionsTrie" : "acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a012f2d2c82c86036ba4d7983dbd0169f5371376dffcecfb9b821c1aec6b467c06a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd88252088455b87e1f80a097e26570288664377581fd1d2645a8f9de94910c9d7a83fab273a7ef875a086b88dafb78c7ff1858c1f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90261f901f9a0ae11e545642620f2ae12a95630845b7aa288c65354a680b33642860de8a1e085a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8a0acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1a0c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd882520884561bc58780a0fc8fa7612987f43f802eff7bc4592e26ddc9c9943215c2b7fae427071c7808f28808ed323dadb03a5df862f86001018304cb2f9400000000000000000000000000000000000000000a801ba04979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32eaa024b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0x04cb2f", "gasPrice" : "0x01", "nonce" : "0x01", - "r" : "0x33c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f23", - "s" : "0x1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cf", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "r" : "0x4979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32ea", + "s" : "0x24b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57", + "to" : "0000000000000000000000000000000000000000", "v" : "0x1b", "value" : "0x0a" } @@ -1165,7 +1367,7 @@ ] }, { - "rlp" : "0xf9045df901f9a08034035d39a082a313b6b36899aa092809ae1742b7f7081aec5bf1383c7b217ba070084843288e4be25bea90302b3a9e0064da56b05212e9fd9388e3933a7a4a6a948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd88252088455b87e2180a0f1abcd8e4405e9f99d50ee00783724bce01931bf40475490ae81727196d87a96883a19b2e6a3a327eaf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a012f2d2c82c86036ba4d7983dbd0169f5371376dffcecfb9b821c1aec6b467c06a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794acde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd880845b18d39e80a003ecff40b01740f845b88180890f25214ab9846db647ae204547bc442e4c4cf988c0a87efe2a0aa70c" + "rlp" : "0xf9045df901f9a07e24511d066ac68ec1c099399d4316c08297f73712cba8d7a177142bc741d1b1a069f92b100ff3ecc6be80a9c3dd6ece91b048e189ceee8ca6afbd483a5650ae94948888f1f195afa192cfee860698584c030f4c9db1a07004f6faa7968b3116c68ab805974d2db1ac7de9f5c01d7f5e7e27110f632562a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa032795354855550136c418b34a04f38dfda5aaeb46271f434f1ce57ab24831fe3b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd882520884561bc58c80a02cc9bfcae7a1d6be2ac18e2c55ca98c793b7ef4c30d6e810d95247a2a8d9019488ccc229d79bd0b4bdf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0ae11e545642620f2ae12a95630845b7aa288c65354a680b33642860de8a1e085a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd880845b18d39e80a0dec357418da79e4298294a64a043a475cac6b0ef97efe3965c5cb87de40f2b3d88e24ec33194cb28f5" } ], "genesisBlockHeader" : { @@ -1175,9 +1377,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "cf1858ed35710e9ac830b80a72058d0cb8429f257bb2037e7e15edb2c55c5e89", - "mixHash" : "b71705debd7b48432ef07239669026d4512570fc59fff62f25372482b8d5d0fd", - "nonce" : "cbe1d16e7588b86e", + "hash" : "f9890c4fdbb45ca114501ef424255febb425818dc353da76ff85600a2d4cb517", + "mixHash" : "594f73a8f34796987c91dd55b42393b1b1d0825434dd997b722f9289b2076f2a", + "nonce" : "f4f67663fbd69a38", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1186,11 +1388,18 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0b71705debd7b48432ef07239669026d4512570fc59fff62f25372482b8d5d0fd88cbe1d16e7588b86ec0c0", - "lastblockhash" : "8034035d39a082a313b6b36899aa092809ae1742b7f7081aec5bf1383c7b217b", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0594f73a8f34796987c91dd55b42393b1b1d0825434dd997b722f9289b2076f2a88f4f67663fbd69a38c0c0", + "lastblockhash" : "7e24511d066ac68ec1c099399d4316c08297f73712cba8d7a177142bc741d1b1", "postState" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0x0a", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x14", + "balance" : "0x0a", "code" : "0x", "nonce" : "0x00", "storage" : { @@ -1231,18 +1440,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "be94168f701b18f7a21a399ba65c2249da457552f66dfc6e314c82958a98a0fe", - "mixHash" : "c364f60f5d865bbfabcf10ffecd30b3125cf458863ce3675ab58eea0290bd980", - "nonce" : "e61f8a423d3f4675", + "hash" : "980d9d3dd7415fb184a73f4854bac0578538c32531c2011ee154585e24d21eb7", + "mixHash" : "46753e4aa1fe7e20c5eaf6d342155fb3182c15da188c8154f90b2e94ce782ed8", + "nonce" : "6fa7b12972f7eb81", "number" : "0x01", - "parentHash" : "993dc94b59e50eb25a82b2e504967b6ce919dc766ecf84b9ddcd37e10771e55e", + "parentHash" : "eb826f0ac51aea05a21633b7bc41b46f8fd3016b1e97c0901b10a1e5bf992f3b", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b87e26", + "timestamp" : "0x561bc592", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0993dc94b59e50eb25a82b2e504967b6ce919dc766ecf84b9ddcd37e10771e55ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd88252088455b87e2680a0c364f60f5d865bbfabcf10ffecd30b3125cf458863ce3675ab58eea0290bd98088e61f8a423d3f4675f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a0eb826f0ac51aea05a21633b7bc41b46f8fd3016b1e97c0901b10a1e5bf992f3ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd882520884561bc59280a046753e4aa1fe7e20c5eaf6d342155fb3182c15da188c8154f90b2e94ce782ed8886fa7b12972f7eb81f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -1267,27 +1476,27 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "37cdf599426940626210302a2e5687b5456a945517aa68b188d2d3b9e59e665f", - "mixHash" : "6135f86da4c9ea678553d375a45fd78acdaa7de044009871c974046236feb087", - "nonce" : "df083b905d1beb11", + "hash" : "2cbbca0c0e6d6f044201d0a042c14ca09574f5bccd28ab5fd89199aff9bcabd1", + "mixHash" : "4015cbf6e0ee02d8526c46e78d1fab505f328310ad1e194ef8e318b70a39e3ce", + "nonce" : "5df2905498bb94cd", "number" : "0x02", - "parentHash" : "be94168f701b18f7a21a399ba65c2249da457552f66dfc6e314c82958a98a0fe", - "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", - "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b87e27", - "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", + "parentHash" : "980d9d3dd7415fb184a73f4854bac0578538c32531c2011ee154585e24d21eb7", + "receiptTrie" : "c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49", + "stateRoot" : "c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8", + "timestamp" : "0x561bc594", + "transactionsTrie" : "acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0be94168f701b18f7a21a399ba65c2249da457552f66dfc6e314c82958a98a0fea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd88252088455b87e2780a06135f86da4c9ea678553d375a45fd78acdaa7de044009871c974046236feb08788df083b905d1beb11f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90261f901f9a0980d9d3dd7415fb184a73f4854bac0578538c32531c2011ee154585e24d21eb7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8a0acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1a0c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd882520884561bc59480a04015cbf6e0ee02d8526c46e78d1fab505f328310ad1e194ef8e318b70a39e3ce885df2905498bb94cdf862f86001018304cb2f9400000000000000000000000000000000000000000a801ba04979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32eaa024b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0x04cb2f", "gasPrice" : "0x01", "nonce" : "0x01", - "r" : "0x33c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f23", - "s" : "0x1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cf", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "r" : "0x4979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32ea", + "s" : "0x24b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57", + "to" : "0000000000000000000000000000000000000000", "v" : "0x1b", "value" : "0x0a" } @@ -1296,7 +1505,7 @@ ] }, { - "rlp" : "0xf9045df901f9a037cdf599426940626210302a2e5687b5456a945517aa68b188d2d3b9e59e665fa03b3169e5c91c12501a31895a746bfdaaa77fd59451ab1454417628ed4e43fd57948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd88252088455b87e2a80a0722b4024f1b8661b99187acce47c27e0a85b6e4e99a71fa507db1cec1b2f591f888623694efcc5fa08f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0be94168f701b18f7a21a399ba65c2249da457552f66dfc6e314c82958a98a0fea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794acde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd880845522f29e80a032cca3e865e7a1cbd6ce80713a271b6b3bc7cac5edf6a0fee3c6c6630147a9a288c2c214df0e986201" + "rlp" : "0xf9045df901f9a02cbbca0c0e6d6f044201d0a042c14ca09574f5bccd28ab5fd89199aff9bcabd1a002877ca4c8fa606bb42f08ac02a5ec7852f11bede8cde6e0f9e5392aee56b8bb948888f1f195afa192cfee860698584c030f4c9db1a07004f6faa7968b3116c68ab805974d2db1ac7de9f5c01d7f5e7e27110f632562a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa032795354855550136c418b34a04f38dfda5aaeb46271f434f1ce57ab24831fe3b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd882520884561bc59a80a0e8116c85c5c5fc8dfe69bcf57bf54be1125ba48b13f98fecad3d4149d3119470883e591b70d924e153f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0980d9d3dd7415fb184a73f4854bac0578538c32531c2011ee154585e24d21eb7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd880845522f29e80a0b4279f0cfc20d76d3eb028bcc2fc374cab7b68e5bee2411aa2960085740eec3888427322c5f9276c10" } ], "genesisBlockHeader" : { @@ -1306,9 +1515,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "993dc94b59e50eb25a82b2e504967b6ce919dc766ecf84b9ddcd37e10771e55e", - "mixHash" : "6c98646b24ea2249cd2c4864fe0e6a35ca6e71b93f1f70e239b7e3701fcbfacf", - "nonce" : "32b4aca0f6759c4d", + "hash" : "eb826f0ac51aea05a21633b7bc41b46f8fd3016b1e97c0901b10a1e5bf992f3b", + "mixHash" : "0af65b5c9288203c874f7b583fdc53d19c5f2d65a6e4d8cb30bcb69bf53e696b", + "nonce" : "832845119602b250", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1317,11 +1526,18 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a06c98646b24ea2249cd2c4864fe0e6a35ca6e71b93f1f70e239b7e3701fcbfacf8832b4aca0f6759c4dc0c0", - "lastblockhash" : "37cdf599426940626210302a2e5687b5456a945517aa68b188d2d3b9e59e665f", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a00af65b5c9288203c874f7b583fdc53d19c5f2d65a6e4d8cb30bcb69bf53e696b88832845119602b250c0c0", + "lastblockhash" : "2cbbca0c0e6d6f044201d0a042c14ca09574f5bccd28ab5fd89199aff9bcabd1", "postState" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0x0a", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x14", + "balance" : "0x0a", "code" : "0x", "nonce" : "0x00", "storage" : { @@ -1362,18 +1578,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "f3e0fe5bebb07a059c33fba08e91a9bacef47e536284d6a377d5d161a6585b9c", - "mixHash" : "4dedefd2a2bec5a5551feac326d3e2daddb9785a03c629e4a258c1987955e967", - "nonce" : "8379017461b3f0e0", + "hash" : "bc5d10c3e5fe480fd3fb37af2e0cbc98b8d0b30afcb4c1344678cf4e5fb05b41", + "mixHash" : "407bbf2d871063c54dfbb222504a435ad0e1b9438fa7c43d984c8bc816838215", + "nonce" : "41308e19720ea763", "number" : "0x01", - "parentHash" : "a936f8c38b33af0927c07d9e5218f8d5b41fbabbac381a009151f48504bc2770", + "parentHash" : "437b16c2ce92e3f0935587e53f53168bdea84fb565c90719b6a825d89452e825", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b87e2f", + "timestamp" : "0x561bc59e", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0a936f8c38b33af0927c07d9e5218f8d5b41fbabbac381a009151f48504bc2770a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd88252088455b87e2f80a04dedefd2a2bec5a5551feac326d3e2daddb9785a03c629e4a258c1987955e967888379017461b3f0e0f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a0437b16c2ce92e3f0935587e53f53168bdea84fb565c90719b6a825d89452e825a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd882520884561bc59e80a0407bbf2d871063c54dfbb222504a435ad0e1b9438fa7c43d984c8bc8168382158841308e19720ea763f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -1398,27 +1614,27 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "430507035bde88b64d598da84bc49ef1788b14470c145a712b73a97ea21b51a6", - "mixHash" : "49452908a692dec75a275617e17ba668970a6d6d20c49fcf5e10a52ff7664640", - "nonce" : "2a5bcf31a677eff4", + "hash" : "73b6de494c7f1d9fff91953827da19a67df8d99b89d84279f7ea29aa9b63fa58", + "mixHash" : "2d5beed6d8227da7e7aa74869d1ed0bf1150067ed063cd095839bb1b92927c36", + "nonce" : "d5bd3a82ffa6db73", "number" : "0x02", - "parentHash" : "f3e0fe5bebb07a059c33fba08e91a9bacef47e536284d6a377d5d161a6585b9c", - "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", - "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b87e32", - "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", + "parentHash" : "bc5d10c3e5fe480fd3fb37af2e0cbc98b8d0b30afcb4c1344678cf4e5fb05b41", + "receiptTrie" : "c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49", + "stateRoot" : "c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8", + "timestamp" : "0x561bc5a1", + "transactionsTrie" : "acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0f3e0fe5bebb07a059c33fba08e91a9bacef47e536284d6a377d5d161a6585b9ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd88252088455b87e3280a049452908a692dec75a275617e17ba668970a6d6d20c49fcf5e10a52ff7664640882a5bcf31a677eff4f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90261f901f9a0bc5d10c3e5fe480fd3fb37af2e0cbc98b8d0b30afcb4c1344678cf4e5fb05b41a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8a0acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1a0c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd882520884561bc5a180a02d5beed6d8227da7e7aa74869d1ed0bf1150067ed063cd095839bb1b92927c3688d5bd3a82ffa6db73f862f86001018304cb2f9400000000000000000000000000000000000000000a801ba04979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32eaa024b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0x04cb2f", "gasPrice" : "0x01", "nonce" : "0x01", - "r" : "0x33c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f23", - "s" : "0x1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cf", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "r" : "0x4979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32ea", + "s" : "0x24b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57", + "to" : "0000000000000000000000000000000000000000", "v" : "0x1b", "value" : "0x0a" } @@ -1427,7 +1643,7 @@ ] }, { - "rlp" : "0xf9045df901f9a0430507035bde88b64d598da84bc49ef1788b14470c145a712b73a97ea21b51a6a04c19fa23cad57cfe47a0f6624c9a7552dc619dafe3cd497bf54ad9e5d9910ade948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd88252088455b87e3480a044f00b5c2881b2a6dfa838cc6d5676b5f916b18d64e724a61c1eb6ff8cdad0bb8882adb7dcd7966945f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0f3e0fe5bebb07a059c33fba08e91a9bacef47e536284d6a377d5d161a6585b9ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794acde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd8808455b87e3480a0bad7f905d29ed0fca99d65d0adcce698dee97cf72a13c7cd8d7a7826b8eee770888bb4b123f1101159" + "rlp" : "0xf9045df901f9a073b6de494c7f1d9fff91953827da19a67df8d99b89d84279f7ea29aa9b63fa58a03824503d31749e4193abbcbd771be40f6905e90b02ab44575d60ba3f459cb25f948888f1f195afa192cfee860698584c030f4c9db1a07004f6faa7968b3116c68ab805974d2db1ac7de9f5c01d7f5e7e27110f632562a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa032795354855550136c418b34a04f38dfda5aaeb46271f434f1ce57ab24831fe3b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd882520884561bc5a580a032f80bc74f5a5c295af85dcdc47ff56f654e99c5bb14db2f8749b1ae81ca8a27883b8619a0a2ae4a47f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0bc5d10c3e5fe480fd3fb37af2e0cbc98b8d0b30afcb4c1344678cf4e5fb05b41a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd88084561bc5a480a0bad7f905d29ed0fca99d65d0adcce698dee97cf72a13c7cd8d7a7826b8eee770880000000000000000" } ], "genesisBlockHeader" : { @@ -1437,9 +1653,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "a936f8c38b33af0927c07d9e5218f8d5b41fbabbac381a009151f48504bc2770", - "mixHash" : "ece2f538411d4a56d3c0513711e7d45e0e59e861489de09cd04ce79cf3fe563c", - "nonce" : "7400678fbfc33844", + "hash" : "437b16c2ce92e3f0935587e53f53168bdea84fb565c90719b6a825d89452e825", + "mixHash" : "79d818f2247c4c5f507acf8607dd146ce31c86e03bf4295cf5992d768b5585e1", + "nonce" : "6184387f9e337bf4", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1448,11 +1664,18 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0ece2f538411d4a56d3c0513711e7d45e0e59e861489de09cd04ce79cf3fe563c887400678fbfc33844c0c0", - "lastblockhash" : "430507035bde88b64d598da84bc49ef1788b14470c145a712b73a97ea21b51a6", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a079d818f2247c4c5f507acf8607dd146ce31c86e03bf4295cf5992d768b5585e1886184387f9e337bf4c0c0", + "lastblockhash" : "73b6de494c7f1d9fff91953827da19a67df8d99b89d84279f7ea29aa9b63fa58", "postState" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0x0a", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x14", + "balance" : "0x0a", "code" : "0x", "nonce" : "0x00", "storage" : { @@ -1493,18 +1716,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "c3a824b3f8810c0e080e046530c7113a574f3460ce9f8769be703d22a8e95b60", - "mixHash" : "0a1148a95c19cee4d479c2333667e7070dc4407221b6d4e227dafea6d44f728c", - "nonce" : "f0886149511bbf12", + "hash" : "cd67f38823b3489fbb1f4391d452fda6f441bed5358d4131cbba47c50ef7de93", + "mixHash" : "2c25e33b202106ca098ef2754462173ef6d04f624ffd205621bdd12c6ed2ecb6", + "nonce" : "49d45ea0b47f3ca3", "number" : "0x01", - "parentHash" : "1c0e2854eb76744cb8738145c3755c10e03083591ca8ad740a4da0d9e991a986", + "parentHash" : "33e12692bdc16457069bd6cdddabd0b83b159b6c743de762e47de5ee72dfc0f2", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b87e39", + "timestamp" : "0x561bc5a9", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a01c0e2854eb76744cb8738145c3755c10e03083591ca8ad740a4da0d9e991a986a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd88252088455b87e3980a00a1148a95c19cee4d479c2333667e7070dc4407221b6d4e227dafea6d44f728c88f0886149511bbf12f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a033e12692bdc16457069bd6cdddabd0b83b159b6c743de762e47de5ee72dfc0f2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd882520884561bc5a980a02c25e33b202106ca098ef2754462173ef6d04f624ffd205621bdd12c6ed2ecb68849d45ea0b47f3ca3f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -1529,27 +1752,27 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "063220035891872df1327fae3b3733f27cc6c0583f5ced940351b8c1f3d3f1c4", - "mixHash" : "3c80dabd0747201137a721f6c23928f8d1d3f20258d780536dc93885870ce105", - "nonce" : "9788f48ccead3940", + "hash" : "e6b6ffe06d5f20edc906780babdfaf1d59ecf944fcf645c56104f27a62845c73", + "mixHash" : "65e6b7b7610975f78b7bd729b35c5587100d757b6e2dd77d2caf67c3922393f0", + "nonce" : "9ed720ee813f296c", "number" : "0x02", - "parentHash" : "c3a824b3f8810c0e080e046530c7113a574f3460ce9f8769be703d22a8e95b60", - "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", - "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b87e3a", - "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", + "parentHash" : "cd67f38823b3489fbb1f4391d452fda6f441bed5358d4131cbba47c50ef7de93", + "receiptTrie" : "c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49", + "stateRoot" : "c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8", + "timestamp" : "0x561bc5b2", + "transactionsTrie" : "acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0c3a824b3f8810c0e080e046530c7113a574f3460ce9f8769be703d22a8e95b60a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd88252088455b87e3a80a03c80dabd0747201137a721f6c23928f8d1d3f20258d780536dc93885870ce105889788f48ccead3940f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90261f901f9a0cd67f38823b3489fbb1f4391d452fda6f441bed5358d4131cbba47c50ef7de93a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8a0acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1a0c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd882520884561bc5b280a065e6b7b7610975f78b7bd729b35c5587100d757b6e2dd77d2caf67c3922393f0889ed720ee813f296cf862f86001018304cb2f9400000000000000000000000000000000000000000a801ba04979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32eaa024b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0x04cb2f", "gasPrice" : "0x01", "nonce" : "0x01", - "r" : "0x33c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f23", - "s" : "0x1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cf", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "r" : "0x4979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32ea", + "s" : "0x24b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57", + "to" : "0000000000000000000000000000000000000000", "v" : "0x1b", "value" : "0x0a" } @@ -1558,7 +1781,7 @@ ] }, { - "rlp" : "0xf9045df901f9a0063220035891872df1327fae3b3733f27cc6c0583f5ced940351b8c1f3d3f1c4a04e656fd5c584c52694bde1cc7ba5db9359716cb48c62f1ac4c48163b4a8c0287948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd88252088455b87e3c80a04abb8d9ed23aa29659ceac8a07f961c09dd89deafb15c349d7fd28ea64ca0d4788b1c4be127703e711f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0bad4fc6b5d99ee03c4aab1592640f6f9dcbc850668d75d631aee34989b938faea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794acde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd8808455b87e3c80a0b689be513313f03d7f77cf3e1843eb33c517e3833a3e08d602660abd634d34e58891cddc15619d1cc9" + "rlp" : "0xf9045df901f9a0e6b6ffe06d5f20edc906780babdfaf1d59ecf944fcf645c56104f27a62845c73a09f292744fafe2152952fcb765e25447e19c44bc2246cdbe3c1e7195609ea5d82948888f1f195afa192cfee860698584c030f4c9db1a07004f6faa7968b3116c68ab805974d2db1ac7de9f5c01d7f5e7e27110f632562a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa032795354855550136c418b34a04f38dfda5aaeb46271f434f1ce57ab24831fe3b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd882520884561bc5bc80a00360e7da12761e3f8604df58363aff547ca483d502d2714aec7f2e46ca42c8928885e4968d0d84b201f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0bad4fc6b5d99ee03c4aab1592640f6f9dcbc850668d75d631aee34989b938faea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830385c002832fefd88084561bc5b880a094b882e2c2507273fca6634f794b9a9a1fd17326758448133da594bba69a73c0885b9a9a7e4f42af6e" } ], "genesisBlockHeader" : { @@ -1568,9 +1791,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "1c0e2854eb76744cb8738145c3755c10e03083591ca8ad740a4da0d9e991a986", - "mixHash" : "f3ac97cafb09924d1da1eed2ac142fbbc6a52cfb9778f7a296bc8054d3d97b2e", - "nonce" : "07135d8ca08a52f1", + "hash" : "33e12692bdc16457069bd6cdddabd0b83b159b6c743de762e47de5ee72dfc0f2", + "mixHash" : "a58c06b658ef21e300583e827086659b4814bc3703ff8bb2d8735d7e43fe4582", + "nonce" : "06490a63e8398839", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1579,11 +1802,18 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0f3ac97cafb09924d1da1eed2ac142fbbc6a52cfb9778f7a296bc8054d3d97b2e8807135d8ca08a52f1c0c0", - "lastblockhash" : "063220035891872df1327fae3b3733f27cc6c0583f5ced940351b8c1f3d3f1c4", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0a58c06b658ef21e300583e827086659b4814bc3703ff8bb2d8735d7e43fe45828806490a63e8398839c0c0", + "lastblockhash" : "e6b6ffe06d5f20edc906780babdfaf1d59ecf944fcf645c56104f27a62845c73", "postState" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0x0a", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x14", + "balance" : "0x0a", "code" : "0x", "nonce" : "0x00", "storage" : { @@ -1624,18 +1854,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "ce67b3029df5928f2223d4dee4d2d5045c10af627f1c1bcaeb185415699b0801", - "mixHash" : "9bf36d5ebe9c5d669ed74af553dc81d4a7f5505feab9bba94d6343e01eb26223", - "nonce" : "b188b061a68fbbae", + "hash" : "2dffc834b7bb3534aa6f5d88672d984288d09f2bd2aa9cefe807d9a0c8f479de", + "mixHash" : "4294fdfba11e64073d532941669676accd7a79103afeb6cc3efca47d5a1878e9", + "nonce" : "cd1623b626f781c9", "number" : "0x01", - "parentHash" : "709692af5de58b81d15974cc8a27ea725897ec96ea464dc0faa59f1ece69dfd0", + "parentHash" : "9d313fdb989614b4943d8f3eea2ffdadf449308af7fe0b3c080e7cac2d5142fb", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b87e43", + "timestamp" : "0x561bc5c0", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0709692af5de58b81d15974cc8a27ea725897ec96ea464dc0faa59f1ece69dfd0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd88252088455b87e4380a09bf36d5ebe9c5d669ed74af553dc81d4a7f5505feab9bba94d6343e01eb2622388b188b061a68fbbaef862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a09d313fdb989614b4943d8f3eea2ffdadf449308af7fe0b3c080e7cac2d5142fba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303863001832fefd882520884561bc5c080a04294fdfba11e64073d532941669676accd7a79103afeb6cc3efca47d5a1878e988cd1623b626f781c9f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -1660,27 +1890,27 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "5e01532d007561090d0f3f2435bd49bee5091cfcd430b6d94fc81446aacb1b93", - "mixHash" : "9891bb614a49b0151320f2290d60ac2a19fc883e70b560db802ec57019cff796", - "nonce" : "a7e050cab01d066b", + "hash" : "f189dc73f83baa7617eae17ee6d12326e6d4517d9fddd75a9852a4cc985ded65", + "mixHash" : "c5e1eb8c8a47349e358ef018a9e76f4381ae656f80dddeded520db366a47061d", + "nonce" : "f5147fec4d3679d8", "number" : "0x02", - "parentHash" : "ce67b3029df5928f2223d4dee4d2d5045c10af627f1c1bcaeb185415699b0801", - "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", - "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b87e45", - "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", + "parentHash" : "2dffc834b7bb3534aa6f5d88672d984288d09f2bd2aa9cefe807d9a0c8f479de", + "receiptTrie" : "c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49", + "stateRoot" : "c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8", + "timestamp" : "0x561bc5c2", + "transactionsTrie" : "acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0ce67b3029df5928f2223d4dee4d2d5045c10af627f1c1bcaeb185415699b0801a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd88252088455b87e4580a09891bb614a49b0151320f2290d60ac2a19fc883e70b560db802ec57019cff79688a7e050cab01d066bf861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90261f901f9a02dffc834b7bb3534aa6f5d88672d984288d09f2bd2aa9cefe807d9a0c8f479dea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c6fa77f5653d57255fb1084f18def0ce1a25f4881cccab026e88f5d64e38d3b8a0acad8f87898d185a2367f67a178e1f2729d5841fa0eb6af5dbf2ab434702bad1a0c1e3f38299eff85b88f22f93e743323d139610756897d6b1b7a307bc9f896b49b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd882520884561bc5c280a0c5e1eb8c8a47349e358ef018a9e76f4381ae656f80dddeded520db366a47061d88f5147fec4d3679d8f862f86001018304cb2f9400000000000000000000000000000000000000000a801ba04979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32eaa024b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0x04cb2f", "gasPrice" : "0x01", "nonce" : "0x01", - "r" : "0x33c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f23", - "s" : "0x1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cf", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "r" : "0x4979362f3bd23c6f2ae4d419728c2b15c950da631821c6274a55d64229af32ea", + "s" : "0x24b1d7092abc298fdf17255c95bd17f6a34663af8ca28957434be8f74fe7fe57", + "to" : "0000000000000000000000000000000000000000", "v" : "0x1b", "value" : "0x0a" } @@ -1689,7 +1919,7 @@ ] }, { - "rlp" : "0xf9045df901f9a05e01532d007561090d0f3f2435bd49bee5091cfcd430b6d94fc81446aacb1b93a03cbe0e866160d584acbf6340dd10d90c7497980a12ebc4285c84b3007ce3ffa4948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd88252088455b87e4680a05c1cbe105b516dac93139f9f529a35a4710b95d04875a0eae6092c14439de20b88c275d0124cad8ebff862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0ce67b3029df5928f2223d4dee4d2d5045c10af627f1c1bcaeb185415699b0801a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794acde5374fce5edbc8e2a8697c15331677e6ebf0ba0bad40b30d613c35dad43e3693329e1b1ee6350f989cf46a288025a1cbfdab9cda056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd8808455b87e4680a0391b4fc87266106ce3a0e9af0f1cc4ffe2f516ca53cd6f52d5f5d0f1380567fe88362b53768d9e4c70" + "rlp" : "0xf9045df901f9a0f189dc73f83baa7617eae17ee6d12326e6d4517d9fddd75a9852a4cc985ded65a0ea64cfd5a4edc4b676ec086535626ab47931753401367b69f92d4696c590aac7948888f1f195afa192cfee860698584c030f4c9db1a07004f6faa7968b3116c68ab805974d2db1ac7de9f5c01d7f5e7e27110f632562a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa032795354855550136c418b34a04f38dfda5aaeb46271f434f1ce57ab24831fe3b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008303871003832fefd882520884561bc5c980a0efe08c93790bb18a42839eddca3ecc41d7e545de36b0952449dcc99b2765aebc88ff5e3f0d900b9ab6f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a02dffc834b7bb3534aa6f5d88672d984288d09f2bd2aa9cefe807d9a0c8f479dea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0bad40b30d613c35dad43e3693329e1b1ee6350f989cf46a288025a1cbfdab9cda056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd88084561bc5c880a0b45455a4556df2a3266b4caa10313765ade7aaaa3517d796bbc3fbbed0fded36888a6f4f14f4f448e9" } ], "genesisBlockHeader" : { @@ -1699,9 +1929,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "709692af5de58b81d15974cc8a27ea725897ec96ea464dc0faa59f1ece69dfd0", - "mixHash" : "b8795ba3976b746f71ef2a9943718bcaceadb0caf6a59e31d658f3c20046c9d1", - "nonce" : "94c2344290da2c80", + "hash" : "9d313fdb989614b4943d8f3eea2ffdadf449308af7fe0b3c080e7cac2d5142fb", + "mixHash" : "a0a790b589a3c093a85b9e6c6b42f6358f8e74b26a17d86b46bb29c4950685ba", + "nonce" : "d067383cce3ad9c3", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1710,11 +1940,18 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0b8795ba3976b746f71ef2a9943718bcaceadb0caf6a59e31d658f3c20046c9d18894c2344290da2c80c0c0", - "lastblockhash" : "5e01532d007561090d0f3f2435bd49bee5091cfcd430b6d94fc81446aacb1b93", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0a0a790b589a3c093a85b9e6c6b42f6358f8e74b26a17d86b46bb29c4950685ba88d067383cce3ad9c3c0c0", + "lastblockhash" : "f189dc73f83baa7617eae17ee6d12326e6d4517d9fddd75a9852a4cc985ded65", "postState" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0x0a", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x14", + "balance" : "0x0a", "code" : "0x", "nonce" : "0x00", "storage" : { diff --git a/tests/files/BlockchainTests/bcUncleTest.json b/tests/files/BlockchainTests/bcUncleTest.json index 518685fda..601b680c3 100644 --- a/tests/files/BlockchainTests/bcUncleTest.json +++ b/tests/files/BlockchainTests/bcUncleTest.json @@ -9,18 +9,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "d1459ee3fba45439c8535b187ac29cc622301edb472d1e55eb16e02ef746a588", - "mixHash" : "2ddd34fbe339dda727ac49927a0940dacc3f7360a3432638bcb2d302c2381a75", - "nonce" : "dd2e754e486edc4e", + "hash" : "e48502ea93edbf72a24a97a0e4675f51bd58239f3257349d474eb7e317b2ffdb", + "mixHash" : "e9980eeacc4cb41bb0caf8b044625b1bd669a7f454f619c086ee2af583156463", + "nonce" : "8e0522d51d631fdb", "number" : "0x01", - "parentHash" : "de36c53de135fab5978dff571b752c0f381c4dd91b518a03c38b1b7869e47a0d", + "parentHash" : "1f2b76e4675519acdfe0efaefc0f3b5cb4a5f6e65305e8ecdf69973f6f8404e0", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e584", + "timestamp" : "0x561bc3db", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0de36c53de135fab5978dff571b752c0f381c4dd91b518a03c38b1b7869e47a0da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e58480a02ddd34fbe339dda727ac49927a0940dacc3f7360a3432638bcb2d302c2381a7588dd2e754e486edc4ef862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a01f2b76e4675519acdfe0efaefc0f3b5cb4a5f6e65305e8ecdf69973f6f8404e0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc3db80a0e9980eeacc4cb41bb0caf8b044625b1bd669a7f454f619c086ee2af583156463888e0522d51d631fdbf862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -45,18 +45,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "ebaf5e1212cc2898d1c60bf61eb9459b5bc87bbd5b648f071fb9e53e30f91b81", - "mixHash" : "c2cdeef16bc99d90385273dedac1a848e29b9793d9558a840e59a7b5a1ff3c12", - "nonce" : "13020c1bf8210e8e", + "hash" : "2ddea10991544f607b4b0862b3d8e65aa6a44ad2be1d39fc2960ebe04b141d99", + "mixHash" : "bc1dfa85b78c158c48387432d181c97c656ab5f8bee32c56a7f909cadc128160", + "nonce" : "427c78c41b8b44c8", "number" : "0x02", - "parentHash" : "d1459ee3fba45439c8535b187ac29cc622301edb472d1e55eb16e02ef746a588", + "parentHash" : "e48502ea93edbf72a24a97a0e4675f51bd58239f3257349d474eb7e317b2ffdb", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e585", + "timestamp" : "0x561bc3dd", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0d1459ee3fba45439c8535b187ac29cc622301edb472d1e55eb16e02ef746a588a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e58580a0c2cdeef16bc99d90385273dedac1a848e29b9793d9558a840e59a7b5a1ff3c128813020c1bf8210e8ef861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a0e48502ea93edbf72a24a97a0e4675f51bd58239f3257349d474eb7e317b2ffdba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc3dd80a0bc1dfa85b78c158c48387432d181c97c656ab5f8bee32c56a7f909cadc12816088427c78c41b8b44c8f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -81,18 +81,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "5ac5e2639f3643f25f49e17ff838fa590873f98b0e507d9cdca45b14c61cd629", - "mixHash" : "d8dd89c23b0689c7dd7e1eac9227682a7f69cd439708f7f5431439d35342272e", - "nonce" : "81f07232da87b45f", + "hash" : "41a0e2e4212ad440e9c5bb5d4a3ba913ce2be93818235d4e3fb1e893158401f2", + "mixHash" : "e1cce5f0b737f57322c2e220c600f5b8766ebff1f4768dfcd5d4d4eb4436aa8e", + "nonce" : "9fc009006d781b7c", "number" : "0x03", - "parentHash" : "ebaf5e1212cc2898d1c60bf61eb9459b5bc87bbd5b648f071fb9e53e30f91b81", + "parentHash" : "2ddea10991544f607b4b0862b3d8e65aa6a44ad2be1d39fc2960ebe04b141d99", "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", "stateRoot" : "e9940294a09308406a3d2e09203aed11db40259fac0a25e639ad2b30b82d07de", - "timestamp" : "0x55b7e586", + "timestamp" : "0x561bc3e1", "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", - "uncleHash" : "3b61326d775f03621fbbec3979abb87d60da6f06f28f472b062ea5787a4c1bdb" + "uncleHash" : "d3521c579d1a30b33de362925cc623afa019609c2732b4a3bdcfccecf882a3eb" }, - "rlp" : "0xf9045df901f9a0ebaf5e1212cc2898d1c60bf61eb9459b5bc87bbd5b648f071fb9e53e30f91b81a03b61326d775f03621fbbec3979abb87d60da6f06f28f472b062ea5787a4c1bdb948888f1f195afa192cfee860698584c030f4c9db1a0e9940294a09308406a3d2e09203aed11db40259fac0a25e639ad2b30b82d07dea01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e58680a0d8dd89c23b0689c7dd7e1eac9227682a7f69cd439708f7f5431439d35342272e8881f07232da87b45ff862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0d1459ee3fba45439c8535b187ac29cc622301edb472d1e55eb16e02ef746a588a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e58680a0ae88d5c6e500d3bcd93dbdd9512330014178ae495f5b2d39063daa23b81a01bd8891a24273290afe19", + "rlp" : "0xf9045df901f9a02ddea10991544f607b4b0862b3d8e65aa6a44ad2be1d39fc2960ebe04b141d99a0d3521c579d1a30b33de362925cc623afa019609c2732b4a3bdcfccecf882a3eb948888f1f195afa192cfee860698584c030f4c9db1a0e9940294a09308406a3d2e09203aed11db40259fac0a25e639ad2b30b82d07dea01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc3e180a0e1cce5f0b737f57322c2e220c600f5b8766ebff1f4768dfcd5d4d4eb4436aa8e889fc009006d781b7cf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0e48502ea93edbf72a24a97a0e4675f51bd58239f3257349d474eb7e317b2ffdba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc3df80a07f2f4946bb2e6a90eef8665a52277e83ca9a8dbc5743ec98c5cc09949dc32bfe8851595928db99aa77", "transactions" : [ { "data" : "0x", @@ -114,21 +114,21 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "263697c9f0a2da2239ffca45ca155725cba2e5bfda7d7bee5e45a840d98f9c32", - "mixHash" : "ae88d5c6e500d3bcd93dbdd9512330014178ae495f5b2d39063daa23b81a01bd", - "nonce" : "91a24273290afe19", + "hash" : "512363a3c825c0368246388141814c2dd97d78b628ba9793e880f4d17d7fab0b", + "mixHash" : "7f2f4946bb2e6a90eef8665a52277e83ca9a8dbc5743ec98c5cc09949dc32bfe", + "nonce" : "51595928db99aa77", "number" : "0x02", - "parentHash" : "d1459ee3fba45439c8535b187ac29cc622301edb472d1e55eb16e02ef746a588", + "parentHash" : "e48502ea93edbf72a24a97a0e4675f51bd58239f3257349d474eb7e317b2ffdb", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e586", + "timestamp" : "0x561bc3df", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" } ] }, { - "rlp" : "0xf903f8f901f7a05ac5e2639f3643f25f49e17ff838fa590873f98b0e507d9cdca45b14c61cd629a03b61326d775f03621fbbec3979abb87d60da6f06f28f472b062ea5787a4c1bdb948888f1f195afa192cfee860698584c030f4c9db1a093a6c849f6c7cf4458d0f74767b23b0d3b35a9440da5de1fd038b924b9e44968a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd8808455b7e58a80a0b112820bb4b50ced67a4133a129e0906f14a677e68636ec37e2d02a49f79264a88bc37d8f323feca07c0f901faf901f7a0d1459ee3fba45439c8535b187ac29cc622301edb472d1e55eb16e02ef746a588a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e58680a0ae88d5c6e500d3bcd93dbdd9512330014178ae495f5b2d39063daa23b81a01bd8891a24273290afe19" + "rlp" : "0xf903f8f901f7a041a0e2e4212ad440e9c5bb5d4a3ba913ce2be93818235d4e3fb1e893158401f2a0d3521c579d1a30b33de362925cc623afa019609c2732b4a3bdcfccecf882a3eb948888f1f195afa192cfee860698584c030f4c9db1a093a6c849f6c7cf4458d0f74767b23b0d3b35a9440da5de1fd038b924b9e44968a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88084561bc3e480a08792dfd7464add0a37ed9b03bdcf046522349983122d93feac78760e79560bdd88d8e58a151ea5f4c9c0f901faf901f7a0e48502ea93edbf72a24a97a0e4675f51bd58239f3257349d474eb7e317b2ffdba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc3df80a07f2f4946bb2e6a90eef8665a52277e83ca9a8dbc5743ec98c5cc09949dc32bfe8851595928db99aa77" } ], "genesisBlockHeader" : { @@ -138,9 +138,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "de36c53de135fab5978dff571b752c0f381c4dd91b518a03c38b1b7869e47a0d", - "mixHash" : "ffd80a8d4878283274f3a953830b666e54d08d584943f943817ebc00cb6aa18a", - "nonce" : "582e21c75ce909cf", + "hash" : "1f2b76e4675519acdfe0efaefc0f3b5cb4a5f6e65305e8ecdf69973f6f8404e0", + "mixHash" : "1622e2f2b73c3fd3a8f742c133499723e5e188c8e49a8ca4adf27d23e1a766e6", + "nonce" : "134c35f982254ea3", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -149,8 +149,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0ffd80a8d4878283274f3a953830b666e54d08d584943f943817ebc00cb6aa18a88582e21c75ce909cfc0c0", - "lastblockhash" : "5ac5e2639f3643f25f49e17ff838fa590873f98b0e507d9cdca45b14c61cd629", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a01622e2f2b73c3fd3a8f742c133499723e5e188c8e49a8ca4adf27d23e1a766e688134c35f982254ea3c0c0", + "lastblockhash" : "41a0e2e4212ad440e9c5bb5d4a3ba913ce2be93818235d4e3fb1e893158401f2", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x1e", @@ -201,18 +201,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "e08da09a1a834ecf70e86f5f08b9c2d5f875651a2125e347bea3f1226180f695", - "mixHash" : "9b3d2bd06e3043476cedd8b6ac5fde8879dded721ad14505d55f6914548bc8d1", - "nonce" : "ac83694108e6479a", + "hash" : "65519ee291a894641449ad8e17bc0b9917de7b285c14eb3d25ac84c1a6e69410", + "mixHash" : "21f65c09c958c2d3a57a0ddd42b0dae81c72045ac1071c85a60757e1194ca8dd", + "nonce" : "4c381026ab8be43d", "number" : "0x01", - "parentHash" : "d965546f6dc01e9cbdc9f32097ba4aa901fa61a29e474203ce90df4720810c10", + "parentHash" : "a68d594e993c3430fb369a9cfc61a6282a9300ef75b64601300be888bfcdc8a3", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e58e", + "timestamp" : "0x561bc3e6", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0d965546f6dc01e9cbdc9f32097ba4aa901fa61a29e474203ce90df4720810c10a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e58e80a09b3d2bd06e3043476cedd8b6ac5fde8879dded721ad14505d55f6914548bc8d188ac83694108e6479af862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a0a68d594e993c3430fb369a9cfc61a6282a9300ef75b64601300be888bfcdc8a3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc3e680a021f65c09c958c2d3a57a0ddd42b0dae81c72045ac1071c85a60757e1194ca8dd884c381026ab8be43df862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -237,18 +237,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "8f419993a65e8ba55c782b10b5b42d52c27adf0dc3d223957554a0c5ae6b2fc7", - "mixHash" : "83223f4f2b270a8f0b09e20bc176d9ae313c5d97a65e8e97cc27d38685329451", - "nonce" : "c35d924f239034f0", + "hash" : "26b70ea2cc9cf330cf0427c28ae740e088bd0d19c01716fdc457d7b498f5f5e2", + "mixHash" : "a9a3acc320fa49164ed9f83240acc0af17918b2c7b19ca561c717792e617f78d", + "nonce" : "13530b456a256474", "number" : "0x02", - "parentHash" : "e08da09a1a834ecf70e86f5f08b9c2d5f875651a2125e347bea3f1226180f695", + "parentHash" : "65519ee291a894641449ad8e17bc0b9917de7b285c14eb3d25ac84c1a6e69410", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e590", + "timestamp" : "0x561bc3e9", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0e08da09a1a834ecf70e86f5f08b9c2d5f875651a2125e347bea3f1226180f695a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e59080a083223f4f2b270a8f0b09e20bc176d9ae313c5d97a65e8e97cc27d3868532945188c35d924f239034f0f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a065519ee291a894641449ad8e17bc0b9917de7b285c14eb3d25ac84c1a6e69410a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc3e980a0a9a3acc320fa49164ed9f83240acc0af17918b2c7b19ca561c717792e617f78d8813530b456a256474f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -266,7 +266,7 @@ ] }, { - "rlp" : "0xf90659f901f9a08f419993a65e8ba55c782b10b5b42d52c27adf0dc3d223957554a0c5ae6b2fc7a01b32687e2ed5c25219121bb1f357f068b07f5de6b95cc6ff054b76e14ba80fd1948888f1f195afa192cfee860698584c030f4c9db1a0e9940294a09308406a3d2e09203aed11db40259fac0a25e639ad2b30b82d07dea01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e59280a0914a3422465854b5df2313efbcbd79127369dda04c813fba3f0d95651acf3694882a645d9e615c2270f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f903f6f901f7a0e08da09a1a834ecf70e86f5f08b9c2d5f875651a2125e347bea3f1226180f695a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e59280a053a4b94815610ac5eaf6011f9c0376429cc1a51ecedd6d0bbb6bf528d8592bf588c966bb810d62c998f901f9a0d965546f6dc01e9cbdc9f32097ba4aa901fa61a29e474203ce90df4720810c10a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e58e80a09b3d2bd06e3043476cedd8b6ac5fde8879dded721ad14505d55f6914548bc8d188ac83694108e6479a" + "rlp" : "0xf90659f901f9a026b70ea2cc9cf330cf0427c28ae740e088bd0d19c01716fdc457d7b498f5f5e2a08ca7b0108faa916c358d2de0588231e6a5f3e88fbc906b8070e76356fef33948948888f1f195afa192cfee860698584c030f4c9db1a077f96f4c766c10cd0207e2672b1b747c741ed75bc94e7be7abacb71cdca3c8fba01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc3f080a0d70898f46f07ff2981bd9a098e71e675dd9d5374c8c9b09c549bc22e160f45ab885395224fed81b7b8f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f903f6f901f7a065519ee291a894641449ad8e17bc0b9917de7b285c14eb3d25ac84c1a6e69410a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc3eb80a0f7376d0f62b8075afcd037734e25b6db38c7e44ad850ebff75b62a774d34ab5988c84729e5199a3faef901f9a0a68d594e993c3430fb369a9cfc61a6282a9300ef75b64601300be888bfcdc8a3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc3e680a021f65c09c958c2d3a57a0ddd42b0dae81c72045ac1071c85a60757e1194ca8dd884c381026ab8be43d" } ], "genesisBlockHeader" : { @@ -276,9 +276,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "d965546f6dc01e9cbdc9f32097ba4aa901fa61a29e474203ce90df4720810c10", - "mixHash" : "c9ce92c8e8e1063a35bc9b9482de6b9c167bc4821c3bc1844234e92b9a166fb0", - "nonce" : "f7c51053f185a20a", + "hash" : "a68d594e993c3430fb369a9cfc61a6282a9300ef75b64601300be888bfcdc8a3", + "mixHash" : "1ce87cf3c22e7ec0c9075694afd457b6cc5f836427d7d971b49309d86a2ee85a", + "nonce" : "f98d0175a0f2f94e", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -287,8 +287,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0c9ce92c8e8e1063a35bc9b9482de6b9c167bc4821c3bc1844234e92b9a166fb088f7c51053f185a20ac0c0", - "lastblockhash" : "8f419993a65e8ba55c782b10b5b42d52c27adf0dc3d223957554a0c5ae6b2fc7", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a01ce87cf3c22e7ec0c9075694afd457b6cc5f836427d7d971b49309d86a2ee85a88f98d0175a0f2f94ec0c0", + "lastblockhash" : "26b70ea2cc9cf330cf0427c28ae740e088bd0d19c01716fdc457d7b498f5f5e2", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x14", @@ -332,18 +332,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "04e67dfa17a078fd38cf706ea7291d96bf369c2d6afc5625c929d43446380b7b", - "mixHash" : "50d5d5bf7d4e2d12d5daba42a48ac5cc30eb293df9e15fe12f7383547c821382", - "nonce" : "b8302bd363e73696", + "hash" : "28c6b2d5d6ac96e8e0705a54de55eaeb4bea34f308446ba79a6d17b9d9426da9", + "mixHash" : "3304605c09e696752a938d6d3b1f57878bd17bc1c9728f6efa3ba32b32311042", + "nonce" : "1b1eca5095035097", "number" : "0x01", - "parentHash" : "02fa6335a92ee14d310111dc791dac8fa07dee43f0c0bc3df8e903c99539b82b", + "parentHash" : "218e0be47d3fe1b72e826958486e12498d1c6c40bb4332062a165104da62dd50", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e598", + "timestamp" : "0x561bc3f4", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a002fa6335a92ee14d310111dc791dac8fa07dee43f0c0bc3df8e903c99539b82ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e59880a050d5d5bf7d4e2d12d5daba42a48ac5cc30eb293df9e15fe12f7383547c82138288b8302bd363e73696f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a0218e0be47d3fe1b72e826958486e12498d1c6c40bb4332062a165104da62dd50a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc3f480a03304605c09e696752a938d6d3b1f57878bd17bc1c9728f6efa3ba32b32311042881b1eca5095035097f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -368,18 +368,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "5d35b0ea6f4a2f05924fc6e5629f0d73e399809b6451c59a2d923140e92e35a6", - "mixHash" : "961a985ba6d4356d0550d5a5a6a1f274c739fd2e61b9d9c5775a39d1758366b4", - "nonce" : "aef57d3a0e0e6775", + "hash" : "afbbbffcc5036c65c180a5c3c780896d9d488308b75ab910873ba4b417f83148", + "mixHash" : "c6a47c902d4dc8c35ec6dbae164544ff09100b94c619f87769d72f60784f56ce", + "nonce" : "bc8a7343f1cfa4a1", "number" : "0x02", - "parentHash" : "04e67dfa17a078fd38cf706ea7291d96bf369c2d6afc5625c929d43446380b7b", + "parentHash" : "28c6b2d5d6ac96e8e0705a54de55eaeb4bea34f308446ba79a6d17b9d9426da9", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e59a", + "timestamp" : "0x561bc3f6", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a004e67dfa17a078fd38cf706ea7291d96bf369c2d6afc5625c929d43446380b7ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e59a80a0961a985ba6d4356d0550d5a5a6a1f274c739fd2e61b9d9c5775a39d1758366b488aef57d3a0e0e6775f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a028c6b2d5d6ac96e8e0705a54de55eaeb4bea34f308446ba79a6d17b9d9426da9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc3f680a0c6a47c902d4dc8c35ec6dbae164544ff09100b94c619f87769d72f60784f56ce88bc8a7343f1cfa4a1f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -397,7 +397,7 @@ ] }, { - "rlp" : "0xf9045ff901f9a05d35b0ea6f4a2f05924fc6e5629f0d73e399809b6451c59a2d923140e92e35a6a04f118df9155a63ce502700086ba05f1171211eb10de8bd09726a029e6f202c65948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e59b80a0876520a31b9c7776568f6d0d53b04eacc3dd4e87693a1b9420d8986a28970dca885356a234e475e9cef862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901fcf901f9a004e67dfa17a078fd38cf706ea7291d96bf369c2d6afc5625c929d43446380b7ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e59a80a0961a985ba6d4356d0550d5a5a6a1f274c739fd2e61b9d9c5775a39d1758366b488aef57d3a0e0e6775" + "rlp" : "0xf9045ff901f9a0afbbbffcc5036c65c180a5c3c780896d9d488308b75ab910873ba4b417f83148a003a49b7617c9709df27313356d1b67355844cb2baf50f382f830a5d27a318d9d948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc3fb80a0ad98b68b79b1e669e8e4de4d86e0bcb1bb763a68d51879386fcedfe568824bf088c01fb53bbb47837ff862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901fcf901f9a028c6b2d5d6ac96e8e0705a54de55eaeb4bea34f308446ba79a6d17b9d9426da9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc3f680a0c6a47c902d4dc8c35ec6dbae164544ff09100b94c619f87769d72f60784f56ce88bc8a7343f1cfa4a1" } ], "genesisBlockHeader" : { @@ -407,9 +407,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "02fa6335a92ee14d310111dc791dac8fa07dee43f0c0bc3df8e903c99539b82b", - "mixHash" : "78da4fbb99dcb65d3253275def8e5122081317ec1c301e25c4175322f9b94e34", - "nonce" : "fa49f96aa9b08395", + "hash" : "218e0be47d3fe1b72e826958486e12498d1c6c40bb4332062a165104da62dd50", + "mixHash" : "72ca14d157ef3629f4d345f27a1f55f0f0accf4d4d8da2fa5649900ecf16d154", + "nonce" : "53bc0894f0ee5982", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -418,8 +418,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a078da4fbb99dcb65d3253275def8e5122081317ec1c301e25c4175322f9b94e3488fa49f96aa9b08395c0c0", - "lastblockhash" : "5d35b0ea6f4a2f05924fc6e5629f0d73e399809b6451c59a2d923140e92e35a6", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a072ca14d157ef3629f4d345f27a1f55f0f0accf4d4d8da2fa5649900ecf16d1548853bc0894f0ee5982c0c0", + "lastblockhash" : "afbbbffcc5036c65c180a5c3c780896d9d488308b75ab910873ba4b417f83148", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x14", @@ -463,18 +463,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "b2c9f317fa482941337afcd78f0245ceddc5fb800d81e0160407702b849586ab", - "mixHash" : "4392f6069c67e32b3dba5a4b5137c77944db6003f2dc8054a595278bada18258", - "nonce" : "7355723e6e9c4a5c", + "hash" : "2e1bc10b48c4d917cc4b5fad176cd4b16e259bf6d7c9dc71e07c4370a2177ded", + "mixHash" : "49f580b54968ce83a2c789d7c565e987cb67a1376c68eaf1be922e6feab20fbf", + "nonce" : "74bc89ed7150de07", "number" : "0x01", - "parentHash" : "76edaf15112f915673b3401c804dbb4f89e67a0f4860fd7520184d5990ffec48", + "parentHash" : "8c07f9fa573264adc978f6c4fd4e25f99d18abfe89733d6fe0e7c3fc3c15e023", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e59f", + "timestamp" : "0x561bc3fe", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a076edaf15112f915673b3401c804dbb4f89e67a0f4860fd7520184d5990ffec48a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e59f80a04392f6069c67e32b3dba5a4b5137c77944db6003f2dc8054a595278bada18258887355723e6e9c4a5cf862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a08c07f9fa573264adc978f6c4fd4e25f99d18abfe89733d6fe0e7c3fc3c15e023a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc3fe80a049f580b54968ce83a2c789d7c565e987cb67a1376c68eaf1be922e6feab20fbf8874bc89ed7150de07f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -499,18 +499,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "cf5e36ebc20606a873731d6d27f75441ab4d957a690966aacd779eae74856a14", - "mixHash" : "857389315198b52bd9cd655c1688eab97c430e4fb40bd7cfa92054cb1f70e93c", - "nonce" : "4b23d375f0772251", + "hash" : "f18b90ea4248d5d5a4f057a680b0f21ff6257d7e54cd63215730d3ff08741ec3", + "mixHash" : "754fca8fafdb5fa77e4602b822f249a64ddb53eb12618de5d778463bf8e996bc", + "nonce" : "f228a982f9f29263", "number" : "0x02", - "parentHash" : "b2c9f317fa482941337afcd78f0245ceddc5fb800d81e0160407702b849586ab", + "parentHash" : "2e1bc10b48c4d917cc4b5fad176cd4b16e259bf6d7c9dc71e07c4370a2177ded", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e5a1", + "timestamp" : "0x561bc400", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0b2c9f317fa482941337afcd78f0245ceddc5fb800d81e0160407702b849586aba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e5a180a0857389315198b52bd9cd655c1688eab97c430e4fb40bd7cfa92054cb1f70e93c884b23d375f0772251f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a02e1bc10b48c4d917cc4b5fad176cd4b16e259bf6d7c9dc71e07c4370a2177deda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc40080a0754fca8fafdb5fa77e4602b822f249a64ddb53eb12618de5d778463bf8e996bc88f228a982f9f29263f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -528,7 +528,7 @@ ] }, { - "rlp" : "0xf9045ff901f9a0cf5e36ebc20606a873731d6d27f75441ab4d957a690966aacd779eae74856a14a03e10a6bde02a32056e87540b4f97761d7788436547fadd9907384d0689ef8968948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e5a380a06ac4cb311dd22b96fbb67d1c8b58c6b223bbc5efba93384277f1ae40eb970a75885ae962d3c0a688c5f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901fcf901f9a076edaf15112f915673b3401c804dbb4f89e67a0f4860fd7520184d5990ffec48a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e59f80a04392f6069c67e32b3dba5a4b5137c77944db6003f2dc8054a595278bada18258887355723e6e9c4a5c" + "rlp" : "0xf9045ff901f9a0f18b90ea4248d5d5a4f057a680b0f21ff6257d7e54cd63215730d3ff08741ec3a030fdadad794c670926769f74fa05cc2c0ff3a68b93a57509648707ce21609f3f948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc40380a0c14f9cd0905208cc0023d467bb5cb41b7815d3751c6205d1cf49e9462cada72b88dd483760bb28adbaf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901fcf901f9a08c07f9fa573264adc978f6c4fd4e25f99d18abfe89733d6fe0e7c3fc3c15e023a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc3fe80a049f580b54968ce83a2c789d7c565e987cb67a1376c68eaf1be922e6feab20fbf8874bc89ed7150de07" } ], "genesisBlockHeader" : { @@ -538,9 +538,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "76edaf15112f915673b3401c804dbb4f89e67a0f4860fd7520184d5990ffec48", - "mixHash" : "3c6e94b3c451d3afb00f4eeda5af5ee38258199265bd2f0b15f74a4dc73c6772", - "nonce" : "95cd864dcabc25b5", + "hash" : "8c07f9fa573264adc978f6c4fd4e25f99d18abfe89733d6fe0e7c3fc3c15e023", + "mixHash" : "5836096134b0c630d3becde647f7346c0bd67376483bfa15d5fcef3b5ca298fc", + "nonce" : "cdf2e1487af65caf", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -549,8 +549,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a03c6e94b3c451d3afb00f4eeda5af5ee38258199265bd2f0b15f74a4dc73c67728895cd864dcabc25b5c0c0", - "lastblockhash" : "cf5e36ebc20606a873731d6d27f75441ab4d957a690966aacd779eae74856a14", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a05836096134b0c630d3becde647f7346c0bd67376483bfa15d5fcef3b5ca298fc88cdf2e1487af65cafc0c0", + "lastblockhash" : "f18b90ea4248d5d5a4f057a680b0f21ff6257d7e54cd63215730d3ff08741ec3", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x14", @@ -594,18 +594,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "efc544580960e0717179c9f5854aed7115581105f3887ff97c31e8d07a19ae27", - "mixHash" : "6f116e4f814a2a56bc490fbee6470e0bf7a3c1624e4349cd10a87392fdcd1673", - "nonce" : "2085687bf7fa11ed", + "hash" : "f5ff22a819ff7e7536276e26c7682bfb8364689d3d5460c8249de6233ba324d5", + "mixHash" : "3b8cf9ac62dfa2621a649ccfed7ac5ed30df162d5fadd4f1a634432e6f7f822a", + "nonce" : "9af21a3c2637d15f", "number" : "0x01", - "parentHash" : "bae7bea1f74549b0d9e4d6d75aa0433fd701afe571999ad580588dbd6468ca58", + "parentHash" : "27ab630fad1c05f2d202be95ba5c4a971d440401a608578791b9a4e8ce2ceffd", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e5a8", + "timestamp" : "0x561bc409", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0bae7bea1f74549b0d9e4d6d75aa0433fd701afe571999ad580588dbd6468ca58a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e5a880a06f116e4f814a2a56bc490fbee6470e0bf7a3c1624e4349cd10a87392fdcd1673882085687bf7fa11edf862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a027ab630fad1c05f2d202be95ba5c4a971d440401a608578791b9a4e8ce2ceffda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc40980a03b8cf9ac62dfa2621a649ccfed7ac5ed30df162d5fadd4f1a634432e6f7f822a889af21a3c2637d15ff862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -630,18 +630,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "df399fb7e3d41ec51d8a4b95fca3e25bd8bcd032889f1139bf4def32d5addaa1", - "mixHash" : "f003f39e3ea760fa0f000b4c3466ec377a866edc44aa8062bfb9fbb56bb2e7c5", - "nonce" : "965acd27bf4fb0bc", + "hash" : "7276c247fa8e722780e5fd04b20e201e820aec6c2ed9d42d7c70b5003310c70a", + "mixHash" : "1746e2c5cc0ea96c01157f8a1da022d88458bab1001d48a14f8ed1332c0bc19a", + "nonce" : "a975b4acdca288de", "number" : "0x02", - "parentHash" : "efc544580960e0717179c9f5854aed7115581105f3887ff97c31e8d07a19ae27", + "parentHash" : "f5ff22a819ff7e7536276e26c7682bfb8364689d3d5460c8249de6233ba324d5", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e5aa", + "timestamp" : "0x561bc40b", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0efc544580960e0717179c9f5854aed7115581105f3887ff97c31e8d07a19ae27a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e5aa80a0f003f39e3ea760fa0f000b4c3466ec377a866edc44aa8062bfb9fbb56bb2e7c588965acd27bf4fb0bcf861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a0f5ff22a819ff7e7536276e26c7682bfb8364689d3d5460c8249de6233ba324d5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc40b80a01746e2c5cc0ea96c01157f8a1da022d88458bab1001d48a14f8ed1332c0bc19a88a975b4acdca288def861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -666,18 +666,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "bd53cacb1744bd512d0b12653743b767263a4296300fed292a8cbda3890258b0", - "mixHash" : "054e2f70873a8c71adeb66368d98141ce659ddb46070a19e9e93fe9db13d4a5f", - "nonce" : "6831b8cc379b057e", + "hash" : "4cdd8183ededa30440819c4c801066a9ffd84ae90f7fec16ecbbb9966291fef7", + "mixHash" : "59250966279b993f403355acac726c9d72c3ee2c6555b614b64c89dce04b0ea5", + "nonce" : "e78cb88b4464e163", "number" : "0x03", - "parentHash" : "df399fb7e3d41ec51d8a4b95fca3e25bd8bcd032889f1139bf4def32d5addaa1", + "parentHash" : "7276c247fa8e722780e5fd04b20e201e820aec6c2ed9d42d7c70b5003310c70a", "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", - "timestamp" : "0x55b7e5ac", + "timestamp" : "0x561bc40f", "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0df399fb7e3d41ec51d8a4b95fca3e25bd8bcd032889f1139bf4def32d5addaa1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e5ac80a0054e2f70873a8c71adeb66368d98141ce659ddb46070a19e9e93fe9db13d4a5f886831b8cc379b057ef862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "rlp" : "0xf90261f901f9a07276c247fa8e722780e5fd04b20e201e820aec6c2ed9d42d7c70b5003310c70aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc40f80a059250966279b993f403355acac726c9d72c3ee2c6555b614b64c89dce04b0ea588e78cb88b4464e163f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", "transactions" : [ { "data" : "0x", @@ -695,7 +695,7 @@ ] }, { - "rlp" : "0xf9045ff901f9a0bd53cacb1744bd512d0b12653743b767263a4296300fed292a8cbda3890258b0a0b6701cd03d2d9b951b8d18be1b2c19a081f590cb08dede1308218c229bac851a948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88252088455b7e5ae80a043f185b7a105813e4fa6f5a6de1f80c996fc8cd7200698fd8a7a7b5402fc750488b5f5a065051f88a7f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7f901fcf901f9a0bae7bea1f74549b0d9e4d6d75aa0433fd701afe571999ad580588dbd6468ca58a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e5a880a06f116e4f814a2a56bc490fbee6470e0bf7a3c1624e4349cd10a87392fdcd1673882085687bf7fa11ed" + "rlp" : "0xf9045ff901f9a04cdd8183ededa30440819c4c801066a9ffd84ae90f7fec16ecbbb9966291fef7a01b39b412dcab31fa1d6232a13af9784387a30314d2abea3407f66b6d089cdebe948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc41280a0286f61157f81742f0761d13dd16220dd0b1ba8b48bd165a3559cf0401de73a64880d3f4b625c7daa74f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7f901fcf901f9a027ab630fad1c05f2d202be95ba5c4a971d440401a608578791b9a4e8ce2ceffda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc40980a03b8cf9ac62dfa2621a649ccfed7ac5ed30df162d5fadd4f1a634432e6f7f822a889af21a3c2637d15f" } ], "genesisBlockHeader" : { @@ -705,9 +705,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "bae7bea1f74549b0d9e4d6d75aa0433fd701afe571999ad580588dbd6468ca58", - "mixHash" : "c369497becc954655df0ba01b00cb65afa0c21e2a968b59033a3df4c5410ea43", - "nonce" : "6684324e5fed634a", + "hash" : "27ab630fad1c05f2d202be95ba5c4a971d440401a608578791b9a4e8ce2ceffd", + "mixHash" : "4789b990131e151e917838fc8c5891b66a0356c634be03f1e7aeaaa6b4e3f99e", + "nonce" : "ebee814b601eb2ef", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -716,8 +716,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0c369497becc954655df0ba01b00cb65afa0c21e2a968b59033a3df4c5410ea43886684324e5fed634ac0c0", - "lastblockhash" : "bd53cacb1744bd512d0b12653743b767263a4296300fed292a8cbda3890258b0", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a04789b990131e151e917838fc8c5891b66a0356c634be03f1e7aeaaa6b4e3f99e88ebee814b601eb2efc0c0", + "lastblockhash" : "4cdd8183ededa30440819c4c801066a9ffd84ae90f7fec16ecbbb9966291fef7", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x1e", @@ -761,18 +761,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "c088c514f32545eea57015416c673be2db49bf9ad86788e3c46b09132401308b", - "mixHash" : "a5f9c24dc3ed54a8a37aadd1555ff0c81c457cc6309d20f487bf67292c7578bf", - "nonce" : "2357a7d57af5c04a", + "hash" : "770df642df28b5ff044ae1eefeca3e43d4e2423353a3d49f05f7b3fb426bcaec", + "mixHash" : "1de46f9c52fed8cd3e3786ba4226de0938e51523bf2e7a9cc482e84feee77596", + "nonce" : "41cfa819ebcf7da9", "number" : "0x01", - "parentHash" : "a7d3001f400f558aed7bafde0a923532d7b3d1226f4236481a4df255cdc364bb", + "parentHash" : "4e54395baab915b2b684342aa88e6ad73b4b16711e38edcec4b5463b11a8c1f7", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e5b1", + "timestamp" : "0x561bc415", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0a7d3001f400f558aed7bafde0a923532d7b3d1226f4236481a4df255cdc364bba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e5b180a0a5f9c24dc3ed54a8a37aadd1555ff0c81c457cc6309d20f487bf67292c7578bf882357a7d57af5c04af862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a04e54395baab915b2b684342aa88e6ad73b4b16711e38edcec4b5463b11a8c1f7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc41580a01de46f9c52fed8cd3e3786ba4226de0938e51523bf2e7a9cc482e84feee775968841cfa819ebcf7da9f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -797,18 +797,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "168c15e29d9b89c40f376d9ca651bceff69a8b0530fa1723a85b5eb21361c5be", - "mixHash" : "58ba91cd3ee3c98b03c7715dc1518d0885ace473c1611a9d131879246b94d779", - "nonce" : "2a31f6c891b93201", + "hash" : "edaa8c5d0aee08673ec6bb5af1d8c6f171db8d18efe16b7a1f8aab4f6425abb8", + "mixHash" : "cb0df6e506f1a9d36e83b12c026efeb70404727adb66d9f1777a5a1617460c46", + "nonce" : "41bd8ecad5e6d901", "number" : "0x02", - "parentHash" : "c088c514f32545eea57015416c673be2db49bf9ad86788e3c46b09132401308b", + "parentHash" : "770df642df28b5ff044ae1eefeca3e43d4e2423353a3d49f05f7b3fb426bcaec", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e5b3", + "timestamp" : "0x561bc419", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0c088c514f32545eea57015416c673be2db49bf9ad86788e3c46b09132401308ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e5b380a058ba91cd3ee3c98b03c7715dc1518d0885ace473c1611a9d131879246b94d779882a31f6c891b93201f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a0770df642df28b5ff044ae1eefeca3e43d4e2423353a3d49f05f7b3fb426bcaeca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc41980a0cb0df6e506f1a9d36e83b12c026efeb70404727adb66d9f1777a5a1617460c468841bd8ecad5e6d901f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -833,18 +833,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "173c269cfa758a242ddfd2ab21906cf283fe5541ead238c991516f6788dde4a2", - "mixHash" : "0929e359b63abdee605d2a7658937962d413ac7999992f1f968ca72b681c0325", - "nonce" : "77ee3052fc7870a3", + "hash" : "06f1e192944a65a6f56eb561efa3ceab3a35482941fe96cd905d00d8fa6781a6", + "mixHash" : "95a9b0608caa38a3aca6cdf96bc78e6391abb7942ac864c400396c17dfe0cb2f", + "nonce" : "d6fed8adf8bfc3b2", "number" : "0x03", - "parentHash" : "168c15e29d9b89c40f376d9ca651bceff69a8b0530fa1723a85b5eb21361c5be", + "parentHash" : "edaa8c5d0aee08673ec6bb5af1d8c6f171db8d18efe16b7a1f8aab4f6425abb8", "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", - "timestamp" : "0x55b7e5b4", + "timestamp" : "0x561bc41d", "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0168c15e29d9b89c40f376d9ca651bceff69a8b0530fa1723a85b5eb21361c5bea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e5b480a00929e359b63abdee605d2a7658937962d413ac7999992f1f968ca72b681c03258877ee3052fc7870a3f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "rlp" : "0xf90261f901f9a0edaa8c5d0aee08673ec6bb5af1d8c6f171db8d18efe16b7a1f8aab4f6425abb8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc41d80a095a9b0608caa38a3aca6cdf96bc78e6391abb7942ac864c400396c17dfe0cb2f88d6fed8adf8bfc3b2f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", "transactions" : [ { "data" : "0x", @@ -869,18 +869,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "4d1b68924c506e1e7c3a53fe4b971132825a99ed0c3ed7a99ca1ce3a5bfddc73", - "mixHash" : "cd4da0227158b308a8df6d7747710851d98f94b85a56165376623cd48c27b22b", - "nonce" : "d005176761e1bf72", + "hash" : "0f4aa37158d8427eb4f6d7de20ac04adf04e316bd8c6be41b38fa6e2120c4482", + "mixHash" : "65304dc97e7467aca8ca2dce6c4918712078f46ff7784d8dc2a3fb5e6b54eb1b", + "nonce" : "7b4df06ea711388f", "number" : "0x04", - "parentHash" : "173c269cfa758a242ddfd2ab21906cf283fe5541ead238c991516f6788dde4a2", + "parentHash" : "06f1e192944a65a6f56eb561efa3ceab3a35482941fe96cd905d00d8fa6781a6", "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", - "timestamp" : "0x55b7e5b6", + "timestamp" : "0x561bc41e", "transactionsTrie" : "9735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0173c269cfa758a242ddfd2ab21906cf283fe5541ead238c991516f6788dde4a2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88252088455b7e5b680a0cd4da0227158b308a8df6d7747710851d98f94b85a56165376623cd48c27b22b88d005176761e1bf72f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", + "rlp" : "0xf90261f901f9a006f1e192944a65a6f56eb561efa3ceab3a35482941fe96cd905d00d8fa6781a6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc41e80a065304dc97e7467aca8ca2dce6c4918712078f46ff7784d8dc2a3fb5e6b54eb1b887b4df06ea711388ff862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", "transactions" : [ { "data" : "0x", @@ -898,7 +898,7 @@ ] }, { - "rlp" : "0xf9045ff901f9a04d1b68924c506e1e7c3a53fe4b971132825a99ed0c3ed7a99ca1ce3a5bfddc73a00796c1e911f827148323234c9ca5e7d116284e322f4bddb744274addc827847c948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a07e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd88252088455b7e5b880a0e3b9d4962bd53a13b7ea8b55dc0a6aeb2cb276371ad59a8a3315b568e57726da88b8c420a5e9391248f862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29a0796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13f901fcf901f9a0a7d3001f400f558aed7bafde0a923532d7b3d1226f4236481a4df255cdc364bba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e5b180a0a5f9c24dc3ed54a8a37aadd1555ff0c81c457cc6309d20f487bf67292c7578bf882357a7d57af5c04a" + "rlp" : "0xf9045ff901f9a00f4aa37158d8427eb4f6d7de20ac04adf04e316bd8c6be41b38fa6e2120c4482a0eee51781cc181b8acfbfa13c92a48115c11bcf6ddb5c1cc2398958624968d0ac948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a07e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bc42380a0656802c47267b2be536ffab84eca7d9de7e2ca0eee133b2b7b2e1b8ef262b88b8874ff9f0f9bf2c9eef862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29a0796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13f901fcf901f9a04e54395baab915b2b684342aa88e6ad73b4b16711e38edcec4b5463b11a8c1f7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc41580a01de46f9c52fed8cd3e3786ba4226de0938e51523bf2e7a9cc482e84feee775968841cfa819ebcf7da9" } ], "genesisBlockHeader" : { @@ -908,9 +908,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "a7d3001f400f558aed7bafde0a923532d7b3d1226f4236481a4df255cdc364bb", - "mixHash" : "ac04d4f385493f0918cfc4a89287448b934498b26a765b51c9506c3291ea17a6", - "nonce" : "9a7e7b45f200f05f", + "hash" : "4e54395baab915b2b684342aa88e6ad73b4b16711e38edcec4b5463b11a8c1f7", + "mixHash" : "6d0fee1aecd4d0209ad84ca65dff5965d7021890caf3b92996176265ee5e5530", + "nonce" : "fd09e3fa8cd819e9", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -919,8 +919,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0ac04d4f385493f0918cfc4a89287448b934498b26a765b51c9506c3291ea17a6889a7e7b45f200f05fc0c0", - "lastblockhash" : "4d1b68924c506e1e7c3a53fe4b971132825a99ed0c3ed7a99ca1ce3a5bfddc73", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a06d0fee1aecd4d0209ad84ca65dff5965d7021890caf3b92996176265ee5e553088fd09e3fa8cd819e9c0c0", + "lastblockhash" : "0f4aa37158d8427eb4f6d7de20ac04adf04e316bd8c6be41b38fa6e2120c4482", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x28", @@ -964,18 +964,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "64acc8b4fc4a117e34dff4404f4089d633971258199ee84f66598513dcf54792", - "mixHash" : "2de21e19139afd229dfd2013d9b8fda28572b831e3cddc2c355c6f3665695226", - "nonce" : "659a80b4ba46f5a1", + "hash" : "ab2216a07ce6423c5a0564c0ea9731dea90ed7ad33e790cdb3a986edd4a982f9", + "mixHash" : "7c2bb1ac8e06d353004b8378c7048f1c5d78e0d998388e52634beb8a33d35bdf", + "nonce" : "8076a0280383c99e", "number" : "0x01", - "parentHash" : "dc7eb82095cab63db777934f5b2197d7ad722f0a20d8bc4fce487f448592e89a", + "parentHash" : "1cf159bc97d10985eb765adb4bad3330f41bbf4a0d18f4cba11bc3ed97ca9fcc", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e5bc", + "timestamp" : "0x561bc426", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0dc7eb82095cab63db777934f5b2197d7ad722f0a20d8bc4fce487f448592e89aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e5bc80a02de21e19139afd229dfd2013d9b8fda28572b831e3cddc2c355c6f366569522688659a80b4ba46f5a1f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a01cf159bc97d10985eb765adb4bad3330f41bbf4a0d18f4cba11bc3ed97ca9fcca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc42680a07c2bb1ac8e06d353004b8378c7048f1c5d78e0d998388e52634beb8a33d35bdf888076a0280383c99ef862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -1000,18 +1000,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "71b70c245b5cfbfc848a2b38772a6bcd9d0143d2984cd7cddb4ea51b8a2bdca3", - "mixHash" : "ce5b0d994fcdbcf7c6f4f5b65a63b188110b3392ca4999dfbffcc708dbfc8f5c", - "nonce" : "3a7a7793ad4203ef", + "hash" : "2cd7321a8d37ab3fc5ccf664cf56664f07d40d685167e3d901108606ba5cfa0d", + "mixHash" : "69207f45eb250f0b43eca81567d1c265fdeaac155c8879f68dcb80d3a3575252", + "nonce" : "07090e4bc09181bc", "number" : "0x02", - "parentHash" : "64acc8b4fc4a117e34dff4404f4089d633971258199ee84f66598513dcf54792", + "parentHash" : "ab2216a07ce6423c5a0564c0ea9731dea90ed7ad33e790cdb3a986edd4a982f9", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e5bf", + "timestamp" : "0x561bc428", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a064acc8b4fc4a117e34dff4404f4089d633971258199ee84f66598513dcf54792a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e5bf80a0ce5b0d994fcdbcf7c6f4f5b65a63b188110b3392ca4999dfbffcc708dbfc8f5c883a7a7793ad4203eff861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a0ab2216a07ce6423c5a0564c0ea9731dea90ed7ad33e790cdb3a986edd4a982f9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc42880a069207f45eb250f0b43eca81567d1c265fdeaac155c8879f68dcb80d3a35752528807090e4bc09181bcf861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -1036,18 +1036,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "23b4a850d077d21abe6db3ecdb0ca5827828ad49718136e79c42d0a71457676a", - "mixHash" : "23d725aab7e9c0ab788037cffe5a8fc3623f82e408317221960205aea702f3b0", - "nonce" : "b650aeb41ca2aa45", + "hash" : "6250152d14ddeb29e3fefd9fd087be4f3f1a9c443fa0a4cea5c710d27784c72a", + "mixHash" : "acb3daed02f3567a38b2a7f7d436bf8fd2fd0c1d312a543aac416c975b4bc8d3", + "nonce" : "9e1166e473e5f2c7", "number" : "0x03", - "parentHash" : "71b70c245b5cfbfc848a2b38772a6bcd9d0143d2984cd7cddb4ea51b8a2bdca3", + "parentHash" : "2cd7321a8d37ab3fc5ccf664cf56664f07d40d685167e3d901108606ba5cfa0d", "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", - "timestamp" : "0x55b7e5c0", + "timestamp" : "0x561bc42b", "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a071b70c245b5cfbfc848a2b38772a6bcd9d0143d2984cd7cddb4ea51b8a2bdca3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e5c080a023d725aab7e9c0ab788037cffe5a8fc3623f82e408317221960205aea702f3b088b650aeb41ca2aa45f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "rlp" : "0xf90261f901f9a02cd7321a8d37ab3fc5ccf664cf56664f07d40d685167e3d901108606ba5cfa0da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc42b80a0acb3daed02f3567a38b2a7f7d436bf8fd2fd0c1d312a543aac416c975b4bc8d3889e1166e473e5f2c7f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", "transactions" : [ { "data" : "0x", @@ -1072,18 +1072,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "49a60e4d7235c32d4094d45c675964b4d8ef2b325b5850e8541f71e84c3eb38c", - "mixHash" : "2685ef16662303e7a425c1bd542c029306cfb1d67c07477be8265843be950ac0", - "nonce" : "a0479a4b4faedf99", + "hash" : "42034c8e33ca1471d23cf1972f71ddff6691f5bac23bf88132221abe95dd882e", + "mixHash" : "bb5a6d1c4d0ac1ffed114bb28af297a8e6a3df01ee3f67481ebffa340c8c4e90", + "nonce" : "819278324b22b4e0", "number" : "0x04", - "parentHash" : "23b4a850d077d21abe6db3ecdb0ca5827828ad49718136e79c42d0a71457676a", + "parentHash" : "6250152d14ddeb29e3fefd9fd087be4f3f1a9c443fa0a4cea5c710d27784c72a", "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", - "timestamp" : "0x55b7e5c1", + "timestamp" : "0x561bc42f", "transactionsTrie" : "9735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a023b4a850d077d21abe6db3ecdb0ca5827828ad49718136e79c42d0a71457676aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88252088455b7e5c180a02685ef16662303e7a425c1bd542c029306cfb1d67c07477be8265843be950ac088a0479a4b4faedf99f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", + "rlp" : "0xf90261f901f9a06250152d14ddeb29e3fefd9fd087be4f3f1a9c443fa0a4cea5c710d27784c72aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc42f80a0bb5a6d1c4d0ac1ffed114bb28af297a8e6a3df01ee3f67481ebffa340c8c4e9088819278324b22b4e0f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", "transactions" : [ { "data" : "0x", @@ -1108,18 +1108,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "94faa16ceb3b4a0311ab097befd1ca720a24b69338a607f869d36497b0ee35ef", - "mixHash" : "471568577fe15eff1c1186ac74070ebd4c639737a98b92b08a94cd2aec4e77d9", - "nonce" : "45befb900c78d740", + "hash" : "0edc3ccbb20f3a5cd63837965801389741250e9693cc28d11137540ee1451ab4", + "mixHash" : "3a2c28f72bbc384be3d0726a3611fcd8dd9a81d27f6e92cf1df18e48c9ad6ef6", + "nonce" : "cbd78e65bbc6f0ce", "number" : "0x05", - "parentHash" : "49a60e4d7235c32d4094d45c675964b4d8ef2b325b5850e8541f71e84c3eb38c", + "parentHash" : "42034c8e33ca1471d23cf1972f71ddff6691f5bac23bf88132221abe95dd882e", "receiptTrie" : "e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9", "stateRoot" : "72f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19", - "timestamp" : "0x55b7e5c2", + "timestamp" : "0x561bc431", "transactionsTrie" : "7e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a049a60e4d7235c32d4094d45c675964b4d8ef2b325b5850e8541f71e84c3eb38ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a07e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd88252088455b7e5c280a0471568577fe15eff1c1186ac74070ebd4c639737a98b92b08a94cd2aec4e77d98845befb900c78d740f862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29a0796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13c0", + "rlp" : "0xf90261f901f9a042034c8e33ca1471d23cf1972f71ddff6691f5bac23bf88132221abe95dd882ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a07e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bc43180a03a2c28f72bbc384be3d0726a3611fcd8dd9a81d27f6e92cf1df18e48c9ad6ef688cbd78e65bbc6f0cef862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29a0796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13c0", "transactions" : [ { "data" : "0x", @@ -1137,7 +1137,7 @@ ] }, { - "rlp" : "0xf9045ff901f9a094faa16ceb3b4a0311ab097befd1ca720a24b69338a607f869d36497b0ee35efa03d6b7960c3c02905fec989139a9e7cccb075c3c1a0e7c1e2dba267fa9dabb332948888f1f195afa192cfee860698584c030f4c9db1a04fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640a072e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fda0849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd88252088455b7e5c480a0102b957975a27f33834d8f5b044912306fe2188bbda5a11e5465f443b1fa0f268848e0346b315e1a5bf862f86005018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0b6a4064ef7d23f0e149472d6f1257055149840b6c73a4ae25e595b9f9fc78edca004ad52e8157ae742b551851d58fd6c3919cd7e5a0a9c6685d5bc630a657dcde7f901fcf901f9a0dc7eb82095cab63db777934f5b2197d7ad722f0a20d8bc4fce487f448592e89aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e5bc80a02de21e19139afd229dfd2013d9b8fda28572b831e3cddc2c355c6f366569522688659a80b4ba46f5a1" + "rlp" : "0xf9045ff901f9a00edc3ccbb20f3a5cd63837965801389741250e9693cc28d11137540ee1451ab4a0843e97db59275c1eff41514cd8634b5565f2954718183545fbe6d1d50080d008948888f1f195afa192cfee860698584c030f4c9db1a04fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640a072e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fda0849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882520884561bc43580a023bfdcf1fcfedf608394a3cc3b363146921b384f536d69a2c930f91f286732c688e4c5d4ac920e3d0bf862f86005018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0b6a4064ef7d23f0e149472d6f1257055149840b6c73a4ae25e595b9f9fc78edca004ad52e8157ae742b551851d58fd6c3919cd7e5a0a9c6685d5bc630a657dcde7f901fcf901f9a01cf159bc97d10985eb765adb4bad3330f41bbf4a0d18f4cba11bc3ed97ca9fcca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc42680a07c2bb1ac8e06d353004b8378c7048f1c5d78e0d998388e52634beb8a33d35bdf888076a0280383c99e" } ], "genesisBlockHeader" : { @@ -1147,9 +1147,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "dc7eb82095cab63db777934f5b2197d7ad722f0a20d8bc4fce487f448592e89a", - "mixHash" : "da5b6a7e56d7ea6da80fffbbbace05baeb41e37de88165dcaf0b1e79748d7466", - "nonce" : "efe028cb4b9bcd55", + "hash" : "1cf159bc97d10985eb765adb4bad3330f41bbf4a0d18f4cba11bc3ed97ca9fcc", + "mixHash" : "aed6ab4b4325ee7dde7fedfb941306e187f012e1119f05f10672f585f8f38e53", + "nonce" : "63e96c614c54256e", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1158,8 +1158,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0da5b6a7e56d7ea6da80fffbbbace05baeb41e37de88165dcaf0b1e79748d746688efe028cb4b9bcd55c0c0", - "lastblockhash" : "94faa16ceb3b4a0311ab097befd1ca720a24b69338a607f869d36497b0ee35ef", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0aed6ab4b4325ee7dde7fedfb941306e187f012e1119f05f10672f585f8f38e538863e96c614c54256ec0c0", + "lastblockhash" : "0edc3ccbb20f3a5cd63837965801389741250e9693cc28d11137540ee1451ab4", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x32", @@ -1203,18 +1203,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "c2158365e8a2f5dbcb528a9d758cbe99b95dd0b0d1263141fc8fdbc2b348e988", - "mixHash" : "d8ecd2ebd545fc06f7a6a307c9b49fc7bb8ab3501c5b5268b9aeec963b534331", - "nonce" : "78c2a01ce08eff1f", + "hash" : "4ccb171eba8cc37dd26f3cd935cdc85fd863ea45659d5bf1ab443464c406ec7f", + "mixHash" : "5468d589075b9b317e0e3a5332cd7893f6e16a37f54c76d8ee87e1ad9b51e4b0", + "nonce" : "e73a06b5f02d31e5", "number" : "0x01", - "parentHash" : "db58fe349415294cb8de63cf37f4c6036d6b31cab5020cf2f8d29750aecae5db", + "parentHash" : "1ec2f9804748eb46081f997445bba4151ebbe3e22e9379a14b9d941934a6e2ce", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e5cb", + "timestamp" : "0x561bc439", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0db58fe349415294cb8de63cf37f4c6036d6b31cab5020cf2f8d29750aecae5dba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e5cb80a0d8ecd2ebd545fc06f7a6a307c9b49fc7bb8ab3501c5b5268b9aeec963b5343318878c2a01ce08eff1ff862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a01ec2f9804748eb46081f997445bba4151ebbe3e22e9379a14b9d941934a6e2cea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc43980a05468d589075b9b317e0e3a5332cd7893f6e16a37f54c76d8ee87e1ad9b51e4b088e73a06b5f02d31e5f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -1239,18 +1239,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "4eb9258a1a59de9bdc80d4839d27c87d9d4c0a4893c035bc3228b124a74cdaa6", - "mixHash" : "3e9156ee95f68a379cdfdceb10241e409013e7d7cc6c0106d2b5a97d8442e218", - "nonce" : "164d4341de8581a8", + "hash" : "427be72cc2fce1e7d2946a0a52793b60c7e7b644a025074086bf061af936dc3e", + "mixHash" : "1dd410c9ac812fad0f278a115a893413c3cbb244a0d95e41b81b72756142b5f1", + "nonce" : "9f834894fee141c4", "number" : "0x02", - "parentHash" : "c2158365e8a2f5dbcb528a9d758cbe99b95dd0b0d1263141fc8fdbc2b348e988", + "parentHash" : "4ccb171eba8cc37dd26f3cd935cdc85fd863ea45659d5bf1ab443464c406ec7f", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e5cd", + "timestamp" : "0x561bc43c", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0c2158365e8a2f5dbcb528a9d758cbe99b95dd0b0d1263141fc8fdbc2b348e988a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e5cd80a03e9156ee95f68a379cdfdceb10241e409013e7d7cc6c0106d2b5a97d8442e21888164d4341de8581a8f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a04ccb171eba8cc37dd26f3cd935cdc85fd863ea45659d5bf1ab443464c406ec7fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc43c80a01dd410c9ac812fad0f278a115a893413c3cbb244a0d95e41b81b72756142b5f1889f834894fee141c4f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -1275,18 +1275,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "d1d98af96f04091341a96879a08064e30bea8830be1d52490fca7b347b9186c2", - "mixHash" : "764a8bde9f8cf66922fdc7c73a9bf468ac82a05eaa885dcba0c85b15566f0a55", - "nonce" : "0e39d847d1980fe7", + "hash" : "7f14a0103267feaa9ee281eca90349c1e02429efa3fc7f0dfc474040049e4cb6", + "mixHash" : "2392bf737603b072c1899129bbac68ec483600010f4bc9a3bf8c8b72faac8d8e", + "nonce" : "d3ab3138ff04a97d", "number" : "0x03", - "parentHash" : "4eb9258a1a59de9bdc80d4839d27c87d9d4c0a4893c035bc3228b124a74cdaa6", + "parentHash" : "427be72cc2fce1e7d2946a0a52793b60c7e7b644a025074086bf061af936dc3e", "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", - "timestamp" : "0x55b7e5cf", + "timestamp" : "0x561bc440", "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a04eb9258a1a59de9bdc80d4839d27c87d9d4c0a4893c035bc3228b124a74cdaa6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e5cf80a0764a8bde9f8cf66922fdc7c73a9bf468ac82a05eaa885dcba0c85b15566f0a55880e39d847d1980fe7f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "rlp" : "0xf90261f901f9a0427be72cc2fce1e7d2946a0a52793b60c7e7b644a025074086bf061af936dc3ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc44080a02392bf737603b072c1899129bbac68ec483600010f4bc9a3bf8c8b72faac8d8e88d3ab3138ff04a97df862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", "transactions" : [ { "data" : "0x", @@ -1311,18 +1311,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "4479c3ce79955dbcead954c1c2b09055a3c6c681df69e7a7f3844b098604f50e", - "mixHash" : "f6ab57b3557b91370893c28131f2d4866515660de2ad1ae0ffad642cfe55ad50", - "nonce" : "e1340d70aa58137b", + "hash" : "aa15b546bba7859988802c6a14827fb63dd59aa82aa4ed9dacf00d0480565f71", + "mixHash" : "e29c0376f724298ada5ef8294737c36e45e09b69f697d93e8e064bc983b06eed", + "nonce" : "413e5c489b8f29f3", "number" : "0x04", - "parentHash" : "d1d98af96f04091341a96879a08064e30bea8830be1d52490fca7b347b9186c2", + "parentHash" : "7f14a0103267feaa9ee281eca90349c1e02429efa3fc7f0dfc474040049e4cb6", "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", - "timestamp" : "0x55b7e5d0", + "timestamp" : "0x561bc442", "transactionsTrie" : "9735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0d1d98af96f04091341a96879a08064e30bea8830be1d52490fca7b347b9186c2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88252088455b7e5d080a0f6ab57b3557b91370893c28131f2d4866515660de2ad1ae0ffad642cfe55ad5088e1340d70aa58137bf862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", + "rlp" : "0xf90261f901f9a07f14a0103267feaa9ee281eca90349c1e02429efa3fc7f0dfc474040049e4cb6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc44280a0e29c0376f724298ada5ef8294737c36e45e09b69f697d93e8e064bc983b06eed88413e5c489b8f29f3f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", "transactions" : [ { "data" : "0x", @@ -1347,18 +1347,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "7913af01d34c7429b060585c4545e492362e0dcf761c5cbe40e838189a17f2aa", - "mixHash" : "cfc32a0981aec5f069d2920004e6a95b0be61a5c85c23e8b4f1d2214e428471e", - "nonce" : "2f58d2e152671bbe", + "hash" : "08da0fffb011ff004ec18e76d997709d306455f0cd561ae6e415a0ac220d6357", + "mixHash" : "694654bf406a63d05507218374a4733047cc39d2b43669aab0a220e9ee709e3a", + "nonce" : "affcecb6370d2556", "number" : "0x05", - "parentHash" : "4479c3ce79955dbcead954c1c2b09055a3c6c681df69e7a7f3844b098604f50e", + "parentHash" : "aa15b546bba7859988802c6a14827fb63dd59aa82aa4ed9dacf00d0480565f71", "receiptTrie" : "e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9", "stateRoot" : "72f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19", - "timestamp" : "0x55b7e5d2", + "timestamp" : "0x561bc444", "transactionsTrie" : "7e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a04479c3ce79955dbcead954c1c2b09055a3c6c681df69e7a7f3844b098604f50ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a07e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd88252088455b7e5d280a0cfc32a0981aec5f069d2920004e6a95b0be61a5c85c23e8b4f1d2214e428471e882f58d2e152671bbef862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29a0796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13c0", + "rlp" : "0xf90261f901f9a0aa15b546bba7859988802c6a14827fb63dd59aa82aa4ed9dacf00d0480565f71a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a07e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bc44480a0694654bf406a63d05507218374a4733047cc39d2b43669aab0a220e9ee709e3a88affcecb6370d2556f862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29a0796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13c0", "transactions" : [ { "data" : "0x", @@ -1383,18 +1383,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "98e70133a3ab917b5327976fe5bb83a2c1aefd340faf1e6dce30dc78135e252a", - "mixHash" : "c851bffbfc59efd7848d11bda1b5830f40529bcc992d98a233f22bbc2cea288a", - "nonce" : "abeddaa2fcca7b1d", + "hash" : "bb3ffc4ad4fc0a4a830b9e5520c3d94c307b46b1d751d3bd337daf9031cf79a1", + "mixHash" : "1880d92cba777ea7653614e704f84984dfcc3a02914b66d7ceb9f170c66c8e6e", + "nonce" : "b5a561e0b567cdb8", "number" : "0x06", - "parentHash" : "7913af01d34c7429b060585c4545e492362e0dcf761c5cbe40e838189a17f2aa", + "parentHash" : "08da0fffb011ff004ec18e76d997709d306455f0cd561ae6e415a0ac220d6357", "receiptTrie" : "849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01f", "stateRoot" : "4fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640", - "timestamp" : "0x55b7e5d3", + "timestamp" : "0x561bc446", "transactionsTrie" : "72e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fd", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a07913af01d34c7429b060585c4545e492362e0dcf761c5cbe40e838189a17f2aaa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640a072e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fda0849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd88252088455b7e5d380a0c851bffbfc59efd7848d11bda1b5830f40529bcc992d98a233f22bbc2cea288a88abeddaa2fcca7b1df862f86005018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0b6a4064ef7d23f0e149472d6f1257055149840b6c73a4ae25e595b9f9fc78edca004ad52e8157ae742b551851d58fd6c3919cd7e5a0a9c6685d5bc630a657dcde7c0", + "rlp" : "0xf90261f901f9a008da0fffb011ff004ec18e76d997709d306455f0cd561ae6e415a0ac220d6357a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640a072e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fda0849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882520884561bc44680a01880d92cba777ea7653614e704f84984dfcc3a02914b66d7ceb9f170c66c8e6e88b5a561e0b567cdb8f862f86005018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0b6a4064ef7d23f0e149472d6f1257055149840b6c73a4ae25e595b9f9fc78edca004ad52e8157ae742b551851d58fd6c3919cd7e5a0a9c6685d5bc630a657dcde7c0", "transactions" : [ { "data" : "0x", @@ -1412,7 +1412,7 @@ ] }, { - "rlp" : "0xf9045ff901f9a098e70133a3ab917b5327976fe5bb83a2c1aefd340faf1e6dce30dc78135e252aa07790a71d8021b5274e93ea6f62a173b08c4ffe3f568e672cbe14018fcb42857a948888f1f195afa192cfee860698584c030f4c9db1a08dfc8c0329a0aef2bde5023d5aa2067e965b50d9527bc91733f45aa0cf0c2a1da0b599d73bc0f69c32741df069fac99e6a88ec762035157a4da4e56988ca234691a0fa86f16d802244d9cf1a7355bf1ef7c68bebca8b427bea750813b7c091dc0ff2b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd88252088455b7e5d480a014ff869dfe4c9ab05a0bc39b13982f4a4278fa2016b03103d83d705dc7e44297885210d6ff35f4ff51f862f86006018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba06e5cde32123fa42eeaa27497d538e8fd35c60eda30ead6c296750d3dfcc6d748a01926babbf8c4fef9eb45fe0d532cc30683a16b3415084a9043b27f513057014bf901fcf901f9a0db58fe349415294cb8de63cf37f4c6036d6b31cab5020cf2f8d29750aecae5dba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e5cb80a0d8ecd2ebd545fc06f7a6a307c9b49fc7bb8ab3501c5b5268b9aeec963b5343318878c2a01ce08eff1f" + "rlp" : "0xf9045ff901f9a0bb3ffc4ad4fc0a4a830b9e5520c3d94c307b46b1d751d3bd337daf9031cf79a1a098a80a4ad8f1d6483d6f1b1b0cbf0985fc643518d9f32b213e5975ac4f4e6120948888f1f195afa192cfee860698584c030f4c9db1a08dfc8c0329a0aef2bde5023d5aa2067e965b50d9527bc91733f45aa0cf0c2a1da0b599d73bc0f69c32741df069fac99e6a88ec762035157a4da4e56988ca234691a0fa86f16d802244d9cf1a7355bf1ef7c68bebca8b427bea750813b7c091dc0ff2b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882520884561bc44a80a0815f2d6d60eed63a7c312d56c69029702f1e6e12164112b5b541df241a0011cd8890b29de804bd5b50f862f86006018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba06e5cde32123fa42eeaa27497d538e8fd35c60eda30ead6c296750d3dfcc6d748a01926babbf8c4fef9eb45fe0d532cc30683a16b3415084a9043b27f513057014bf901fcf901f9a01ec2f9804748eb46081f997445bba4151ebbe3e22e9379a14b9d941934a6e2cea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc43980a05468d589075b9b317e0e3a5332cd7893f6e16a37f54c76d8ee87e1ad9b51e4b088e73a06b5f02d31e5" } ], "genesisBlockHeader" : { @@ -1422,9 +1422,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "db58fe349415294cb8de63cf37f4c6036d6b31cab5020cf2f8d29750aecae5db", - "mixHash" : "885bcbaef7aad2604083c7a0775fbb3728a4b2df52351140434e4370a3620cbf", - "nonce" : "9119d7e0fbce77e6", + "hash" : "1ec2f9804748eb46081f997445bba4151ebbe3e22e9379a14b9d941934a6e2ce", + "mixHash" : "c6ca03c82c25dc3c6928e945edcfc83a7457b2f3c8fd5ea27452256913860178", + "nonce" : "4400c78f137786c6", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1433,8 +1433,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0885bcbaef7aad2604083c7a0775fbb3728a4b2df52351140434e4370a3620cbf889119d7e0fbce77e6c0c0", - "lastblockhash" : "98e70133a3ab917b5327976fe5bb83a2c1aefd340faf1e6dce30dc78135e252a", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0c6ca03c82c25dc3c6928e945edcfc83a7457b2f3c8fd5ea27452256913860178884400c78f137786c6c0c0", + "lastblockhash" : "bb3ffc4ad4fc0a4a830b9e5520c3d94c307b46b1d751d3bd337daf9031cf79a1", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x3c", @@ -1478,18 +1478,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "2f7700ff5d7647850f96bf91ec6b69644716a20e5628dcaac4ba67f7d7ac35f7", - "mixHash" : "8859edd34e49b8a055d18d6405e40ba4ba858761893263c6f35d61d2cf65d413", - "nonce" : "8359034e7211d63d", + "hash" : "7b0c7352bf41724c2527da2bce2e01b23defe7187d65ec99516f4263edf68b9a", + "mixHash" : "cd79c88092ad211ef007a8320a6edbcbb7c77096a7e3f1094bfb203649384110", + "nonce" : "59d98d9126e8f1b9", "number" : "0x01", - "parentHash" : "843f643b429413febe66739dd895e54e7b22dec39eb7f6d6e101fa0dbbc942b1", + "parentHash" : "396f0cf7749f7c2afd0a6d81752e9bd53d3650a0bc1be0f3ef596dc082711646", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e5d7", + "timestamp" : "0x561bc44c", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0843f643b429413febe66739dd895e54e7b22dec39eb7f6d6e101fa0dbbc942b1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e5d780a08859edd34e49b8a055d18d6405e40ba4ba858761893263c6f35d61d2cf65d413888359034e7211d63df862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a0396f0cf7749f7c2afd0a6d81752e9bd53d3650a0bc1be0f3ef596dc082711646a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc44c80a0cd79c88092ad211ef007a8320a6edbcbb7c77096a7e3f1094bfb2036493841108859d98d9126e8f1b9f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -1514,18 +1514,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "e017752cd1a1d568a963aa109fd02f886f7ace1682c9d1680a53e0b49cb732ae", - "mixHash" : "54fb301eb845af89b33ce602841b1dfdbc9dbb2feb89a1505dc4e7c8e2c98f9e", - "nonce" : "e590f9d6e0262d05", + "hash" : "7eedbabdfed771a2f2d518201e23d65b60c497a12189321fb47b16b5eae99194", + "mixHash" : "2d44c7216708564d2bc8989e785a5bb348359a4bfeb6fa5791fead5e504171bf", + "nonce" : "98a7699bb7f14e61", "number" : "0x02", - "parentHash" : "2f7700ff5d7647850f96bf91ec6b69644716a20e5628dcaac4ba67f7d7ac35f7", + "parentHash" : "7b0c7352bf41724c2527da2bce2e01b23defe7187d65ec99516f4263edf68b9a", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e5d9", + "timestamp" : "0x561bc44e", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a02f7700ff5d7647850f96bf91ec6b69644716a20e5628dcaac4ba67f7d7ac35f7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e5d980a054fb301eb845af89b33ce602841b1dfdbc9dbb2feb89a1505dc4e7c8e2c98f9e88e590f9d6e0262d05f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a07b0c7352bf41724c2527da2bce2e01b23defe7187d65ec99516f4263edf68b9aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc44e80a02d44c7216708564d2bc8989e785a5bb348359a4bfeb6fa5791fead5e504171bf8898a7699bb7f14e61f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -1543,7 +1543,7 @@ ] }, { - "rlp" : "0xf903f8f901f7a0e017752cd1a1d568a963aa109fd02f886f7ace1682c9d1680a53e0b49cb732aea04aa0b0f7952a601a4487938e173e710f5541e6ef86617ddecbeca2c1c290b0c0948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd8808455b7e5dd80a04e6c73aa395d3e2298af9f0342d3ff7b2568f907245ac9370722533493bdafc28844e66374bc98e8ebc0f901faf901f7a0e017752cd1a1d568a963aa109fd02f886f7ace1682c9d1680a53e0b49cb732aea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794acde5374fce5edbc8e2a8697c15331677e6ebf0ba0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd8808455b7e5db80a0197d6ad9e0f640046e5bd773eee3f9adcee29c5f671f758dab28a04ef86fad5b88c45e631a30e16c31" + "rlp" : "0xf903f8f901f7a07eedbabdfed771a2f2d518201e23d65b60c497a12189321fb47b16b5eae99194a0b959658572f9c8ea98177db96fbcfc5f1d9cc1b8cd29574b27de50e8e9a57485948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88084561bc45280a0b61c3dfbf2f5c49c21ef9dd75f800bb597013160aac25496337c9c05c58672c488c987ca834efa98d6c0f901faf901f7a07eedbabdfed771a2f2d518201e23d65b60c497a12189321fb47b16b5eae99194a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88084561bc45080a06c62ddf9f168235eabb8640e7dc67566d1a4d63d443aaed1ba5a151d1d052f2e88493afa866e15d563" } ], "genesisBlockHeader" : { @@ -1553,9 +1553,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "843f643b429413febe66739dd895e54e7b22dec39eb7f6d6e101fa0dbbc942b1", - "mixHash" : "fb6367b0aa7abccc5240d89dba5230eee92db558f081464bfd8686e74473a9d1", - "nonce" : "53f4a3c713bdc3e7", + "hash" : "396f0cf7749f7c2afd0a6d81752e9bd53d3650a0bc1be0f3ef596dc082711646", + "mixHash" : "4481edc6ac40d7d1d786a557dc546427b4b690ba4e9629e9131568058f4bc3d5", + "nonce" : "0a93628bc0d0bb7d", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1564,8 +1564,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0fb6367b0aa7abccc5240d89dba5230eee92db558f081464bfd8686e74473a9d18853f4a3c713bdc3e7c0c0", - "lastblockhash" : "e017752cd1a1d568a963aa109fd02f886f7ace1682c9d1680a53e0b49cb732ae", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a04481edc6ac40d7d1d786a557dc546427b4b690ba4e9629e9131568058f4bc3d5880a93628bc0d0bb7dc0c0", + "lastblockhash" : "7eedbabdfed771a2f2d518201e23d65b60c497a12189321fb47b16b5eae99194", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x14", @@ -1609,18 +1609,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "848bcea0dca7fce292656d00fc96b5831c0deb3216ebf2793074328a7e57b36b", - "mixHash" : "7dc52e6da6114763bce2f7ad1db1abf5567f6fa40a1ad2d87dba61e55af21a84", - "nonce" : "db09cb6d013f4a3c", + "hash" : "1a0dd73d87faa9cdd57fa48f86ebb49d459b676d6244338627de1c69f0a2e784", + "mixHash" : "6e450d49e79df81867dc3bda9298453f4fcd5cebd0ff3dc53bff5b0bde171dc9", + "nonce" : "4229010d23db8f95", "number" : "0x01", - "parentHash" : "070b10580e9280fec18879a01ed02e8a5490dbe271276c9bdbc12c69596aa5d3", + "parentHash" : "be2136d1471777deb1f8bf93339bdc51f9ea0da98773dfe4ca1170449ec751dd", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e5e2", + "timestamp" : "0x561bc457", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0070b10580e9280fec18879a01ed02e8a5490dbe271276c9bdbc12c69596aa5d3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e5e280a07dc52e6da6114763bce2f7ad1db1abf5567f6fa40a1ad2d87dba61e55af21a8488db09cb6d013f4a3cf862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a0be2136d1471777deb1f8bf93339bdc51f9ea0da98773dfe4ca1170449ec751dda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc45780a06e450d49e79df81867dc3bda9298453f4fcd5cebd0ff3dc53bff5b0bde171dc9884229010d23db8f95f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -1645,18 +1645,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "baf1ed8d8b052aabecf47eeb9ad615d52e95af9b2fe12901c5d569bfb6918f35", - "mixHash" : "cc293ed4b85b0dd357e1c69bb241526091d21521c855c69ff883b7ebf759962c", - "nonce" : "9a84eccdb5b3230e", + "hash" : "aea78c288cae51772060174592ae5dd5a23578e42d1b473f508ea4544e178388", + "mixHash" : "4f636470e0aecac6dd9b65779d2b38bd5bbbadfccf79a478657ad7ab3f3d0f84", + "nonce" : "0b3578d47902d01a", "number" : "0x02", - "parentHash" : "848bcea0dca7fce292656d00fc96b5831c0deb3216ebf2793074328a7e57b36b", + "parentHash" : "1a0dd73d87faa9cdd57fa48f86ebb49d459b676d6244338627de1c69f0a2e784", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e5e4", + "timestamp" : "0x561bc459", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0848bcea0dca7fce292656d00fc96b5831c0deb3216ebf2793074328a7e57b36ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e5e480a0cc293ed4b85b0dd357e1c69bb241526091d21521c855c69ff883b7ebf759962c889a84eccdb5b3230ef861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a01a0dd73d87faa9cdd57fa48f86ebb49d459b676d6244338627de1c69f0a2e784a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc45980a04f636470e0aecac6dd9b65779d2b38bd5bbbadfccf79a478657ad7ab3f3d0f84880b3578d47902d01af861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -1681,18 +1681,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "10c309eaeb4fce33c28ccb51b441fd1815d562ce6bf513b1c21a41e4cb4b74cc", - "mixHash" : "3b278d48bd00c9a90177a50d236e5d5ba63e0ff12ed0e15fe90535c5e22b11f9", - "nonce" : "51190c2345b65856", + "hash" : "2fc841c9d102c3fa384ef25fda9f2f091741a5d688ce1506c3a6d87bf4f03fdd", + "mixHash" : "05e01ab4f8a4b6bb4c8ba48904fa58474c23d1c209dd1c80eaf044de194e7e15", + "nonce" : "8a012ae8c5e20263", "number" : "0x03", - "parentHash" : "baf1ed8d8b052aabecf47eeb9ad615d52e95af9b2fe12901c5d569bfb6918f35", + "parentHash" : "aea78c288cae51772060174592ae5dd5a23578e42d1b473f508ea4544e178388", "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", - "stateRoot" : "e9940294a09308406a3d2e09203aed11db40259fac0a25e639ad2b30b82d07de", - "timestamp" : "0x55b7e5e9", + "stateRoot" : "77f96f4c766c10cd0207e2672b1b747c741ed75bc94e7be7abacb71cdca3c8fb", + "timestamp" : "0x561bc45e", "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", - "uncleHash" : "94a2ce9b62b808715454833e7911d52146db90cf2a2b9ed632d25a768ae2bb9a" + "uncleHash" : "36abeedc2545fc521f104ea692befa5db141e0969b63310f0633897a32af52f7" }, - "rlp" : "0xf9045df901f9a0baf1ed8d8b052aabecf47eeb9ad615d52e95af9b2fe12901c5d569bfb6918f35a094a2ce9b62b808715454833e7911d52146db90cf2a2b9ed632d25a768ae2bb9a948888f1f195afa192cfee860698584c030f4c9db1a0e9940294a09308406a3d2e09203aed11db40259fac0a25e639ad2b30b82d07dea01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e5e980a03b278d48bd00c9a90177a50d236e5d5ba63e0ff12ed0e15fe90535c5e22b11f98851190c2345b65856f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0848bcea0dca7fce292656d00fc96b5831c0deb3216ebf2793074328a7e57b36ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e5e980a0c7763e89d3801098cb6b28a68ac1fc0d47ff764f07a44352eb4e4d5a2e2e3741888f8eb5edad437c6f", + "rlp" : "0xf9045df901f9a0aea78c288cae51772060174592ae5dd5a23578e42d1b473f508ea4544e178388a036abeedc2545fc521f104ea692befa5db141e0969b63310f0633897a32af52f7948888f1f195afa192cfee860698584c030f4c9db1a077f96f4c766c10cd0207e2672b1b747c741ed75bc94e7be7abacb71cdca3c8fba01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc45e80a005e01ab4f8a4b6bb4c8ba48904fa58474c23d1c209dd1c80eaf044de194e7e15888a012ae8c5e20263f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a01a0dd73d87faa9cdd57fa48f86ebb49d459b676d6244338627de1c69f0a2e784a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc45c80a0fedb8a4a2e2de4651471bc7d3d034b55f0a348a2cd31336abe3dfab5a0d042028825aad91445906a79", "transactions" : [ { "data" : "0x", @@ -1709,19 +1709,19 @@ "uncleHeaders" : [ { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "bcde5374fce5edbc8e2a8697c15331677e6ebf0b", + "coinbase" : "0000000000000000000000000000000000000000", "difficulty" : "0x020040", "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "4565f03ff4bee1cf40f4c6bb8ae1ea7db20ce6820f4ad0c9e28e7c8516543634", - "mixHash" : "c7763e89d3801098cb6b28a68ac1fc0d47ff764f07a44352eb4e4d5a2e2e3741", - "nonce" : "8f8eb5edad437c6f", + "hash" : "5bd836784837513fe028f3f58d5d72a7eb09b956a03ecbf2c7316304921157be", + "mixHash" : "fedb8a4a2e2de4651471bc7d3d034b55f0a348a2cd31336abe3dfab5a0d04202", + "nonce" : "25aad91445906a79", "number" : "0x02", - "parentHash" : "848bcea0dca7fce292656d00fc96b5831c0deb3216ebf2793074328a7e57b36b", + "parentHash" : "1a0dd73d87faa9cdd57fa48f86ebb49d459b676d6244338627de1c69f0a2e784", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e5e9", + "timestamp" : "0x561bc45c", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" } @@ -1735,9 +1735,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "070b10580e9280fec18879a01ed02e8a5490dbe271276c9bdbc12c69596aa5d3", - "mixHash" : "2a99fcda243a81b2c773fe8aa962c51a2dfcadec241d4ca25dc38349dc758547", - "nonce" : "d37af5b4065d6c17", + "hash" : "be2136d1471777deb1f8bf93339bdc51f9ea0da98773dfe4ca1170449ec751dd", + "mixHash" : "d16c2ba7fcff2ac14fd12872b7a187ca4217e17482faa22c2b7ff6fb375d1437", + "nonce" : "c137077e7a037e5f", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1746,9 +1746,16 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a02a99fcda243a81b2c773fe8aa962c51a2dfcadec241d4ca25dc38349dc75854788d37af5b4065d6c17c0c0", - "lastblockhash" : "10c309eaeb4fce33c28ccb51b441fd1815d562ce6bf513b1c21a41e4cb4b74cc", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0d16c2ba7fcff2ac14fd12872b7a187ca4217e17482faa22c2b7ff6fb375d143788c137077e7a037e5fc0c0", + "lastblockhash" : "2fc841c9d102c3fa384ef25fda9f2f091741a5d688ce1506c3a6d87bf4f03fdd", "postState" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0x3cb71f51fc558000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x1e", "code" : "0x", @@ -1769,13 +1776,6 @@ "nonce" : "0x03", "storage" : { } - }, - "bcde5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x3cb71f51fc558000", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } } }, "pre" : { @@ -1798,18 +1798,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "d37b0fec80f904f027dc667ec40b46b75265ee82568ed6793346141a66752ecf", - "mixHash" : "8d0920b68750ad4d8d10fbbf9bc51f36133d8d427380e171d62f7387f0ef958d", - "nonce" : "a9f438c968444426", + "hash" : "b3082823bedebe0c4cfd170bf37aaac44920fc91a5569b9163bce87d5a8287c4", + "mixHash" : "d4b66899881861079edacbc5f8f5d1afa8bb913465a1beb11e37daa13175c891", + "nonce" : "4c2d2b85e1f540f2", "number" : "0x01", - "parentHash" : "144d782debe6e96cb0857dadf014de5058645fa7db1cba954cf96d87994f0b83", + "parentHash" : "815f89c56acf2b280dd629528cde8275d24e7689c506064eff71e870ddd72031", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e5ef", + "timestamp" : "0x561bc463", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0144d782debe6e96cb0857dadf014de5058645fa7db1cba954cf96d87994f0b83a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e5ef80a08d0920b68750ad4d8d10fbbf9bc51f36133d8d427380e171d62f7387f0ef958d88a9f438c968444426f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a0815f89c56acf2b280dd629528cde8275d24e7689c506064eff71e870ddd72031a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc46380a0d4b66899881861079edacbc5f8f5d1afa8bb913465a1beb11e37daa13175c891884c2d2b85e1f540f2f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -1834,18 +1834,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "c2eec648d50b3291dd24f3a7bb3eefe08c16c7a70bd2aff3d1cddfee14cebaff", - "mixHash" : "a37e72ecf10eefe6935849687ab8488b8550a818d568c75a6ccbc60e8263a333", - "nonce" : "2a8f3e244ad8a940", + "hash" : "ac9ecb300a7cc4a0ada87fe1b895d8219d89a77f8f9b5130adcbb7117d6e27ba", + "mixHash" : "ee1c9d9298357cec15c7824b2a82e764c9fc5fba2c5dc3e95df1d6c0fce97d77", + "nonce" : "22a240427a55186e", "number" : "0x02", - "parentHash" : "d37b0fec80f904f027dc667ec40b46b75265ee82568ed6793346141a66752ecf", + "parentHash" : "b3082823bedebe0c4cfd170bf37aaac44920fc91a5569b9163bce87d5a8287c4", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e5f1", + "timestamp" : "0x561bc465", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0d37b0fec80f904f027dc667ec40b46b75265ee82568ed6793346141a66752ecfa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e5f180a0a37e72ecf10eefe6935849687ab8488b8550a818d568c75a6ccbc60e8263a333882a8f3e244ad8a940f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a0b3082823bedebe0c4cfd170bf37aaac44920fc91a5569b9163bce87d5a8287c4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc46580a0ee1c9d9298357cec15c7824b2a82e764c9fc5fba2c5dc3e95df1d6c0fce97d778822a240427a55186ef861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -1870,18 +1870,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "a0592e4b257d6a37669960fee33015e6b9b17cf086264a0ab9968028cb56d827", - "mixHash" : "9e7d608c837a912e10d3319cd86e60105e544c0d10926ba91c396a4adf47461f", - "nonce" : "045d1449895b82db", + "hash" : "0cea6502b59ae9ad4752913d7607ecd12f10fa872b102456236d55a8336d0ba0", + "mixHash" : "202c005bbc92c12e5d368bc02224b7c42999026e9a06cb3835c596f12e1cb90a", + "nonce" : "4763c2b9ff431b88", "number" : "0x03", - "parentHash" : "c2eec648d50b3291dd24f3a7bb3eefe08c16c7a70bd2aff3d1cddfee14cebaff", + "parentHash" : "ac9ecb300a7cc4a0ada87fe1b895d8219d89a77f8f9b5130adcbb7117d6e27ba", "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", - "timestamp" : "0x55b7e5f2", + "timestamp" : "0x561bc467", "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0c2eec648d50b3291dd24f3a7bb3eefe08c16c7a70bd2aff3d1cddfee14cebaffa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e5f280a09e7d608c837a912e10d3319cd86e60105e544c0d10926ba91c396a4adf47461f88045d1449895b82dbf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "rlp" : "0xf90261f901f9a0ac9ecb300a7cc4a0ada87fe1b895d8219d89a77f8f9b5130adcbb7117d6e27baa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc46780a0202c005bbc92c12e5d368bc02224b7c42999026e9a06cb3835c596f12e1cb90a884763c2b9ff431b88f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", "transactions" : [ { "data" : "0x", @@ -1906,18 +1906,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "8a1e3f1d3b1be4c57ef831ebf6effa17e8bd7c8c427cfb3487c88388610a8b00", - "mixHash" : "48ce7381ca0fbdaaf58f7edbf0c480d02a52f85e52e25a343541ff5adb184581", - "nonce" : "b0f17ab21c8bfda7", + "hash" : "cc089373d20f7e918bab267bae5a9525dc112b76ec85fd2ff744b6b93fb26d06", + "mixHash" : "8adbe2c50e58c51dbd1f3139f8c3b813bf1788fb80ef2ee393b4e86b72fe158d", + "nonce" : "9018bbc61e1bed05", "number" : "0x04", - "parentHash" : "a0592e4b257d6a37669960fee33015e6b9b17cf086264a0ab9968028cb56d827", + "parentHash" : "0cea6502b59ae9ad4752913d7607ecd12f10fa872b102456236d55a8336d0ba0", "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", "stateRoot" : "6dafa6a641442afce62b7690346dc46c35537cc16dc9fd331eae4e50de716eb2", - "timestamp" : "0x55b7e5f6", + "timestamp" : "0x561bc46b", "transactionsTrie" : "9735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071", - "uncleHash" : "89c779a8ea6fafe7c0fbe3aa128d21deac5df8566c6f64e17a019b7c5e20e59c" + "uncleHash" : "885904485e82238be984a0c643da4599312757424a7ec150ae72fc9a529f64d0" }, - "rlp" : "0xf9045df901f9a0a0592e4b257d6a37669960fee33015e6b9b17cf086264a0ab9968028cb56d827a089c779a8ea6fafe7c0fbe3aa128d21deac5df8566c6f64e17a019b7c5e20e59c948888f1f195afa192cfee860698584c030f4c9db1a06dafa6a641442afce62b7690346dc46c35537cc16dc9fd331eae4e50de716eb2a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88252088455b7e5f680a048ce7381ca0fbdaaf58f7edbf0c480d02a52f85e52e25a343541ff5adb18458188b0f17ab21c8bfda7f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7f901faf901f7a0d37b0fec80f904f027dc667ec40b46b75265ee82568ed6793346141a66752ecfa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e5f680a01c418a33b509b63e5e1281868743c23b0b9c3adee773c6fbd7021868f90ac26f88e4b70946313e3ae2", + "rlp" : "0xf9045df901f9a00cea6502b59ae9ad4752913d7607ecd12f10fa872b102456236d55a8336d0ba0a0885904485e82238be984a0c643da4599312757424a7ec150ae72fc9a529f64d0948888f1f195afa192cfee860698584c030f4c9db1a06dafa6a641442afce62b7690346dc46c35537cc16dc9fd331eae4e50de716eb2a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc46b80a08adbe2c50e58c51dbd1f3139f8c3b813bf1788fb80ef2ee393b4e86b72fe158d889018bbc61e1bed05f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7f901faf901f7a0b3082823bedebe0c4cfd170bf37aaac44920fc91a5569b9163bce87d5a8287c4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc46a80a0ada1e67d3e299624fd7daa81a78d56f6ba66c469567edb36a920074f26dec7aa8874247b2c4f806517", "transactions" : [ { "data" : "0x", @@ -1939,14 +1939,14 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "622aaafec59854a625fe46af0a8f75ad5e62f3d454ec0929771db268ec76807f", - "mixHash" : "1c418a33b509b63e5e1281868743c23b0b9c3adee773c6fbd7021868f90ac26f", - "nonce" : "e4b70946313e3ae2", + "hash" : "b281373f96295dbdda586edc95887adb970c8a497ea46bf80576e4e947e6e853", + "mixHash" : "ada1e67d3e299624fd7daa81a78d56f6ba66c469567edb36a920074f26dec7aa", + "nonce" : "74247b2c4f806517", "number" : "0x02", - "parentHash" : "d37b0fec80f904f027dc667ec40b46b75265ee82568ed6793346141a66752ecf", + "parentHash" : "b3082823bedebe0c4cfd170bf37aaac44920fc91a5569b9163bce87d5a8287c4", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e5f6", + "timestamp" : "0x561bc46a", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" } @@ -1960,9 +1960,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "144d782debe6e96cb0857dadf014de5058645fa7db1cba954cf96d87994f0b83", - "mixHash" : "6b48a5702aeb05b5ae078b457689aaf3eb1ca02da41444dcebb655fb43fc3527", - "nonce" : "742e07cbc69dcbed", + "hash" : "815f89c56acf2b280dd629528cde8275d24e7689c506064eff71e870ddd72031", + "mixHash" : "b8e585b9e29ad9b4142e777056fe7aad934199c14bbffa01bfb60715aa6563b0", + "nonce" : "5a7357e320daa8b6", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1971,8 +1971,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a06b48a5702aeb05b5ae078b457689aaf3eb1ca02da41444dcebb655fb43fc352788742e07cbc69dcbedc0c0", - "lastblockhash" : "8a1e3f1d3b1be4c57ef831ebf6effa17e8bd7c8c427cfb3487c88388610a8b00", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0b8e585b9e29ad9b4142e777056fe7aad934199c14bbffa01bfb60715aa6563b0885a7357e320daa8b6c0c0", + "lastblockhash" : "cc089373d20f7e918bab267bae5a9525dc112b76ec85fd2ff744b6b93fb26d06", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x28", @@ -2023,18 +2023,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "bf021bcfff718ecd54153c147051a7f7fe05631d9cec2dc47d1856ff7f29992d", - "mixHash" : "c3e0adff3ab101471196d1f98bf802dbcd4a1deed3f5c4165a8785af43d66fe1", - "nonce" : "4dfa06d63bd41cfc", + "hash" : "ee54d2defd3665c8e5a492ef8b86764e99c675fbcbaaf2be9aa18d203113421d", + "mixHash" : "16e52c0b353d7a0cbd518f198a85357c91c4f2add57f5f7e2dd8767ea9f59d36", + "nonce" : "fc39d996b712e3fd", "number" : "0x01", - "parentHash" : "8723c8fcb8aa72dd6baa0dc9c455d987ed731b0b10ca131944121c5e282a1591", + "parentHash" : "f1506282a4460830e51e0b3e4c460fab107d0bf06c953aefa30b580efa97bedd", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e5fa", + "timestamp" : "0x561bc46e", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a08723c8fcb8aa72dd6baa0dc9c455d987ed731b0b10ca131944121c5e282a1591a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e5fa80a0c3e0adff3ab101471196d1f98bf802dbcd4a1deed3f5c4165a8785af43d66fe1884dfa06d63bd41cfcf862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a0f1506282a4460830e51e0b3e4c460fab107d0bf06c953aefa30b580efa97bedda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc46e80a016e52c0b353d7a0cbd518f198a85357c91c4f2add57f5f7e2dd8767ea9f59d3688fc39d996b712e3fdf862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -2059,18 +2059,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "6ee715ca3f694e82ac24819b9698a5e97479be87a7bb64a978e0ac5454fb83b9", - "mixHash" : "40586bf10f8da37fc6ac6b3f1b6db5546ef28c91db16b8ce64e6600d29b327c5", - "nonce" : "c30159887e3bfa56", + "hash" : "76f4ae3209548a05f9cc23da00d1cd334107e9c2998298268d18d11f3cd224c0", + "mixHash" : "343cbb877bcc4153ad810ef4a9e3b652abb89cd28b1c3cbcba7bbb5a8f1deaf7", + "nonce" : "78e1e0f5fdf61465", "number" : "0x02", - "parentHash" : "bf021bcfff718ecd54153c147051a7f7fe05631d9cec2dc47d1856ff7f29992d", + "parentHash" : "ee54d2defd3665c8e5a492ef8b86764e99c675fbcbaaf2be9aa18d203113421d", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e5fd", + "timestamp" : "0x561bc472", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0bf021bcfff718ecd54153c147051a7f7fe05631d9cec2dc47d1856ff7f29992da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e5fd80a040586bf10f8da37fc6ac6b3f1b6db5546ef28c91db16b8ce64e6600d29b327c588c30159887e3bfa56f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a0ee54d2defd3665c8e5a492ef8b86764e99c675fbcbaaf2be9aa18d203113421da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc47280a0343cbb877bcc4153ad810ef4a9e3b652abb89cd28b1c3cbcba7bbb5a8f1deaf78878e1e0f5fdf61465f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -2095,18 +2095,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "02aabb8245f7b30ccad5d362f1e863be247802c09de08b1dcf63dc3da6f761ce", - "mixHash" : "87572b81f8fd757e33a2ff8eaf7ebafe20875c97d993162e3208b637bc83d22b", - "nonce" : "f0808ca8bb0fb67e", + "hash" : "fb9fdbc29fed6e3bcb333275ec3dc0718305c737170cd22327147bf57d83de74", + "mixHash" : "f1512f3fa7cdb30650337c093304b2e6fabf4f29d5062685e7770f151481c2bd", + "nonce" : "18f4d0c595736dca", "number" : "0x03", - "parentHash" : "6ee715ca3f694e82ac24819b9698a5e97479be87a7bb64a978e0ac5454fb83b9", + "parentHash" : "76f4ae3209548a05f9cc23da00d1cd334107e9c2998298268d18d11f3cd224c0", "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", - "timestamp" : "0x55b7e5fe", + "timestamp" : "0x561bc473", "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a06ee715ca3f694e82ac24819b9698a5e97479be87a7bb64a978e0ac5454fb83b9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e5fe80a087572b81f8fd757e33a2ff8eaf7ebafe20875c97d993162e3208b637bc83d22b88f0808ca8bb0fb67ef862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "rlp" : "0xf90261f901f9a076f4ae3209548a05f9cc23da00d1cd334107e9c2998298268d18d11f3cd224c0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc47380a0f1512f3fa7cdb30650337c093304b2e6fabf4f29d5062685e7770f151481c2bd8818f4d0c595736dcaf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", "transactions" : [ { "data" : "0x", @@ -2131,18 +2131,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "0c9c8374e0847172852e81ab9a8bd1e620c6386cbb34f01cd6f7e54423d7b345", - "mixHash" : "c27fe243c73cc4961ff65c919e6d12b2c9209fd75a527140e4fc5e75f39777ac", - "nonce" : "e7d6fc41413e6348", + "hash" : "ee2368539aff14419b4d923d42be5da86ff7dffa0c5b7286728b80f88f445bff", + "mixHash" : "333ab1b0fa057e4e5610cc318db17bc655d2ec26f8382deffb5f22ac070205c9", + "nonce" : "493c6f596f6c9bb1", "number" : "0x04", - "parentHash" : "02aabb8245f7b30ccad5d362f1e863be247802c09de08b1dcf63dc3da6f761ce", + "parentHash" : "fb9fdbc29fed6e3bcb333275ec3dc0718305c737170cd22327147bf57d83de74", "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", - "timestamp" : "0x55b7e600", + "timestamp" : "0x561bc475", "transactionsTrie" : "9735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a002aabb8245f7b30ccad5d362f1e863be247802c09de08b1dcf63dc3da6f761cea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88252088455b7e60080a0c27fe243c73cc4961ff65c919e6d12b2c9209fd75a527140e4fc5e75f39777ac88e7d6fc41413e6348f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", + "rlp" : "0xf90261f901f9a0fb9fdbc29fed6e3bcb333275ec3dc0718305c737170cd22327147bf57d83de74a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc47580a0333ab1b0fa057e4e5610cc318db17bc655d2ec26f8382deffb5f22ac070205c988493c6f596f6c9bb1f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", "transactions" : [ { "data" : "0x", @@ -2167,18 +2167,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "0057b84e0bec716583a15ca05bc07021c97ed7c2ea16e5df6607b186f0f7d7b8", - "mixHash" : "761e3b335b0162a533398ada831fd672a6b9b49b86af4c9562f8f0539442e212", - "nonce" : "4c8b9acc188c00e6", + "hash" : "af45f403ed39853eedcbef5e29bca45cf9b2a1bf5f1799e350d44a47f1177826", + "mixHash" : "9a40ccbfb12f58d422e22b7aca773baf3a6f1c179e6de034c4ef8bcf6b5a8c32", + "nonce" : "b7d7b6289680328f", "number" : "0x05", - "parentHash" : "0c9c8374e0847172852e81ab9a8bd1e620c6386cbb34f01cd6f7e54423d7b345", + "parentHash" : "ee2368539aff14419b4d923d42be5da86ff7dffa0c5b7286728b80f88f445bff", "receiptTrie" : "e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9", "stateRoot" : "3b65ea470283584ddd5d5a4cf40334c2b39e9fe79e32a90a527cc73bac381d62", - "timestamp" : "0x55b7e601", + "timestamp" : "0x561bc479", "transactionsTrie" : "7e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1", - "uncleHash" : "aac69b30d00aba697de724c2b9dc7c6b7409b36a26d7dc1cf04aa5edaf3d2a65" + "uncleHash" : "776bcd9fea4e7c885d3bac0e1413716949d7287e4b242a6dcfe50fcaaad55cd7" }, - "rlp" : "0xf9045df901f9a00c9c8374e0847172852e81ab9a8bd1e620c6386cbb34f01cd6f7e54423d7b345a0aac69b30d00aba697de724c2b9dc7c6b7409b36a26d7dc1cf04aa5edaf3d2a65948888f1f195afa192cfee860698584c030f4c9db1a03b65ea470283584ddd5d5a4cf40334c2b39e9fe79e32a90a527cc73bac381d62a07e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd88252088455b7e60180a0761e3b335b0162a533398ada831fd672a6b9b49b86af4c9562f8f0539442e212884c8b9acc188c00e6f862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29a0796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13f901faf901f7a0bf021bcfff718ecd54153c147051a7f7fe05631d9cec2dc47d1856ff7f29992da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e60180a0dfeff5c977e1118d73d6d2dd1d4e19666c993c08d4e65b89d19358b6f4316360884b47bd06c5b7160e", + "rlp" : "0xf9045df901f9a0ee2368539aff14419b4d923d42be5da86ff7dffa0c5b7286728b80f88f445bffa0776bcd9fea4e7c885d3bac0e1413716949d7287e4b242a6dcfe50fcaaad55cd7948888f1f195afa192cfee860698584c030f4c9db1a03b65ea470283584ddd5d5a4cf40334c2b39e9fe79e32a90a527cc73bac381d62a07e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bc47980a09a40ccbfb12f58d422e22b7aca773baf3a6f1c179e6de034c4ef8bcf6b5a8c3288b7d7b6289680328ff862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29a0796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13f901faf901f7a0ee54d2defd3665c8e5a492ef8b86764e99c675fbcbaaf2be9aa18d203113421da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc47880a0e9c94c3d163005ae2660ed84cc2d2cacf3dfeeeebb16593d8a90d4f960899827888b4d2ee71ddccf1f", "transactions" : [ { "data" : "0x", @@ -2200,14 +2200,14 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "9b4f9b64a66f3bf95d9e985b04fcb79e8c91410e44020cba494a5e4b6d76412d", - "mixHash" : "dfeff5c977e1118d73d6d2dd1d4e19666c993c08d4e65b89d19358b6f4316360", - "nonce" : "4b47bd06c5b7160e", + "hash" : "856d05ddb3c503fca6217b7c01cf29bd1674b259d434053d07128381a1f89466", + "mixHash" : "e9c94c3d163005ae2660ed84cc2d2cacf3dfeeeebb16593d8a90d4f960899827", + "nonce" : "8b4d2ee71ddccf1f", "number" : "0x02", - "parentHash" : "bf021bcfff718ecd54153c147051a7f7fe05631d9cec2dc47d1856ff7f29992d", + "parentHash" : "ee54d2defd3665c8e5a492ef8b86764e99c675fbcbaaf2be9aa18d203113421d", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e601", + "timestamp" : "0x561bc478", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" } @@ -2221,9 +2221,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "8723c8fcb8aa72dd6baa0dc9c455d987ed731b0b10ca131944121c5e282a1591", - "mixHash" : "5efa1d5c696c72f978d3f4f7b4c83a9513caa86622686ad3604730efbda4d756", - "nonce" : "3ba8ab0af9e4e15c", + "hash" : "f1506282a4460830e51e0b3e4c460fab107d0bf06c953aefa30b580efa97bedd", + "mixHash" : "1f576666e14c15cf286b6597cdf010ebb3e3f6f3a87e0eaf162b9d38b162ae9a", + "nonce" : "a5de8185dbd2a6eb", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -2232,8 +2232,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a05efa1d5c696c72f978d3f4f7b4c83a9513caa86622686ad3604730efbda4d756883ba8ab0af9e4e15cc0c0", - "lastblockhash" : "0057b84e0bec716583a15ca05bc07021c97ed7c2ea16e5df6607b186f0f7d7b8", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a01f576666e14c15cf286b6597cdf010ebb3e3f6f3a87e0eaf162b9d38b162ae9a88a5de8185dbd2a6ebc0c0", + "lastblockhash" : "af45f403ed39853eedcbef5e29bca45cf9b2a1bf5f1799e350d44a47f1177826", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x32", @@ -2284,18 +2284,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "1246f6ca139a7529176fd1099d2ebb4ee5d6f9b82cdd8d28bc4f5485bfcf6ae8", - "mixHash" : "bdd8684659416e1ebaaad1d14d16c738911f2c358539d2b52c3753ac0d1f45b1", - "nonce" : "13eb3ffb447952c9", + "hash" : "37eeedbe7ebd08f804917105e9ad7763684538f61d20de7fdd48982585c07c12", + "mixHash" : "14a43f0335ba79875443fc00d1376d5e9f29243eebf17c34c478ab1426121b2f", + "nonce" : "30904d3072167e16", "number" : "0x01", - "parentHash" : "1d2785c37d7f6a59956dbd40a6f9c57dd59bdb23c0d72298b7e52eaabce161a0", + "parentHash" : "bdfa455cf11980b36cd6f253226dc391fa9629eb0c9c98c60c0ac58ab45d2004", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e607", + "timestamp" : "0x561bc47c", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a01d2785c37d7f6a59956dbd40a6f9c57dd59bdb23c0d72298b7e52eaabce161a0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e60780a0bdd8684659416e1ebaaad1d14d16c738911f2c358539d2b52c3753ac0d1f45b18813eb3ffb447952c9f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a0bdfa455cf11980b36cd6f253226dc391fa9629eb0c9c98c60c0ac58ab45d2004a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc47c80a014a43f0335ba79875443fc00d1376d5e9f29243eebf17c34c478ab1426121b2f8830904d3072167e16f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -2320,18 +2320,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "57d14443020a6132c3430001d8681ab3b082109bdfa9449bac414c695e59c769", - "mixHash" : "e72218bcd05a843b142b7cef525df2387408e056438d0c55d069e838a535a714", - "nonce" : "50b719c1b993880a", + "hash" : "43d2fa74856ca7d1ceb1a896baec1b1fafc9de199bfce48599bcc1e6943b1165", + "mixHash" : "c682707a7042fa059dbd7a777e2a0bca14b7725332ab62c91df51a3d26206de4", + "nonce" : "25dccd86b5d98d1f", "number" : "0x02", - "parentHash" : "1246f6ca139a7529176fd1099d2ebb4ee5d6f9b82cdd8d28bc4f5485bfcf6ae8", + "parentHash" : "37eeedbe7ebd08f804917105e9ad7763684538f61d20de7fdd48982585c07c12", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e608", + "timestamp" : "0x561bc47e", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a01246f6ca139a7529176fd1099d2ebb4ee5d6f9b82cdd8d28bc4f5485bfcf6ae8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e60880a0e72218bcd05a843b142b7cef525df2387408e056438d0c55d069e838a535a7148850b719c1b993880af861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a037eeedbe7ebd08f804917105e9ad7763684538f61d20de7fdd48982585c07c12a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc47e80a0c682707a7042fa059dbd7a777e2a0bca14b7725332ab62c91df51a3d26206de48825dccd86b5d98d1ff861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -2356,18 +2356,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "c4b1d7f7fbd49c09a49fb1d299f230f6da5d8f4fc6b9e8c853d50bc1b6a3a926", - "mixHash" : "24c94ff604868d80a802186483d0fbe4e705c06915b63f925e7607ca656ad483", - "nonce" : "f13b8dfae8410ae4", + "hash" : "d32a7e265c7b12b9118939e8ab75d17ec19f167e7148cc8bef77441acb6ee20d", + "mixHash" : "1441fabda9b97bee4dbd1044eaedf60d44daeb142a8816079a37eedbf5163808", + "nonce" : "119a341b1fdbb038", "number" : "0x03", - "parentHash" : "57d14443020a6132c3430001d8681ab3b082109bdfa9449bac414c695e59c769", + "parentHash" : "43d2fa74856ca7d1ceb1a896baec1b1fafc9de199bfce48599bcc1e6943b1165", "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", - "timestamp" : "0x55b7e60a", + "timestamp" : "0x561bc47f", "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a057d14443020a6132c3430001d8681ab3b082109bdfa9449bac414c695e59c769a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e60a80a024c94ff604868d80a802186483d0fbe4e705c06915b63f925e7607ca656ad48388f13b8dfae8410ae4f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "rlp" : "0xf90261f901f9a043d2fa74856ca7d1ceb1a896baec1b1fafc9de199bfce48599bcc1e6943b1165a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc47f80a01441fabda9b97bee4dbd1044eaedf60d44daeb142a8816079a37eedbf516380888119a341b1fdbb038f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", "transactions" : [ { "data" : "0x", @@ -2392,18 +2392,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "800c305ab7671994eb8fb17458db6623322f3e7347fae0f01c89183666df19ef", - "mixHash" : "7198f0019b6e2f6c3ec027e836e2937a13590b819d5975880969a9ca0c46ffb4", - "nonce" : "960b7ec642ef8bf4", + "hash" : "fdb2b6ab6e32856032fd50402fece1af1038b76e161082395f495581de963799", + "mixHash" : "5b7617303fc31acea92023aefc4c7a081d149930636a8667c773b89393e91c49", + "nonce" : "ebc8ab646dbd4986", "number" : "0x04", - "parentHash" : "c4b1d7f7fbd49c09a49fb1d299f230f6da5d8f4fc6b9e8c853d50bc1b6a3a926", + "parentHash" : "d32a7e265c7b12b9118939e8ab75d17ec19f167e7148cc8bef77441acb6ee20d", "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", - "timestamp" : "0x55b7e60c", + "timestamp" : "0x561bc483", "transactionsTrie" : "9735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0c4b1d7f7fbd49c09a49fb1d299f230f6da5d8f4fc6b9e8c853d50bc1b6a3a926a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88252088455b7e60c80a07198f0019b6e2f6c3ec027e836e2937a13590b819d5975880969a9ca0c46ffb488960b7ec642ef8bf4f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", + "rlp" : "0xf90261f901f9a0d32a7e265c7b12b9118939e8ab75d17ec19f167e7148cc8bef77441acb6ee20da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc48380a05b7617303fc31acea92023aefc4c7a081d149930636a8667c773b89393e91c4988ebc8ab646dbd4986f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", "transactions" : [ { "data" : "0x", @@ -2428,18 +2428,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "6b878f6623f6dd69d0e37b5c937e65e896e23078b9c51842997e2707f419264f", - "mixHash" : "1bb9ef2c84cea74696d5361741d1281992dd4348041ddf8c517128bc2bdfcb15", - "nonce" : "e1ca504e66e293a0", + "hash" : "bb2919f2227856a997af0bb3c0314cb9621eaac82d1afbe51124592d1b512940", + "mixHash" : "a200207cc76a1a281768442c18a4b9b6d1024a0f15311ae91fa1879ca21e40e2", + "nonce" : "e468ddb371bb7e55", "number" : "0x05", - "parentHash" : "800c305ab7671994eb8fb17458db6623322f3e7347fae0f01c89183666df19ef", + "parentHash" : "fdb2b6ab6e32856032fd50402fece1af1038b76e161082395f495581de963799", "receiptTrie" : "e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9", "stateRoot" : "72f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19", - "timestamp" : "0x55b7e60d", + "timestamp" : "0x561bc485", "transactionsTrie" : "7e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0800c305ab7671994eb8fb17458db6623322f3e7347fae0f01c89183666df19efa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a07e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd88252088455b7e60d80a01bb9ef2c84cea74696d5361741d1281992dd4348041ddf8c517128bc2bdfcb1588e1ca504e66e293a0f862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29a0796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13c0", + "rlp" : "0xf90261f901f9a0fdb2b6ab6e32856032fd50402fece1af1038b76e161082395f495581de963799a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a07e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bc48580a0a200207cc76a1a281768442c18a4b9b6d1024a0f15311ae91fa1879ca21e40e288e468ddb371bb7e55f862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29a0796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13c0", "transactions" : [ { "data" : "0x", @@ -2464,18 +2464,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "2442399b62048a60e33a82cfe9c2296e082226275fb974cc00484fad98cee388", - "mixHash" : "f93c20c1d8e2981c8d8d42d96210164aeebc6523fadc63ef03fca02584b4a6c0", - "nonce" : "f3577b1bc99dd084", + "hash" : "802664997731da0698e36d0e9f3734d18bcf1a383261adecea74a08b7e1266d7", + "mixHash" : "039cb4a92a9e64b5cd8398ca46aa7dfc0badba2084fca79fad3143dfac08d3af", + "nonce" : "0e2a51b82daf2931", "number" : "0x06", - "parentHash" : "6b878f6623f6dd69d0e37b5c937e65e896e23078b9c51842997e2707f419264f", + "parentHash" : "bb2919f2227856a997af0bb3c0314cb9621eaac82d1afbe51124592d1b512940", "receiptTrie" : "849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01f", "stateRoot" : "2e334cbdda64192c09413319afacbc86fee9a44aa9a634793a43a09f5ecc718f", - "timestamp" : "0x55b7e60f", + "timestamp" : "0x561bc48c", "transactionsTrie" : "72e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fd", - "uncleHash" : "01446b5678d1c29dc6f8bdc6f5d6e0b57ff98fedbc9bdedd8f8d2eae20598150" + "uncleHash" : "28fbe71bd418619594f73ffbfc798f37371fd13306ceb7616c7c05876e517ea1" }, - "rlp" : "0xf9045df901f9a06b878f6623f6dd69d0e37b5c937e65e896e23078b9c51842997e2707f419264fa001446b5678d1c29dc6f8bdc6f5d6e0b57ff98fedbc9bdedd8f8d2eae20598150948888f1f195afa192cfee860698584c030f4c9db1a02e334cbdda64192c09413319afacbc86fee9a44aa9a634793a43a09f5ecc718fa072e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fda0849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd88252088455b7e60f80a0f93c20c1d8e2981c8d8d42d96210164aeebc6523fadc63ef03fca02584b4a6c088f3577b1bc99dd084f862f86005018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0b6a4064ef7d23f0e149472d6f1257055149840b6c73a4ae25e595b9f9fc78edca004ad52e8157ae742b551851d58fd6c3919cd7e5a0a9c6685d5bc630a657dcde7f901faf901f7a01246f6ca139a7529176fd1099d2ebb4ee5d6f9b82cdd8d28bc4f5485bfcf6ae8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e60f80a015cd8d47590a06d5e0ca8ce929f8df6712155b391c0bce3849cfca92864c0a6a88e6dd2b4005d2b11d", + "rlp" : "0xf9045df901f9a0bb2919f2227856a997af0bb3c0314cb9621eaac82d1afbe51124592d1b512940a028fbe71bd418619594f73ffbfc798f37371fd13306ceb7616c7c05876e517ea1948888f1f195afa192cfee860698584c030f4c9db1a02e334cbdda64192c09413319afacbc86fee9a44aa9a634793a43a09f5ecc718fa072e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fda0849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882520884561bc48c80a0039cb4a92a9e64b5cd8398ca46aa7dfc0badba2084fca79fad3143dfac08d3af880e2a51b82daf2931f862f86005018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0b6a4064ef7d23f0e149472d6f1257055149840b6c73a4ae25e595b9f9fc78edca004ad52e8157ae742b551851d58fd6c3919cd7e5a0a9c6685d5bc630a657dcde7f901faf901f7a037eeedbe7ebd08f804917105e9ad7763684538f61d20de7fdd48982585c07c12a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000002832fefd88084561bc48a80a0e7a75abf445f493ac902218d318cf72bc7511f5b71e5445c15d7d3141bfc9ae688e96c0b5cff9532ff", "transactions" : [ { "data" : "0x", @@ -2493,18 +2493,18 @@ { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "bcde5374fce5edbc8e2a8697c15331677e6ebf0b", - "difficulty" : "0x020040", + "difficulty" : "0x020000", "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "f835082853f4a2bb71bfb6697d4307d3c449303217d1ecc53be82ee482deb25b", - "mixHash" : "15cd8d47590a06d5e0ca8ce929f8df6712155b391c0bce3849cfca92864c0a6a", - "nonce" : "e6dd2b4005d2b11d", + "hash" : "acf53d57b7f3f9597efdbe96b558875bd0659d1fc9c17091ac57099b486291b7", + "mixHash" : "e7a75abf445f493ac902218d318cf72bc7511f5b71e5445c15d7d3141bfc9ae6", + "nonce" : "e96c0b5cff9532ff", "number" : "0x02", - "parentHash" : "1246f6ca139a7529176fd1099d2ebb4ee5d6f9b82cdd8d28bc4f5485bfcf6ae8", + "parentHash" : "37eeedbe7ebd08f804917105e9ad7763684538f61d20de7fdd48982585c07c12", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e60f", + "timestamp" : "0x561bc48a", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" } @@ -2518,9 +2518,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "1d2785c37d7f6a59956dbd40a6f9c57dd59bdb23c0d72298b7e52eaabce161a0", - "mixHash" : "41b1e0321f46cfc9bd2fc2dd4907a4f3623afe486361bd84b016d787efbff85b", - "nonce" : "86a7d389a4f25d47", + "hash" : "bdfa455cf11980b36cd6f253226dc391fa9629eb0c9c98c60c0ac58ab45d2004", + "mixHash" : "743ea0fad0b7edeb855b7bdc506dc5c66a3548c9c267f403e51d4dfc50e1818a", + "nonce" : "4029cbd253c20110", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -2529,8 +2529,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a041b1e0321f46cfc9bd2fc2dd4907a4f3623afe486361bd84b016d787efbff85b8886a7d389a4f25d47c0c0", - "lastblockhash" : "2442399b62048a60e33a82cfe9c2296e082226275fb974cc00484fad98cee388", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0743ea0fad0b7edeb855b7bdc506dc5c66a3548c9c267f403e51d4dfc50e1818a884029cbd253c20110c0c0", + "lastblockhash" : "802664997731da0698e36d0e9f3734d18bcf1a383261adecea74a08b7e1266d7", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x3c", @@ -2581,18 +2581,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "ca1b46f4ee9bc9ae4df82db12f8608b303b68c58de9f494323efb4413aba8c1b", - "mixHash" : "c6aa839ffffe7e333f891568d8ddf93db07c2d8a8eca28a6eb31447ed91ab809", - "nonce" : "c5c90d8ab78d712a", + "hash" : "54ae15fbe1906ea2f7291c92f6ddabcda5bb2e1e788e95adfa13611c5bc91efb", + "mixHash" : "09ba719a3da45a4681df553edbb994006d3f74e39c4ae7fb7ac49aa4b625c67e", + "nonce" : "ad33e2c2eeccb92a", "number" : "0x01", - "parentHash" : "f2e5bf43eb35a49f375add78b304d5467b081a7c4c5ca45e001782838f72ecc3", + "parentHash" : "5b5acadff6b69db71a2e5d5db7c7fb3d2ba613b56f93f44fcd39d0764f8e5c36", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e613", + "timestamp" : "0x561bc48e", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0f2e5bf43eb35a49f375add78b304d5467b081a7c4c5ca45e001782838f72ecc3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e61380a0c6aa839ffffe7e333f891568d8ddf93db07c2d8a8eca28a6eb31447ed91ab80988c5c90d8ab78d712af862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a05b5acadff6b69db71a2e5d5db7c7fb3d2ba613b56f93f44fcd39d0764f8e5c36a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc48e80a009ba719a3da45a4681df553edbb994006d3f74e39c4ae7fb7ac49aa4b625c67e88ad33e2c2eeccb92af862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -2617,18 +2617,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "c41d4c5de9d874f39a3bdbc336ea4798e6c45d8c18eed231af7a4d8ade515858", - "mixHash" : "781ef73ddbc64eb5da3e4dac173944da979d1e9b4aaaa55b5ed93721fc2ff801", - "nonce" : "c9830ca48b148e7f", + "hash" : "fae1303630ffbeb1d22c6b17523fc432cc6ddc0124ad9c80e3232089a80be742", + "mixHash" : "75925693c86d289124933fa2e987a9c186cf961c08f029fe28725df56998871d", + "nonce" : "bbedcc06204341de", "number" : "0x02", - "parentHash" : "ca1b46f4ee9bc9ae4df82db12f8608b303b68c58de9f494323efb4413aba8c1b", + "parentHash" : "54ae15fbe1906ea2f7291c92f6ddabcda5bb2e1e788e95adfa13611c5bc91efb", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e614", + "timestamp" : "0x561bc490", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0ca1b46f4ee9bc9ae4df82db12f8608b303b68c58de9f494323efb4413aba8c1ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e61480a0781ef73ddbc64eb5da3e4dac173944da979d1e9b4aaaa55b5ed93721fc2ff80188c9830ca48b148e7ff861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a054ae15fbe1906ea2f7291c92f6ddabcda5bb2e1e788e95adfa13611c5bc91efba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc49080a075925693c86d289124933fa2e987a9c186cf961c08f029fe28725df56998871d88bbedcc06204341def861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -2653,18 +2653,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "af3d7e2f78c8c457866c8cbb1d6ac75f2df97c932d03a02852d713ac36d90c28", - "mixHash" : "9cff942edead5e235da15e0fead43382e83ef2bcaf2910637f15dbe0c30bfcdd", - "nonce" : "efb0bbbb8976c0b8", + "hash" : "a9d710a36f97d6fd5a9732efea15b04b61cd0b1a730f8af113c33b7d1022986d", + "mixHash" : "32eb94e16b75929f7a1361e4d11599186d42a25be6db867f50477985ff4c5b9d", + "nonce" : "efa0693349236b2c", "number" : "0x03", - "parentHash" : "c41d4c5de9d874f39a3bdbc336ea4798e6c45d8c18eed231af7a4d8ade515858", + "parentHash" : "fae1303630ffbeb1d22c6b17523fc432cc6ddc0124ad9c80e3232089a80be742", "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", - "timestamp" : "0x55b7e615", + "timestamp" : "0x561bc493", "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0c41d4c5de9d874f39a3bdbc336ea4798e6c45d8c18eed231af7a4d8ade515858a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e61580a09cff942edead5e235da15e0fead43382e83ef2bcaf2910637f15dbe0c30bfcdd88efb0bbbb8976c0b8f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "rlp" : "0xf90261f901f9a0fae1303630ffbeb1d22c6b17523fc432cc6ddc0124ad9c80e3232089a80be742a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc49380a032eb94e16b75929f7a1361e4d11599186d42a25be6db867f50477985ff4c5b9d88efa0693349236b2cf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", "transactions" : [ { "data" : "0x", @@ -2689,18 +2689,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "a0169a23e11243f9c10c4f5b98d4b8bb8d6f5f4aab25eb1fcbecc74056268c7b", - "mixHash" : "d3fa4814535ece4dbcec0130ca88402fa24fb2eda083517638c663754d07b689", - "nonce" : "6a20f322eb00ffe6", + "hash" : "4085645a73f8a4cb8747d58420e7d97d0fad204220a29012d5243fa00e938fe4", + "mixHash" : "93ec2cd1b27bd758f9399402b9c0155daf9855a6112f16ddc099f820c0c3a43f", + "nonce" : "eb4cdd80fb9117ad", "number" : "0x04", - "parentHash" : "af3d7e2f78c8c457866c8cbb1d6ac75f2df97c932d03a02852d713ac36d90c28", + "parentHash" : "a9d710a36f97d6fd5a9732efea15b04b61cd0b1a730f8af113c33b7d1022986d", "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", - "timestamp" : "0x55b7e618", + "timestamp" : "0x561bc494", "transactionsTrie" : "9735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0af3d7e2f78c8c457866c8cbb1d6ac75f2df97c932d03a02852d713ac36d90c28a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88252088455b7e61880a0d3fa4814535ece4dbcec0130ca88402fa24fb2eda083517638c663754d07b689886a20f322eb00ffe6f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", + "rlp" : "0xf90261f901f9a0a9d710a36f97d6fd5a9732efea15b04b61cd0b1a730f8af113c33b7d1022986da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc49480a093ec2cd1b27bd758f9399402b9c0155daf9855a6112f16ddc099f820c0c3a43f88eb4cdd80fb9117adf862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", "transactions" : [ { "data" : "0x", @@ -2725,18 +2725,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "4b31de82c573e8c3a30fde619a0e793140abb6b668956d2c1f46f90d6bff91af", - "mixHash" : "69b03e1943a360d2143f6c543b2b676f9161b30c5f0877ee089ef23139f95681", - "nonce" : "eee157438e805079", + "hash" : "6961395aca081f5ea710568215fb43ece99e2a6d11fa328bcfb7fa21f3f145ea", + "mixHash" : "2f830bf6506bf35ac3335eb7e3d3b92e956ed543d5c4b07ec9162d26e8fa58d9", + "nonce" : "224cafa381c38d6e", "number" : "0x05", - "parentHash" : "a0169a23e11243f9c10c4f5b98d4b8bb8d6f5f4aab25eb1fcbecc74056268c7b", + "parentHash" : "4085645a73f8a4cb8747d58420e7d97d0fad204220a29012d5243fa00e938fe4", "receiptTrie" : "e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9", "stateRoot" : "72f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19", - "timestamp" : "0x55b7e61a", + "timestamp" : "0x561bc498", "transactionsTrie" : "7e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0a0169a23e11243f9c10c4f5b98d4b8bb8d6f5f4aab25eb1fcbecc74056268c7ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a07e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd88252088455b7e61a80a069b03e1943a360d2143f6c543b2b676f9161b30c5f0877ee089ef23139f9568188eee157438e805079f862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29a0796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13c0", + "rlp" : "0xf90261f901f9a04085645a73f8a4cb8747d58420e7d97d0fad204220a29012d5243fa00e938fe4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a07e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bc49880a02f830bf6506bf35ac3335eb7e3d3b92e956ed543d5c4b07ec9162d26e8fa58d988224cafa381c38d6ef862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29a0796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13c0", "transactions" : [ { "data" : "0x", @@ -2761,18 +2761,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "5500678df0162633ad16235996f885836bf54b94fc044af132025a06c60ab6e0", - "mixHash" : "d4174cb2ccb7bb0e020262401c36cb63d7b3bc8c76d79283fab85cf373376f2f", - "nonce" : "8cc41a266b97cea2", + "hash" : "8e5d861be6287515be5badf68938ff5ffcfd22c9a9f4b42eea837b1b51530803", + "mixHash" : "1a0d591f6a2533ab1cf35662b5fd68b12dd035755be8b59d31bec380a168036d", + "nonce" : "5af9cf707d29defd", "number" : "0x06", - "parentHash" : "4b31de82c573e8c3a30fde619a0e793140abb6b668956d2c1f46f90d6bff91af", + "parentHash" : "6961395aca081f5ea710568215fb43ece99e2a6d11fa328bcfb7fa21f3f145ea", "receiptTrie" : "849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01f", "stateRoot" : "4fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640", - "timestamp" : "0x55b7e61b", + "timestamp" : "0x561bc49a", "transactionsTrie" : "72e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fd", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a04b31de82c573e8c3a30fde619a0e793140abb6b668956d2c1f46f90d6bff91afa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640a072e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fda0849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd88252088455b7e61b80a0d4174cb2ccb7bb0e020262401c36cb63d7b3bc8c76d79283fab85cf373376f2f888cc41a266b97cea2f862f86005018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0b6a4064ef7d23f0e149472d6f1257055149840b6c73a4ae25e595b9f9fc78edca004ad52e8157ae742b551851d58fd6c3919cd7e5a0a9c6685d5bc630a657dcde7c0", + "rlp" : "0xf90261f901f9a06961395aca081f5ea710568215fb43ece99e2a6d11fa328bcfb7fa21f3f145eaa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640a072e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fda0849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882520884561bc49a80a01a0d591f6a2533ab1cf35662b5fd68b12dd035755be8b59d31bec380a168036d885af9cf707d29defdf862f86005018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0b6a4064ef7d23f0e149472d6f1257055149840b6c73a4ae25e595b9f9fc78edca004ad52e8157ae742b551851d58fd6c3919cd7e5a0a9c6685d5bc630a657dcde7c0", "transactions" : [ { "data" : "0x", @@ -2797,18 +2797,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "4d2e9b6a2bfafc1f54a56b580868e2a351d12d73a86e682806f745e516ee35d0", - "mixHash" : "a2cc433f0d028a29368cdf96b9d1718fdae155ab39fa72bcd9c24f939d3fc988", - "nonce" : "343330326a4b2ae0", + "hash" : "6601ed2b5d0fdc4ccdbfa66b10d054e30f9c3aa986171601469aa8244f33efb7", + "mixHash" : "e6b3aeba786593732971c2d272161ac0f234558ba1933fc1293e54796aad6f9f", + "nonce" : "2c7ee1ef2f95c97f", "number" : "0x07", - "parentHash" : "5500678df0162633ad16235996f885836bf54b94fc044af132025a06c60ab6e0", + "parentHash" : "8e5d861be6287515be5badf68938ff5ffcfd22c9a9f4b42eea837b1b51530803", "receiptTrie" : "fa86f16d802244d9cf1a7355bf1ef7c68bebca8b427bea750813b7c091dc0ff2", "stateRoot" : "a278ecf98583bb70af712a1f8f79a1811cc948a15f98d8c39ccd09dee9b551f5", - "timestamp" : "0x55b7e61c", + "timestamp" : "0x561bc49d", "transactionsTrie" : "b599d73bc0f69c32741df069fac99e6a88ec762035157a4da4e56988ca234691", - "uncleHash" : "72895252001c32a349cad2306d39981f8f7d68f313b18ac76d7624ae9384d637" + "uncleHash" : "c4bda136b21f3984cac1c52f8c0b33dad212cb023392d21cc88744f898b059e4" }, - "rlp" : "0xf9045df901f9a05500678df0162633ad16235996f885836bf54b94fc044af132025a06c60ab6e0a072895252001c32a349cad2306d39981f8f7d68f313b18ac76d7624ae9384d637948888f1f195afa192cfee860698584c030f4c9db1a0a278ecf98583bb70af712a1f8f79a1811cc948a15f98d8c39ccd09dee9b551f5a0b599d73bc0f69c32741df069fac99e6a88ec762035157a4da4e56988ca234691a0fa86f16d802244d9cf1a7355bf1ef7c68bebca8b427bea750813b7c091dc0ff2b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd88252088455b7e61c80a0a2cc433f0d028a29368cdf96b9d1718fdae155ab39fa72bcd9c24f939d3fc98888343330326a4b2ae0f862f86006018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba06e5cde32123fa42eeaa27497d538e8fd35c60eda30ead6c296750d3dfcc6d748a01926babbf8c4fef9eb45fe0d532cc30683a16b3415084a9043b27f513057014bf901faf901f7a0ca1b46f4ee9bc9ae4df82db12f8608b303b68c58de9f494323efb4413aba8c1ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e61c80a05c5bd88c3e230857de50a19d318e5463ca3fcd4980e6cf5087ba176141ca53518814406589235c63d6", + "rlp" : "0xf9045df901f9a08e5d861be6287515be5badf68938ff5ffcfd22c9a9f4b42eea837b1b51530803a0c4bda136b21f3984cac1c52f8c0b33dad212cb023392d21cc88744f898b059e4948888f1f195afa192cfee860698584c030f4c9db1a0a278ecf98583bb70af712a1f8f79a1811cc948a15f98d8c39ccd09dee9b551f5a0b599d73bc0f69c32741df069fac99e6a88ec762035157a4da4e56988ca234691a0fa86f16d802244d9cf1a7355bf1ef7c68bebca8b427bea750813b7c091dc0ff2b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882520884561bc49d80a0e6b3aeba786593732971c2d272161ac0f234558ba1933fc1293e54796aad6f9f882c7ee1ef2f95c97ff862f86006018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba06e5cde32123fa42eeaa27497d538e8fd35c60eda30ead6c296750d3dfcc6d748a01926babbf8c4fef9eb45fe0d532cc30683a16b3415084a9043b27f513057014bf901faf901f7a054ae15fbe1906ea2f7291c92f6ddabcda5bb2e1e788e95adfa13611c5bc91efba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000002832fefd88084561bc49c80a03d143fc810dcc7166fcc5ecf3af8e57a7175ee138ddac58b731de352babd3148886ae44f3b7fa1db53", "transactions" : [ { "data" : "0x", @@ -2826,18 +2826,18 @@ { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "bcde5374fce5edbc8e2a8697c15331677e6ebf0b", - "difficulty" : "0x020040", + "difficulty" : "0x020000", "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "5433fbc7fb8fb8cd150cc8b1cb4b63f0259c76a34f5027b207ba45d78f03efc6", - "mixHash" : "5c5bd88c3e230857de50a19d318e5463ca3fcd4980e6cf5087ba176141ca5351", - "nonce" : "14406589235c63d6", + "hash" : "3bc82db4cac3d708bb24b308efa9011b4fac9700562253457dd5528436de3082", + "mixHash" : "3d143fc810dcc7166fcc5ecf3af8e57a7175ee138ddac58b731de352babd3148", + "nonce" : "6ae44f3b7fa1db53", "number" : "0x02", - "parentHash" : "ca1b46f4ee9bc9ae4df82db12f8608b303b68c58de9f494323efb4413aba8c1b", + "parentHash" : "54ae15fbe1906ea2f7291c92f6ddabcda5bb2e1e788e95adfa13611c5bc91efb", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e61c", + "timestamp" : "0x561bc49c", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" } @@ -2851,9 +2851,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "f2e5bf43eb35a49f375add78b304d5467b081a7c4c5ca45e001782838f72ecc3", - "mixHash" : "202af71b6c46f151079373ca0cb252a4175cded02bd51dd6e2be7e60bce268e2", - "nonce" : "76d7a5d3d7af183a", + "hash" : "5b5acadff6b69db71a2e5d5db7c7fb3d2ba613b56f93f44fcd39d0764f8e5c36", + "mixHash" : "26abfe38fcec66f3ea9b8c95111f8b5e1934c499ef3a5669852f4563d3676eab", + "nonce" : "dba36bf4973620ec", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -2862,8 +2862,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0202af71b6c46f151079373ca0cb252a4175cded02bd51dd6e2be7e60bce268e28876d7a5d3d7af183ac0c0", - "lastblockhash" : "4d2e9b6a2bfafc1f54a56b580868e2a351d12d73a86e682806f745e516ee35d0", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a026abfe38fcec66f3ea9b8c95111f8b5e1934c499ef3a5669852f4563d3676eab88dba36bf4973620ecc0c0", + "lastblockhash" : "6601ed2b5d0fdc4ccdbfa66b10d054e30f9c3aa986171601469aa8244f33efb7", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x46", @@ -2914,18 +2914,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "164011cb73efea29a63b1a3bc6e32a7c4a972fea8a591e654aa8f953e0e12a35", - "mixHash" : "c7c52464482cdc5f0a785168079eeccfb63bed56bcf304d5410e99682a0bd847", - "nonce" : "417f70e6ca3b32d8", + "hash" : "af0f9b3d10ab3f8d73c2657e3907bfd43976e9a1d08ecc19dd52b8c3b3ffe853", + "mixHash" : "c031a52aa06d7b346908682a6ef73df0c3435a94e27b5189fd06a5eca871e26a", + "nonce" : "c21d770420d81399", "number" : "0x01", - "parentHash" : "12a12c1e921514e61fb007a8acc2effeb58260a073826c7de080301a0a4d7de0", + "parentHash" : "39e82c2550b2e5489c66ca4e9518159fd233c0510412ec54983f6098230d1634", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e620", + "timestamp" : "0x561bc4a0", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a012a12c1e921514e61fb007a8acc2effeb58260a073826c7de080301a0a4d7de0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e62080a0c7c52464482cdc5f0a785168079eeccfb63bed56bcf304d5410e99682a0bd84788417f70e6ca3b32d8f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a039e82c2550b2e5489c66ca4e9518159fd233c0510412ec54983f6098230d1634a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc4a080a0c031a52aa06d7b346908682a6ef73df0c3435a94e27b5189fd06a5eca871e26a88c21d770420d81399f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -2950,18 +2950,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "2f0cff4601aadd32dac8d3a2bf690472c073295734a89fbdef8e42643d011b94", - "mixHash" : "aa639ce944abe12b3d1e3e0e3b6a686af3cfcf836dcfbab6e9529ef7af70cca4", - "nonce" : "218e25fb14f52cc0", + "hash" : "084d002f9cddc6772632b43508f9e6bfb7fa77e6f4d337cff03ddfa72911dfa5", + "mixHash" : "f1682c23ff2959558213501b396fa5471730495851f95346655b91f165482ecb", + "nonce" : "ac10ce6f15342849", "number" : "0x02", - "parentHash" : "164011cb73efea29a63b1a3bc6e32a7c4a972fea8a591e654aa8f953e0e12a35", + "parentHash" : "af0f9b3d10ab3f8d73c2657e3907bfd43976e9a1d08ecc19dd52b8c3b3ffe853", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e622", + "timestamp" : "0x561bc4a3", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0164011cb73efea29a63b1a3bc6e32a7c4a972fea8a591e654aa8f953e0e12a35a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e62280a0aa639ce944abe12b3d1e3e0e3b6a686af3cfcf836dcfbab6e9529ef7af70cca488218e25fb14f52cc0f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a0af0f9b3d10ab3f8d73c2657e3907bfd43976e9a1d08ecc19dd52b8c3b3ffe853a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc4a380a0f1682c23ff2959558213501b396fa5471730495851f95346655b91f165482ecb88ac10ce6f15342849f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -2986,18 +2986,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "02fee418041a2a6f55cd2e019d1879d28820a36ee68687322925dad893767128", - "mixHash" : "a303b79538ee54f340d1254de438744d9771b3134ff9569ce4ead537ac6a5c0a", - "nonce" : "975691a7b6481d49", + "hash" : "0b32233fb580b5ef4bd852596e0cf49f2b7c5977b1dc49a889a4f0b8b0382ef7", + "mixHash" : "19e02fbcbe6182b4f4317725badd11db0ee2344f97dbb1c6e08beb1ed968071c", + "nonce" : "b70a6f3a0e4f00af", "number" : "0x03", - "parentHash" : "2f0cff4601aadd32dac8d3a2bf690472c073295734a89fbdef8e42643d011b94", + "parentHash" : "084d002f9cddc6772632b43508f9e6bfb7fa77e6f4d337cff03ddfa72911dfa5", "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", - "timestamp" : "0x55b7e624", + "timestamp" : "0x561bc4a7", "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a02f0cff4601aadd32dac8d3a2bf690472c073295734a89fbdef8e42643d011b94a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e62480a0a303b79538ee54f340d1254de438744d9771b3134ff9569ce4ead537ac6a5c0a88975691a7b6481d49f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "rlp" : "0xf90261f901f9a0084d002f9cddc6772632b43508f9e6bfb7fa77e6f4d337cff03ddfa72911dfa5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc4a780a019e02fbcbe6182b4f4317725badd11db0ee2344f97dbb1c6e08beb1ed968071c88b70a6f3a0e4f00aff862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", "transactions" : [ { "data" : "0x", @@ -3022,18 +3022,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "6ce9fea02bcf63248a190c0a396f907abf6187b874ed320f35d972b8d244abfe", - "mixHash" : "f9e90067e529d50cbc8fd1801a5504c4fc82284ba5404c2dcaaf97b902f9c71d", - "nonce" : "0ccd9f582da11e01", + "hash" : "8842d286e45b20fb9d9a833d597845f178d9bf3f523d5d16038671751b545c95", + "mixHash" : "eb3c6d94aad8cdb6937ab02bc36a517851aad0fdb2948074314f4f0b3845f6a8", + "nonce" : "4841fb9f7f791a13", "number" : "0x04", - "parentHash" : "02fee418041a2a6f55cd2e019d1879d28820a36ee68687322925dad893767128", + "parentHash" : "0b32233fb580b5ef4bd852596e0cf49f2b7c5977b1dc49a889a4f0b8b0382ef7", "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", - "timestamp" : "0x55b7e626", + "timestamp" : "0x561bc4a9", "transactionsTrie" : "9735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a002fee418041a2a6f55cd2e019d1879d28820a36ee68687322925dad893767128a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88252088455b7e62680a0f9e90067e529d50cbc8fd1801a5504c4fc82284ba5404c2dcaaf97b902f9c71d880ccd9f582da11e01f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", + "rlp" : "0xf90261f901f9a00b32233fb580b5ef4bd852596e0cf49f2b7c5977b1dc49a889a4f0b8b0382ef7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc4a980a0eb3c6d94aad8cdb6937ab02bc36a517851aad0fdb2948074314f4f0b3845f6a8884841fb9f7f791a13f862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", "transactions" : [ { "data" : "0x", @@ -3058,18 +3058,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "6ff8ed118451b1c64ce469918543b713323c8aff9301be5085c26bc6c56081b0", - "mixHash" : "2502c7ebff12c47da1bdba02c5e701cc12044a04a835375402a358ac4fc2d9df", - "nonce" : "a2c1812b57215ef1", + "hash" : "0baefa6583cc8d013c702393e83524078d20430d8ae93d20bca0c7e15d7607cb", + "mixHash" : "074a1e68497d97b35d56cc7766261a1d12eae4277d0e8fafbbe30766fb66896f", + "nonce" : "ce71dfbeead7acef", "number" : "0x05", - "parentHash" : "6ce9fea02bcf63248a190c0a396f907abf6187b874ed320f35d972b8d244abfe", + "parentHash" : "8842d286e45b20fb9d9a833d597845f178d9bf3f523d5d16038671751b545c95", "receiptTrie" : "e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9", "stateRoot" : "72f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19", - "timestamp" : "0x55b7e627", + "timestamp" : "0x561bc4ac", "transactionsTrie" : "7e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a06ce9fea02bcf63248a190c0a396f907abf6187b874ed320f35d972b8d244abfea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a07e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd88252088455b7e62780a02502c7ebff12c47da1bdba02c5e701cc12044a04a835375402a358ac4fc2d9df88a2c1812b57215ef1f862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29a0796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13c0", + "rlp" : "0xf90261f901f9a08842d286e45b20fb9d9a833d597845f178d9bf3f523d5d16038671751b545c95a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a07e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bc4ac80a0074a1e68497d97b35d56cc7766261a1d12eae4277d0e8fafbbe30766fb66896f88ce71dfbeead7aceff862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29a0796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13c0", "transactions" : [ { "data" : "0x", @@ -3094,18 +3094,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "3ea6b2fdb490dd57b1b0f94e862536091713ffab015c62a59e2488581599ef64", - "mixHash" : "5398d63239398f42b9dd225b451b06818dda95710789318acb51ef533fdeba25", - "nonce" : "59ec7c0179cbf622", + "hash" : "97c9e2b8420755fc7e2e207a41c2b6066be15ad1f948ed0e3d0afd2229c1f690", + "mixHash" : "88eb4d71ab98403f45f751a947f20bba3cf04edc976ee022795bd26c5349b9e8", + "nonce" : "48e24b080c6a7aaf", "number" : "0x06", - "parentHash" : "6ff8ed118451b1c64ce469918543b713323c8aff9301be5085c26bc6c56081b0", + "parentHash" : "0baefa6583cc8d013c702393e83524078d20430d8ae93d20bca0c7e15d7607cb", "receiptTrie" : "849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01f", "stateRoot" : "4fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640", - "timestamp" : "0x55b7e628", + "timestamp" : "0x561bc4af", "transactionsTrie" : "72e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fd", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a06ff8ed118451b1c64ce469918543b713323c8aff9301be5085c26bc6c56081b0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640a072e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fda0849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd88252088455b7e62880a05398d63239398f42b9dd225b451b06818dda95710789318acb51ef533fdeba258859ec7c0179cbf622f862f86005018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0b6a4064ef7d23f0e149472d6f1257055149840b6c73a4ae25e595b9f9fc78edca004ad52e8157ae742b551851d58fd6c3919cd7e5a0a9c6685d5bc630a657dcde7c0", + "rlp" : "0xf90261f901f9a00baefa6583cc8d013c702393e83524078d20430d8ae93d20bca0c7e15d7607cba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640a072e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fda0849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882520884561bc4af80a088eb4d71ab98403f45f751a947f20bba3cf04edc976ee022795bd26c5349b9e88848e24b080c6a7aaff862f86005018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0b6a4064ef7d23f0e149472d6f1257055149840b6c73a4ae25e595b9f9fc78edca004ad52e8157ae742b551851d58fd6c3919cd7e5a0a9c6685d5bc630a657dcde7c0", "transactions" : [ { "data" : "0x", @@ -3130,18 +3130,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "d8895d9e8406cb6302012738f58f7c7375d0b525a58028bf0fd1f717da562375", - "mixHash" : "b041cd40580101cb85b659717c57b3af510b1e7f5ae6f8c92648a86b96e7d248", - "nonce" : "2c8bb1b6ffacfaf5", + "hash" : "821f65b4b45a408dba77d0dfb899a0fd501b460a78a9ef8e27d55bb86c4d048e", + "mixHash" : "047d0349384be60caf29bba3d40dda16ba8cc2829358083139e2fef9be262ab7", + "nonce" : "7e5e59235c7007d0", "number" : "0x07", - "parentHash" : "3ea6b2fdb490dd57b1b0f94e862536091713ffab015c62a59e2488581599ef64", + "parentHash" : "97c9e2b8420755fc7e2e207a41c2b6066be15ad1f948ed0e3d0afd2229c1f690", "receiptTrie" : "fa86f16d802244d9cf1a7355bf1ef7c68bebca8b427bea750813b7c091dc0ff2", "stateRoot" : "8dfc8c0329a0aef2bde5023d5aa2067e965b50d9527bc91733f45aa0cf0c2a1d", - "timestamp" : "0x55b7e62a", + "timestamp" : "0x561bc4b1", "transactionsTrie" : "b599d73bc0f69c32741df069fac99e6a88ec762035157a4da4e56988ca234691", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a03ea6b2fdb490dd57b1b0f94e862536091713ffab015c62a59e2488581599ef64a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08dfc8c0329a0aef2bde5023d5aa2067e965b50d9527bc91733f45aa0cf0c2a1da0b599d73bc0f69c32741df069fac99e6a88ec762035157a4da4e56988ca234691a0fa86f16d802244d9cf1a7355bf1ef7c68bebca8b427bea750813b7c091dc0ff2b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd88252088455b7e62a80a0b041cd40580101cb85b659717c57b3af510b1e7f5ae6f8c92648a86b96e7d248882c8bb1b6ffacfaf5f862f86006018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba06e5cde32123fa42eeaa27497d538e8fd35c60eda30ead6c296750d3dfcc6d748a01926babbf8c4fef9eb45fe0d532cc30683a16b3415084a9043b27f513057014bc0", + "rlp" : "0xf90261f901f9a097c9e2b8420755fc7e2e207a41c2b6066be15ad1f948ed0e3d0afd2229c1f690a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08dfc8c0329a0aef2bde5023d5aa2067e965b50d9527bc91733f45aa0cf0c2a1da0b599d73bc0f69c32741df069fac99e6a88ec762035157a4da4e56988ca234691a0fa86f16d802244d9cf1a7355bf1ef7c68bebca8b427bea750813b7c091dc0ff2b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882520884561bc4b180a0047d0349384be60caf29bba3d40dda16ba8cc2829358083139e2fef9be262ab7887e5e59235c7007d0f862f86006018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba06e5cde32123fa42eeaa27497d538e8fd35c60eda30ead6c296750d3dfcc6d748a01926babbf8c4fef9eb45fe0d532cc30683a16b3415084a9043b27f513057014bc0", "transactions" : [ { "data" : "0x", @@ -3166,18 +3166,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "b0acb86aba553a20fb7434103e61384615c1e9271d3869703452a6b30d82916e", - "mixHash" : "9c1008a669877c1cec7e4f43e9507d4bc7553fbee72e98b43c48950d5211d9f4", - "nonce" : "a0e7f2efd7211dc4", + "hash" : "cb1c419560ca1acec8c16aaf5360669e9168b0698a4977ebaa02bfc367224d40", + "mixHash" : "349b1db2908421a5358e6a5090d1ad913e7b57e357c22e151507aca0b2d2c1e2", + "nonce" : "acbf9781c3323cb7", "number" : "0x08", - "parentHash" : "d8895d9e8406cb6302012738f58f7c7375d0b525a58028bf0fd1f717da562375", + "parentHash" : "821f65b4b45a408dba77d0dfb899a0fd501b460a78a9ef8e27d55bb86c4d048e", "receiptTrie" : "129e8dcd3e2880de0795a0472065a402520bd37918c6d9a60d64854e300cf7dd", "stateRoot" : "ab9ad166ab0e45e4d81749dce13dc94e8c32c857c681f2339cd12cb1b0c01ce1", - "timestamp" : "0x55b7e62b", + "timestamp" : "0x561bc4b7", "transactionsTrie" : "7b01349f6ec832de83c289f71dfd836e9af6031c5b9b0935d4445c5449237b1a", - "uncleHash" : "52b0bba7347e351c452cf7e5f49d344998481281126f188a1fe0cfa3c89d0605" + "uncleHash" : "3e97d80a2f32d69f6017f187a221bfb4d0cc948f72f94b591d599f245105dbfa" }, - "rlp" : "0xf9045df901f9a0d8895d9e8406cb6302012738f58f7c7375d0b525a58028bf0fd1f717da562375a052b0bba7347e351c452cf7e5f49d344998481281126f188a1fe0cfa3c89d0605948888f1f195afa192cfee860698584c030f4c9db1a0ab9ad166ab0e45e4d81749dce13dc94e8c32c857c681f2339cd12cb1b0c01ce1a07b01349f6ec832de83c289f71dfd836e9af6031c5b9b0935d4445c5449237b1aa0129e8dcd3e2880de0795a0472065a402520bd37918c6d9a60d64854e300cf7ddb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd88252088455b7e62b80a09c1008a669877c1cec7e4f43e9507d4bc7553fbee72e98b43c48950d5211d9f488a0e7f2efd7211dc4f862f86007018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca03ffd5dfb58490a6b7491f045acbe6930d2e7d1a636ac08e9f6b071c62f36b6f4a0069907c3301954e812fd2936731ca1dd2c07e362c050ffc3554c76acc11c2fa3f901faf901f7a0164011cb73efea29a63b1a3bc6e32a7c4a972fea8a591e654aa8f953e0e12a35a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e62b80a0f9ae44a500473185681a09f2dfa3a97f8f9cde8e9fdb5d2b3febc86c5d203cf48893715a06b87abc89", + "rlp" : "0xf9045df901f9a0821f65b4b45a408dba77d0dfb899a0fd501b460a78a9ef8e27d55bb86c4d048ea03e97d80a2f32d69f6017f187a221bfb4d0cc948f72f94b591d599f245105dbfa948888f1f195afa192cfee860698584c030f4c9db1a0ab9ad166ab0e45e4d81749dce13dc94e8c32c857c681f2339cd12cb1b0c01ce1a07b01349f6ec832de83c289f71dfd836e9af6031c5b9b0935d4445c5449237b1aa0129e8dcd3e2880de0795a0472065a402520bd37918c6d9a60d64854e300cf7ddb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd882520884561bc4b780a0349b1db2908421a5358e6a5090d1ad913e7b57e357c22e151507aca0b2d2c1e288acbf9781c3323cb7f862f86007018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca03ffd5dfb58490a6b7491f045acbe6930d2e7d1a636ac08e9f6b071c62f36b6f4a0069907c3301954e812fd2936731ca1dd2c07e362c050ffc3554c76acc11c2fa3f901faf901f7a0af0f9b3d10ab3f8d73c2657e3907bfd43976e9a1d08ecc19dd52b8c3b3ffe853a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000002832fefd88084561bc4b380a0bf20128d3fe182e368eae7dc1799cf54860f5a74cefc7503adbd3d967f4853ac884314037aef102db2", "transactions" : [ { "data" : "0x", @@ -3195,18 +3195,18 @@ { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "bcde5374fce5edbc8e2a8697c15331677e6ebf0b", - "difficulty" : "0x020040", + "difficulty" : "0x020000", "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "a3eeec47377ce6495e20616917c824ea37b49d58960c13a4260112a5bf9cb9ed", - "mixHash" : "f9ae44a500473185681a09f2dfa3a97f8f9cde8e9fdb5d2b3febc86c5d203cf4", - "nonce" : "93715a06b87abc89", + "hash" : "85f4483409ebaf83abf4e9f8618483f35bb3bcc5bb2387bb8d561b01c122eb1b", + "mixHash" : "bf20128d3fe182e368eae7dc1799cf54860f5a74cefc7503adbd3d967f4853ac", + "nonce" : "4314037aef102db2", "number" : "0x02", - "parentHash" : "164011cb73efea29a63b1a3bc6e32a7c4a972fea8a591e654aa8f953e0e12a35", + "parentHash" : "af0f9b3d10ab3f8d73c2657e3907bfd43976e9a1d08ecc19dd52b8c3b3ffe853", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e62b", + "timestamp" : "0x561bc4b3", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" } @@ -3220,9 +3220,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "12a12c1e921514e61fb007a8acc2effeb58260a073826c7de080301a0a4d7de0", - "mixHash" : "a8fedcb68225c6a54cd774d6e3b115734d3a54d7ee0bebf1a0110dd75498fdcd", - "nonce" : "079ac9a72c12891a", + "hash" : "39e82c2550b2e5489c66ca4e9518159fd233c0510412ec54983f6098230d1634", + "mixHash" : "c9396ef49ed91257b3c1f865907e12407bc8b2536337444f603e68ab4cc151c0", + "nonce" : "05c9722a2d2c373d", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -3231,8 +3231,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0a8fedcb68225c6a54cd774d6e3b115734d3a54d7ee0bebf1a0110dd75498fdcd88079ac9a72c12891ac0c0", - "lastblockhash" : "b0acb86aba553a20fb7434103e61384615c1e9271d3869703452a6b30d82916e", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0c9396ef49ed91257b3c1f865907e12407bc8b2536337444f603e68ab4cc151c08805c9722a2d2c373dc0c0", + "lastblockhash" : "cb1c419560ca1acec8c16aaf5360669e9168b0698a4977ebaa02bfc367224d40", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x50", @@ -3283,18 +3283,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "45941bf09db025195b580530a9058d07acb5f9f563565a8c2fbadd4f44021124", - "mixHash" : "c1ab17c71bfdeb0c8d7df860e14f6bead5ff4a6ce29fd6e5e5cbd76e7f5cef64", - "nonce" : "b01f64683527582c", + "hash" : "29e70a34c9b14f7dbb3eefe9a518a4a780902c279e8b85467107d0f1eafaffa3", + "mixHash" : "ae57b9f82e76fd28a5ecd2c9011b68e3f01dc12944615fd8781ec1a5af04e6fc", + "nonce" : "73bac001f639dc93", "number" : "0x01", - "parentHash" : "9b1b5dc5b1c41e9baab4d7164577b64480ebe8f97518e8e1779956fc467c153a", + "parentHash" : "4c9396f848992f11682564cc430e35e77757c94fb42830b71305f9f73dd9f7ed", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e631", + "timestamp" : "0x561bc4ba", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a09b1b5dc5b1c41e9baab4d7164577b64480ebe8f97518e8e1779956fc467c153aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e63180a0c1ab17c71bfdeb0c8d7df860e14f6bead5ff4a6ce29fd6e5e5cbd76e7f5cef6488b01f64683527582cf862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a04c9396f848992f11682564cc430e35e77757c94fb42830b71305f9f73dd9f7eda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc4ba80a0ae57b9f82e76fd28a5ecd2c9011b68e3f01dc12944615fd8781ec1a5af04e6fc8873bac001f639dc93f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -3319,18 +3319,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "3ef87a7caf42bb034793ab9fdfa48972ea2a6983d369d073c873c40679717949", - "mixHash" : "bcdf4b34ced90618165e400feab8a16ecc038e8787a849f380f32a5417049cf7", - "nonce" : "785e750080dc1789", + "hash" : "5b17f8bb76ae3a769278653704c06b3901bba9db8dc125215223df97d66dd47b", + "mixHash" : "2ef70353b7a900f8f911726a742c36c5d00b1985ff3d0150f176f4c3264bd8ea", + "nonce" : "7e58782fbab1baab", "number" : "0x02", - "parentHash" : "45941bf09db025195b580530a9058d07acb5f9f563565a8c2fbadd4f44021124", + "parentHash" : "29e70a34c9b14f7dbb3eefe9a518a4a780902c279e8b85467107d0f1eafaffa3", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e633", + "timestamp" : "0x561bc4bd", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a045941bf09db025195b580530a9058d07acb5f9f563565a8c2fbadd4f44021124a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e63380a0bcdf4b34ced90618165e400feab8a16ecc038e8787a849f380f32a5417049cf788785e750080dc1789f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a029e70a34c9b14f7dbb3eefe9a518a4a780902c279e8b85467107d0f1eafaffa3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc4bd80a02ef70353b7a900f8f911726a742c36c5d00b1985ff3d0150f176f4c3264bd8ea887e58782fbab1baabf861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -3355,18 +3355,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "8af299a3b77079b96cfd297f86c656075eadd498d656112e2a7ff86035e716aa", - "mixHash" : "9052a3a4936b048c38302d953385702f9c30a772f292390876c88bcfd2bd7421", - "nonce" : "e6118f88b05029d2", + "hash" : "93743754d46b17f6d9a485676e1f1b57ed7fde6c359c7c854553fb0868121dfe", + "mixHash" : "b2f1de8aaab571d08b5d011b7c82d8c795c487b29a065aab89d8fa44d66775fb", + "nonce" : "b3045874c0ed2339", "number" : "0x03", - "parentHash" : "3ef87a7caf42bb034793ab9fdfa48972ea2a6983d369d073c873c40679717949", + "parentHash" : "5b17f8bb76ae3a769278653704c06b3901bba9db8dc125215223df97d66dd47b", "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", "stateRoot" : "611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8", - "timestamp" : "0x55b7e636", + "timestamp" : "0x561bc4bf", "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a03ef87a7caf42bb034793ab9fdfa48972ea2a6983d369d073c873c40679717949a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e63680a09052a3a4936b048c38302d953385702f9c30a772f292390876c88bcfd2bd742188e6118f88b05029d2f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", + "rlp" : "0xf90261f901f9a05b17f8bb76ae3a769278653704c06b3901bba9db8dc125215223df97d66dd47ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc4bf80a0b2f1de8aaab571d08b5d011b7c82d8c795c487b29a065aab89d8fa44d66775fb88b3045874c0ed2339f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38c0", "transactions" : [ { "data" : "0x", @@ -3391,18 +3391,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "3226caaffb6e1db75508fcfa4694bf2b8dff4e0d02ad169e322eef83d3cb5538", - "mixHash" : "33b124abaa76527cdfc1e2580d8ea922f1cdab35060f1e9afb603a6958ad1885", - "nonce" : "a995ebfc440b1f1b", + "hash" : "f17c6aac8a6f5c646606917560d4ff308a7e0450590fa23626d79c554ef0a17e", + "mixHash" : "4401031e5d43eef4e62b81a6fc2ca9015504df5a9f35811e79a3ab1d2892446f", + "nonce" : "985c38739536dbcc", "number" : "0x04", - "parentHash" : "8af299a3b77079b96cfd297f86c656075eadd498d656112e2a7ff86035e716aa", + "parentHash" : "93743754d46b17f6d9a485676e1f1b57ed7fde6c359c7c854553fb0868121dfe", "receiptTrie" : "69deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9", "stateRoot" : "0c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107", - "timestamp" : "0x55b7e637", + "timestamp" : "0x561bc4c3", "transactionsTrie" : "9735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a08af299a3b77079b96cfd297f86c656075eadd498d656112e2a7ff86035e716aaa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88252088455b7e63780a033b124abaa76527cdfc1e2580d8ea922f1cdab35060f1e9afb603a6958ad188588a995ebfc440b1f1bf862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", + "rlp" : "0xf90261f901f9a093743754d46b17f6d9a485676e1f1b57ed7fde6c359c7c854553fb0868121dfea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a00c3ce4dfb1b837f3b857028aff9c63f24359d84a006f1241770ab8331dde3107a09735e49acaddb4d8338ed33df8dd006449b20b85e89e47224ac8ec8f7ea26071a069deb0f79afb53bdf4c14eba71e4404be1094d3d788ecc339f017c2e58893be9b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd882520884561bc4c380a04401031e5d43eef4e62b81a6fc2ca9015504df5a9f35811e79a3ab1d2892446f88985c38739536dbccf862f86003018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0a7b7f2fa93025fc1e6aa18c1aa07c32a456439754e196cb74f2f7d12cf3e840da02078cf840fb25fc3d858b2a85b622f21be0588b5c5d81d433427f6470e06a4a7c0", "transactions" : [ { "data" : "0x", @@ -3427,18 +3427,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "1d5e736882e821bf2d88f7734e04a6664fd4de4c2a9ab459e9879c1e9c137737", - "mixHash" : "7e25935923fed3084316eebe937be67dff6025de8b58102aff90eefec320dada", - "nonce" : "f2a1e6948cbb687b", + "hash" : "3605afe3d3fbb2239f42a3ad302c3ec82036b12a5905a9e6f2e053b6db5df280", + "mixHash" : "65ad0a96b199985b0c91cb97b49d0777034137a420cd8d20a0bf9191e25f3f17", + "nonce" : "187140548c755402", "number" : "0x05", - "parentHash" : "3226caaffb6e1db75508fcfa4694bf2b8dff4e0d02ad169e322eef83d3cb5538", + "parentHash" : "f17c6aac8a6f5c646606917560d4ff308a7e0450590fa23626d79c554ef0a17e", "receiptTrie" : "e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9", "stateRoot" : "72f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19", - "timestamp" : "0x55b7e639", + "timestamp" : "0x561bc4c6", "transactionsTrie" : "7e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a03226caaffb6e1db75508fcfa4694bf2b8dff4e0d02ad169e322eef83d3cb5538a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a07e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd88252088455b7e63980a07e25935923fed3084316eebe937be67dff6025de8b58102aff90eefec320dada88f2a1e6948cbb687bf862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29a0796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13c0", + "rlp" : "0xf90261f901f9a0f17c6aac8a6f5c646606917560d4ff308a7e0450590fa23626d79c554ef0a17ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a072f178532a814ac25b12f6aa78d93fa62f6f22d00632316b89d5ff3245dcfb19a07e457eebaff319b52b0446acbf66b7d4d641643ec78446b22fa087d412a858a1a0e2ae757a304ff8d30220499b6abac6ab78a67232d6d7b6bf4a6ca4b863b64ff9b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302010005832fefd882520884561bc4c680a065ad0a96b199985b0c91cb97b49d0777034137a420cd8d20a0bf9191e25f3f1788187140548c755402f862f86004018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ce71dc96c33cae8ba60e25cc2a00a83e4a9fc564520cec1449f63da7435fcb29a0796d06a71cf9a4a3a680421d69147413fa1e903f181f9782783ad9ca55d36b13c0", "transactions" : [ { "data" : "0x", @@ -3463,18 +3463,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "6ee47800890cc93009cb6538bb20b69a4a177a82721b825598d7f51f6c4c034c", - "mixHash" : "16ff0a30e5982cde5d784bc61d64fbfe852f3dab1a258da273642febf4cd6977", - "nonce" : "340e50c2e4c5023b", + "hash" : "73b79ef1893a199ff4769bc1b782a07e0a7af2ccec3eae184727e7a3b208eefb", + "mixHash" : "93fcac89efd8309ac1a8df23ffef31dd85b3ed437a66a84b4481983b300dd187", + "nonce" : "feb5d17d6b830201", "number" : "0x06", - "parentHash" : "1d5e736882e821bf2d88f7734e04a6664fd4de4c2a9ab459e9879c1e9c137737", + "parentHash" : "3605afe3d3fbb2239f42a3ad302c3ec82036b12a5905a9e6f2e053b6db5df280", "receiptTrie" : "849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01f", "stateRoot" : "4fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640", - "timestamp" : "0x55b7e63a", + "timestamp" : "0x561bc4c8", "transactionsTrie" : "72e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fd", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a01d5e736882e821bf2d88f7734e04a6664fd4de4c2a9ab459e9879c1e9c137737a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640a072e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fda0849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd88252088455b7e63a80a016ff0a30e5982cde5d784bc61d64fbfe852f3dab1a258da273642febf4cd697788340e50c2e4c5023bf862f86005018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0b6a4064ef7d23f0e149472d6f1257055149840b6c73a4ae25e595b9f9fc78edca004ad52e8157ae742b551851d58fd6c3919cd7e5a0a9c6685d5bc630a657dcde7c0", + "rlp" : "0xf90261f901f9a03605afe3d3fbb2239f42a3ad302c3ec82036b12a5905a9e6f2e053b6db5df280a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04fce7db8f2e81e86d93c8d95fbe34fcd7091927b19a7ef15d37efc8debe0f640a072e4aac2bdb78c4c3f8e50bf39b1aa8714fdbf32c1d3426750b9c108c52ce8fda0849a66e138adff4a516bf3cdf9734e092027eadf37fca9320f2d422bda58a01fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302014006832fefd882520884561bc4c880a093fcac89efd8309ac1a8df23ffef31dd85b3ed437a66a84b4481983b300dd18788feb5d17d6b830201f862f86005018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0b6a4064ef7d23f0e149472d6f1257055149840b6c73a4ae25e595b9f9fc78edca004ad52e8157ae742b551851d58fd6c3919cd7e5a0a9c6685d5bc630a657dcde7c0", "transactions" : [ { "data" : "0x", @@ -3499,18 +3499,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "779256c7681150d9b07cbc7c2d8631a07c69b8eef6b32cf4f9d12b847d8d8a5d", - "mixHash" : "2e027a49d2cf52015c153bdc4c4c939671bed7f62019fe404e969d94172a732a", - "nonce" : "5133ad51005d8b22", + "hash" : "c905f8067198e0d59fc9fb27a90a5b8b69a23349c96251a64fc5a677f0b65bba", + "mixHash" : "b939b531ffd49a1b11ffa6a85e088bda655f5386b7436ed218c0027f9cab02ba", + "nonce" : "955558ddc50ca5f3", "number" : "0x07", - "parentHash" : "6ee47800890cc93009cb6538bb20b69a4a177a82721b825598d7f51f6c4c034c", + "parentHash" : "73b79ef1893a199ff4769bc1b782a07e0a7af2ccec3eae184727e7a3b208eefb", "receiptTrie" : "fa86f16d802244d9cf1a7355bf1ef7c68bebca8b427bea750813b7c091dc0ff2", "stateRoot" : "8dfc8c0329a0aef2bde5023d5aa2067e965b50d9527bc91733f45aa0cf0c2a1d", - "timestamp" : "0x55b7e63c", + "timestamp" : "0x561bc4ca", "transactionsTrie" : "b599d73bc0f69c32741df069fac99e6a88ec762035157a4da4e56988ca234691", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a06ee47800890cc93009cb6538bb20b69a4a177a82721b825598d7f51f6c4c034ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08dfc8c0329a0aef2bde5023d5aa2067e965b50d9527bc91733f45aa0cf0c2a1da0b599d73bc0f69c32741df069fac99e6a88ec762035157a4da4e56988ca234691a0fa86f16d802244d9cf1a7355bf1ef7c68bebca8b427bea750813b7c091dc0ff2b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd88252088455b7e63c80a02e027a49d2cf52015c153bdc4c4c939671bed7f62019fe404e969d94172a732a885133ad51005d8b22f862f86006018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba06e5cde32123fa42eeaa27497d538e8fd35c60eda30ead6c296750d3dfcc6d748a01926babbf8c4fef9eb45fe0d532cc30683a16b3415084a9043b27f513057014bc0", + "rlp" : "0xf90261f901f9a073b79ef1893a199ff4769bc1b782a07e0a7af2ccec3eae184727e7a3b208eefba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08dfc8c0329a0aef2bde5023d5aa2067e965b50d9527bc91733f45aa0cf0c2a1da0b599d73bc0f69c32741df069fac99e6a88ec762035157a4da4e56988ca234691a0fa86f16d802244d9cf1a7355bf1ef7c68bebca8b427bea750813b7c091dc0ff2b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302018007832fefd882520884561bc4ca80a0b939b531ffd49a1b11ffa6a85e088bda655f5386b7436ed218c0027f9cab02ba88955558ddc50ca5f3f862f86006018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba06e5cde32123fa42eeaa27497d538e8fd35c60eda30ead6c296750d3dfcc6d748a01926babbf8c4fef9eb45fe0d532cc30683a16b3415084a9043b27f513057014bc0", "transactions" : [ { "data" : "0x", @@ -3535,18 +3535,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "598e4b33a9fb984658772883710621b6651b82cdb1ab0bb0b25096d7204f1209", - "mixHash" : "7813324f35b13f3c15e39ece04840a7c118ef3420346f406d8879fbac44c4ae8", - "nonce" : "f1914871020de377", + "hash" : "56ae22e9ff2b348c076e7822731021a0c18ffed2b597016988d381abea804063", + "mixHash" : "00336bdf349a460f98a36d561b55dfd25da505fddf593443c3ecd61501aad394", + "nonce" : "4e1b69555ee1ef86", "number" : "0x08", - "parentHash" : "779256c7681150d9b07cbc7c2d8631a07c69b8eef6b32cf4f9d12b847d8d8a5d", + "parentHash" : "c905f8067198e0d59fc9fb27a90a5b8b69a23349c96251a64fc5a677f0b65bba", "receiptTrie" : "129e8dcd3e2880de0795a0472065a402520bd37918c6d9a60d64854e300cf7dd", "stateRoot" : "a62f540ccf204f049e5c7bbae8f4f73ea5817c37a1764812cbf120a87f5b4225", - "timestamp" : "0x55b7e63d", + "timestamp" : "0x561bc4cd", "transactionsTrie" : "7b01349f6ec832de83c289f71dfd836e9af6031c5b9b0935d4445c5449237b1a", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0779256c7681150d9b07cbc7c2d8631a07c69b8eef6b32cf4f9d12b847d8d8a5da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a62f540ccf204f049e5c7bbae8f4f73ea5817c37a1764812cbf120a87f5b4225a07b01349f6ec832de83c289f71dfd836e9af6031c5b9b0935d4445c5449237b1aa0129e8dcd3e2880de0795a0472065a402520bd37918c6d9a60d64854e300cf7ddb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd88252088455b7e63d80a07813324f35b13f3c15e39ece04840a7c118ef3420346f406d8879fbac44c4ae888f1914871020de377f862f86007018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca03ffd5dfb58490a6b7491f045acbe6930d2e7d1a636ac08e9f6b071c62f36b6f4a0069907c3301954e812fd2936731ca1dd2c07e362c050ffc3554c76acc11c2fa3c0", + "rlp" : "0xf90261f901f9a0c905f8067198e0d59fc9fb27a90a5b8b69a23349c96251a64fc5a677f0b65bbaa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a62f540ccf204f049e5c7bbae8f4f73ea5817c37a1764812cbf120a87f5b4225a07b01349f6ec832de83c289f71dfd836e9af6031c5b9b0935d4445c5449237b1aa0129e8dcd3e2880de0795a0472065a402520bd37918c6d9a60d64854e300cf7ddb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830201c008832fefd882520884561bc4cd80a000336bdf349a460f98a36d561b55dfd25da505fddf593443c3ecd61501aad394884e1b69555ee1ef86f862f86007018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca03ffd5dfb58490a6b7491f045acbe6930d2e7d1a636ac08e9f6b071c62f36b6f4a0069907c3301954e812fd2936731ca1dd2c07e362c050ffc3554c76acc11c2fa3c0", "transactions" : [ { "data" : "0x", @@ -3564,7 +3564,7 @@ ] }, { - "rlp" : "0xf9045df901f9a0598e4b33a9fb984658772883710621b6651b82cdb1ab0bb0b25096d7204f1209a02cdc769a520a6a7c9a5665c4ab9abb86496171f4e80386d0fb736488804069b9948888f1f195afa192cfee860698584c030f4c9db1a016671b78846a5ee341404f6bef367f9303c179870635f2e88709e6f788945ce0a0ab929a0fb5e6103a254e439ce0eb9275f55ae2b9f7f87292632fcae71dda99b9a0353f8e1730a3aa56c6853787c65fa09bff030cfc624de2637535a039285a9966b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd88252088455b7e63e80a0402758327f9aeba71a0bc7a12cf480421f451670bc65533c73cd918fa1f55d73887ab463f6ac57b5fcf862f86008018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0820dd7609f5a6df98cd89c1b2340a276c142984b2464b7c5bc367f618248f794a00bd364a543b498adf4d98d712c9f739448be1e3126837cd2ec21eb610fd9df8df901faf901f7a045941bf09db025195b580530a9058d07acb5f9f563565a8c2fbadd4f44021124a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000002832fefd8808455b7e63e80a046072e534407a48e7aa4439c907d72fc926084ed8ea6a9103f6b83478b54f60488ae813017cf2a7eb8" + "rlp" : "0xf9045df901f9a056ae22e9ff2b348c076e7822731021a0c18ffed2b597016988d381abea804063a03fc7ca07a8b0abcd3f8589c18cdb020d2051225eef6d899540786fbe88988e2e948888f1f195afa192cfee860698584c030f4c9db1a016671b78846a5ee341404f6bef367f9303c179870635f2e88709e6f788945ce0a0ab929a0fb5e6103a254e439ce0eb9275f55ae2b9f7f87292632fcae71dda99b9a0353f8e1730a3aa56c6853787c65fa09bff030cfc624de2637535a039285a9966b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302020009832fefd882520884561bc4d080a043c67d2963a18002bf42c31fa740a2c3abc49c1ab266154a14e48ba2924888b888a0abe99af5c3b7a6f862f86008018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0820dd7609f5a6df98cd89c1b2340a276c142984b2464b7c5bc367f618248f794a00bd364a543b498adf4d98d712c9f739448be1e3126837cd2ec21eb610fd9df8df901faf901f7a029e70a34c9b14f7dbb3eefe9a518a4a780902c279e8b85467107d0f1eafaffa3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000002832fefd88084561bc4cf80a007b49ddcf97b0c8e715a84ef205f1c56c78f6e7e2f772fbf825f86afa98d974f889f3b38b2bf6ab073" } ], "genesisBlockHeader" : { @@ -3574,9 +3574,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "9b1b5dc5b1c41e9baab4d7164577b64480ebe8f97518e8e1779956fc467c153a", - "mixHash" : "867caf1aa2d8e31e397b059541019eba688c1955530332cec94be8efd2f8e22d", - "nonce" : "75b4b5767db1743c", + "hash" : "4c9396f848992f11682564cc430e35e77757c94fb42830b71305f9f73dd9f7ed", + "mixHash" : "7c7f3f0283af4c22e7dc2a568089a6b6f1babe2d11f2ad4aeb21dce76f2fa553", + "nonce" : "fe56aaf8e613571e", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -3585,8 +3585,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0867caf1aa2d8e31e397b059541019eba688c1955530332cec94be8efd2f8e22d8875b4b5767db1743cc0c0", - "lastblockhash" : "598e4b33a9fb984658772883710621b6651b82cdb1ab0bb0b25096d7204f1209", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a07c7f3f0283af4c22e7dc2a568089a6b6f1babe2d11f2ad4aeb21dce76f2fa55388fe56aaf8e613571ec0c0", + "lastblockhash" : "56ae22e9ff2b348c076e7822731021a0c18ffed2b597016988d381abea804063", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x50", @@ -3630,18 +3630,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "c24426290a7a240eff3cc48d6597c95599f7849ef719a1fa31a1c9b8b0bd763a", - "mixHash" : "5bab5302290147024ba8067b8fa116316a91d79d4f90cfdb03b3218f66404f2d", - "nonce" : "035ca9756fa8edc5", + "hash" : "55c7a5d1a39f8d2ec709bfed3c3348eff02e8d852c7a6d56ef8e948508628618", + "mixHash" : "41c49076965dae0bd94c687002af81c9380bfd7601637b12f2a05b8ac9e8dde6", + "nonce" : "4508890ae01751e1", "number" : "0x01", - "parentHash" : "e927183ba83352d5cecb600f5eb075617bec2cd219574f2aaec06f52bbfd219c", + "parentHash" : "e1c5bbfd7084bf197a7cbdfdc094382f5da07af338f89c6b71bfa7029d946a67", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e643", + "timestamp" : "0x561bc4d3", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0e927183ba83352d5cecb600f5eb075617bec2cd219574f2aaec06f52bbfd219ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e64380a05bab5302290147024ba8067b8fa116316a91d79d4f90cfdb03b3218f66404f2d88035ca9756fa8edc5f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a0e1c5bbfd7084bf197a7cbdfdc094382f5da07af338f89c6b71bfa7029d946a67a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc4d380a041c49076965dae0bd94c687002af81c9380bfd7601637b12f2a05b8ac9e8dde6884508890ae01751e1f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -3666,18 +3666,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "b30d70a56bb0f5bb41c7e21f8b1ada637e66e2cba80d9bcd6bf2af0fceb1e6f1", - "mixHash" : "883c6abebfc948320c2bb396b8920a2e9ea65e812650b717a64889b1019968dd", - "nonce" : "60e0d034908cdeea", + "hash" : "d03aa23fe574c9063c2d4510bc0cd14a90b34cbca6cb35643f979702597faa65", + "mixHash" : "40c87548593e948181b958f42bc2557966f9b01d5c0320978db84fb6a16f9368", + "nonce" : "b4b7a408b6cd26f1", "number" : "0x02", - "parentHash" : "c24426290a7a240eff3cc48d6597c95599f7849ef719a1fa31a1c9b8b0bd763a", + "parentHash" : "55c7a5d1a39f8d2ec709bfed3c3348eff02e8d852c7a6d56ef8e948508628618", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e644", + "timestamp" : "0x561bc4d6", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0c24426290a7a240eff3cc48d6597c95599f7849ef719a1fa31a1c9b8b0bd763aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e64480a0883c6abebfc948320c2bb396b8920a2e9ea65e812650b717a64889b1019968dd8860e0d034908cdeeaf861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a055c7a5d1a39f8d2ec709bfed3c3348eff02e8d852c7a6d56ef8e948508628618a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc4d680a040c87548593e948181b958f42bc2557966f9b01d5c0320978db84fb6a16f936888b4b7a408b6cd26f1f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -3695,7 +3695,7 @@ ] }, { - "rlp" : "0xf90851f901f9a0b30d70a56bb0f5bb41c7e21f8b1ada637e66e2cba80d9bcd6bf2af0fceb1e6f1a0b6ea018dcc13f17df7ae813665483123758de3088442ae2355f596558e94a03a948888f1f195afa192cfee860698584c030f4c9db1a087f9b1b5d37fd6ec76c69ce4c5bc13c3d6b030b622bcec64220cab38b9f8ddf3a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e64680a0e5584c963eeaaa0fa40d0bd55875490f187417ce35a439b74818f53ef66b6e5488145a3c4fefee7fdaf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f905eef901f7a0c24426290a7a240eff3cc48d6597c95599f7849ef719a1fa31a1c9b8b0bd763aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794dcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e64680a0b0687ba55807299e711a91957d93b38c765315e3dd8c9bac20c1272e2bc17aab88ffe5ed0e5d5d08e5f901f7a0c24426290a7a240eff3cc48d6597c95599f7849ef719a1fa31a1c9b8b0bd763aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e64780a05974acc4135270d59611820be6a11c61246ac71fc89eb95aa3d9c7fd1b5b250688e8afe43ecb070c4ff901f7a0c24426290a7a240eff3cc48d6597c95599f7849ef719a1fa31a1c9b8b0bd763aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794fcdf5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e64880a02cf60491b250f72f21f5506de139ee250a2af227caf48993351ee3a8ad1329f888d317ee31287720d2" + "rlp" : "0xf90851f901f9a0d03aa23fe574c9063c2d4510bc0cd14a90b34cbca6cb35643f979702597faa65a06ec1937d5f014b27b46c126e070d798582b0ae9d4218a21dde59511f54519752948888f1f195afa192cfee860698584c030f4c9db1a0864522da4438583097cd714054118fc040062a38ff4120866171fedfb4df0a18a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc4dd80a07c43294815858c4d345732b45ca8d4c62d885bdb0b73baeeaccf6671669b26f488dfc68dc3b6433e72f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f905eef901f7a055c7a5d1a39f8d2ec709bfed3c3348eff02e8d852c7a6d56ef8e948508628618a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc4d880a027474758480bfc7920c3aa74ad0871689c798a6df1c984fe174557f0e57d6e6d889fd76476e5e75c82f901f7a055c7a5d1a39f8d2ec709bfed3c3348eff02e8d852c7a6d56ef8e948508628618a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc4d880a0916be61cc4579c736a36604268c316e746eab511926f2ff2783de9d46961e7b7887bee2d9e35ef35fef901f7a055c7a5d1a39f8d2ec709bfed3c3348eff02e8d852c7a6d56ef8e948508628618a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ccde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc4d880a077193a949a629e4443cc52eca24cab0266bb25f0217347f3d30d95a7581bb88088c1b0428795a2ed42" } ], "genesisBlockHeader" : { @@ -3705,9 +3705,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "e927183ba83352d5cecb600f5eb075617bec2cd219574f2aaec06f52bbfd219c", - "mixHash" : "a5bf7ea6076ad3e0c4aa5bc79f0eccf72d7f2a56469ed760dc08d58589e30a01", - "nonce" : "c188fe8d5eb60129", + "hash" : "e1c5bbfd7084bf197a7cbdfdc094382f5da07af338f89c6b71bfa7029d946a67", + "mixHash" : "667eb2d6c8bbd3cd2c92cd6e4a77d090193fca9f5ef490619faaf152ef9fb0ea", + "nonce" : "76e2b4e6b5f5b10d", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -3716,8 +3716,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0a5bf7ea6076ad3e0c4aa5bc79f0eccf72d7f2a56469ed760dc08d58589e30a0188c188fe8d5eb60129c0c0", - "lastblockhash" : "b30d70a56bb0f5bb41c7e21f8b1ada637e66e2cba80d9bcd6bf2af0fceb1e6f1", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0667eb2d6c8bbd3cd2c92cd6e4a77d090193fca9f5ef490619faaf152ef9fb0ea8876e2b4e6b5f5b10dc0c0", + "lastblockhash" : "d03aa23fe574c9063c2d4510bc0cd14a90b34cbca6cb35643f979702597faa65", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x14", @@ -3761,18 +3761,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "4f1262e788f3a8005743a531b524a67972af35d691348dc1e33336bf5b1fff93", - "mixHash" : "7100b0f40a5e6a963f4e50d430dc0d0ee192efb6a48eb0c0e6524e582eb9227c", - "nonce" : "a8c4c2264d75a6b0", + "hash" : "0caf1750c5ff8a49ac8e2b7eec3480c75cbfbfad74db742e28445d0830335802", + "mixHash" : "2eac8afcab92ed9b06995b776757a80b8096eae48b054d908f82a85ed1c3a960", + "nonce" : "ae35904fa4ea6abc", "number" : "0x01", - "parentHash" : "b74f95bd327c0f5510d6f852c749257c7a2d22fa1a1eedd1052b2653ec9d7ba7", + "parentHash" : "47d8484f226bf7b741825c78a44b1a4d6218673428e08bd450441839ddadc43c", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e650", + "timestamp" : "0x561bc4e1", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0b74f95bd327c0f5510d6f852c749257c7a2d22fa1a1eedd1052b2653ec9d7ba7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e65080a07100b0f40a5e6a963f4e50d430dc0d0ee192efb6a48eb0c0e6524e582eb9227c88a8c4c2264d75a6b0f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a047d8484f226bf7b741825c78a44b1a4d6218673428e08bd450441839ddadc43ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc4e180a02eac8afcab92ed9b06995b776757a80b8096eae48b054d908f82a85ed1c3a96088ae35904fa4ea6abcf862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -3797,18 +3797,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "ab5807b971f96062094fa2767aad6f818d78ea7fbfc6a8d8a228d23f2e09f0fb", - "mixHash" : "106e4c04eab0eb5fbfc3122bd89ea25e461037876fe3d457e367ff0cf93a05bd", - "nonce" : "988bd2a0b672bf34", + "hash" : "b804b2d678871d19533f9bddb09251d4c0e27d23d528d893a7d5d79c2f67abd6", + "mixHash" : "7e0e6ee451350f0a40a5729a5a10e7d5411b4739370ab33dfe721d3900cbafc5", + "nonce" : "2edc7c98cc8dbfdd", "number" : "0x02", - "parentHash" : "4f1262e788f3a8005743a531b524a67972af35d691348dc1e33336bf5b1fff93", + "parentHash" : "0caf1750c5ff8a49ac8e2b7eec3480c75cbfbfad74db742e28445d0830335802", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e652", + "timestamp" : "0x561bc4e3", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a04f1262e788f3a8005743a531b524a67972af35d691348dc1e33336bf5b1fff93a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e65280a0106e4c04eab0eb5fbfc3122bd89ea25e461037876fe3d457e367ff0cf93a05bd88988bd2a0b672bf34f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a00caf1750c5ff8a49ac8e2b7eec3480c75cbfbfad74db742e28445d0830335802a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc4e380a07e0e6ee451350f0a40a5729a5a10e7d5411b4739370ab33dfe721d3900cbafc5882edc7c98cc8dbfddf861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -3826,7 +3826,7 @@ ] }, { - "rlp" : "0xf90657f901f9a0ab5807b971f96062094fa2767aad6f818d78ea7fbfc6a8d8a228d23f2e09f0fba0259ef7455726d1f05d6a2497e2308a414dba7185158b47423533fa73af8010dd948888f1f195afa192cfee860698584c030f4c9db1a0e9940294a09308406a3d2e09203aed11db40259fac0a25e639ad2b30b82d07dea01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e65380a03ea2ef160c9e9455af9f1247e5e74b28d277fc95b2f1d038c31fce4b45f96c958857807ced6997c0cbf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f903f4f901f7a04f1262e788f3a8005743a531b524a67972af35d691348dc1e33336bf5b1fff93a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e65380a0f8014f8e83392de5d04b3afee0b435454b26d962d53dd57bdf1262392ab3417f8851c0fd58df99843ff901f7a04f1262e788f3a8005743a531b524a67972af35d691348dc1e33336bf5b1fff93a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e65380a0f8014f8e83392de5d04b3afee0b435454b26d962d53dd57bdf1262392ab3417f8851c0fd58df99843f" + "rlp" : "0xf90657f901f9a0b804b2d678871d19533f9bddb09251d4c0e27d23d528d893a7d5d79c2f67abd6a0f8debcc58e5a5fd9ba6f8b0cd6870a266ba550d67489e4716848bed724a60ebd948888f1f195afa192cfee860698584c030f4c9db1a077f96f4c766c10cd0207e2672b1b747c741ed75bc94e7be7abacb71cdca3c8fba01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc4e780a0b297d079cd31f3a659a63b38887508e53db68f9787315c64d2feb06d29c33200886094c60fab12bb93f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f903f4f901f7a00caf1750c5ff8a49ac8e2b7eec3480c75cbfbfad74db742e28445d0830335802a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc4e580a03be49db68d5bb326cab3af1474ffa2ca9b0f44f4ca69030b16b2412a5f965aa888605a189ba41ed467f901f7a00caf1750c5ff8a49ac8e2b7eec3480c75cbfbfad74db742e28445d0830335802a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc4e580a03be49db68d5bb326cab3af1474ffa2ca9b0f44f4ca69030b16b2412a5f965aa888605a189ba41ed467" } ], "genesisBlockHeader" : { @@ -3836,9 +3836,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "b74f95bd327c0f5510d6f852c749257c7a2d22fa1a1eedd1052b2653ec9d7ba7", - "mixHash" : "ea6c5bcdb3b3e4595abfcc75810826e5e9835a49d405c996ba2e3796e761010c", - "nonce" : "e294038eccabaad9", + "hash" : "47d8484f226bf7b741825c78a44b1a4d6218673428e08bd450441839ddadc43c", + "mixHash" : "dfb89fcf395a4e9b537e8e85327abca4c1f10138c35a62fe446d6578c8be498f", + "nonce" : "750a66381f7fe4c9", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -3847,8 +3847,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0ea6c5bcdb3b3e4595abfcc75810826e5e9835a49d405c996ba2e3796e761010c88e294038eccabaad9c0c0", - "lastblockhash" : "ab5807b971f96062094fa2767aad6f818d78ea7fbfc6a8d8a228d23f2e09f0fb", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0dfb89fcf395a4e9b537e8e85327abca4c1f10138c35a62fe446d6578c8be498f88750a66381f7fe4c9c0c0", + "lastblockhash" : "b804b2d678871d19533f9bddb09251d4c0e27d23d528d893a7d5d79c2f67abd6", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x14", @@ -3892,18 +3892,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "f014a0d6a9cd01109e6206f9147b94f6e3c04e5336334d10145cef80f8138490", - "mixHash" : "434f9afdfa6e9056d9ac4073c89174313f23918cccd2cf4b9b471101c5696dfe", - "nonce" : "9d8f931bc06fb36a", + "hash" : "2d95091d11bed8927517e8fd990da0a8c12b2ba2f7ad43175ec1bf2319c18ee2", + "mixHash" : "283d9b36d7066acbf878a82dc28ea0ea9286855eff95a8c9edbd4a23c8c400e1", + "nonce" : "23b16e093a7965c1", "number" : "0x01", - "parentHash" : "91f737f54f4866a95f6282443e45f88f496683cc54e0030d79814e048170b120", + "parentHash" : "27b864410070851ffc26e1449507ca74be3aeb0d84b6e5b01e715a11ff4334d2", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e65a", + "timestamp" : "0x561bc4ea", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a091f737f54f4866a95f6282443e45f88f496683cc54e0030d79814e048170b120a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e65a80a0434f9afdfa6e9056d9ac4073c89174313f23918cccd2cf4b9b471101c5696dfe889d8f931bc06fb36af862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a027b864410070851ffc26e1449507ca74be3aeb0d84b6e5b01e715a11ff4334d2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc4ea80a0283d9b36d7066acbf878a82dc28ea0ea9286855eff95a8c9edbd4a23c8c400e18823b16e093a7965c1f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -3928,18 +3928,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "14f7af73dcffdfd9890aff4a89ada89cba3aa95c33892987216a11b7c89c8d8f", - "mixHash" : "6f37729db6a262bd0d79a5da22229608c11aaf917ddcb26564d7e27849b6b0bb", - "nonce" : "07bd3d0fa78f7ce8", + "hash" : "77d22298ce33895b9bd90e81641135e8e3cd00dbe72d1bc511ea774dff8a0cf0", + "mixHash" : "80cac415084a40b2122c7dad43be4d523879fbde621db6bc2355ced95add98f2", + "nonce" : "05ea7e44263e1c5e", "number" : "0x02", - "parentHash" : "f014a0d6a9cd01109e6206f9147b94f6e3c04e5336334d10145cef80f8138490", + "parentHash" : "2d95091d11bed8927517e8fd990da0a8c12b2ba2f7ad43175ec1bf2319c18ee2", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e65b", + "timestamp" : "0x561bc4ec", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0f014a0d6a9cd01109e6206f9147b94f6e3c04e5336334d10145cef80f8138490a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e65b80a06f37729db6a262bd0d79a5da22229608c11aaf917ddcb26564d7e27849b6b0bb8807bd3d0fa78f7ce8f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a02d95091d11bed8927517e8fd990da0a8c12b2ba2f7ad43175ec1bf2319c18ee2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc4ec80a080cac415084a40b2122c7dad43be4d523879fbde621db6bc2355ced95add98f28805ea7e44263e1c5ef861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -3964,18 +3964,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "97ccd515f78a0e46ce15404b73aca10aabd1bf146eb62a60d0689ebbed8bb0cc", - "mixHash" : "e60e001a962b7e671f7ea52366930d232fc764f7dee025fcfd830587f371a417", - "nonce" : "67eb6a46ae3ad382", + "hash" : "5cf66fc3d0600ce2a6352f3c3b2d8b9ae937ce1a1e473bfb6293861281a2777d", + "mixHash" : "656115515a851c3806249a7d2fdcaecc916cafbd15d06c8abf7a59f04dcfb4d6", + "nonce" : "917009daba1a0906", "number" : "0x03", - "parentHash" : "14f7af73dcffdfd9890aff4a89ada89cba3aa95c33892987216a11b7c89c8d8f", + "parentHash" : "77d22298ce33895b9bd90e81641135e8e3cd00dbe72d1bc511ea774dff8a0cf0", "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", "stateRoot" : "aff6e06c5e4cf6b8b5e0094ae04c15ba5fd31d5a78a3e801cda7a9a46fd10633", - "timestamp" : "0x55b7e65d", + "timestamp" : "0x561bc4f2", "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", - "uncleHash" : "454383102f1d08d32e9fd76093cf959121b9e682cfe29cec17da283a20e01947" + "uncleHash" : "9207822a789131bfc33dd621a6e312f6b29fc16a0acf05abc99448675dff35c6" }, - "rlp" : "0xf90657f901f9a014f7af73dcffdfd9890aff4a89ada89cba3aa95c33892987216a11b7c89c8d8fa0454383102f1d08d32e9fd76093cf959121b9e682cfe29cec17da283a20e01947948888f1f195afa192cfee860698584c030f4c9db1a0aff6e06c5e4cf6b8b5e0094ae04c15ba5fd31d5a78a3e801cda7a9a46fd10633a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e65d80a0e60e001a962b7e671f7ea52366930d232fc764f7dee025fcfd830587f371a4178867eb6a46ae3ad382f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f903f4f901f7a0f014a0d6a9cd01109e6206f9147b94f6e3c04e5336334d10145cef80f8138490a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e65d80a0d2fc0ec53edc9913d86d3670455bad840f3548b32c95b0980e4842e53e47442888a7789f130fc42f73f901f7a0f014a0d6a9cd01109e6206f9147b94f6e3c04e5336334d10145cef80f8138490a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ccde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e65d80a05e8a5e18e281941a5e347a58dbf28106a08f7406d0e674037bb49782f372e1d388e23d10d7c0b3610e", + "rlp" : "0xf90657f901f9a077d22298ce33895b9bd90e81641135e8e3cd00dbe72d1bc511ea774dff8a0cf0a09207822a789131bfc33dd621a6e312f6b29fc16a0acf05abc99448675dff35c6948888f1f195afa192cfee860698584c030f4c9db1a0aff6e06c5e4cf6b8b5e0094ae04c15ba5fd31d5a78a3e801cda7a9a46fd10633a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc4f280a0656115515a851c3806249a7d2fdcaecc916cafbd15d06c8abf7a59f04dcfb4d688917009daba1a0906f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f903f4f901f7a02d95091d11bed8927517e8fd990da0a8c12b2ba2f7ad43175ec1bf2319c18ee2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc4ee80a0735d7d02faf67aa8dd6f05be1fe08641453b4144be826a6d6289f19ae8cb6dd1880196d9164bc3622df901f7a02d95091d11bed8927517e8fd990da0a8c12b2ba2f7ad43175ec1bf2319c18ee2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ccde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88084561bc4ef80a087b89dd08bdaf78823714f281773e31f3bbd781834db42eba81b41f607f6bd3f88bd06c119aa172c53", "transactions" : [ { "data" : "0x", @@ -3997,14 +3997,14 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "b742482bfcc54984420d1cbf8e7c32a62281d85ce9ee612df878b0a6a2c9a472", - "mixHash" : "d2fc0ec53edc9913d86d3670455bad840f3548b32c95b0980e4842e53e474428", - "nonce" : "a7789f130fc42f73", + "hash" : "170c412b73c3c3a2fbcfb043bc80534a1696397705c2efbbdce73d729b8f2bd1", + "mixHash" : "735d7d02faf67aa8dd6f05be1fe08641453b4144be826a6d6289f19ae8cb6dd1", + "nonce" : "0196d9164bc3622d", "number" : "0x02", - "parentHash" : "f014a0d6a9cd01109e6206f9147b94f6e3c04e5336334d10145cef80f8138490", + "parentHash" : "2d95091d11bed8927517e8fd990da0a8c12b2ba2f7ad43175ec1bf2319c18ee2", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e65d", + "timestamp" : "0x561bc4ee", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, @@ -4015,14 +4015,14 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "f028d267eabf21927053abb2442cfc8fd2a7db91166221a8cb34966cf6ceeefb", - "mixHash" : "5e8a5e18e281941a5e347a58dbf28106a08f7406d0e674037bb49782f372e1d3", - "nonce" : "e23d10d7c0b3610e", + "hash" : "12f449db61c0f5e2ef6c759b0ffe241a8ca759d4bcddd6b26cf371edf48b6143", + "mixHash" : "87b89dd08bdaf78823714f281773e31f3bbd781834db42eba81b41f607f6bd3f", + "nonce" : "bd06c119aa172c53", "number" : "0x02", - "parentHash" : "f014a0d6a9cd01109e6206f9147b94f6e3c04e5336334d10145cef80f8138490", + "parentHash" : "2d95091d11bed8927517e8fd990da0a8c12b2ba2f7ad43175ec1bf2319c18ee2", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e65d", + "timestamp" : "0x561bc4ef", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" } @@ -4036,9 +4036,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "91f737f54f4866a95f6282443e45f88f496683cc54e0030d79814e048170b120", - "mixHash" : "82f990cc5ec898f542c3a0501e41a989eb1b1c946d450df7477a2a8c86fe0d56", - "nonce" : "af712523fbdab13a", + "hash" : "27b864410070851ffc26e1449507ca74be3aeb0d84b6e5b01e715a11ff4334d2", + "mixHash" : "a583d62f377c5c9c8680853123790e1b5b53085be8bbda353d1f7f0c39a08e51", + "nonce" : "37745cb9767bc8a6", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -4047,8 +4047,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a082f990cc5ec898f542c3a0501e41a989eb1b1c946d450df7477a2a8c86fe0d5688af712523fbdab13ac0c0", - "lastblockhash" : "97ccd515f78a0e46ce15404b73aca10aabd1bf146eb62a60d0689ebbed8bb0cc", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0a583d62f377c5c9c8680853123790e1b5b53085be8bbda353d1f7f0c39a08e518837745cb9767bc8a6c0c0", + "lastblockhash" : "5cf66fc3d0600ce2a6352f3c3b2d8b9ae937ce1a1e473bfb6293861281a2777d", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x1e", @@ -4106,18 +4106,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "babbe15aa2bb1e519d9e1b7bfc1e8f68a2679ec566a920ba2d258d6e0ad856ac", - "mixHash" : "24eab0d8810643b01e08064267df194797803349dcd0189bf55f1c82bd869e46", - "nonce" : "830bbea07d02a03f", + "hash" : "a2a5604baa4181b480b83fcd0f67a245b26b6c71245ca1dbce735b26a59bd5cf", + "mixHash" : "3ac1b21786309f8891d9b59fffebcb5434c03d28fc8367eb6d79c93c6a2c8712", + "nonce" : "d8bc8992e9ff2bd0", "number" : "0x01", - "parentHash" : "a3087d5c75b9e89f60e13394ec49f9eb855d398fc914fd0cb94d4add59700c8a", + "parentHash" : "924970b7a5a36ea6c8bc329dfc11606c8a1cda50a5ca8750e59621c93aae48fb", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e664", + "timestamp" : "0x561bc4f6", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0a3087d5c75b9e89f60e13394ec49f9eb855d398fc914fd0cb94d4add59700c8aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e66480a024eab0d8810643b01e08064267df194797803349dcd0189bf55f1c82bd869e4688830bbea07d02a03ff862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a0924970b7a5a36ea6c8bc329dfc11606c8a1cda50a5ca8750e59621c93aae48fba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc4f680a03ac1b21786309f8891d9b59fffebcb5434c03d28fc8367eb6d79c93c6a2c871288d8bc8992e9ff2bd0f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -4142,18 +4142,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "730701670914fd82dabe139dbd9c4b531c33852ae991d18b3a29e49ece90ebf9", - "mixHash" : "fea9941af8545d8b57be690cff78a13f6f61dfdc7c66a468ce9e63a445e977e6", - "nonce" : "08eadbfc9ec5c178", + "hash" : "df19d08534a19085b42ed2c15f9b72c69663e09bcc76d809ba58438593dc2cc2", + "mixHash" : "8af2918ba5e465ef5871a7dda51a53f5bfe202c3b81e6ad7665a9da759ebff9a", + "nonce" : "b215ff0cdbf31bb0", "number" : "0x02", - "parentHash" : "babbe15aa2bb1e519d9e1b7bfc1e8f68a2679ec566a920ba2d258d6e0ad856ac", + "parentHash" : "a2a5604baa4181b480b83fcd0f67a245b26b6c71245ca1dbce735b26a59bd5cf", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", - "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e666", + "stateRoot" : "6ff22555fde6fe93e5b412a8691287a5be5708246adfd0c599604849925fcc34", + "timestamp" : "0x561bc4fb", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", - "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + "uncleHash" : "b23dfc06e35d1eeca4fc8de368e4f1fa32b423d4d1febe5e112402774e63f2f3" }, - "rlp" : "0xf90260f901f9a0babbe15aa2bb1e519d9e1b7bfc1e8f68a2679ec566a920ba2d258d6e0ad856aca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e66680a0fea9941af8545d8b57be690cff78a13f6f61dfdc7c66a468ce9e63a445e977e68808eadbfc9ec5c178f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf9045cf901f9a0a2a5604baa4181b480b83fcd0f67a245b26b6c71245ca1dbce735b26a59bd5cfa0b23dfc06e35d1eeca4fc8de368e4f1fa32b423d4d1febe5e112402774e63f2f3948888f1f195afa192cfee860698584c030f4c9db1a06ff22555fde6fe93e5b412a8691287a5be5708246adfd0c599604849925fcc34a0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc4fb80a08af2918ba5e465ef5871a7dda51a53f5bfe202c3b81e6ad7665a9da759ebff9a88b215ff0cdbf31bb0f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cff901faf901f7a0924970b7a5a36ea6c8bc329dfc11606c8a1cda50a5ca8750e59621c93aae48fba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88084561bc4f980a09bb05c0b0899b1676970df5ee46e090bd9c9c3be0520b6751b9f87824383d37388ce73741b0f064742", "transactions" : [ { "data" : "0x", @@ -4167,186 +4167,22 @@ "value" : "0x0a" } ], - "uncleHeaders" : [ - ] - } - ], - "genesisBlockHeader" : { - "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020000", - "extraData" : "0x42", - "gasLimit" : "0x2fefd8", - "gasUsed" : "0x00", - "hash" : "a3087d5c75b9e89f60e13394ec49f9eb855d398fc914fd0cb94d4add59700c8a", - "mixHash" : "36bf95a80faae03161ca582b7e67e395d05ac142e3347d63b5d6099c2c92e689", - "nonce" : "49f6fa7862fe3f2b", - "number" : "0x00", - "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", - "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", - "timestamp" : "0x54c98c81", - "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a036bf95a80faae03161ca582b7e67e395d05ac142e3347d63b5d6099c2c92e6898849f6fa7862fe3f2bc0c0", - "lastblockhash" : "730701670914fd82dabe139dbd9c4b531c33852ae991d18b3a29e49ece90ebf9", - "postState" : { - "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x14", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - }, - "8888f1f195afa192cfee860698584c030f4c9db1" : { - "balance" : "0x8ac7230489e8a410", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x09184e71fbdc", - "code" : "0x", - "nonce" : "0x02", - "storage" : { - } - } - }, - "pre" : { - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x09184e72a000", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - } - } - }, - "uncleHeaderWithGeneration0" : { - "blocks" : [ - { - "blockHeader" : { - "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020000", - "extraData" : "0x", - "gasLimit" : "0x2fefd8", - "gasUsed" : "0x5208", - "hash" : "6b02d0bed5051bbc8bd1c065ce01ec53b9cff7d6438c6f957edd377f18a97bfe", - "mixHash" : "a3db9dc2a91c73f6f6806ac86fe4b66cb8642f04df91153f62030198fda9187b", - "nonce" : "0c224bd5018ecfc3", - "number" : "0x01", - "parentHash" : "3be5a90b7f1ed9deb79008003b590d75f6148ce51bc3230efc15587a0820b979", - "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", - "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e668", - "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", - "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp" : "0xf90261f901f9a03be5a90b7f1ed9deb79008003b590d75f6148ce51bc3230efc15587a0820b979a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e66880a0a3db9dc2a91c73f6f6806ac86fe4b66cb8642f04df91153f62030198fda9187b880c224bd5018ecfc3f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", - "transactions" : [ - { - "data" : "0x", - "gasLimit" : "0x04cb2f", - "gasPrice" : "0x01", - "nonce" : "0x00", - "r" : "0x77c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8", - "s" : "0x3f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288d", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1b", - "value" : "0x0a" - } - ], - "uncleHeaders" : [ - ] - }, - { - "blockHeader" : { - "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020040", - "extraData" : "0x", - "gasLimit" : "0x2fefd8", - "gasUsed" : "0x5208", - "hash" : "23d9217f7c314cf41c6854e8a180d7e86f7334103ad215e1862c89e6adecca74", - "mixHash" : "57378132af1489775010aa1a3499c2ce2d3d9ecc46a88059d4b25d9ee49ca032", - "nonce" : "a29a3429e0f0ea83", - "number" : "0x02", - "parentHash" : "6b02d0bed5051bbc8bd1c065ce01ec53b9cff7d6438c6f957edd377f18a97bfe", - "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", - "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e669", - "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", - "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp" : "0xf90260f901f9a06b02d0bed5051bbc8bd1c065ce01ec53b9cff7d6438c6f957edd377f18a97bfea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e66980a057378132af1489775010aa1a3499c2ce2d3d9ecc46a88059d4b25d9ee49ca03288a29a3429e0f0ea83f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", - "transactions" : [ - { - "data" : "0x", - "gasLimit" : "0x04cb2f", - "gasPrice" : "0x01", - "nonce" : "0x01", - "r" : "0x33c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f23", - "s" : "0x1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cf", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1b", - "value" : "0x0a" - } - ], - "uncleHeaders" : [ - ] - }, - { - "blockHeader" : { - "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020080", - "extraData" : "0x", - "gasLimit" : "0x2fefd8", - "gasUsed" : "0x5208", - "hash" : "734ac7132d52997d8ae6d7a128abd9c8cbf3403d0a586ddb456dacaa80c4fcd7", - "mixHash" : "cfb51b29a47723f94748cd3a25b2f1a77369bc4b69f991c7e3278cd6ccdb2dd8", - "nonce" : "5c27847a9084fbcb", - "number" : "0x03", - "parentHash" : "23d9217f7c314cf41c6854e8a180d7e86f7334103ad215e1862c89e6adecca74", - "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", - "stateRoot" : "e9940294a09308406a3d2e09203aed11db40259fac0a25e639ad2b30b82d07de", - "timestamp" : "0x55b7e66c", - "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", - "uncleHash" : "f76d38646108ff0dbf42fbd6bfeab3ab59900639afbf60b68ad52c862cf658ae" - }, - "rlp" : "0xf9045df901f9a023d9217f7c314cf41c6854e8a180d7e86f7334103ad215e1862c89e6adecca74a0f76d38646108ff0dbf42fbd6bfeab3ab59900639afbf60b68ad52c862cf658ae948888f1f195afa192cfee860698584c030f4c9db1a0e9940294a09308406a3d2e09203aed11db40259fac0a25e639ad2b30b82d07dea01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455b7e66c80a0cfb51b29a47723f94748cd3a25b2f1a77369bc4b69f991c7e3278cd6ccdb2dd8885c27847a9084fbcbf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a06b02d0bed5051bbc8bd1c065ce01ec53b9cff7d6438c6f957edd377f18a97bfea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8808455b7e66c80a0b866ad9b18e225a75941207a4c4a7d396297c16c55ba2fb04c56b9c4b7c80a228890a38beb79bc2a37", - "transactions" : [ - { - "data" : "0x", - "gasLimit" : "0x04cb2f", - "gasPrice" : "0x01", - "nonce" : "0x02", - "r" : "0x15eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0ee", - "s" : "0x5d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1c", - "value" : "0x0a" - } - ], "uncleHeaders" : [ { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "bcde5374fce5edbc8e2a8697c15331677e6ebf0b", - "difficulty" : "0x020040", + "coinbase" : "0000000000000000000000000000000000000000", + "difficulty" : "0x020000", "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "182f77934ebbe76b05071cb8326d88791756ba9b589dd67d5b7630d86e8cc753", - "mixHash" : "b866ad9b18e225a75941207a4c4a7d396297c16c55ba2fb04c56b9c4b7c80a22", - "nonce" : "90a38beb79bc2a37", - "number" : "0x02", - "parentHash" : "6b02d0bed5051bbc8bd1c065ce01ec53b9cff7d6438c6f957edd377f18a97bfe", + "hash" : "14c938e905040e38758d18f8febfd5cf73e70f9f064e28c84c40510ec352aa1e", + "mixHash" : "9bb05c0b0899b1676970df5ee46e090bd9c9c3be0520b6751b9f87824383d373", + "nonce" : "ce73741b0f064742", + "number" : "0x01", + "parentHash" : "924970b7a5a36ea6c8bc329dfc11606c8a1cda50a5ca8750e59621c93aae48fb", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e66c", + "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", + "timestamp" : "0x561bc4f9", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" } @@ -4360,9 +4196,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "3be5a90b7f1ed9deb79008003b590d75f6148ce51bc3230efc15587a0820b979", - "mixHash" : "29a5c3ac2e574fcd150050c2c4e861c23fd08baf0b3bc27b2a26cceb7f6f23c3", - "nonce" : "04174224d3160dec", + "hash" : "924970b7a5a36ea6c8bc329dfc11606c8a1cda50a5ca8750e59621c93aae48fb", + "mixHash" : "1d49583c88fc5130d0e59a3443a3a22ef0f192f6e91cc0c36197dc39c1addc4e", + "nonce" : "6df0d2a9365c6bc9", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -4371,147 +4207,16 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a029a5c3ac2e574fcd150050c2c4e861c23fd08baf0b3bc27b2a26cceb7f6f23c38804174224d3160decc0c0", - "lastblockhash" : "734ac7132d52997d8ae6d7a128abd9c8cbf3403d0a586ddb456dacaa80c4fcd7", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a01d49583c88fc5130d0e59a3443a3a22ef0f192f6e91cc0c36197dc39c1addc4e886df0d2a9365c6bc9c0c0", + "lastblockhash" : "df19d08534a19085b42ed2c15f9b72c69663e09bcc76d809ba58438593dc2cc2", "postState" : { - "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x1e", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - }, - "8888f1f195afa192cfee860698584c030f4c9db1" : { - "balance" : "0xd255d112e1049618", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x09184e71a9ca", - "code" : "0x", - "nonce" : "0x03", - "storage" : { - } - }, - "bcde5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "0000000000000000000000000000000000000000" : { "balance" : "0x3cb71f51fc558000", "code" : "0x", "nonce" : "0x00", "storage" : { } - } - }, - "pre" : { - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x09184e72a000", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - } - } - }, - "uncleWithSameBlockNumber" : { - "blocks" : [ - { - "blockHeader" : { - "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020000", - "extraData" : "0x", - "gasLimit" : "0x2fefd8", - "gasUsed" : "0x5208", - "hash" : "826b851d25e7f51f5083da61fa650fef23c27f5f6be8ecf0f506afc07add30e0", - "mixHash" : "c5d376671017cc2b8013bf31f5fea3b60c5018dbc2de4b41b1afeab41c99e890", - "nonce" : "9ea444af9648661e", - "number" : "0x01", - "parentHash" : "367c93ca95ef93c2ce69180879ee7818d322047126edaf3ee204afb7e91de836", - "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", - "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55b7e670", - "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", - "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp" : "0xf90261f901f9a0367c93ca95ef93c2ce69180879ee7818d322047126edaf3ee204afb7e91de836a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455b7e67080a0c5d376671017cc2b8013bf31f5fea3b60c5018dbc2de4b41b1afeab41c99e890889ea444af9648661ef862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", - "transactions" : [ - { - "data" : "0x", - "gasLimit" : "0x04cb2f", - "gasPrice" : "0x01", - "nonce" : "0x00", - "r" : "0x77c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8", - "s" : "0x3f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288d", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1b", - "value" : "0x0a" - } - ], - "uncleHeaders" : [ - ] - }, - { - "blockHeader" : { - "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020040", - "extraData" : "0x", - "gasLimit" : "0x2fefd8", - "gasUsed" : "0x5208", - "hash" : "49119458d9411a7f2e1ef5765a31ca20530d31778ab31c4ad4bf19ebc70618b4", - "mixHash" : "7068c2e09cfa98834e09b300364fd89b22063b1e9297851a0d41374844b52a5a", - "nonce" : "de82185ac9a57fb8", - "number" : "0x02", - "parentHash" : "826b851d25e7f51f5083da61fa650fef23c27f5f6be8ecf0f506afc07add30e0", - "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", - "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55b7e672", - "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", - "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp" : "0xf90260f901f9a0826b851d25e7f51f5083da61fa650fef23c27f5f6be8ecf0f506afc07add30e0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455b7e67280a07068c2e09cfa98834e09b300364fd89b22063b1e9297851a0d41374844b52a5a88de82185ac9a57fb8f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", - "transactions" : [ - { - "data" : "0x", - "gasLimit" : "0x04cb2f", - "gasPrice" : "0x01", - "nonce" : "0x01", - "r" : "0x33c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f23", - "s" : "0x1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cf", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1b", - "value" : "0x0a" - } - ], - "uncleHeaders" : [ - ] }, - { - "rlp" : "0xf9045df901f9a09ec0fa7ffafb599b94bc05832a54d47102f04cdcee31152517f9f03ef5bf0724a0e0bf6f718c592868cd802cace16b5d9bdc09ce27e2c01df528a2c3627b92f967948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200c004832fefd88252088455b7e67480a02dcd229fa448ba54dd0975852f395f642f4681e54f65c2da6295a38f94ef89328891f8d5907e2a46b6f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a049119458d9411a7f2e1ef5765a31ca20530d31778ab31c4ad4bf19ebc70618b4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd8808455b7e67380a0b3f4c0a90dd1774ea4909710587acb7633174ba92bbaf6837a50957b538f41b7882539d50331e0b731" - } - ], - "genesisBlockHeader" : { - "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020000", - "extraData" : "0x42", - "gasLimit" : "0x2fefd8", - "gasUsed" : "0x00", - "hash" : "367c93ca95ef93c2ce69180879ee7818d322047126edaf3ee204afb7e91de836", - "mixHash" : "8b1c009dabcf7da34193bc8c5307e5553e37881645174e76dcea6868fb632455", - "nonce" : "e1a9de28bfac5d99", - "number" : "0x00", - "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", - "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot" : "7dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1", - "timestamp" : "0x54c98c81", - "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a08b1c009dabcf7da34193bc8c5307e5553e37881645174e76dcea6868fb63245588e1a9de28bfac5d99c0c0", - "lastblockhash" : "49119458d9411a7f2e1ef5765a31ca20530d31778ab31c4ad4bf19ebc70618b4", - "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x14", "code" : "0x", @@ -4520,7 +4225,7 @@ } }, "8888f1f195afa192cfee860698584c030f4c9db1" : { - "balance" : "0x8ac7230489e8a410", + "balance" : "0x8cf23f909c104410", "code" : "0x", "nonce" : "0x00", "storage" : { @@ -4544,7 +4249,7 @@ } } }, - "uncleTimestampTooBig" : { + "uncleHeaderWithGeneration0" : { "blocks" : [ { "blockHeader" : { @@ -4554,18 +4259,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "6bd328a10bb674cc758bd1bccb8afb584808766434c28b85580b422c75d4130e", - "mixHash" : "fefce638471ab6b66b1f1423ae574a99a6b2137229fe1846c508554d718d2bc1", - "nonce" : "f8cf2912afdd244d", + "hash" : "901c7b6f81b76b8e1a3d8c5041a71948eb8a11d1aaf21210e61090fde56fe49e", + "mixHash" : "a94e90de37a12bf91cf6c449257d6870d51f1c4386f41466be7877965d7a1957", + "nonce" : "e9e6889df29b30aa", "number" : "0x01", - "parentHash" : "b964d0b68e5a3c7265e4087dc2a8aaf599f06b6d6c1316a1b1b6475587f569e2", + "parentHash" : "3da1053469c4c201242bb63af439aa41d95c9917ad596f5dc252af5441c90650", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55d9d69f", + "timestamp" : "0x561bc4ff", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0b964d0b68e5a3c7265e4087dc2a8aaf599f06b6d6c1316a1b1b6475587f569e2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455d9d69f80a0fefce638471ab6b66b1f1423ae574a99a6b2137229fe1846c508554d718d2bc188f8cf2912afdd244df862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a03da1053469c4c201242bb63af439aa41d95c9917ad596f5dc252af5441c90650a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc4ff80a0a94e90de37a12bf91cf6c449257d6870d51f1c4386f41466be7877965d7a195788e9e6889df29b30aaf862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -4590,18 +4295,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "4c179927c9b9897464c7133033b412c9b66ee2bb1fa4a4b2595a6006d4081e3f", - "mixHash" : "3449cf46635bab4ae7121dcd145e6ca12ac4337f79e88354c41bff1c48335b48", - "nonce" : "4376da5cd48ffb68", + "hash" : "6eaff7753c471be5ada9675f55a797b9604a09698441812c9cb72dd3c2235b10", + "mixHash" : "74176231a763272b8d81fcb44c495f41d58ccfa90e0237ad5278e05f3f4a0f7c", + "nonce" : "f272c6090f5f831f", "number" : "0x02", - "parentHash" : "6bd328a10bb674cc758bd1bccb8afb584808766434c28b85580b422c75d4130e", + "parentHash" : "901c7b6f81b76b8e1a3d8c5041a71948eb8a11d1aaf21210e61090fde56fe49e", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55d9d6a1", + "timestamp" : "0x561bc502", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a06bd328a10bb674cc758bd1bccb8afb584808766434c28b85580b422c75d4130ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455d9d6a180a03449cf46635bab4ae7121dcd145e6ca12ac4337f79e88354c41bff1c48335b48884376da5cd48ffb68f861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a0901c7b6f81b76b8e1a3d8c5041a71948eb8a11d1aaf21210e61090fde56fe49ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc50280a074176231a763272b8d81fcb44c495f41d58ccfa90e0237ad5278e05f3f4a0f7c88f272c6090f5f831ff861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -4619,7 +4324,7 @@ ] }, { - "rlp" : "0xf90459f901f9a04c179927c9b9897464c7133033b412c9b66ee2bb1fa4a4b2595a6006d4081e3fa0f4fd3b99eb9b343e87bc472fdcd6b18e5cbcb231b1e70f8948e97b02c008ac26948888f1f195afa192cfee860698584c030f4c9db1a0e9940294a09308406a3d2e09203aed11db40259fac0a25e639ad2b30b82d07dea01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455d9d6a680a0caf6f553d8c1394d291caaeabc61bc25f9126f4c313c829b2a51134cbd23d27188e6999e52421f5a38f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901f6f901f3a06bd328a10bb674cc758bd1bccb8afb584808766434c28b85580b422c75d4130ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000002832fefd8808080a077355633b05269548d6b3bd8e80d334fcb1a31c566b980dfc56eb57d5c16acc388846c622f81a727e7" + "rlp" : "0xf9045df901f9a06eaff7753c471be5ada9675f55a797b9604a09698441812c9cb72dd3c2235b10a09ab8d606a056ca3d17b3ab48e536905be799d4b14d08b60b214075627cf8fc13948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc50580a0bf15b3d8a32d3d9141614f453c2bf6547a3a6dfcb530eb34dd8b2026210bae9a8890d43342e73b7205f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0058f0a61ba972286c9f4b9f5ae5b6417ecc7e5d7d6700c4a3d1f6f3a06fb163388e0082b67ab46ce8f" } ], "genesisBlockHeader" : { @@ -4629,9 +4334,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "b964d0b68e5a3c7265e4087dc2a8aaf599f06b6d6c1316a1b1b6475587f569e2", - "mixHash" : "b65f3c17c458ce015c087c3e4c0ffeeb010bf648a1faa2585c674d81ea7dcdfd", - "nonce" : "0b2ec3394d2421e3", + "hash" : "3da1053469c4c201242bb63af439aa41d95c9917ad596f5dc252af5441c90650", + "mixHash" : "058f0a61ba972286c9f4b9f5ae5b6417ecc7e5d7d6700c4a3d1f6f3a06fb1633", + "nonce" : "e0082b67ab46ce8f", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -4640,8 +4345,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0b65f3c17c458ce015c087c3e4c0ffeeb010bf648a1faa2585c674d81ea7dcdfd880b2ec3394d2421e3c0c0", - "lastblockhash" : "4c179927c9b9897464c7133033b412c9b66ee2bb1fa4a4b2595a6006d4081e3f", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0058f0a61ba972286c9f4b9f5ae5b6417ecc7e5d7d6700c4a3d1f6f3a06fb163388e0082b67ab46ce8fc0c0", + "lastblockhash" : "6eaff7753c471be5ada9675f55a797b9604a09698441812c9cb72dd3c2235b10", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x14", @@ -4675,7 +4380,7 @@ } } }, - "uncleTimestampMaxUint256" : { + "uncleWithSameBlockNumber" : { "blocks" : [ { "blockHeader" : { @@ -4685,18 +4390,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "19c900975f94fd78dc12ad13740200fbe0a2eba43fd070bedc65588b0c95438a", - "mixHash" : "4296af28ea723598c959f1cabc6f01fa0c75d126cfde89f13ccd9debcf3079c3", - "nonce" : "3213b3fd7789f5d5", + "hash" : "e10a948fb587a39ed7c6ea1c9607e7a47e1f401f9667facfca1bbe861ebbeca3", + "mixHash" : "ee7db719d45db1ed3924a6b61b4bbf5124b161931dcde9d328a54700af5b4768", + "nonce" : "ba7d86a5437051e6", "number" : "0x01", - "parentHash" : "e688d736f1307c6f97b6777381b30556137b9d4ca5c43fbd5b30d6b5df315264", + "parentHash" : "8a8b886106d8177957a61cef1e44d0c1ee509bb340a3a82b961c81598fc4c5dd", "receiptTrie" : "e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313", "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0x55d9c571", + "timestamp" : "0x561bc509", "transactionsTrie" : "5c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0e688d736f1307c6f97b6777381b30556137b9d4ca5c43fbd5b30d6b5df315264a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455d9c57180a04296af28ea723598c959f1cabc6f01fa0c75d126cfde89f13ccd9debcf3079c3883213b3fd7789f5d5f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", + "rlp" : "0xf90261f901f9a08a8b886106d8177957a61cef1e44d0c1ee509bb340a3a82b961c81598fc4c5dda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a05c9151c2413d1cd25c51ffb4ac38948acc1359bf08c6b49f283660e9bcf0f516a0e9244cf7503b79c03d3a099e07a80d2dbc77bb0b502d8a89d51ac0d68dd31313b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882520884561bc50980a0ee7db719d45db1ed3924a6b61b4bbf5124b161931dcde9d328a54700af5b476888ba7d86a5437051e6f862f86080018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba077c7cd36820c71821c1aed59de46e70e701c4a8dd89c9ba508ab722210f60da8a03f29825d40c7c3f7bff3ca69267e0f3fb74b2d18b8c2c4e3c135b5d3b06e288dc0", "transactions" : [ { "data" : "0x", @@ -4721,18 +4426,18 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "04e0807bea4d9766809afba8f4dbf2e5ab4e522aa4570bb915381c6593530e89", - "mixHash" : "782e9bf4a3427dee8cf2494f966830dd04a217eb5cf8769dba0ed6400212264f", - "nonce" : "e83b4878a0b9a46f", + "hash" : "d4d44936c635fa81a3fa02e831d3fcfe17d51803c33c5c54d080458d3e527c70", + "mixHash" : "0953c4d42c2d0027d42cf446fe0e6f4495cf47fcba1c0d23a16bf96be2666827", + "nonce" : "49fac2a20ef2621e", "number" : "0x02", - "parentHash" : "19c900975f94fd78dc12ad13740200fbe0a2eba43fd070bedc65588b0c95438a", + "parentHash" : "e10a948fb587a39ed7c6ea1c9607e7a47e1f401f9667facfca1bbe861ebbeca3", "receiptTrie" : "5ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6b", "stateRoot" : "e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70e", - "timestamp" : "0x55d9c573", + "timestamp" : "0x561bc50d", "transactionsTrie" : "c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a019c900975f94fd78dc12ad13740200fbe0a2eba43fd070bedc65588b0c95438aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88252088455d9c57380a0782e9bf4a3427dee8cf2494f966830dd04a217eb5cf8769dba0ed6400212264f88e83b4878a0b9a46ff861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", + "rlp" : "0xf90260f901f9a0e10a948fb587a39ed7c6ea1c9607e7a47e1f401f9667facfca1bbe861ebbeca3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0e7e4760f75476ec7f51869d8bdce5c693058fd5a95c77ea9c0bf7ced1e50d70ea0c673e076264c4669a5c2e479f1757b78e42511efe33b5fd2c0a23b929c7f87f5a05ea1a8b24652fed0ecab4738edd9211891eb8c4353c345973b78a02cc0f32f6bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd882520884561bc50d80a00953c4d42c2d0027d42cf446fe0e6f4495cf47fcba1c0d23a16bf96be26668278849fac2a20ef2621ef861f85f01018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba033c86e64d708c97c6b135cadff79dbf45985aa0b53694789e90d15f756765f239f1d0f8caa2a16405148c9d85581be5814960010f3cba938b5501590cea1f7cfc0", "transactions" : [ { "data" : "0x", @@ -4750,58 +4455,7 @@ ] }, { - "blockHeader" : { - "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020080", - "extraData" : "0x", - "gasLimit" : "0x2fefd8", - "gasUsed" : "0x5208", - "hash" : "eed1b4da708283370856fc76352d68f36d9766b7f366da372e2992ced9a1f663", - "mixHash" : "c250fe02a675a64e068023f48df2662ff2269d970f7689bde287228e200d5401", - "nonce" : "105781dacf8bcf41", - "number" : "0x03", - "parentHash" : "04e0807bea4d9766809afba8f4dbf2e5ab4e522aa4570bb915381c6593530e89", - "receiptTrie" : "4ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920af", - "stateRoot" : "e9940294a09308406a3d2e09203aed11db40259fac0a25e639ad2b30b82d07de", - "timestamp" : "0x55d9c577", - "transactionsTrie" : "1722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1a", - "uncleHash" : "1e8797b712282d23d059df15e9082411499795fe2644bdfb35f310c10c78169b" - }, - "rlp" : "0xf90479f901f9a004e0807bea4d9766809afba8f4dbf2e5ab4e522aa4570bb915381c6593530e89a01e8797b712282d23d059df15e9082411499795fe2644bdfb35f310c10c78169b948888f1f195afa192cfee860698584c030f4c9db1a0e9940294a09308406a3d2e09203aed11db40259fac0a25e639ad2b30b82d07dea01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd88252088455d9c57780a0c250fe02a675a64e068023f48df2662ff2269d970f7689bde287228e200d540188105781dacf8bcf41f862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f90216f90213a019c900975f94fd78dc12ad13740200fbe0a2eba43fd070bedc65588b0c95438aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794bcde5374fce5edbc8e2a8697c15331677e6ebf0ba0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000002832fefd880a0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80a06868c784ca472bb16eb9b23029965a737713003d0da6c006e4923e400cd783fc88d99c24fcd2648302", - "transactions" : [ - { - "data" : "0x", - "gasLimit" : "0x04cb2f", - "gasPrice" : "0x01", - "nonce" : "0x02", - "r" : "0x15eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0ee", - "s" : "0x5d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1c", - "value" : "0x0a" - } - ], - "uncleHeaders" : [ - { - "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "bcde5374fce5edbc8e2a8697c15331677e6ebf0b", - "difficulty" : "0x020000", - "extraData" : "0x", - "gasLimit" : "0x2fefd8", - "gasUsed" : "0x00", - "hash" : "5264110fedc6f468e9b3c1fead10ee4bdd4957bcb6d193503f8ede6a0d478b95", - "mixHash" : "6868c784ca472bb16eb9b23029965a737713003d0da6c006e4923e400cd783fc", - "nonce" : "d99c24fcd2648302", - "number" : "0x02", - "parentHash" : "19c900975f94fd78dc12ad13740200fbe0a2eba43fd070bedc65588b0c95438a", - "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot" : "cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878", - "timestamp" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - } - ] + "rlp" : "0xf9045df901f9a0d4d44936c635fa81a3fa02e831d3fcfe17d51803c33c5c54d080458d3e527c70a052327aebdddc32bd8a2fd265f205df67da7cf6d16ac58527266bbbaa928bbf20948888f1f195afa192cfee860698584c030f4c9db1a0611bfab1015d8c54765dff6be143b5ac81757633aa8859a72262099e1d848ce8a01722b8a91bfc4f5614ce36ee77c7cce6620ab4af36d3c54baa66d7dbeb7bce1aa04ede0225773c7a517b91994aca65ade45124e7ef4b8be1e6097c9773a11920afb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd882520884561bc51080a0e34c9bf2f90e6f622ab069212824ada94ff3d4017b8cb628ded9eb48bb2a51f98837bc1798640eda8bf862f86002018304cb2f94095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca015eb1cc916728b9799e55c489857727669afb2986433d5f54cde11faaed9f0eea05d36f6d06c34aae8d0a2a5895c8ba4a17ad46a5fa59f361cb3e7e01a23030e38f901faf901f7a0e10a948fb587a39ed7c6ea1c9607e7a47e1f401f9667facfca1bbe861ebbeca3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0cb52de543653d86ccd13ba3ddf8b052525b04231c6884a4db3188a184681d878a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004003832fefd88084561bc50f80a06e7ddb03188568826b2cf4136d93cb7d6c6dd16ba2d415a581bf5cba587a704a88d784e67439747070" } ], "genesisBlockHeader" : { @@ -4811,9 +4465,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "e688d736f1307c6f97b6777381b30556137b9d4ca5c43fbd5b30d6b5df315264", - "mixHash" : "f35b4695bdfef02db19d255636bec7911667c7056df2b2f475053ea78dd1b0ff", - "nonce" : "5333c47f947590d8", + "hash" : "8a8b886106d8177957a61cef1e44d0c1ee509bb340a3a82b961c81598fc4c5dd", + "mixHash" : "91c1fc75d5af1c976443ea54c2bb264a030a033d752b43a8c9a5595c13bc49e4", + "nonce" : "c62b2394c9e29dc9", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -4822,27 +4476,27 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0f35b4695bdfef02db19d255636bec7911667c7056df2b2f475053ea78dd1b0ff885333c47f947590d8c0c0", - "lastblockhash" : "eed1b4da708283370856fc76352d68f36d9766b7f366da372e2992ced9a1f663", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a091c1fc75d5af1c976443ea54c2bb264a030a033d752b43a8c9a5595c13bc49e488c62b2394c9e29dc9c0c0", + "lastblockhash" : "d4d44936c635fa81a3fa02e831d3fcfe17d51803c33c5c54d080458d3e527c70", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x1e", + "balance" : "0x14", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "8888f1f195afa192cfee860698584c030f4c9db1" : { - "balance" : "0xd255d112e1049618", + "balance" : "0x8ac7230489e8a410", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x09184e71a9ca", + "balance" : "0x09184e71fbdc", "code" : "0x", - "nonce" : "0x03", + "nonce" : "0x02", "storage" : { } } @@ -4857,4 +4511,4 @@ } } } -} +} \ No newline at end of file diff --git a/tests/files/BlockchainTests/bcValidBlockTest.json b/tests/files/BlockchainTests/bcValidBlockTest.json index 8c29d465e..1c1ecdd06 100644 --- a/tests/files/BlockchainTests/bcValidBlockTest.json +++ b/tests/files/BlockchainTests/bcValidBlockTest.json @@ -1,8 +1,41 @@ { - "ExtraData1024" : { + "ExtraData32" : { "blocks" : [ { - "rlp" : "0xf90667f905fba08c2fd497eec8ef215f5314aa333dec79cdd7d3ed4ac4b0278b7cb7e896141beba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0bac6177a79e910c98d86ec31a09ae37ac2de15b754fd7bed1ba52362c49416bfa0498785da562aa0c5dd5937cf15f22139b0b1bcf3b4fc48986e1bb1dae9292796a0c7778a7376099ee2e5c455791c1885b5c361b95713fddcbe32d97fd01334d296b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fe3de82560b8455d5f36db9040001020304050607080910111213141516171819202122232410000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000a0fd3fc8e3e2037d4da6ddb2cd53ccf71bfe20e0180b750681615da9f392b2b5cb88483597d2f41121d1f866f864800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d8785012a05f200801ca0ee0b9ec878fbd4258a9473199d8ecc32996a20c323c004e79e0cda20e0418ce3a04e6bc63927d1510bab54f37e46fa036faf4b2c465d271920d9afea1fadf7bd21c0" + "blockHeader" : { + "bloom" : "00000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000040000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x0102030405060708091011121314151617181920212223242526272829303132", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x560b", + "hash" : "a940e5af7d146b3b917c953a82e1966b906dace3a4e355b5b0a4560190357ea1", + "mixHash" : "8ccb2837fb2923bd97e8f2d08ea32012d6e34be018c73e49a0f98843e8f47d5d", + "nonce" : "e53be49fec01012e", + "number" : "0x01", + "parentHash" : "3caa2203f3d7c136c0295ed128a7d31cea520b1ca5e27afe17d0853331798942", + "receiptTrie" : "c7778a7376099ee2e5c455791c1885b5c361b95713fddcbe32d97fd01334d296", + "stateRoot" : "bac6177a79e910c98d86ec31a09ae37ac2de15b754fd7bed1ba52362c49416bf", + "timestamp" : "0x5627cb99", + "transactionsTrie" : "d45893a296c1490a978e0bd321b5f2635d8280365c1fe9f693d65f233e791344", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "rlp" : "0xf90285f90219a03caa2203f3d7c136c0295ed128a7d31cea520b1ca5e27afe17d0853331798942a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0bac6177a79e910c98d86ec31a09ae37ac2de15b754fd7bed1ba52362c49416bfa0d45893a296c1490a978e0bd321b5f2635d8280365c1fe9f693d65f233e791344a0c7778a7376099ee2e5c455791c1885b5c361b95713fddcbe32d97fd01334d296b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b845627cb99a00102030405060708091011121314151617181920212223242526272829303132a08ccb2837fb2923bd97e8f2d08ea32012d6e34be018c73e49a0f98843e8f47d5d88e53be49fec01012ef866f864800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d8785012a05f200801ba0cb088b8d2ff76a7b2c6616c9d02fb6b7a501afbf8b69d7180b09928a1b80b5e4a06448fe7476c606582039bb72a9f6f4b4fad18507b8dfbd00eebbe151cc573cd2c0", + "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0xc350", + "gasPrice" : "0x0a", + "nonce" : "0x00", + "r" : "0xcb088b8d2ff76a7b2c6616c9d02fb6b7a501afbf8b69d7180b09928a1b80b5e4", + "s" : "0x6448fe7476c606582039bb72a9f6f4b4fad18507b8dfbd00eebbe151cc573cd2", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x012a05f200" + } + ], + "uncleHeaders" : [ + ] } ], "genesisBlockHeader" : { @@ -12,9 +45,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "8c2fd497eec8ef215f5314aa333dec79cdd7d3ed4ac4b0278b7cb7e896141beb", - "mixHash" : "94113ea0cff9f8e6238d4690bfb792c01f278981cb69324f99b3f7d74a0555f0", - "nonce" : "31a7ad4c847d6419", + "hash" : "3caa2203f3d7c136c0295ed128a7d31cea520b1ca5e27afe17d0853331798942", + "mixHash" : "363659b251bf8b819179874c8cce7b9b983d7f3704cbb58a3b334431f7032871", + "nonce" : "9032d09c281e1236", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -23,22 +56,29 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0925002c3260b44e44c3edebad1cc442142b03020209df1ab8bb86752edbd2cd7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a094113ea0cff9f8e6238d4690bfb792c01f278981cb69324f99b3f7d74a0555f08831a7ad4c847d6419c0c0", - "lastblockhash" : "8c2fd497eec8ef215f5314aa333dec79cdd7d3ed4ac4b0278b7cb7e896141beb", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0925002c3260b44e44c3edebad1cc442142b03020209df1ab8bb86752edbd2cd7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0363659b251bf8b819179874c8cce7b9b983d7f3704cbb58a3b334431f7032871889032d09c281e1236c0c0", + "lastblockhash" : "a940e5af7d146b3b917c953a82e1966b906dace3a4e355b5b0a4560190357ea1", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x64", + "balance" : "0x012a05f264", "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600052600060206000a1", "nonce" : "0x00", "storage" : { } }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x02540be400", + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "0x4563918244f75c6e", "code" : "0x", "nonce" : "0x00", "storage" : { } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x012a029592", + "code" : "0x", + "nonce" : "0x01", + "storage" : { + } } }, "pre" : { @@ -66,28 +106,28 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x020000", "extraData" : "0x", - "gasLimit" : "0x2fe3de", + "gasLimit" : "0x2fefd8", "gasUsed" : "0x9b60", - "hash" : "8673ec3c2dc51b15ae7d459f4d1b4fb8c2b0540a6ff36c44a89bdd2635f40259", - "mixHash" : "df5262c6a6a63550d25f3f5eb79f0adf4f10bd8d5f391a2e7a0351e042eb3700", - "nonce" : "d0a5076139120a1b", + "hash" : "ba3fc4c07dc8c5e15551de8c4fd0bebf8fc2fb72d4927a68246eca534bcd687f", + "mixHash" : "c06b02891bc312c3e877eb4868825a8b60a42a923ff2aa8fc83903553a757698", + "nonce" : "04fc9d5b0b8d5422", "number" : "0x01", - "parentHash" : "2dbce99ecc0642021115fd662f970c97db29f0ab77d8cbcfe2fdac5a9c4e751a", + "parentHash" : "8688e84486823ec43ae59084a4d269802e06dcaa8c0def9dcb49f766b0f19e12", "receiptTrie" : "ec3f8def09644029c390920a2e25d14648d2c1f6244425a15068e8c9f8c19707", "stateRoot" : "423ca0dbb9d7ea2a10cc94b19ceffab7bf52c6163fb6c6a005a1464748e9d969", - "timestamp" : "0x55d5f36f", - "transactionsTrie" : "7f40c85c972d94c1505e6309a763cabd663665e88520dc1df9910bdb2edb80ae", + "timestamp" : "0x5627cba0", + "transactionsTrie" : "887419d2890f698eca010ab81937cb539f5d8dd8e435770bf96d828583d9eaac", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf902a6f901f9a02dbce99ecc0642021115fd662f970c97db29f0ab77d8cbcfe2fdac5a9c4e751aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0423ca0dbb9d7ea2a10cc94b19ceffab7bf52c6163fb6c6a005a1464748e9d969a07f40c85c972d94c1505e6309a763cabd663665e88520dc1df9910bdb2edb80aea0ec3f8def09644029c390920a2e25d14648d2c1f6244425a15068e8c9f8c19707b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fe3de829b608455d5f36f80a0df5262c6a6a63550d25f3f5eb79f0adf4f10bd8d5f391a2e7a0351e042eb370088d0a5076139120a1bf8a7f8a5800a8307a1208081ffb857604b80600c6000396000f3007c01000000000000000000000000000000000000000000000000000000006000350463cbf0b0c08114602d57005b60006004358073ffffffffffffffffffffffffffffffffffffffff16ff1ca00e7d3c664c49aa9f5ce4eb76c8547450466262a78bd093160f492ea0853c68e9a03f843e72210ff1da4fd9e375339872bcf0fad05c014e280ffc755e173700dd62c0", + "rlp" : "0xf902a6f901f9a08688e84486823ec43ae59084a4d269802e06dcaa8c0def9dcb49f766b0f19e12a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0423ca0dbb9d7ea2a10cc94b19ceffab7bf52c6163fb6c6a005a1464748e9d969a0887419d2890f698eca010ab81937cb539f5d8dd8e435770bf96d828583d9eaaca0ec3f8def09644029c390920a2e25d14648d2c1f6244425a15068e8c9f8c19707b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8829b60845627cba080a0c06b02891bc312c3e877eb4868825a8b60a42a923ff2aa8fc83903553a7576988804fc9d5b0b8d5422f8a7f8a5800a8307a1208081ffb857604b80600c6000396000f3007c01000000000000000000000000000000000000000000000000000000006000350463cbf0b0c08114602d57005b60006004358073ffffffffffffffffffffffffffffffffffffffff16ff1ca0b436591c326163d51dcb6a45f85becad4eeaabb0a7ad2ed88d298de1d803e840a0f751c295e56d66a1bc9cdb5ba4a606cadb91e420ad996e5a062a0c5f650f877bc0", "transactions" : [ { "data" : "0x604b80600c6000396000f3007c01000000000000000000000000000000000000000000000000000000006000350463cbf0b0c08114602d57005b60006004358073ffffffffffffffffffffffffffffffffffffffff16ff", "gasLimit" : "0x07a120", "gasPrice" : "0x0a", "nonce" : "0x00", - "r" : "0x0e7d3c664c49aa9f5ce4eb76c8547450466262a78bd093160f492ea0853c68e9", - "s" : "0x3f843e72210ff1da4fd9e375339872bcf0fad05c014e280ffc755e173700dd62", + "r" : "0xb436591c326163d51dcb6a45f85becad4eeaabb0a7ad2ed88d298de1d803e840", + "s" : "0xf751c295e56d66a1bc9cdb5ba4a606cadb91e420ad996e5a062a0c5f650f877b", "to" : "", "v" : "0x1c", "value" : "0xff" @@ -102,28 +142,28 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x020040", "extraData" : "0x", - "gasLimit" : "0x2fd815", + "gasLimit" : "0x2fefd8", "gasUsed" : "0x29e8", - "hash" : "1c9757e5d46f60bdbf30ad82313b09613b3eacd03250d4e57cd64b4c0536a45f", - "mixHash" : "e92fb366af9ae483a489a07f3efee04e9a1f37a7f8293743c446e5340007d585", - "nonce" : "c80b72a0f5bec0b0", + "hash" : "f9bd76a30b672d8fd494680c7932c0747393f7174aa63271c054565e4bdc50b0", + "mixHash" : "59dd7822f9881f1806fe0c5e6516a2657e790d90b513407632a789ef49a78694", + "nonce" : "84025973a7609364", "number" : "0x02", - "parentHash" : "8673ec3c2dc51b15ae7d459f4d1b4fb8c2b0540a6ff36c44a89bdd2635f40259", + "parentHash" : "ba3fc4c07dc8c5e15551de8c4fd0bebf8fc2fb72d4927a68246eca534bcd687f", "receiptTrie" : "f07efe64d675e0da95ad02d9acabe60870e522a1ef3c2703ddcac44b58a3634c", "stateRoot" : "44b99148dcf8c520293cfa3c86244b4998e57de44313d21d1b0267dc0a68a5d0", - "timestamp" : "0x55d5f371", - "transactionsTrie" : "581b9ae3564d0a429f48551804ec427b549b0f9ff92f0e2e96a4898167f82409", + "timestamp" : "0x5627cba1", + "transactionsTrie" : "9283d01d761a4ecb6458cca4cb04863a05e336b433021cd1abd12a926d14c61e", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90285f901f9a08673ec3c2dc51b15ae7d459f4d1b4fb8c2b0540a6ff36c44a89bdd2635f40259a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a044b99148dcf8c520293cfa3c86244b4998e57de44313d21d1b0267dc0a68a5d0a0581b9ae3564d0a429f48551804ec427b549b0f9ff92f0e2e96a4898167f82409a0f07efe64d675e0da95ad02d9acabe60870e522a1ef3c2703ddcac44b58a3634cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fd8158229e88455d5f37180a0e92fb366af9ae483a489a07f3efee04e9a1f37a7f8293743c446e5340007d58588c80b72a0f5bec0b0f886f884010a8307a120946295ee1b4f6dd65047762f924ecd367c17eabf8f01a4cbf0b0c000000000000000000000000000000000000000000000000000000000000000001ba0e9f25400a2683c5323e1f0a2c1d1bbfbc7a525e861993b9f21e414acfa876df0a04e3cb018a144be08a3cf6abc8abfcb0f159190af5d697283f05b326ba59ccc10c0", + "rlp" : "0xf90285f901f9a0ba3fc4c07dc8c5e15551de8c4fd0bebf8fc2fb72d4927a68246eca534bcd687fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a044b99148dcf8c520293cfa3c86244b4998e57de44313d21d1b0267dc0a68a5d0a09283d01d761a4ecb6458cca4cb04863a05e336b433021cd1abd12a926d14c61ea0f07efe64d675e0da95ad02d9acabe60870e522a1ef3c2703ddcac44b58a3634cb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd88229e8845627cba180a059dd7822f9881f1806fe0c5e6516a2657e790d90b513407632a789ef49a786948884025973a7609364f886f884010a8307a120946295ee1b4f6dd65047762f924ecd367c17eabf8f01a4cbf0b0c000000000000000000000000000000000000000000000000000000000000000001ba0780d3176eb04f97f908ecdf98e47264970903af3b6a502e9bcf864c5f396c8a1a049f3f7150d876b8ca7eee556b6fa3c0a197bf0eead8e89258fb0bd7cdce6f2a7c0", "transactions" : [ { "data" : "0xcbf0b0c00000000000000000000000000000000000000000000000000000000000000000", "gasLimit" : "0x07a120", "gasPrice" : "0x0a", "nonce" : "0x01", - "r" : "0xe9f25400a2683c5323e1f0a2c1d1bbfbc7a525e861993b9f21e414acfa876df0", - "s" : "0x4e3cb018a144be08a3cf6abc8abfcb0f159190af5d697283f05b326ba59ccc10", + "r" : "0x780d3176eb04f97f908ecdf98e47264970903af3b6a502e9bcf864c5f396c8a1", + "s" : "0x49f3f7150d876b8ca7eee556b6fa3c0a197bf0eead8e89258fb0bd7cdce6f2a7", "to" : "6295ee1b4f6dd65047762f924ecd367c17eabf8f", "v" : "0x1b", "value" : "0x01" @@ -138,30 +178,30 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x020080", "extraData" : "0x", - "gasLimit" : "0x2fcc2c", + "gasLimit" : "0x2fefd8", "gasUsed" : "0x5558", - "hash" : "35f8fc45e4c6c4917c6335ec17af3b62f417d89d7190388bd9ded21937fcb0ec", - "mixHash" : "f97c32aacf87573135d2cc28fad71cf7887f12365f789310dd6a0ee8056b36aa", - "nonce" : "1cbda4bcf4227d5e", + "hash" : "763443d269b09c8f1d1443749432db4b05f3592da8e06e160a367e142cdac491", + "mixHash" : "bfa3dd806769c6dd614945e09b7a248ed02a71ad1016c1efe55a830112734443", + "nonce" : "2d5fce050763ad3d", "number" : "0x03", - "parentHash" : "1c9757e5d46f60bdbf30ad82313b09613b3eacd03250d4e57cd64b4c0536a45f", + "parentHash" : "f9bd76a30b672d8fd494680c7932c0747393f7174aa63271c054565e4bdc50b0", "receiptTrie" : "826e862432492d77d6484d0bc7f1446ee70b2c65e8375af09c1d03e306c93e96", "stateRoot" : "bf1799991c6f2f23f1d93ede356e877388ad45e6731ac5e071db76e23df23fc6", - "timestamp" : "0x55d5f373", - "transactionsTrie" : "eb87d8102765efd55c70863ab739867ed1bd718611d2b37058d6b7ebd0941a97", + "timestamp" : "0x5627cba4", + "transactionsTrie" : "520c18d950af3c7fc6b38f1e998c9be86f3469a7846fcbf301e5ebbbc74731a0", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90285f901f9a01c9757e5d46f60bdbf30ad82313b09613b3eacd03250d4e57cd64b4c0536a45fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0bf1799991c6f2f23f1d93ede356e877388ad45e6731ac5e071db76e23df23fc6a0eb87d8102765efd55c70863ab739867ed1bd718611d2b37058d6b7ebd0941a97a0826e862432492d77d6484d0bc7f1446ee70b2c65e8375af09c1d03e306c93e96b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fcc2c8255588455d5f37380a0f97c32aacf87573135d2cc28fad71cf7887f12365f789310dd6a0ee8056b36aa881cbda4bcf4227d5ef886f884020a8307a120946295ee1b4f6dd65047762f924ecd367c17eabf8f01a4cbf0b0c001100000000000110000000000000110000000000000110000000000000000111ba02db741161d0014df4fdc93cfb33867295da3b2d9bcc9af8e2d6bb478e1a877d0a0439808cf9ba3e46e97e20a05450daa2a6dca8b21fc47041b5fa492fb322f39e4c0", + "rlp" : "0xf90285f901f9a0f9bd76a30b672d8fd494680c7932c0747393f7174aa63271c054565e4bdc50b0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0bf1799991c6f2f23f1d93ede356e877388ad45e6731ac5e071db76e23df23fc6a0520c18d950af3c7fc6b38f1e998c9be86f3469a7846fcbf301e5ebbbc74731a0a0826e862432492d77d6484d0bc7f1446ee70b2c65e8375af09c1d03e306c93e96b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302008003832fefd8825558845627cba480a0bfa3dd806769c6dd614945e09b7a248ed02a71ad1016c1efe55a830112734443882d5fce050763ad3df886f884020a8307a120946295ee1b4f6dd65047762f924ecd367c17eabf8f01a4cbf0b0c001100000000000110000000000000110000000000000110000000000000000111ca02042a48a4e853541f42b8bd674d66bcd46e3f619eb16b5db33f87eba9e488e63a07c44ef3acb13a7eb8f4e8b8e85f662dff3d2e4a735f1017d33323d2ed03ba2f7c0", "transactions" : [ { "data" : "0xcbf0b0c00110000000000011000000000000011000000000000011000000000000000011", "gasLimit" : "0x07a120", "gasPrice" : "0x0a", "nonce" : "0x02", - "r" : "0x2db741161d0014df4fdc93cfb33867295da3b2d9bcc9af8e2d6bb478e1a877d0", - "s" : "0x439808cf9ba3e46e97e20a05450daa2a6dca8b21fc47041b5fa492fb322f39e4", + "r" : "0x2042a48a4e853541f42b8bd674d66bcd46e3f619eb16b5db33f87eba9e488e63", + "s" : "0x7c44ef3acb13a7eb8f4e8b8e85f662dff3d2e4a735f1017d33323d2ed03ba2f7", "to" : "6295ee1b4f6dd65047762f924ecd367c17eabf8f", - "v" : "0x1b", + "v" : "0x1c", "value" : "0x01" } ], @@ -176,9 +216,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "2dbce99ecc0642021115fd662f970c97db29f0ab77d8cbcfe2fdac5a9c4e751a", - "mixHash" : "e660eaee8fd51b47772bc099e9d42b44b725985863e65c3beaf973aa8c08288d", - "nonce" : "6bd62d8354f7f889", + "hash" : "8688e84486823ec43ae59084a4d269802e06dcaa8c0def9dcb49f766b0f19e12", + "mixHash" : "74b13e31eb5c11b5f6d0662201e501257d352d813a5358b7c90f57e81916e1f4", + "nonce" : "2d7e150e6c29ba72", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -187,8 +227,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0e660eaee8fd51b47772bc099e9d42b44b725985863e65c3beaf973aa8c08288d886bd62d8354f7f889c0c0", - "lastblockhash" : "35f8fc45e4c6c4917c6335ec17af3b62f417d89d7190388bd9ded21937fcb0ec", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a074b13e31eb5c11b5f6d0662201e501257d352d813a5358b7c90f57e81916e1f4882d7e150e6c29ba72c0c0", + "lastblockhash" : "763443d269b09c8f1d1443749432db4b05f3592da8e06e160a367e142cdac491", "postState" : { "0000000000000000000000000000000000000000" : { "balance" : "0x0100", @@ -237,28 +277,28 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x020000", "extraData" : "0x", - "gasLimit" : "0x2fe3de", + "gasLimit" : "0x2fefd8", "gasUsed" : "0x9b60", - "hash" : "cf83ae01626704224c3cb3689a2808d33587e348463bc27db5da8b574b2ed9f4", - "mixHash" : "64f49eed71bbc033392ba8543967d7417a677348ccb9125b5e3993b233032d2b", - "nonce" : "6afddfbe3fc0727c", + "hash" : "a51512b96693c95aa7233e78a7279eed0e8fee647e9a0a7627b30cc13376bd78", + "mixHash" : "37a8ec64c12a69fabeccbc78a18f0ec13626f21fd0420d77e9b7271e84f9351a", + "nonce" : "396a409b65c79fda", "number" : "0x01", - "parentHash" : "e0dffadd3df956f9c6dffdad1481b2de060890e85dde5d4c769ed97ca1019a15", + "parentHash" : "ac369213f82fd5efb6fb5c4c4e6ddf18c7680a3f4aafd55bf28e79182fca436d", "receiptTrie" : "ec3f8def09644029c390920a2e25d14648d2c1f6244425a15068e8c9f8c19707", "stateRoot" : "423ca0dbb9d7ea2a10cc94b19ceffab7bf52c6163fb6c6a005a1464748e9d969", - "timestamp" : "0x55d5f375", - "transactionsTrie" : "7f40c85c972d94c1505e6309a763cabd663665e88520dc1df9910bdb2edb80ae", + "timestamp" : "0x5627cba7", + "transactionsTrie" : "d9e42e71496cbaa94686eaf9701406ad44588cefec45d3074e67b59692d0a4f5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf902a6f901f9a0e0dffadd3df956f9c6dffdad1481b2de060890e85dde5d4c769ed97ca1019a15a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0423ca0dbb9d7ea2a10cc94b19ceffab7bf52c6163fb6c6a005a1464748e9d969a07f40c85c972d94c1505e6309a763cabd663665e88520dc1df9910bdb2edb80aea0ec3f8def09644029c390920a2e25d14648d2c1f6244425a15068e8c9f8c19707b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fe3de829b608455d5f37580a064f49eed71bbc033392ba8543967d7417a677348ccb9125b5e3993b233032d2b886afddfbe3fc0727cf8a7f8a5800a8307a1208081ffb857604b80600c6000396000f3007c01000000000000000000000000000000000000000000000000000000006000350463cbf0b0c08114602d57005b60006004358073ffffffffffffffffffffffffffffffffffffffff16ff1ca00e7d3c664c49aa9f5ce4eb76c8547450466262a78bd093160f492ea0853c68e9a03f843e72210ff1da4fd9e375339872bcf0fad05c014e280ffc755e173700dd62c0", + "rlp" : "0xf902a6f901f9a0ac369213f82fd5efb6fb5c4c4e6ddf18c7680a3f4aafd55bf28e79182fca436da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0423ca0dbb9d7ea2a10cc94b19ceffab7bf52c6163fb6c6a005a1464748e9d969a0d9e42e71496cbaa94686eaf9701406ad44588cefec45d3074e67b59692d0a4f5a0ec3f8def09644029c390920a2e25d14648d2c1f6244425a15068e8c9f8c19707b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8829b60845627cba780a037a8ec64c12a69fabeccbc78a18f0ec13626f21fd0420d77e9b7271e84f9351a88396a409b65c79fdaf8a7f8a5800a8307a1208081ffb857604b80600c6000396000f3007c01000000000000000000000000000000000000000000000000000000006000350463cbf0b0c08114602d57005b60006004358073ffffffffffffffffffffffffffffffffffffffff16ff1ca0a85879b618bba0a8c5d329bc6eb744820a6937a4216a6589b2ec6e87553ee080a0ae6f27e7ee7169ae6da224e13b2e8052eee5bfc61861a1b12892feb736e96120c0", "transactions" : [ { "data" : "0x604b80600c6000396000f3007c01000000000000000000000000000000000000000000000000000000006000350463cbf0b0c08114602d57005b60006004358073ffffffffffffffffffffffffffffffffffffffff16ff", "gasLimit" : "0x07a120", "gasPrice" : "0x0a", "nonce" : "0x00", - "r" : "0x0e7d3c664c49aa9f5ce4eb76c8547450466262a78bd093160f492ea0853c68e9", - "s" : "0x3f843e72210ff1da4fd9e375339872bcf0fad05c014e280ffc755e173700dd62", + "r" : "0xa85879b618bba0a8c5d329bc6eb744820a6937a4216a6589b2ec6e87553ee080", + "s" : "0xae6f27e7ee7169ae6da224e13b2e8052eee5bfc61861a1b12892feb736e96120", "to" : "", "v" : "0x1c", "value" : "0xff" @@ -273,30 +313,30 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x020040", "extraData" : "0x", - "gasLimit" : "0x2fd815", + "gasLimit" : "0x2fefd8", "gasUsed" : "0x7f40", - "hash" : "ac96fa4af300f71025f7442cf278abe45dc789a167bff8e102ea3f3bb1dee2ca", - "mixHash" : "55bb9767542a6acd7e02cebbff51330846c1e2c4ca703f4655b8be478165d8bd", - "nonce" : "ba79253406610fb9", + "hash" : "530fa334d98b04aeb725a2b0273ec3504171558dbe55b2c99fe65d07c5d3a46c", + "mixHash" : "022d839c6c708dad6698d540627c9e9509211081938e4e978a73173cb1458948", + "nonce" : "6a07db0b6929d1b9", "number" : "0x02", - "parentHash" : "cf83ae01626704224c3cb3689a2808d33587e348463bc27db5da8b574b2ed9f4", + "parentHash" : "a51512b96693c95aa7233e78a7279eed0e8fee647e9a0a7627b30cc13376bd78", "receiptTrie" : "4e6849e0b3c4415a7266cce7d4e494a5a743fca2f95755667fce336c52771c9d", "stateRoot" : "a3c6cbad55204a40a6661061ea40fbc40491d5e97ca2d5858a025ad5f2178edf", - "timestamp" : "0x55d5f376", - "transactionsTrie" : "4fe1aa9540114cce1ee19a4751bede622013e27f1025c7ef5d955f0132f978db", + "timestamp" : "0x5627cbaa", + "transactionsTrie" : "90cb79e7a4faf186d63cb55d9b5144a219941aabe5ba910b03fe3c213b55dffd", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf9030cf901f9a0cf83ae01626704224c3cb3689a2808d33587e348463bc27db5da8b574b2ed9f4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a3c6cbad55204a40a6661061ea40fbc40491d5e97ca2d5858a025ad5f2178edfa04fe1aa9540114cce1ee19a4751bede622013e27f1025c7ef5d955f0132f978dba04e6849e0b3c4415a7266cce7d4e494a5a743fca2f95755667fce336c52771c9db90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fd815827f408455d5f37680a055bb9767542a6acd7e02cebbff51330846c1e2c4ca703f4655b8be478165d8bd88ba79253406610fb9f9010cf884010a8307a120946295ee1b4f6dd65047762f924ecd367c17eabf8f01a4cbf0b0c000000000000000000000000000000000000000000000000000000000000000001ba0e9f25400a2683c5323e1f0a2c1d1bbfbc7a525e861993b9f21e414acfa876df0a04e3cb018a144be08a3cf6abc8abfcb0f159190af5d697283f05b326ba59ccc10f884020a8307a120946295ee1b4f6dd65047762f924ecd367c17eabf8f01a4cbf0b0c001100000000000110000000000000110000000000000110000000000000000111ba02db741161d0014df4fdc93cfb33867295da3b2d9bcc9af8e2d6bb478e1a877d0a0439808cf9ba3e46e97e20a05450daa2a6dca8b21fc47041b5fa492fb322f39e4c0", + "rlp" : "0xf9030cf901f9a0a51512b96693c95aa7233e78a7279eed0e8fee647e9a0a7627b30cc13376bd78a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0a3c6cbad55204a40a6661061ea40fbc40491d5e97ca2d5858a025ad5f2178edfa090cb79e7a4faf186d63cb55d9b5144a219941aabe5ba910b03fe3c213b55dffda04e6849e0b3c4415a7266cce7d4e494a5a743fca2f95755667fce336c52771c9db90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302004002832fefd8827f40845627cbaa80a0022d839c6c708dad6698d540627c9e9509211081938e4e978a73173cb1458948886a07db0b6929d1b9f9010cf884010a8307a120946295ee1b4f6dd65047762f924ecd367c17eabf8f01a4cbf0b0c000000000000000000000000000000000000000000000000000000000000000001ca081be27d2a912a449a8029a84548ddf5ea016feade466c019e1106e4005980c13a0201ffacd003e8b2865643977021d59b6b9641a347d5c37b67aa11469f599c765f884020a8307a120946295ee1b4f6dd65047762f924ecd367c17eabf8f01a4cbf0b0c001100000000000110000000000000110000000000000110000000000000000111ba0b6d370ad8fb5e06905f24df8ddd4f1d6f7bea26efa7a89959eec2898b9a03baea082e659a045f518235cabc916efd3d9816bf3510910dc29ebbececdaf4f3886fdc0", "transactions" : [ { "data" : "0xcbf0b0c00000000000000000000000000000000000000000000000000000000000000000", "gasLimit" : "0x07a120", "gasPrice" : "0x0a", "nonce" : "0x01", - "r" : "0xe9f25400a2683c5323e1f0a2c1d1bbfbc7a525e861993b9f21e414acfa876df0", - "s" : "0x4e3cb018a144be08a3cf6abc8abfcb0f159190af5d697283f05b326ba59ccc10", + "r" : "0x81be27d2a912a449a8029a84548ddf5ea016feade466c019e1106e4005980c13", + "s" : "0x201ffacd003e8b2865643977021d59b6b9641a347d5c37b67aa11469f599c765", "to" : "6295ee1b4f6dd65047762f924ecd367c17eabf8f", - "v" : "0x1b", + "v" : "0x1c", "value" : "0x01" }, { @@ -304,8 +344,8 @@ "gasLimit" : "0x07a120", "gasPrice" : "0x0a", "nonce" : "0x02", - "r" : "0x2db741161d0014df4fdc93cfb33867295da3b2d9bcc9af8e2d6bb478e1a877d0", - "s" : "0x439808cf9ba3e46e97e20a05450daa2a6dca8b21fc47041b5fa492fb322f39e4", + "r" : "0xb6d370ad8fb5e06905f24df8ddd4f1d6f7bea26efa7a89959eec2898b9a03bae", + "s" : "0x82e659a045f518235cabc916efd3d9816bf3510910dc29ebbececdaf4f3886fd", "to" : "6295ee1b4f6dd65047762f924ecd367c17eabf8f", "v" : "0x1b", "value" : "0x01" @@ -322,9 +362,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "e0dffadd3df956f9c6dffdad1481b2de060890e85dde5d4c769ed97ca1019a15", - "mixHash" : "13558d7be6a18d42bcf54c92ac59c16de2f867012bf6896ea67fea10d3f5bd02", - "nonce" : "515d58cf8b44534a", + "hash" : "ac369213f82fd5efb6fb5c4c4e6ddf18c7680a3f4aafd55bf28e79182fca436d", + "mixHash" : "c3486b2a97f60f5fa28ae43f1f94d61a61fe49e321b5f44c38b642a4e3ab0cd4", + "nonce" : "415e1c766f4726c3", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -333,8 +373,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a013558d7be6a18d42bcf54c92ac59c16de2f867012bf6896ea67fea10d3f5bd0288515d58cf8b44534ac0c0", - "lastblockhash" : "ac96fa4af300f71025f7442cf278abe45dc789a167bff8e102ea3f3bb1dee2ca", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07dba07d6b448a186e9612e5f737d1c909dce473e53199901a302c00646d523c1a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0c3486b2a97f60f5fa28ae43f1f94d61a61fe49e321b5f44c38b642a4e3ab0cd488415e1c766f4726c3c0c0", + "lastblockhash" : "530fa334d98b04aeb725a2b0273ec3504171558dbe55b2c99fe65d07c5d3a46c", "postState" : { "0000000000000000000000000000000000000000" : { "balance" : "0x0100", @@ -375,252 +415,6 @@ } } }, - "SuicideCoinbase" : { - "blocks" : [ - { - "blockHeader" : { - "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020000", - "extraData" : "0x", - "gasLimit" : "0x2fefd8", - "gasUsed" : "0xcdc7", - "hash" : "b1ff798f6f2a8c617f75b265e00ec67fab2f1e6076359d3332d99e8f69688850", - "mixHash" : "f9192b11328b47b77fc4765f3ec74ab433d63a01095ed77e3f82627766a491bc", - "nonce" : "97c55a07ab25b5fe", - "number" : "0x01", - "parentHash" : "363315d12ad724ec43a5400affb35e66e0b94bc40c6150b2870f76563a7703a7", - "receiptTrie" : "56e592ae6cf92b6c205e50d9cdbf1d3c5fe7f9fbc2bf219b93855107518e7e7f", - "stateRoot" : "7564aa479e81b3f9a05b0f99193fdd7367ccc0e74d140249d943ce0df904ba02", - "timestamp" : "0x55e5b3e8", - "transactionsTrie" : "fcfe9f2203bd98342867117fa3de299a09578371efd04fc9e76a46f7f1fda4bb", - "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp" : "0xf9032ef901f9a0363315d12ad724ec43a5400affb35e66e0b94bc40c6150b2870f76563a7703a7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07564aa479e81b3f9a05b0f99193fdd7367ccc0e74d140249d943ce0df904ba02a0fcfe9f2203bd98342867117fa3de299a09578371efd04fc9e76a46f7f1fda4bba056e592ae6cf92b6c205e50d9cdbf1d3c5fe7f9fbc2bf219b93855107518e7e7fb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882cdc78455e5b3e880a0f9192b11328b47b77fc4765f3ec74ab433d63a01095ed77e3f82627766a491bc8897c55a07ab25b5fef9012ef866800a8307a120948888f1f195afa192cfee860698584c030f4c9db18203e9840c55699c1ba091fc4c402ced19b984e953546d3fc786c46a79c9f0c7918b8f3343dc529ef0e5a0546d89230c90ca8bf7988a826430d4771ab3a67cc0f3cb8019d67ab10ec10524f861010a82c3509400000000000000000000000000000000000000008203e8801ba0b03ab16ed211bf447ac030216ab088f18367ee51303545d2957990e9d3a28f10a07f18dd055139f7ac5558997b80ccae799ab6fbad2326799db509a9d4e5a52d72f861020a82c3509400000000000000000000000000000000000000008203ea801ba00925abd1221d388622138f4bae46803313f297001e96fec22dc4268fca5b5a82a055cd8142bcec39f80b359aa089f6a70568d23a67048026703981fad9339ef5d4c0", - "transactions" : [ - { - "data" : "0x0c55699c", - "gasLimit" : "0x07a120", - "gasPrice" : "0x0a", - "nonce" : "0x00", - "r" : "0x91fc4c402ced19b984e953546d3fc786c46a79c9f0c7918b8f3343dc529ef0e5", - "s" : "0x546d89230c90ca8bf7988a826430d4771ab3a67cc0f3cb8019d67ab10ec10524", - "to" : "8888f1f195afa192cfee860698584c030f4c9db1", - "v" : "0x1b", - "value" : "0x03e9" - }, - { - "data" : "0x", - "gasLimit" : "0xc350", - "gasPrice" : "0x0a", - "nonce" : "0x01", - "r" : "0xb03ab16ed211bf447ac030216ab088f18367ee51303545d2957990e9d3a28f10", - "s" : "0x7f18dd055139f7ac5558997b80ccae799ab6fbad2326799db509a9d4e5a52d72", - "to" : "0000000000000000000000000000000000000000", - "v" : "0x1b", - "value" : "0x03e8" - }, - { - "data" : "0x", - "gasLimit" : "0xc350", - "gasPrice" : "0x0a", - "nonce" : "0x02", - "r" : "0x0925abd1221d388622138f4bae46803313f297001e96fec22dc4268fca5b5a82", - "s" : "0x55cd8142bcec39f80b359aa089f6a70568d23a67048026703981fad9339ef5d4", - "to" : "0000000000000000000000000000000000000000", - "v" : "0x1b", - "value" : "0x03ea" - } - ], - "uncleHeaders" : [ - ] - } - ], - "genesisBlockHeader" : { - "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020000", - "extraData" : "0x42", - "gasLimit" : "0x2fefd8", - "gasUsed" : "0x00", - "hash" : "363315d12ad724ec43a5400affb35e66e0b94bc40c6150b2870f76563a7703a7", - "mixHash" : "d45a667aa8d50bd136d83b1b86bf38fe3cabfb78c47022e67bb6cfcb76529f7b", - "nonce" : "5350f90a8c5a106a", - "number" : "0x00", - "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", - "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot" : "4941fba20142b10d43d0a893dfa4f5eedcbcb4b55c8554efd71e226624d9b37c", - "timestamp" : "0x54c98c81", - "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a04941fba20142b10d43d0a893dfa4f5eedcbcb4b55c8554efd71e226624d9b37ca056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0d45a667aa8d50bd136d83b1b86bf38fe3cabfb78c47022e67bb6cfcb76529f7b885350f90a8c5a106ac0c0", - "lastblockhash" : "b1ff798f6f2a8c617f75b265e00ec67fab2f1e6076359d3332d99e8f69688850", - "postState" : { - "0000000000000000000000000000000000000000" : { - "balance" : "0x07d2", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - }, - "8888f1f195afa192cfee860698584c030f4c9db1" : { - "balance" : "0x4563918244fa68a0", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x025403d650", - "code" : "0x", - "nonce" : "0x03", - "storage" : { - } - } - }, - "pre" : { - "8888f1f195afa192cfee860698584c030f4c9db1" : { - "balance" : "0x03e8", - "code" : "0x60606040526000357c0100000000000000000000000000000000000000000000000000000000900480630c55699c146037576035565b005b60406004506042565b005b3373ffffffffffffffffffffffffffffffffffffffff16ff5b56", - "nonce" : "0x00", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x02540be400", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - } - } - }, - "OOGStateCopyContainingDeletedContract" : { - "blocks" : [ - { - "blockHeader" : { - "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020000", - "extraData" : "0x", - "gasLimit" : "0x092a08", - "gasUsed" : "0x021ed0", - "hash" : "e6289f0826f8b8998cf5cb3747b95f8e3252a11e5eb930f139bf591b38b3f272", - "mixHash" : "d1fbf3b3e6c0189e04fa100c3d2e78889ffbec16553d50153b3f400fcd2b0589", - "nonce" : "9f2f26d826716c43", - "number" : "0x01", - "parentHash" : "d8eb76ceb37b640d4e0aae5ea85dca3989fe3b2616d2a7b333379c8a315e4fe1", - "receiptTrie" : "3e21fb330e6981a4657f97fc2ace223c75f17d83f0fa017586d5b872b48b4824", - "stateRoot" : "042cf0272a105f572ee8a5a3014aef7fff760fc3ce18c2aedac0cc55c152a4b9", - "timestamp" : "0x55edb8c0", - "transactionsTrie" : "5c3eb7e26c39308ede0b5a0b9b403fb89c3369deda106c32faf7d0def6f421d2", - "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "rlp" : "0xf902eef901faa0d8eb76ceb37b640d4e0aae5ea85dca3989fe3b2616d2a7b333379c8a315e4fe1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0042cf0272a105f572ee8a5a3014aef7fff760fc3ce18c2aedac0cc55c152a4b9a05c3eb7e26c39308ede0b5a0b9b403fb89c3369deda106c32faf7d0def6f421d2a03e21fb330e6981a4657f97fc2ace223c75f17d83f0fa017586d5b872b48b4824b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000183092a0883021ed08455edb8c080a0d1fbf3b3e6c0189e04fa100c3d2e78889ffbec16553d50153b3f400fcd2b0589889f2f26d826716c43f8eef864800a830493e09464306ec3f51a26dcf19f5da0c043040f54f4eca501840c5feb5d1ba00cf2cc4de3013273d0aae3cf36cdb6cf152573f7a5b99fe2c514a845bbb98a93a048f4aa20b37303bf4f2c0e7e5f6c178814f99ab4d3d98cf9382185f1ae256b7ff886010a830493e0942e0de3fc10a88911ff857126db1a5f0da6f251738203eaa4fc49c80e00000000000000000000000064306ec3f51a26dcf19f5da0c043040f54f4eca51ca0c9f11f1b4aedd9c1d99a6e2aea6f9ce90bdd6bb6063193715fdb43e77029346fa03440044e3aa54293e887f1751146bf915e73c39eae7da82b75a6d2c7a31d252bc0", - "transactions" : [ - { - "data" : "0x0c5feb5d", - "gasLimit" : "0x0493e0", - "gasPrice" : "0x0a", - "nonce" : "0x00", - "r" : "0x0cf2cc4de3013273d0aae3cf36cdb6cf152573f7a5b99fe2c514a845bbb98a93", - "s" : "0x48f4aa20b37303bf4f2c0e7e5f6c178814f99ab4d3d98cf9382185f1ae256b7f", - "to" : "64306ec3f51a26dcf19f5da0c043040f54f4eca5", - "v" : "0x1b", - "value" : "0x01" - }, - { - "data" : "0xfc49c80e00000000000000000000000064306ec3f51a26dcf19f5da0c043040f54f4eca5", - "gasLimit" : "0x0493e0", - "gasPrice" : "0x0a", - "nonce" : "0x01", - "r" : "0xc9f11f1b4aedd9c1d99a6e2aea6f9ce90bdd6bb6063193715fdb43e77029346f", - "s" : "0x3440044e3aa54293e887f1751146bf915e73c39eae7da82b75a6d2c7a31d252b", - "to" : "2e0de3fc10a88911ff857126db1a5f0da6f25173", - "v" : "0x1c", - "value" : "0x03ea" - } - ], - "uncleHeaders" : [ - ] - } - ], - "genesisBlockHeader" : { - "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020000", - "extraData" : "0x42", - "gasLimit" : "0x0927c0", - "gasUsed" : "0x00", - "hash" : "d8eb76ceb37b640d4e0aae5ea85dca3989fe3b2616d2a7b333379c8a315e4fe1", - "mixHash" : "c29e85e09cf8a71fbf0151f492eb89d135ed3515a6d7bf792978eab16c55e87c", - "nonce" : "02427e36fe1c0e09", - "number" : "0x00", - "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", - "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot" : "2b9f478fe39744a8c17eb48ae7bf86f6a47031a823a632f9bd661b59978aeefd", - "timestamp" : "0x54c98c81", - "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a02b9f478fe39744a8c17eb48ae7bf86f6a47031a823a632f9bd661b59978aeefda056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080830927c0808454c98c8142a0c29e85e09cf8a71fbf0151f492eb89d135ed3515a6d7bf792978eab16c55e87c8802427e36fe1c0e09c0c0", - "lastblockhash" : "e6289f0826f8b8998cf5cb3747b95f8e3252a11e5eb930f139bf591b38b3f272", - "postState" : { - "2e0de3fc10a88911ff857126db1a5f0da6f25173" : { - "balance" : "0x03eb", - "code" : "0x60606040526000357c01000000000000000000000000000000000000000000000000000000009004806342e90c3314610044578063fc49c80e1461005157610042565b005b61004f600450610064565b005b6100626004803590602001506100a4565b005b6000600090505b600a8160ff1610156100a057602a600060005082600a81101561000257909001600050819055505b808060010191505061006b565b5b50565b3073ffffffffffffffffffffffffffffffffffffffff1661ea6060405180807f53746f7265282900000000000000000000000000000000000000000000000000815260200150600701905060405180910390207c0100000000000000000000000000000000000000000000000000000000809104027c0100000000000000000000000000000000000000000000000000000000900490604051827c010000000000000000000000000000000000000000000000000000000002815260040180905060006040518083038160008887f19350505050508073ffffffffffffffffffffffffffffffffffffffff166326c6a34c604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506020604051808303816000876161da5a03f115610002575050506040515160006000506009600a81101561000257909001600050819055505b5056", - "nonce" : "0x00", - "storage" : { - "0x09" : "0x26c6a34c00000000000000000000000000000000000000000000000000000000" - } - }, - "64306ec3f51a26dcf19f5da0c043040f54f4eca5" : { - "balance" : "0x00", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - }, - "8888f1f195afa192cfee860698584c030f4c9db1" : { - "balance" : "0x4563918245093420", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x174861aff7", - "code" : "0x", - "nonce" : "0x02", - "storage" : { - } - } - }, - "pre" : { - "2e0de3fc10a88911ff857126db1a5f0da6f25173" : { - "balance" : "0x01", - "code" : "0x60606040526000357c01000000000000000000000000000000000000000000000000000000009004806342e90c3314610044578063fc49c80e1461005157610042565b005b61004f600450610064565b005b6100626004803590602001506100a4565b005b6000600090505b600a8160ff1610156100a057602a600060005082600a81101561000257909001600050819055505b808060010191505061006b565b5b50565b3073ffffffffffffffffffffffffffffffffffffffff1661ea6060405180807f53746f7265282900000000000000000000000000000000000000000000000000815260200150600701905060405180910390207c0100000000000000000000000000000000000000000000000000000000809104027c0100000000000000000000000000000000000000000000000000000000900490604051827c010000000000000000000000000000000000000000000000000000000002815260040180905060006040518083038160008887f19350505050508073ffffffffffffffffffffffffffffffffffffffff166326c6a34c604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506020604051808303816000876161da5a03f115610002575050506040515160006000506009600a81101561000257909001600050819055505b5056", - "nonce" : "0x00", - "storage" : { - } - }, - "64306ec3f51a26dcf19f5da0c043040f54f4eca5" : { - "balance" : "0x01", - "code" : "0x60606040526000357c0100000000000000000000000000000000000000000000000000000000900480630c5feb5d14604157806326c6a34c14604c57603f565b005b604a600450606b565b005b60556004506086565b6040518082815260200191505060405180910390f35b3373ffffffffffffffffffffffffffffffffffffffff16ff5b565b600061053990506091565b9056", - "nonce" : "0x00", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x174876e800", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - } - } - }, "SimpleTx" : { "blocks" : [ { @@ -631,26 +425,26 @@ "extraData" : "0x", "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "1233b33c3768c89bd2e949d05a429c8ed5206b1b8bef36d755b088a3c47bf855", - "mixHash" : "22b3f6f80e88965d5e57331e657fc2def2969152c348273fd3a556f62dc8825a", - "nonce" : "6c9b38c24303299c", + "hash" : "af7d40c3a13b4992211dd9ad2dad23668b5d3b6488a305fd9fd3e3206689fe53", + "mixHash" : "362294e6fc301ee3825542ae4788f9dd7bb703164a5284858c7a67b5f4b87ab2", + "nonce" : "dc8704440c676eaf", "number" : "0x01", - "parentHash" : "c6cde6f56d64db59c89e4543a1c2c1264f8190b02bc762683bbea75a6d61784e", + "parentHash" : "7e05cd132877d0c302290059a5c6f9ce4a99f7655c0a3b7c1091ed5395562be6", "receiptTrie" : "bc37d79753ad738a6dac4921e57392f145d8887476de3f783dfa7edae9283e52", "stateRoot" : "964e6c9995e7e3757e934391b4f16b50c20409ee4eb9abd4c4617cb805449b9a", - "timestamp" : "0x55d5f379", - "transactionsTrie" : "53d5b71a8fbb9590de82d69dfa4ac31923b0c8afce0d30d0d8d1e931f25030dc", + "timestamp" : "0x5627cbb1", + "transactionsTrie" : "dc1b0c5c249bdfa3447de70a4c2c52f0fea038aba147151d5631b9aaf0af0522", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90260f901f9a0c6cde6f56d64db59c89e4543a1c2c1264f8190b02bc762683bbea75a6d61784ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0964e6c9995e7e3757e934391b4f16b50c20409ee4eb9abd4c4617cb805449b9aa053d5b71a8fbb9590de82d69dfa4ac31923b0c8afce0d30d0d8d1e931f25030dca0bc37d79753ad738a6dac4921e57392f145d8887476de3f783dfa7edae9283e52b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd88252088455d5f37980a022b3f6f80e88965d5e57331e657fc2def2969152c348273fd3a556f62dc8825a886c9b38c24303299cf861f85f800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0f3266921c93d600c43f6fa4724b7abae079b35b9e95df592f95f9f3445e94c88a012f977552ebdb7a492cf35f3106df16ccb4576ebad4113056ee1f52cbe4978c1c0", + "rlp" : "0xf90260f901f9a07e05cd132877d0c302290059a5c6f9ce4a99f7655c0a3b7c1091ed5395562be6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0964e6c9995e7e3757e934391b4f16b50c20409ee4eb9abd4c4617cb805449b9aa0dc1b0c5c249bdfa3447de70a4c2c52f0fea038aba147151d5631b9aaf0af0522a0bc37d79753ad738a6dac4921e57392f145d8887476de3f783dfa7edae9283e52b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845627cbb180a0362294e6fc301ee3825542ae4788f9dd7bb703164a5284858c7a67b5f4b87ab288dc8704440c676eaff861f85f800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0adab5f480d9b30f8d62049d101649bba2aeb7b4d543e4221d7b1d286f6abcb7ea014ea3faa79d88cdbdbf94c947ddf5c5763390425d93064fb5b8ba2c3f1b25547c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0xc350", "gasPrice" : "0x0a", "nonce" : "0x00", - "r" : "0xf3266921c93d600c43f6fa4724b7abae079b35b9e95df592f95f9f3445e94c88", - "s" : "0x12f977552ebdb7a492cf35f3106df16ccb4576ebad4113056ee1f52cbe4978c1", + "r" : "0xadab5f480d9b30f8d62049d101649bba2aeb7b4d543e4221d7b1d286f6abcb7e", + "s" : "0x14ea3faa79d88cdbdbf94c947ddf5c5763390425d93064fb5b8ba2c3f1b25547", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "v" : "0x1b", "value" : "0x0a" @@ -667,9 +461,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "c6cde6f56d64db59c89e4543a1c2c1264f8190b02bc762683bbea75a6d61784e", - "mixHash" : "8c73628251e10dcd7cac339d4d5d60c28897d59f832435f77c327e4fc04d5e4b", - "nonce" : "a5a076acffc3d021", + "hash" : "7e05cd132877d0c302290059a5c6f9ce4a99f7655c0a3b7c1091ed5395562be6", + "mixHash" : "fcd3331e1bdd9d315518b8659114434338290e814dedda2911a3d8801ad62a97", + "nonce" : "b1183b7a857b1896", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -678,8 +472,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a08c73628251e10dcd7cac339d4d5d60c28897d59f832435f77c327e4fc04d5e4b88a5a076acffc3d021c0c0", - "lastblockhash" : "1233b33c3768c89bd2e949d05a429c8ed5206b1b8bef36d755b088a3c47bf855", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0fcd3331e1bdd9d315518b8659114434338290e814dedda2911a3d8801ad62a9788b1183b7a857b1896c0c0", + "lastblockhash" : "af7d40c3a13b4992211dd9ad2dad23668b5d3b6488a305fd9fd3e3206689fe53", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x0a", @@ -721,30 +515,30 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x020000", "extraData" : "0x", - "gasLimit" : "0x2fe3de", + "gasLimit" : "0x2fefd8", "gasUsed" : "0xf618", - "hash" : "7b4977120a0ee41f3f6a37d35887745fa3ec4f040b19c86c04f1705dcc7cb597", - "mixHash" : "d94fe632206c4afc4f52a75d128ccc6de848e9a458c2217ac8265a647c907750", - "nonce" : "ba192f1cb643c16f", + "hash" : "1d9d39d376fb235b8040f0f5e356e04c35ea816562addc4d22f8e8a35524ec64", + "mixHash" : "d227a5eba8a07b2dabccde3b9684a5ac580732896cb41cc81923fc2e89005b98", + "nonce" : "84a6723b9a749cf4", "number" : "0x01", - "parentHash" : "37cbb5aa6f955d7fc4048cc3dca511979b8a37679835d510cfeb4c6cbe6cde16", - "receiptTrie" : "86e489f2e34f4665b59315779d2bb5c16dc9bf7066aad3c89557556a40d76492", - "stateRoot" : "63dd9ae8517e40e5e48d7efc1440411c120b3e880ed01d0f6874380cf69d45bf", - "timestamp" : "0x55d5f37b", - "transactionsTrie" : "9ca199690a5ad007f08fac5b524d2fa2fa1e0397f7534f1d9c7e388c571aa2c4", + "parentHash" : "8ad1cb102cfd00060836adee99521caf03f06f072dc8248c7963b765f5c32859", + "receiptTrie" : "de28bac0f97dc889adccab7fe4522da47a61e7afebab291db4e0842652dd23bb", + "stateRoot" : "abdaf8afccfebba2ff6fd0db1031e1d80a86204a5d2246c52852cbd3613b0d69", + "timestamp" : "0x5627cbb5", + "transactionsTrie" : "93b27788118ff4a8a6a2d8301bd2bf058e5939dab59fa9aea3f07e88dd53dc83", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90323f901f9a037cbb5aa6f955d7fc4048cc3dca511979b8a37679835d510cfeb4c6cbe6cde16a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a063dd9ae8517e40e5e48d7efc1440411c120b3e880ed01d0f6874380cf69d45bfa09ca199690a5ad007f08fac5b524d2fa2fa1e0397f7534f1d9c7e388c571aa2c4a086e489f2e34f4665b59315779d2bb5c16dc9bf7066aad3c89557556a40d76492b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fe3de82f6188455d5f37b80a0d94fe632206c4afc4f52a75d128ccc6de848e9a458c2217ac8265a647c90775088ba192f1cb643c16ff90123f85f800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0f3266921c93d600c43f6fa4724b7abae079b35b9e95df592f95f9f3445e94c88a012f977552ebdb7a492cf35f3106df16ccb4576ebad4113056ee1f52cbe4978c1f85f800182520894000000000000000000000000000b9331677e6ebf0a801ca098ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4aa08887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3f85f030182520894b94f5374fce5edbc8e2a8697c15331677e6ebf0b0a801ca098ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4aa08887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3c0", + "rlp" : "0xf90323f901f9a08ad1cb102cfd00060836adee99521caf03f06f072dc8248c7963b765f5c32859a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0abdaf8afccfebba2ff6fd0db1031e1d80a86204a5d2246c52852cbd3613b0d69a093b27788118ff4a8a6a2d8301bd2bf058e5939dab59fa9aea3f07e88dd53dc83a0de28bac0f97dc889adccab7fe4522da47a61e7afebab291db4e0842652dd23bbb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882f618845627cbb580a0d227a5eba8a07b2dabccde3b9684a5ac580732896cb41cc81923fc2e89005b988884a6723b9a749cf4f90123f85f800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca061414f206fc35898f5e3c1d8f18c928c90b60988e02da67b61e1ff780f31d8eca00b6369bbda37256c8c8a287710290cc0787ac8d748dac7e5026a7f31cbb9eb6df85f800182520894000000000000000000000000000b9331677e6ebf14801ca098ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4aa08887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3f85f030182520894b94f5374fce5edbc8e2a8697c15331677e6ebf0b1e801ca098ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4aa08887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0xc350", "gasPrice" : "0x0a", "nonce" : "0x00", - "r" : "0xf3266921c93d600c43f6fa4724b7abae079b35b9e95df592f95f9f3445e94c88", - "s" : "0x12f977552ebdb7a492cf35f3106df16ccb4576ebad4113056ee1f52cbe4978c1", + "r" : "0x61414f206fc35898f5e3c1d8f18c928c90b60988e02da67b61e1ff780f31d8ec", + "s" : "0x0b6369bbda37256c8c8a287710290cc0787ac8d748dac7e5026a7f31cbb9eb6d", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1b", + "v" : "0x1c", "value" : "0x0a" }, { @@ -756,7 +550,7 @@ "s" : "0x8887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3", "to" : "000000000000000000000000000b9331677e6ebf", "v" : "0x1c", - "value" : "0x0a" + "value" : "0x14" }, { "data" : "0x", @@ -767,7 +561,7 @@ "s" : "0x8887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3", "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", "v" : "0x1c", - "value" : "0x0a" + "value" : "0x1e" } ], "uncleHeaders" : [ @@ -781,22 +575,22 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "37cbb5aa6f955d7fc4048cc3dca511979b8a37679835d510cfeb4c6cbe6cde16", - "mixHash" : "d618479348484fbc60b890b62529d620231bb098ed243c6067c7f01c90df9048", - "nonce" : "85fb6f380fc20c15", + "hash" : "8ad1cb102cfd00060836adee99521caf03f06f072dc8248c7963b765f5c32859", + "mixHash" : "9659eb36e7a9ba545250cbe2f15846bb0ff38c669ebe4033abe28ceec1ea5e1f", + "nonce" : "2b970b83b7db35aa", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot" : "bba25a960aa5c66a2cbd42582b5859a1b8f01db4ccc9eda59e82c315e50dc871", + "stateRoot" : "7d883d38bc7a640dd66e5cda78cd01b52a7dc40e61f7c2ddbab7cb3ae3b8b9f2", "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0bba25a960aa5c66a2cbd42582b5859a1b8f01db4ccc9eda59e82c315e50dc871a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0d618479348484fbc60b890b62529d620231bb098ed243c6067c7f01c90df90488885fb6f380fc20c15c0c0", - "lastblockhash" : "7b4977120a0ee41f3f6a37d35887745fa3ec4f040b19c86c04f1705dcc7cb597", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a07d883d38bc7a640dd66e5cda78cd01b52a7dc40e61f7c2ddbab7cb3ae3b8b9f2a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a09659eb36e7a9ba545250cbe2f15846bb0ff38c669ebe4033abe28ceec1ea5e1f882b970b83b7db35aac0c0", + "lastblockhash" : "1d9d39d376fb235b8040f0f5e356e04c35ea816562addc4d22f8e8a35524ec64", "postState" : { "000000000000000000000000000b9331677e6ebf" : { - "balance" : "0x0a", + "balance" : "0x14", "code" : "0x", "nonce" : "0x00", "storage" : { @@ -809,10 +603,10 @@ "storage" : { } }, - "31bb58672e8bf7684108feeacf424ab62b873824" : { - "balance" : "0x02540b91ee", + "49ec3a96efcc4f9e2e741ea2af622b91f74a2bcc" : { + "balance" : "0x02540b91da", "code" : "0x", - "nonce" : "0x01", + "nonce" : "0x04", "storage" : { } }, @@ -831,25 +625,25 @@ } }, "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x0a", + "balance" : "0x1e", "code" : "0x", "nonce" : "0x00", "storage" : { } }, - "fa7f04899691becd07dd3081d0a2f3ee7640af52" : { - "balance" : "0x02540b91ee", + "e4ccfc7cc4a70f5efd0b87867f20acbf68842ef8" : { + "balance" : "0x02540b91e4", "code" : "0x", - "nonce" : "0x04", + "nonce" : "0x01", "storage" : { } } }, "pre" : { - "31bb58672e8bf7684108feeacf424ab62b873824" : { + "49ec3a96efcc4f9e2e741ea2af622b91f74a2bcc" : { "balance" : "0x02540be400", "code" : "0x", - "nonce" : "0x00", + "nonce" : "0x03", "storage" : { } }, @@ -860,10 +654,10 @@ "storage" : { } }, - "fa7f04899691becd07dd3081d0a2f3ee7640af52" : { + "e4ccfc7cc4a70f5efd0b87867f20acbf68842ef8" : { "balance" : "0x02540be400", "code" : "0x", - "nonce" : "0x03", + "nonce" : "0x00", "storage" : { } } @@ -877,28 +671,28 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x020000", "extraData" : "0x", - "gasLimit" : "0x2fe3de", + "gasLimit" : "0x2fefd8", "gasUsed" : "0xc350", - "hash" : "77a8d519b4f678feecda052fa9cd6bac5c1d7313c66af8b434fdf2afe4c0db70", - "mixHash" : "6b4d051c23def9cefc87924bc76619f857a4a6de07a9dadf11552d16b11d00ac", - "nonce" : "ff16b3b8f6dc207a", + "hash" : "08999c6e35287ddfe38f587d2ac9654dc02d5b472c07db5e43f4ffaf880c1d23", + "mixHash" : "1f698e7f70ed0d2075c9a3fe06049cd4e2e6b479f378b37b3b595a51f1a4191b", + "nonce" : "ca2170d5f113d37c", "number" : "0x01", - "parentHash" : "7880053bd588b13a5c3535f212df856c730606b9e51267219e908216bc006a03", + "parentHash" : "eca291fa99b0c164cd4b5bc958a2862ce902e09e37cdb94efcf25dd57eec43b0", "receiptTrie" : "5e947bdcb71ec84c3e4f884827f8bcc98412c54bffa8ee25770d55ddbcb05f23", "stateRoot" : "d4d1286d3c22aaacd7bd2adcc2934ba68740c4c5360c89f99a3a6a727a8bcbbd", - "timestamp" : "0x55d5f37e", - "transactionsTrie" : "0f6203a75e815282560cdf61871ed2fa253b910d74f0f772bbb980d2f13dedd9", + "timestamp" : "0x5627cbbb", + "transactionsTrie" : "c89c6525023f0099838de890b8e06a7670d643c4ce9be44e86449b61ad86874f", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf903fef901f9a07880053bd588b13a5c3535f212df856c730606b9e51267219e908216bc006a03a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d4d1286d3c22aaacd7bd2adcc2934ba68740c4c5360c89f99a3a6a727a8bcbbda00f6203a75e815282560cdf61871ed2fa253b910d74f0f772bbb980d2f13dedd9a05e947bdcb71ec84c3e4f884827f8bcc98412c54bffa8ee25770d55ddbcb05f23b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fe3de82c3508455d5f37e80a06b4d051c23def9cefc87924bc76619f857a4a6de07a9dadf11552d16b11d00ac88ff16b3b8f6dc207af901fef901fb803282c3508080b901ae60056013565b6101918061001d6000396000f35b3360008190555056006001600060e060020a6000350480630a874df61461003a57806341c0e1b514610058578063a02b161e14610066578063dbbdf0831461007757005b610045600435610149565b80600160a060020a031660005260206000f35b610060610161565b60006000f35b6100716004356100d4565b60006000f35b61008560043560243561008b565b60006000f35b600054600160a060020a031632600160a060020a031614156100ac576100b1565b6100d0565b8060018360005260205260406000208190555081600060005260206000a15b5050565b600054600160a060020a031633600160a060020a031614158015610118575033600160a060020a0316600182600052602052604060002054600160a060020a031614155b61012157610126565b610146565b600060018260005260205260406000208190555080600060005260206000a15b50565b60006001826000526020526040600020549050919050565b600054600160a060020a031633600160a060020a0316146101815761018f565b600054600160a060020a0316ff5b561ba04d2aeb53154952b3a3d4718d8a11476c1165f8b53fad1c16e7c27d2a0df29298a0695d3859403ff7ae34072e8f48f29d603aef37fff7d01e55f32de724c9492239c0", + "rlp" : "0xf903fef901f9a0eca291fa99b0c164cd4b5bc958a2862ce902e09e37cdb94efcf25dd57eec43b0a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0d4d1286d3c22aaacd7bd2adcc2934ba68740c4c5360c89f99a3a6a727a8bcbbda0c89c6525023f0099838de890b8e06a7670d643c4ce9be44e86449b61ad86874fa05e947bdcb71ec84c3e4f884827f8bcc98412c54bffa8ee25770d55ddbcb05f23b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882c350845627cbbb80a01f698e7f70ed0d2075c9a3fe06049cd4e2e6b479f378b37b3b595a51f1a4191b88ca2170d5f113d37cf901fef901fb803282c3508080b901ae60056013565b6101918061001d6000396000f35b3360008190555056006001600060e060020a6000350480630a874df61461003a57806341c0e1b514610058578063a02b161e14610066578063dbbdf0831461007757005b610045600435610149565b80600160a060020a031660005260206000f35b610060610161565b60006000f35b6100716004356100d4565b60006000f35b61008560043560243561008b565b60006000f35b600054600160a060020a031632600160a060020a031614156100ac576100b1565b6100d0565b8060018360005260205260406000208190555081600060005260206000a15b5050565b600054600160a060020a031633600160a060020a031614158015610118575033600160a060020a0316600182600052602052604060002054600160a060020a031614155b61012157610126565b610146565b600060018260005260205260406000208190555080600060005260206000a15b50565b60006001826000526020526040600020549050919050565b600054600160a060020a031633600160a060020a0316146101815761018f565b600054600160a060020a0316ff5b561ba0ccf4822a049c88c8185a7d6f6ca07755f7b80853b11a7f2de6ce9c61086f08d8a0ede9eb6888e015bf2307b39483f8e1483bc1eb335dbf2bed39277f1963b2906ec0", "transactions" : [ { "data" : "0x60056013565b6101918061001d6000396000f35b3360008190555056006001600060e060020a6000350480630a874df61461003a57806341c0e1b514610058578063a02b161e14610066578063dbbdf0831461007757005b610045600435610149565b80600160a060020a031660005260206000f35b610060610161565b60006000f35b6100716004356100d4565b60006000f35b61008560043560243561008b565b60006000f35b600054600160a060020a031632600160a060020a031614156100ac576100b1565b6100d0565b8060018360005260205260406000208190555081600060005260206000a15b5050565b600054600160a060020a031633600160a060020a031614158015610118575033600160a060020a0316600182600052602052604060002054600160a060020a031614155b61012157610126565b610146565b600060018260005260205260406000208190555080600060005260206000a15b50565b60006001826000526020526040600020549050919050565b600054600160a060020a031633600160a060020a0316146101815761018f565b600054600160a060020a0316ff5b56", "gasLimit" : "0xc350", "gasPrice" : "0x32", "nonce" : "0x00", - "r" : "0x4d2aeb53154952b3a3d4718d8a11476c1165f8b53fad1c16e7c27d2a0df29298", - "s" : "0x695d3859403ff7ae34072e8f48f29d603aef37fff7d01e55f32de724c9492239", + "r" : "0xccf4822a049c88c8185a7d6f6ca07755f7b80853b11a7f2de6ce9c61086f08d8", + "s" : "0xede9eb6888e015bf2307b39483f8e1483bc1eb335dbf2bed39277f1963b2906e", "to" : "", "v" : "0x1b", "value" : "0x00" @@ -915,19 +709,19 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x64", - "hash" : "7880053bd588b13a5c3535f212df856c730606b9e51267219e908216bc006a03", - "mixHash" : "02f48916fece039bbb816bbc50f0a08ff9ffb5f7c91d66de884e1a0884969b01", - "nonce" : "e89cfda8dde9b93f", + "hash" : "eca291fa99b0c164cd4b5bc958a2862ce902e09e37cdb94efcf25dd57eec43b0", + "mixHash" : "d3cb7c5f2f2ad60267de25d36d18e540e85f75e49aade6cdfbb7defeec4d459b", + "nonce" : "0db22809e573eb21", "number" : "0x00", - "parentHash" : "efb4db878627027c81b3bb1c7dd3a18dae3914a49cdd24a3e40ab3bbfbb240c5", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a0efb4db878627027c81b3bb1c7dd3a18dae3914a49cdd24a3e40ab3bbfbb240c5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8648454c98c8142a002f48916fece039bbb816bbc50f0a08ff9ffb5f7c91d66de884e1a0884969b0188e89cfda8dde9b93fc0c0", - "lastblockhash" : "77a8d519b4f678feecda052fa9cd6bac5c1d7313c66af8b434fdf2afe4c0db70", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8648454c98c8142a0d3cb7c5f2f2ad60267de25d36d18e540e85f75e49aade6cdfbb7defeec4d459b880db22809e573eb21c0c0", + "lastblockhash" : "08999c6e35287ddfe38f587d2ac9654dc02d5b472c07db5e43f4ffaf880c1d23", "postState" : { "8888f1f195afa192cfee860698584c030f4c9db1" : { "balance" : "0x45639182451a25a0", @@ -962,30 +756,30 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x020000", "extraData" : "0x", - "gasLimit" : "0x2fe3de", + "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "36d8fbfc8833d1fde1acd0117797d69bf3034c07280c7846f4a7c5f690c0d1bd", - "mixHash" : "04a94f9f31db791e1c1043f7c2b1a2898df6a80a54ab0878f42473b3c2af5cb9", - "nonce" : "bbbb6e598e5760eb", + "hash" : "6164aa182d13aaabeec6f3e7ecd9cf37bfb479e5750fad47f4c3184e8d0cf942", + "mixHash" : "956b24cb89339acd4f223b8c55dab21591996f0484edf4de1c3f13fd2f77ee33", + "nonce" : "9521e668514c147f", "number" : "0x01", - "parentHash" : "859886d7bd1ee6db9677192606fca39f236ad52aa269fd2084f169cdc0184181", + "parentHash" : "f62e19a41ca609a3c3042362615c96c14287091daa172dedb3ccae340a01bf39", "receiptTrie" : "443970a57a806576827076eb900c8c0727c18df44f4ced9fee3c74f2401617f6", "stateRoot" : "3087516fb6d1378db34011edb02d4ba48be6b74e60e38163ff4f42097d87215b", - "timestamp" : "0x55d5f37f", - "transactionsTrie" : "ac17c4b8de7653cfabc0272d6e1803064949cdd66fd57a713ae1ffe24bfb5293", + "timestamp" : "0x5627cbbf", + "transactionsTrie" : "001b9842a07d9f4961eb73987e75934f0f9c3b7c9c17866649da1670783af0a8", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0859886d7bd1ee6db9677192606fca39f236ad52aa269fd2084f169cdc0184181a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a03087516fb6d1378db34011edb02d4ba48be6b74e60e38163ff4f42097d87215ba0ac17c4b8de7653cfabc0272d6e1803064949cdd66fd57a713ae1ffe24bfb5293a0443970a57a806576827076eb900c8c0727c18df44f4ced9fee3c74f2401617f6b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fe3de8252088455d5f37f80a004a94f9f31db791e1c1043f7c2b1a2898df6a80a54ab0878f42473b3c2af5cb988bbbb6e598e5760ebf862f860800183014c0894095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca04d52b16e9e2813953622dc36e9fc90c1d12fa114a0f7eec136f8129eef11be4ca039aa3ab1e3a55f591c272f7e48f82d1570d27f64cfcd4abd581c05be11d646c0c0", + "rlp" : "0xf90261f901f9a0f62e19a41ca609a3c3042362615c96c14287091daa172dedb3ccae340a01bf39a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a03087516fb6d1378db34011edb02d4ba48be6b74e60e38163ff4f42097d87215ba0001b9842a07d9f4961eb73987e75934f0f9c3b7c9c17866649da1670783af0a8a0443970a57a806576827076eb900c8c0727c18df44f4ced9fee3c74f2401617f6b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845627cbbf80a0956b24cb89339acd4f223b8c55dab21591996f0484edf4de1c3f13fd2f77ee33889521e668514c147ff862f860800183014c0894095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0f4326525d3cd9ff07f99d0ae508cbf0940a43a7032519f2cc876bd997acd0864a09eae24f7bc31b300eab6f934f930b4b4928b31a28fd96cadeb58d146c88dba32c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0x014c08", "gasPrice" : "0x01", "nonce" : "0x00", - "r" : "0x4d52b16e9e2813953622dc36e9fc90c1d12fa114a0f7eec136f8129eef11be4c", - "s" : "0x39aa3ab1e3a55f591c272f7e48f82d1570d27f64cfcd4abd581c05be11d646c0", + "r" : "0xf4326525d3cd9ff07f99d0ae508cbf0940a43a7032519f2cc876bd997acd0864", + "s" : "0x9eae24f7bc31b300eab6f934f930b4b4928b31a28fd96cadeb58d146c88dba32", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1c", + "v" : "0x1b", "value" : "0x0a" } ], @@ -1000,9 +794,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "859886d7bd1ee6db9677192606fca39f236ad52aa269fd2084f169cdc0184181", - "mixHash" : "44883e5b7f534d928f2e629de72c8c81bb600b74d5ed8205b473a8c55597a540", - "nonce" : "475a338100c88919", + "hash" : "f62e19a41ca609a3c3042362615c96c14287091daa172dedb3ccae340a01bf39", + "mixHash" : "eb7a6b76e4ee113af9bc1a8c25e77883c463b4fc1d14955245454fa0120a41d8", + "nonce" : "374cd8643202d06b", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1011,8 +805,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a044883e5b7f534d928f2e629de72c8c81bb600b74d5ed8205b473a8c55597a54088475a338100c88919c0c0", - "lastblockhash" : "36d8fbfc8833d1fde1acd0117797d69bf3034c07280c7846f4a7c5f690c0d1bd", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0eb7a6b76e4ee113af9bc1a8c25e77883c463b4fc1d14955245454fa0120a41d888374cd8643202d06bc0c0", + "lastblockhash" : "6164aa182d13aaabeec6f3e7ecd9cf37bfb479e5750fad47f4c3184e8d0cf942", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x0a", @@ -1054,20 +848,20 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x020000", "extraData" : "0x", - "gasLimit" : "0x2fe3de", + "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "4518faee37d63fa607e3d185f998608455c1335ff24548396f951d739d84caf6", - "mixHash" : "3f8815db0719f146b997d1b87e75ad11c09db9557321074dd38b21d0def784ea", - "nonce" : "2357882b0f288034", + "hash" : "a202eb673857ee440171197628de2b20fb00c51473b8abcb26274934386ff516", + "mixHash" : "fd8b1021e77a1334b11a033a9d59d1465bbef1718e73f001edb9b6a658839202", + "nonce" : "b774a4369c37dffc", "number" : "0x01", - "parentHash" : "8a83ada0e0f4251ae1f4de435f56ed7723df9afd12bba44addff5e5ef41b8e41", + "parentHash" : "ce66158bfe13bba525de2b1804097e33bed22ef37d2d0c75b20a94547d976a5a", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "8503769bb14067be7c5e438c353094e5a9a6c72f375fad4a76878a8882ceb496", - "timestamp" : "0x55d5f380", + "timestamp" : "0x5627cbc7", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf901fcf901f7a08a83ada0e0f4251ae1f4de435f56ed7723df9afd12bba44addff5e5ef41b8e41a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08503769bb14067be7c5e438c353094e5a9a6c72f375fad4a76878a8882ceb496a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fe3de808455d5f38080a03f8815db0719f146b997d1b87e75ad11c09db9557321074dd38b21d0def784ea882357882b0f288034c0c0", + "rlp" : "0xf901fcf901f7a0ce66158bfe13bba525de2b1804097e33bed22ef37d2d0c75b20a94547d976a5aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a08503769bb14067be7c5e438c353094e5a9a6c72f375fad4a76878a8882ceb496a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd880845627cbc780a0fd8b1021e77a1334b11a033a9d59d1465bbef1718e73f001edb9b6a65883920288b774a4369c37dffcc0c0", "transactions" : [ ], "uncleHeaders" : [ @@ -1081,9 +875,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "8a83ada0e0f4251ae1f4de435f56ed7723df9afd12bba44addff5e5ef41b8e41", - "mixHash" : "5b4b6d03199c1615a7262b7d7a30bdcd948b4f559c8273da457360a140023fcc", - "nonce" : "7f37019fd56f6bdb", + "hash" : "ce66158bfe13bba525de2b1804097e33bed22ef37d2d0c75b20a94547d976a5a", + "mixHash" : "59f388bd19e3e6783121cb652bb3f3809fb5c5440c2a5dda42efe83b39b22916", + "nonce" : "ab704afa0cdcc4ac", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1092,8 +886,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a05b4b6d03199c1615a7262b7d7a30bdcd948b4f559c8273da457360a140023fcc887f37019fd56f6bdbc0c0", - "lastblockhash" : "4518faee37d63fa607e3d185f998608455c1335ff24548396f951d739d84caf6", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a059f388bd19e3e6783121cb652bb3f3809fb5c5440c2a5dda42efe83b39b2291688ab704afa0cdcc4acc0c0", + "lastblockhash" : "a202eb673857ee440171197628de2b20fb00c51473b8abcb26274934386ff516", "postState" : { "8888f1f195afa192cfee860698584c030f4c9db1" : { "balance" : "0x4563918244f40000", @@ -1128,30 +922,30 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x020000", "extraData" : "0x", - "gasLimit" : "0x2fe3de", + "gasLimit" : "0x2fefd8", "gasUsed" : "0x014820", - "hash" : "274d394e8c4917a6f69a0de847c4a0dea8a6497d4d8ecca7c585f57d903ad72a", - "mixHash" : "2e8f712996da2d6de99d6de00d650c1f64b2e1c62387956eba6e75c38a38d1cf", - "nonce" : "9b96a98327192017", + "hash" : "7ec5815ccde335afb35770a951ba98a4c9908ecf7900618948675d79828dd969", + "mixHash" : "0fb15de9a259e2b2864a910f0d23f0dc364a1d2aa514c7fba7fc18e0ec1e0d7f", + "nonce" : "c30cc055638dcfca", "number" : "0x01", - "parentHash" : "2a6269150eab64ecdc6ee16dd899acbf09c2f304c1ab658b4df62b83c234a550", + "parentHash" : "9dbbdd68a7db4f2bc4d900eb42c8512de3aea02bbea8a13370ddbe6d403ed14f", "receiptTrie" : "4cf33491338ba5c04157a50abc2ba539a9f84a982ff43af45b0b0382e9bbbad7", "stateRoot" : "374444ef3d413eeeb69c71cfefba8380d463a8fbd233a32b7e0035afa5c400d1", - "timestamp" : "0x55d5f382", - "transactionsTrie" : "c52db987225c0bbeb1808b41fa870bc5f134073ed79c2d1a9c8b28545de80f49", + "timestamp" : "0x5627cbcc", + "transactionsTrie" : "47ed28699ac7fd2cb2bc823643cbe3593457e2761e6ee3c10315ab28bb7ca6a3", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90385f901faa02a6269150eab64ecdc6ee16dd899acbf09c2f304c1ab658b4df62b83c234a550a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0374444ef3d413eeeb69c71cfefba8380d463a8fbd233a32b7e0035afa5c400d1a0c52db987225c0bbeb1808b41fa870bc5f134073ed79c2d1a9c8b28545de80f49a04cf33491338ba5c04157a50abc2ba539a9f84a982ff43af45b0b0382e9bbbad7b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fe3de830148208455d5f38280a02e8f712996da2d6de99d6de00d650c1f64b2e1c62387956eba6e75c38a38d1cf889b96a98327192017f90184f85f800182520894095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0272bb540c27b214d5cb7deb7ee3a5b0045574474f59a494033efa146c67d0cd2a0272179cc62995b02183f47adcc6a11a66b7cc66c543f9bd4eea28c0368415f62f85f010182520894095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0cd5d6b8050014bc9d170d316d1d5ce8a321e964033c81a267db9abf46871798ba029109ebdc6c46e732e68f26acbc79c4b27ee90123edb2b2d9cc303533584a685f85f020182520894095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca0d9e6314ad1ab598ed8948dcc9e68382e8ea532019c9d6363a30b827237d7c89ba058ab0d9c0d6054dbdb626ae4211aca67517f93ceeebdb71e5a8a06117bf52e3ef85f030182520894095e7baea6a6c7c4c2dfeb977efac326af552d870a801ca07b2200ec5136ce610f849f66d04175024134620b94ee509897025c25b1c1b0e7a076cc6272ea4917f4f3a875030a69b6ceef2e11ad21c9c2acaf4964f2344e665ac0", + "rlp" : "0xf90385f901faa09dbbdd68a7db4f2bc4d900eb42c8512de3aea02bbea8a13370ddbe6d403ed14fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0374444ef3d413eeeb69c71cfefba8380d463a8fbd233a32b7e0035afa5c400d1a047ed28699ac7fd2cb2bc823643cbe3593457e2761e6ee3c10315ab28bb7ca6a3a04cf33491338ba5c04157a50abc2ba539a9f84a982ff43af45b0b0382e9bbbad7b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd883014820845627cbcc80a00fb15de9a259e2b2864a910f0d23f0dc364a1d2aa514c7fba7fc18e0ec1e0d7f88c30cc055638dcfcaf90184f85f800182520894095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba05b54a56f3aca9abeb878b97efc29fe428ecabc2bf8507baa0c089d3cb1d01fb3a013f3a4232fb78bf4bdc7d9351c07d20e449f6627fa1c6cbff986daac8179dcf6f85f010182520894095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba03ef9cc36cfec51fa5995790264f9fd22e0096ed3685f58b32d2f507ac80d5d50a06128cb4c03046c8de191cefe2560583df6845a9cea5c71ed44b31ac8a98a8694f85f020182520894095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0e98e7319e3c5e44e0f39132b4f2d37d6822889862a4e60c4c967336227cd9a2ba0fa192734c45b72acb96275470b2970fae47c3cfb48391d5f73e142e14c8a3faaf85f030182520894095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba04c326203f409671751985e2df6785a25ae4e62f5a9399ceff47e31f2fad3a095a0405c34bd7e838929d565a2f250abf54c5972a2221ae1d5e33b47771c6189af2fc0", "transactions" : [ { "data" : "0x", "gasLimit" : "0x5208", "gasPrice" : "0x01", "nonce" : "0x00", - "r" : "0x272bb540c27b214d5cb7deb7ee3a5b0045574474f59a494033efa146c67d0cd2", - "s" : "0x272179cc62995b02183f47adcc6a11a66b7cc66c543f9bd4eea28c0368415f62", + "r" : "0x5b54a56f3aca9abeb878b97efc29fe428ecabc2bf8507baa0c089d3cb1d01fb3", + "s" : "0x13f3a4232fb78bf4bdc7d9351c07d20e449f6627fa1c6cbff986daac8179dcf6", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1c", + "v" : "0x1b", "value" : "0x0a" }, { @@ -1159,10 +953,10 @@ "gasLimit" : "0x5208", "gasPrice" : "0x01", "nonce" : "0x01", - "r" : "0xcd5d6b8050014bc9d170d316d1d5ce8a321e964033c81a267db9abf46871798b", - "s" : "0x29109ebdc6c46e732e68f26acbc79c4b27ee90123edb2b2d9cc303533584a685", + "r" : "0x3ef9cc36cfec51fa5995790264f9fd22e0096ed3685f58b32d2f507ac80d5d50", + "s" : "0x6128cb4c03046c8de191cefe2560583df6845a9cea5c71ed44b31ac8a98a8694", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1c", + "v" : "0x1b", "value" : "0x0a" }, { @@ -1170,10 +964,10 @@ "gasLimit" : "0x5208", "gasPrice" : "0x01", "nonce" : "0x02", - "r" : "0xd9e6314ad1ab598ed8948dcc9e68382e8ea532019c9d6363a30b827237d7c89b", - "s" : "0x58ab0d9c0d6054dbdb626ae4211aca67517f93ceeebdb71e5a8a06117bf52e3e", + "r" : "0xe98e7319e3c5e44e0f39132b4f2d37d6822889862a4e60c4c967336227cd9a2b", + "s" : "0xfa192734c45b72acb96275470b2970fae47c3cfb48391d5f73e142e14c8a3faa", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1c", + "v" : "0x1b", "value" : "0x0a" }, { @@ -1181,10 +975,10 @@ "gasLimit" : "0x5208", "gasPrice" : "0x01", "nonce" : "0x03", - "r" : "0x7b2200ec5136ce610f849f66d04175024134620b94ee509897025c25b1c1b0e7", - "s" : "0x76cc6272ea4917f4f3a875030a69b6ceef2e11ad21c9c2acaf4964f2344e665a", + "r" : "0x4c326203f409671751985e2df6785a25ae4e62f5a9399ceff47e31f2fad3a095", + "s" : "0x405c34bd7e838929d565a2f250abf54c5972a2221ae1d5e33b47771c6189af2f", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1c", + "v" : "0x1b", "value" : "0x0a" } ], @@ -1199,9 +993,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "2a6269150eab64ecdc6ee16dd899acbf09c2f304c1ab658b4df62b83c234a550", - "mixHash" : "bb09ae3a7189ef5816e52078d798f7fc20db94b79dab95a1c5ef9fbb6e049a6f", - "nonce" : "529ca9d230a6b676", + "hash" : "9dbbdd68a7db4f2bc4d900eb42c8512de3aea02bbea8a13370ddbe6d403ed14f", + "mixHash" : "c47b6196504a2b45cba00e6d51fe2f4ae86854ecde7415d13d4131ed99245fdc", + "nonce" : "ebdd7b70f2f529be", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1210,8 +1004,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0bb09ae3a7189ef5816e52078d798f7fc20db94b79dab95a1c5ef9fbb6e049a6f88529ca9d230a6b676c0c0", - "lastblockhash" : "274d394e8c4917a6f69a0de847c4a0dea8a6497d4d8ecca7c585f57d903ad72a", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0c47b6196504a2b45cba00e6d51fe2f4ae86854ecde7415d13d4131ed99245fdc88ebdd7b70f2f529bec0c0", + "lastblockhash" : "7ec5815ccde335afb35770a951ba98a4c9908ecf7900618948675d79828dd969", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x28", @@ -1253,28 +1047,28 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x020000", "extraData" : "0x", - "gasLimit" : "0x2fe3de", + "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "adc8932eaf583e4b4b34d178d26996631eb75b051772584bf0d6b41600a7b847", - "mixHash" : "6c3e4bf7ae0cb93ee67b01ea59a3f20de0a57b3200fdb3e0e955a6324b0a7dde", - "nonce" : "8825a74a706f6238", + "hash" : "a55b238a013730966549f4ea8d35c4ec35f4ea4f47b697580e66ea43ea4fcd09", + "mixHash" : "da2a44951b76582b742d5db610047de167311d305b067d4469d3505d20d9bde6", + "nonce" : "c1c91174088dfce1", "number" : "0x01", - "parentHash" : "f7b70a12006718c3e4627bdfe3c919fd9eabbf76ff7479f32cf3ddb49c63e6ad", + "parentHash" : "241f1bcf42b82957ac38fa45419da4381b38a4479fcf2623dc8441874f58b15d", "receiptTrie" : "61d9e5e4b662b22b0f085689e02d37aa14ec80fbdf37f867d9e90a6a7faeb8d3", "stateRoot" : "c1ce557179e21d2943e2a22ceb238403d0f353f1abafc424286cfe27621adcca", - "timestamp" : "0x55d5f384", - "transactionsTrie" : "0b02bd3fe4650efdbb64e9df234e189c6fb8ae493fecf5880a90ba3e322c63a4", + "timestamp" : "0x5627cbd4", + "transactionsTrie" : "635bc730f0d973aaf6e28ed69bf29496e14f78c1d2256ea84dabac35cf9408cd", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90261f901f9a0f7b70a12006718c3e4627bdfe3c919fd9eabbf76ff7479f32cf3ddb49c63e6ada01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c1ce557179e21d2943e2a22ceb238403d0f353f1abafc424286cfe27621adccaa00b02bd3fe4650efdbb64e9df234e189c6fb8ae493fecf5880a90ba3e322c63a4a061d9e5e4b662b22b0f085689e02d37aa14ec80fbdf37f867d9e90a6a7faeb8d3b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fe3de8252088455d5f38480a06c3e4bf7ae0cb93ee67b01ea59a3f20de0a57b3200fdb3e0e955a6324b0a7dde888825a74a706f6238f862f860808083014c0894095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba0ecde765b594ddb833b31bf9a628c37b339bf902ee753a33f9c1a97b4926af0e6a03066e5a2a101f72195110cbcf749e379afc6bc8232d7c3ea3d7b81ed5397a5b3c0", + "rlp" : "0xf90261f901f9a0241f1bcf42b82957ac38fa45419da4381b38a4479fcf2623dc8441874f58b15da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0c1ce557179e21d2943e2a22ceb238403d0f353f1abafc424286cfe27621adccaa0635bc730f0d973aaf6e28ed69bf29496e14f78c1d2256ea84dabac35cf9408cda061d9e5e4b662b22b0f085689e02d37aa14ec80fbdf37f867d9e90a6a7faeb8d3b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845627cbd480a0da2a44951b76582b742d5db610047de167311d305b067d4469d3505d20d9bde688c1c91174088dfce1f862f860808083014c0894095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba04ede9016f1048f8dddff93b9d6238d9bedac925e615e210ece76d2aa480592f3a08a5be22a8be394a529cb1498d73b540f0fba9acf4fcce55b100699ecc7b82641c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0x014c08", "gasPrice" : "0x00", "nonce" : "0x00", - "r" : "0xecde765b594ddb833b31bf9a628c37b339bf902ee753a33f9c1a97b4926af0e6", - "s" : "0x3066e5a2a101f72195110cbcf749e379afc6bc8232d7c3ea3d7b81ed5397a5b3", + "r" : "0x4ede9016f1048f8dddff93b9d6238d9bedac925e615e210ece76d2aa480592f3", + "s" : "0x8a5be22a8be394a529cb1498d73b540f0fba9acf4fcce55b100699ecc7b82641", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "v" : "0x1b", "value" : "0x0a" @@ -1291,9 +1085,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "f7b70a12006718c3e4627bdfe3c919fd9eabbf76ff7479f32cf3ddb49c63e6ad", - "mixHash" : "2bc2e574eea3a4fe7f92ec525312ab9b5c350bc0139e1d444d478c06347b29b5", - "nonce" : "7ce9a2d4a8a46868", + "hash" : "241f1bcf42b82957ac38fa45419da4381b38a4479fcf2623dc8441874f58b15d", + "mixHash" : "755e41532f8cd15c6c3a88007212bf825b3ca57e3ca477f224c30442059b7481", + "nonce" : "67fb83210a349be8", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1302,8 +1096,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a02bc2e574eea3a4fe7f92ec525312ab9b5c350bc0139e1d444d478c06347b29b5887ce9a2d4a8a46868c0c0", - "lastblockhash" : "adc8932eaf583e4b4b34d178d26996631eb75b051772584bf0d6b41600a7b847", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0755e41532f8cd15c6c3a88007212bf825b3ca57e3ca477f224c30442059b74818867fb83210a349be8c0c0", + "lastblockhash" : "a55b238a013730966549f4ea8d35c4ec35f4ea4f47b697580e66ea43ea4fcd09", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x0a", @@ -1345,30 +1139,30 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x020000", "extraData" : "0x", - "gasLimit" : "0x2fe3de", + "gasLimit" : "0x2fefd8", "gasUsed" : "0x560b", - "hash" : "9db645ca22e25dbe760ed94e4b979a24aaced81feddf8058f1447b6be2252a9c", - "mixHash" : "19077b96c944a3f30c8e3cdc38fd8b2e4ab2fdac14d71c03ea13a416d7ef32ca", - "nonce" : "6889326f8c6fb276", + "hash" : "2945281fac86adf1c8dd325160e24f512e73681eed7a2804c61c909ccc524e46", + "mixHash" : "8ea293eba3c33199b29000a90e0d4f828d78077c77afea63e04465c34cb57bd9", + "nonce" : "6a23c00ab919a602", "number" : "0x01", - "parentHash" : "8e221317873233bc0e5ee34f33c1d376f0db5bc65ba5bd427c02e1ca0663ba25", + "parentHash" : "be327ac61fa9531569d092314e4bdc483ea553c8bd2e82c0118c6387b19aa90b", "receiptTrie" : "c7778a7376099ee2e5c455791c1885b5c361b95713fddcbe32d97fd01334d296", "stateRoot" : "bac6177a79e910c98d86ec31a09ae37ac2de15b754fd7bed1ba52362c49416bf", - "timestamp" : "0x55d5f386", - "transactionsTrie" : "498785da562aa0c5dd5937cf15f22139b0b1bcf3b4fc48986e1bb1dae9292796", + "timestamp" : "0x5627cbd7", + "transactionsTrie" : "286a87b659c6ad4b0708c1fa37e8eff175612d808586147af6fa77d1b2ed08d5", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90265f901f9a08e221317873233bc0e5ee34f33c1d376f0db5bc65ba5bd427c02e1ca0663ba25a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0bac6177a79e910c98d86ec31a09ae37ac2de15b754fd7bed1ba52362c49416bfa0498785da562aa0c5dd5937cf15f22139b0b1bcf3b4fc48986e1bb1dae9292796a0c7778a7376099ee2e5c455791c1885b5c361b95713fddcbe32d97fd01334d296b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fe3de82560b8455d5f38680a019077b96c944a3f30c8e3cdc38fd8b2e4ab2fdac14d71c03ea13a416d7ef32ca886889326f8c6fb276f866f864800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d8785012a05f200801ca0ee0b9ec878fbd4258a9473199d8ecc32996a20c323c004e79e0cda20e0418ce3a04e6bc63927d1510bab54f37e46fa036faf4b2c465d271920d9afea1fadf7bd21c0", + "rlp" : "0xf90265f901f9a0be327ac61fa9531569d092314e4bdc483ea553c8bd2e82c0118c6387b19aa90ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0bac6177a79e910c98d86ec31a09ae37ac2de15b754fd7bed1ba52362c49416bfa0286a87b659c6ad4b0708c1fa37e8eff175612d808586147af6fa77d1b2ed08d5a0c7778a7376099ee2e5c455791c1885b5c361b95713fddcbe32d97fd01334d296b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b845627cbd780a08ea293eba3c33199b29000a90e0d4f828d78077c77afea63e04465c34cb57bd9886a23c00ab919a602f866f864800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d8785012a05f200801ba01277c4ae048bdccc8f0a5d2470e22b16066d0badaa4ea6d8432e7152ad82ce1da0d9fac6ac3d48a250da9c551e80fe1422c303c754d96b08dc4c24877e3bbf986bc0", "transactions" : [ { "data" : "0x", "gasLimit" : "0xc350", "gasPrice" : "0x0a", "nonce" : "0x00", - "r" : "0xee0b9ec878fbd4258a9473199d8ecc32996a20c323c004e79e0cda20e0418ce3", - "s" : "0x4e6bc63927d1510bab54f37e46fa036faf4b2c465d271920d9afea1fadf7bd21", + "r" : "0x1277c4ae048bdccc8f0a5d2470e22b16066d0badaa4ea6d8432e7152ad82ce1d", + "s" : "0xd9fac6ac3d48a250da9c551e80fe1422c303c754d96b08dc4c24877e3bbf986b", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1c", + "v" : "0x1b", "value" : "0x012a05f200" } ], @@ -1383,9 +1177,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "8e221317873233bc0e5ee34f33c1d376f0db5bc65ba5bd427c02e1ca0663ba25", - "mixHash" : "512588f77e4b6b7deb3651e89214c54ae9d7b0b51650baad9cec23d162ce91c0", - "nonce" : "f89ef32e65f27ed8", + "hash" : "be327ac61fa9531569d092314e4bdc483ea553c8bd2e82c0118c6387b19aa90b", + "mixHash" : "409a11c29373c4763ffa6e35bb779f9a2cb510bc0c088c15a772814d5c73a3c3", + "nonce" : "28660de2421bd082", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1394,8 +1188,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0925002c3260b44e44c3edebad1cc442142b03020209df1ab8bb86752edbd2cd7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0512588f77e4b6b7deb3651e89214c54ae9d7b0b51650baad9cec23d162ce91c088f89ef32e65f27ed8c0c0", - "lastblockhash" : "9db645ca22e25dbe760ed94e4b979a24aaced81feddf8058f1447b6be2252a9c", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0925002c3260b44e44c3edebad1cc442142b03020209df1ab8bb86752edbd2cd7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0409a11c29373c4763ffa6e35bb779f9a2cb510bc0c088c15a772814d5c73a3c38828660de2421bd082c0c0", + "lastblockhash" : "2945281fac86adf1c8dd325160e24f512e73681eed7a2804c61c909ccc524e46", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x012a05f264", @@ -1444,30 +1238,30 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x038630", "extraData" : "0x", - "gasLimit" : "0x2fe3de", + "gasLimit" : "0x2fefd8", "gasUsed" : "0x560b", - "hash" : "e016b3366903c44b33a0b79af1e286fc13b80fb54d2cbaf62c289be14e2bf958", - "mixHash" : "5f90930a01b1cc113338264120191d7deb9beaefc6b9c2de9dc604bc3be6dae7", - "nonce" : "85aaae2774202ad0", + "hash" : "97427bebf071cf77ae78fd9d1e68bc0133e39dfd4a90aff038f68226942b1530", + "mixHash" : "2a22fedf24b18a9ea36c8a4cae645d52764e36295e0ae762a60c6942261ae634", + "nonce" : "577cb4bf2c0dd8f8", "number" : "0x01", - "parentHash" : "5e135c4bdefcd8851f92a3a4670e8bf7662961b66876bbb65b572a31358d6d14", + "parentHash" : "e293bb48c39c20f2cdde145caec0f88d4165860a99fc52699d478e4918d74afb", "receiptTrie" : "5e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26", "stateRoot" : "201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914", - "timestamp" : "0x55d5f388", - "transactionsTrie" : "c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7", + "timestamp" : "0x5627cbde", + "transactionsTrie" : "ccb4272484379283a2fca37626b7fc7e023a1e76bca9a5d41a099214f60f42c3", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90262f901f9a05e135c4bdefcd8851f92a3a4670e8bf7662961b66876bbb65b572a31358d6d14a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008303863001832fe3de82560b8455d5f38880a05f90930a01b1cc113338264120191d7deb9beaefc6b9c2de9dc604bc3be6dae78885aaae2774202ad0f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0", + "rlp" : "0xf90262f901f9a0e293bb48c39c20f2cdde145caec0f88d4165860a99fc52699d478e4918d74afba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0ccb4272484379283a2fca37626b7fc7e023a1e76bca9a5d41a099214f60f42c3a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008303863001832fefd882560b845627cbde80a02a22fedf24b18a9ea36c8a4cae645d52764e36295e0ae762a60c6942261ae63488577cb4bf2c0dd8f8f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca04abbe029d149dc82917a3b3a8974ff19ecd82c75602e832c73b404c55b89837aa0d7133b0871b65c5216ff39115baed4f61b967691239560761d494991381ac229c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0xc350", "gasPrice" : "0x0a", "nonce" : "0x00", - "r" : "0x149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393", - "s" : "0x3cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36", + "r" : "0x4abbe029d149dc82917a3b3a8974ff19ecd82c75602e832c73b404c55b89837a", + "s" : "0xd7133b0871b65c5216ff39115baed4f61b967691239560761d494991381ac229", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1b", + "v" : "0x1c", "value" : "0x1388" } ], @@ -1475,7 +1269,7 @@ ] }, { - "rlp" : "0xf901fcf901f7a0e016b3366903c44b33a0b79af1e286fc13b80fb54d2cbaf62c289be14e2bf958a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b18395884d55f5dc870bc46e565a5dbdc5659325f66cc457b38bcecb01662f78a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fd800808455d5f38880a08f4407a10797e7dffabcf54459eb6f63ba0d6925ba7b6e999848d334123b09fe88436e39fd86607230c0c0" + "rlp" : "0xf901fcf901f7a097427bebf071cf77ae78fd9d1e68bc0133e39dfd4a90aff038f68226942b1530a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b18395884d55f5dc870bc46e565a5dbdc5659325f66cc457b38bcecb01662f78a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fefd880845627cbde80a0e7996e0a7695e96cead8db1007f4e1bb5404064a9cd87bea4c6add553cdf7cc78822887df730efca66c0c0" } ], "genesisBlockHeader" : { @@ -1485,9 +1279,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "5e135c4bdefcd8851f92a3a4670e8bf7662961b66876bbb65b572a31358d6d14", - "mixHash" : "cd34e2cf76dab4ec5e90d8aee1c23968edf59d1264c238769b457959768b2792", - "nonce" : "0f7a20795f299b7b", + "hash" : "e293bb48c39c20f2cdde145caec0f88d4165860a99fc52699d478e4918d74afb", + "mixHash" : "c22e79b22d35863af946e1b8c3e631ad9cfcbe8d62413f3065974ad7824a04c8", + "nonce" : "3e8a82ac1d46d7da", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1496,8 +1290,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0cd34e2cf76dab4ec5e90d8aee1c23968edf59d1264c238769b457959768b2792880f7a20795f299b7bc0c0", - "lastblockhash" : "e016b3366903c44b33a0b79af1e286fc13b80fb54d2cbaf62c289be14e2bf958", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0c22e79b22d35863af946e1b8c3e631ad9cfcbe8d62413f3065974ad7824a04c8883e8a82ac1d46d7dac0c0", + "lastblockhash" : "97427bebf071cf77ae78fd9d1e68bc0133e39dfd4a90aff038f68226942b1530", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x13ec", @@ -1546,28 +1340,28 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x038630", "extraData" : "0x", - "gasLimit" : "0x2fe3de", + "gasLimit" : "0x2fefd8", "gasUsed" : "0x560b", - "hash" : "022df90fbe4b089dfa6b0a879b9787b262ede8171a1170878e0f694e5e13977d", - "mixHash" : "8226205217edade35ca29967d4dd7a7aa5d9d2453d2e608d023cd8f5a1fb7298", - "nonce" : "27b3c785ac56dee5", + "hash" : "e67fc0e4a3ae602515231903fb7817f2a5e0e8e6f10322735b6d0e2430de32b3", + "mixHash" : "9eca7c547ac973f8cf0a62ea5facea6d1f5a2b0eb7299de5b2e5bc8a55592332", + "nonce" : "0a2398721917debc", "number" : "0x01", - "parentHash" : "29b2b142238c3820d4ede0193cf4bf11c7a242c38074e1820d410f54f219cc50", + "parentHash" : "2cf8caf29f48c7765399e7acb1bb4b2f0cabc2122eaf23e896fe26073d6f848d", "receiptTrie" : "5e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26", "stateRoot" : "201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914", - "timestamp" : "0x55d5f38c", - "transactionsTrie" : "c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7", + "timestamp" : "0x5627cbe7", + "transactionsTrie" : "7e1e4d5a6fbb4a2472143fc2c8a3c154c4d50c3e7d360ff7765d0e198eb2f2fa", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90262f901f9a029b2b142238c3820d4ede0193cf4bf11c7a242c38074e1820d410f54f219cc50a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008303863001832fe3de82560b8455d5f38c80a08226205217edade35ca29967d4dd7a7aa5d9d2453d2e608d023cd8f5a1fb72988827b3c785ac56dee5f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0", + "rlp" : "0xf90262f901f9a02cf8caf29f48c7765399e7acb1bb4b2f0cabc2122eaf23e896fe26073d6f848da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a07e1e4d5a6fbb4a2472143fc2c8a3c154c4d50c3e7d360ff7765d0e198eb2f2faa05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008303863001832fefd882560b845627cbe780a09eca7c547ac973f8cf0a62ea5facea6d1f5a2b0eb7299de5b2e5bc8a55592332880a2398721917debcf863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba06f9a4676ec805ca75e9c63de5cb6d1fc28b1f4349e2074092349ad9f933de178a03a1355a08989578c21910b61dbf839f30c56818aedd92be8973493601f093b08c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0xc350", "gasPrice" : "0x0a", "nonce" : "0x00", - "r" : "0x149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393", - "s" : "0x3cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36", + "r" : "0x6f9a4676ec805ca75e9c63de5cb6d1fc28b1f4349e2074092349ad9f933de178", + "s" : "0x3a1355a08989578c21910b61dbf839f30c56818aedd92be8973493601f093b08", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "v" : "0x1b", "value" : "0x1388" @@ -1578,25 +1372,36 @@ }, { "blockHeader" : { - "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "bloom" : "00000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000040000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x0386a0", "extraData" : "0x", - "gasLimit" : "0x2fd800", - "gasUsed" : "0x00", - "hash" : "5765fc0b211f0686440ad73a8a7b40c2d1bbba1a380755c2fc02ba2fd0ed3920", - "mixHash" : "3d33c0eb4de9bd8df7f581bef8f2a8e184bac0f7b49f7b8bf567b0599edfdeef", - "nonce" : "d08ba7d2e8860f81", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x560b", + "hash" : "b3512bff8599823ffa32fbf170e4f70ae6040747e40ad0f9fec66b79af0cc907", + "mixHash" : "3b79b768d897da6d14050827c67259958406017898b42371442ca0d65fe81d02", + "nonce" : "d432d8d4a640adc1", "number" : "0x02", - "parentHash" : "022df90fbe4b089dfa6b0a879b9787b262ede8171a1170878e0f694e5e13977d", - "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "stateRoot" : "b18395884d55f5dc870bc46e565a5dbdc5659325f66cc457b38bcecb01662f78", - "timestamp" : "0x55d5f398", - "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "parentHash" : "e67fc0e4a3ae602515231903fb7817f2a5e0e8e6f10322735b6d0e2430de32b3", + "receiptTrie" : "ca0d8c2843163f5f0af8080df9da6fd48fd591ba4af83d649351fb75df2426aa", + "stateRoot" : "327e60bc4804c9286fe24fb28f7489cd12c5f1e11fc6e56aad9ad2971a13cb24", + "timestamp" : "0x5627cbf3", + "transactionsTrie" : "9f8be7a83a918e15462b5d2d6ba6081ccf26c0ff9cd28c5595eeaad50731c5b6", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf901fcf901f7a0022df90fbe4b089dfa6b0a879b9787b262ede8171a1170878e0f694e5e13977da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b18395884d55f5dc870bc46e565a5dbdc5659325f66cc457b38bcecb01662f78a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a002832fd800808455d5f39880a03d33c0eb4de9bd8df7f581bef8f2a8e184bac0f7b49f7b8bf567b0599edfdeef88d08ba7d2e8860f81c0c0", + "rlp" : "0xf90262f901f9a0e67fc0e4a3ae602515231903fb7817f2a5e0e8e6f10322735b6d0e2430de32b3a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0327e60bc4804c9286fe24fb28f7489cd12c5f1e11fc6e56aad9ad2971a13cb24a09f8be7a83a918e15462b5d2d6ba6081ccf26c0ff9cd28c5595eeaad50731c5b6a0ca0d8c2843163f5f0af8080df9da6fd48fd591ba4af83d649351fb75df2426aab9010000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000040000000000000000000000000000000000000000000000000000000830386a002832fefd882560b845627cbf380a03b79b768d897da6d14050827c67259958406017898b42371442ca0d65fe81d0288d432d8d4a640adc1f863f861010a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821b58801ba09a8de6a47a001e6311dd9ef852dc5b5f07e2c7da872d1b5de65014c999ca5690a069bb12762ab448693e12ad4bee02854b8eb510a85aa165b53d4ed40efc7483aec0", "transactions" : [ + { + "data" : "0x", + "gasLimit" : "0xc350", + "gasPrice" : "0x0a", + "nonce" : "0x01", + "r" : "0x9a8de6a47a001e6311dd9ef852dc5b5f07e2c7da872d1b5de65014c999ca5690", + "s" : "0x69bb12762ab448693e12ad4bee02854b8eb510a85aa165b53d4ed40efc7483ae", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "v" : "0x1b", + "value" : "0x1b58" + } ], "uncleHeaders" : [ ] @@ -1609,9 +1414,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "29b2b142238c3820d4ede0193cf4bf11c7a242c38074e1820d410f54f219cc50", - "mixHash" : "c3fa7245f0b834661ee019eb3d5c93b1b0feefed21ac808b714e846c4b0f0eb2", - "nonce" : "8de870f337f9fdee", + "hash" : "2cf8caf29f48c7765399e7acb1bb4b2f0cabc2122eaf23e896fe26073d6f848d", + "mixHash" : "24056bea37ec94e430d050a9da900c839a7f944f956b224811c021529c02a28f", + "nonce" : "ca0fc3eb54de5974", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1620,27 +1425,27 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0c3fa7245f0b834661ee019eb3d5c93b1b0feefed21ac808b714e846c4b0f0eb2888de870f337f9fdeec0c0", - "lastblockhash" : "5765fc0b211f0686440ad73a8a7b40c2d1bbba1a380755c2fc02ba2fd0ed3920", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a024056bea37ec94e430d050a9da900c839a7f944f956b224811c021529c02a28f88ca0fc3eb54de5974c0c0", + "lastblockhash" : "b3512bff8599823ffa32fbf170e4f70ae6040747e40ad0f9fec66b79af0cc907", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x13ec", + "balance" : "0x2f44", "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600052600060206000a1", "nonce" : "0x00", "storage" : { } }, "8888f1f195afa192cfee860698584c030f4c9db1" : { - "balance" : "0x8ac7230489eb5c6e", + "balance" : "0x8ac7230489eeb8dc", "code" : "0x", "nonce" : "0x00", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x174873780a", + "balance" : "0x1748700044", "code" : "0x", - "nonce" : "0x01", + "nonce" : "0x02", "storage" : { } } @@ -1670,30 +1475,30 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x038630", "extraData" : "0x", - "gasLimit" : "0x2fe3de", + "gasLimit" : "0x2fefd8", "gasUsed" : "0x560b", - "hash" : "32e292b358e8af8d64ff76b578c54498b589c0796110fce0208ea7b9bac8c823", - "mixHash" : "662a7e387a457a9ea534c61809c9b2179a939aeb7b2f43ee99cb79e3acd0a892", - "nonce" : "4b4187434fff8ace", + "hash" : "6d447adf912d2188ddbb3e39663e65ac9612a119fa533e88857072f6afa5ac60", + "mixHash" : "5b7cec43784479d7aae8c94a389ec335a15a4b0f9c64d9981d86bab1220d101a", + "nonce" : "d6bfc7b12d586178", "number" : "0x01", - "parentHash" : "32a200899b03f628f35544e00bf4df519224e7a2b0bdf4ec17cf49e79d6aba23", + "parentHash" : "cea8f0500e09c51d6ab6f36640f100b23bbb45df93bf67968dbe47d598747da5", "receiptTrie" : "5e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26", "stateRoot" : "201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914", - "timestamp" : "0x55d5f3a4", - "transactionsTrie" : "c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7", + "timestamp" : "0x5627cc01", + "transactionsTrie" : "433c1337d758715161ae6470e165bb4572adfb0b21d88e894c1118ef92b1d4e6", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90262f901f9a032a200899b03f628f35544e00bf4df519224e7a2b0bdf4ec17cf49e79d6aba23a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008303863001832fe3de82560b8455d5f3a480a0662a7e387a457a9ea534c61809c9b2179a939aeb7b2f43ee99cb79e3acd0a892884b4187434fff8acef863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0", + "rlp" : "0xf90262f901f9a0cea8f0500e09c51d6ab6f36640f100b23bbb45df93bf67968dbe47d598747da5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0433c1337d758715161ae6470e165bb4572adfb0b21d88e894c1118ef92b1d4e6a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008303863001832fefd882560b845627cc0180a05b7cec43784479d7aae8c94a389ec335a15a4b0f9c64d9981d86bab1220d101a88d6bfc7b12d586178f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca0fec8ded5ac9eda6a242dd1e44cf72c7a0d245070a0906cb10d024874e469af90a042a4837313491d438f013af04c85a0b583d94dd8041fce3c0b28ebd4efd3417cc0", "transactions" : [ { "data" : "0x", "gasLimit" : "0xc350", "gasPrice" : "0x0a", "nonce" : "0x00", - "r" : "0x149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393", - "s" : "0x3cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36", + "r" : "0xfec8ded5ac9eda6a242dd1e44cf72c7a0d245070a0906cb10d024874e469af90", + "s" : "0x42a4837313491d438f013af04c85a0b583d94dd8041fce3c0b28ebd4efd3417c", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1b", + "v" : "0x1c", "value" : "0x1388" } ], @@ -1706,20 +1511,20 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x0385c0", "extraData" : "0x", - "gasLimit" : "0x2fd800", + "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "ce62a266c155dbb5a54d1751eff2157eb4aaf30cec6ba4fada794064be5f3c4c", - "mixHash" : "47fdbc9960f9e8ac28228008b70eae19c80df8f091df7a2f99f423c458f7cd2a", - "nonce" : "1d8e8adcf90009c6", + "hash" : "60ab873e63ba139021216c4f10d2656eb7106d4f53626536ffc4186f6e59b8f7", + "mixHash" : "dea40a257fd67c19ea71060f09c014d1831b3b0de7cb2a3a80c52663d45fe633", + "nonce" : "3e4af4544bc6d146", "number" : "0x02", - "parentHash" : "32e292b358e8af8d64ff76b578c54498b589c0796110fce0208ea7b9bac8c823", + "parentHash" : "6d447adf912d2188ddbb3e39663e65ac9612a119fa533e88857072f6afa5ac60", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "b18395884d55f5dc870bc46e565a5dbdc5659325f66cc457b38bcecb01662f78", - "timestamp" : "0x55d5f3b1", + "timestamp" : "0x5627cc0e", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf901fcf901f7a032e292b358e8af8d64ff76b578c54498b589c0796110fce0208ea7b9bac8c823a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b18395884d55f5dc870bc46e565a5dbdc5659325f66cc457b38bcecb01662f78a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830385c002832fd800808455d5f3b180a047fdbc9960f9e8ac28228008b70eae19c80df8f091df7a2f99f423c458f7cd2a881d8e8adcf90009c6c0c0", + "rlp" : "0xf901fcf901f7a06d447adf912d2188ddbb3e39663e65ac9612a119fa533e88857072f6afa5ac60a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b18395884d55f5dc870bc46e565a5dbdc5659325f66cc457b38bcecb01662f78a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830385c002832fefd880845627cc0e80a0dea40a257fd67c19ea71060f09c014d1831b3b0de7cb2a3a80c52663d45fe633883e4af4544bc6d146c0c0", "transactions" : [ ], "uncleHeaders" : [ @@ -1733,9 +1538,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "32a200899b03f628f35544e00bf4df519224e7a2b0bdf4ec17cf49e79d6aba23", - "mixHash" : "888f553018e58e19b120c7a23bd9257ce0a5e47674dde39ff5cdc879f1cd89bd", - "nonce" : "f5b845e1ecbbcc28", + "hash" : "cea8f0500e09c51d6ab6f36640f100b23bbb45df93bf67968dbe47d598747da5", + "mixHash" : "9c878c7c5bb9f4f1bdaad33df5b9db33c076fcf0fffa2dc3559425a08efcce93", + "nonce" : "1dd25a779d4b1c9f", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1744,8 +1549,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0888f553018e58e19b120c7a23bd9257ce0a5e47674dde39ff5cdc879f1cd89bd88f5b845e1ecbbcc28c0c0", - "lastblockhash" : "ce62a266c155dbb5a54d1751eff2157eb4aaf30cec6ba4fada794064be5f3c4c", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a09c878c7c5bb9f4f1bdaad33df5b9db33c076fcf0fffa2dc3559425a08efcce93881dd25a779d4b1c9fc0c0", + "lastblockhash" : "60ab873e63ba139021216c4f10d2656eb7106d4f53626536ffc4186f6e59b8f7", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x13ec", @@ -1794,28 +1599,28 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x038630", "extraData" : "0x", - "gasLimit" : "0x2fe3de", + "gasLimit" : "0x2fefd8", "gasUsed" : "0x560b", - "hash" : "844baa5fea0b9e184029509c7f0ecdcc88cdd4afa2eb16f47c6e17693228a8d4", - "mixHash" : "0132a62f6f12967c7dd21b6293422880c6972a2e4949265d4ad1b7d8cf242990", - "nonce" : "7e0dac58cdfdcb85", + "hash" : "7ba794fab718b2da8311d8aca118f9063bf22b2d5d78c4bc281ce982f05b7f3f", + "mixHash" : "737b28e11b54335571a875566abf622aec6f03e54512ae7d3cd343f1f783a868", + "nonce" : "fb3f8be1f031b97a", "number" : "0x01", - "parentHash" : "6aab9fc348a1137614fd7493bffd8069faf8623440bf2669f3b3e1b6739d122b", + "parentHash" : "78bff09d8cfa41eda4b7a988e43f4830497eecec0e2ccb2732f1db38bb39ec26", "receiptTrie" : "5e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26", "stateRoot" : "201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914", - "timestamp" : "0x55d5f3b6", - "transactionsTrie" : "c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7", + "timestamp" : "0x5627cc25", + "transactionsTrie" : "e275e5d68ab361e959d7d24a3203d3df3259f3d172ab1916a31fd9c7811e6250", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90262f901f9a06aab9fc348a1137614fd7493bffd8069faf8623440bf2669f3b3e1b6739d122ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0c590d5598e571c0acebad12175f241738803400f57cfb272e595999dbbfd08d7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008303863001832fe3de82560b8455d5f3b680a00132a62f6f12967c7dd21b6293422880c6972a2e4949265d4ad1b7d8cf242990887e0dac58cdfdcb85f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393a03cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36c0", + "rlp" : "0xf90262f901f9a078bff09d8cfa41eda4b7a988e43f4830497eecec0e2ccb2732f1db38bb39ec26a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0201eacb02252d150f7f1a1dc2440f7fab2f468329953051836f81bae65e26914a0e275e5d68ab361e959d7d24a3203d3df3259f3d172ab1916a31fd9c7811e6250a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008303863001832fefd882560b845627cc2580a0737b28e11b54335571a875566abf622aec6f03e54512ae7d3cd343f1f783a86888fb3f8be1f031b97af863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0adf84a246115ccf74ddb896994b5d073126242ff16a185491b6efde0f7b64804a06416371d2e658aad34cc31e3ce9313b7205427ca02faf6ffb8f8010a97a71254c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0xc350", "gasPrice" : "0x0a", "nonce" : "0x00", - "r" : "0x149dedccf5d524176aa17525074acf56f17cd7b472a9860c9d3ec4d87a6d0393", - "s" : "0x3cf6326d11c57d8b558c21c63fc848f8d0b76582060044e8e48d9d0d29054a36", + "r" : "0xadf84a246115ccf74ddb896994b5d073126242ff16a185491b6efde0f7b64804", + "s" : "0x6416371d2e658aad34cc31e3ce9313b7205427ca02faf6ffb8f8010a97a71254", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "v" : "0x1b", "value" : "0x1388" @@ -1830,20 +1635,20 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x0385c0", "extraData" : "0x", - "gasLimit" : "0x2fd800", + "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "8a2f8db544b6d65d1ca99a61a9afea0f7ff97f253ef293adb764fd893298b986", - "mixHash" : "7905c4293448b50ee78be5e43e3cf31950d8743e82c1733b7d0a038f4f8121d5", - "nonce" : "1906d96c17fa4d0b", + "hash" : "1a7582c90ac19360220a4384fb170a2bc117a633f132539af61a6197321cd6c8", + "mixHash" : "4653d985a1391e115b22ed3b421fbbc8f08e1d17ea4431d619c8ae56727cff37", + "nonce" : "478dbde47f93c97c", "number" : "0x02", - "parentHash" : "844baa5fea0b9e184029509c7f0ecdcc88cdd4afa2eb16f47c6e17693228a8d4", + "parentHash" : "7ba794fab718b2da8311d8aca118f9063bf22b2d5d78c4bc281ce982f05b7f3f", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "b18395884d55f5dc870bc46e565a5dbdc5659325f66cc457b38bcecb01662f78", - "timestamp" : "0x55d5f3c4", + "timestamp" : "0x5627cc33", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf901fcf901f7a0844baa5fea0b9e184029509c7f0ecdcc88cdd4afa2eb16f47c6e17693228a8d4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b18395884d55f5dc870bc46e565a5dbdc5659325f66cc457b38bcecb01662f78a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830385c002832fd800808455d5f3c480a07905c4293448b50ee78be5e43e3cf31950d8743e82c1733b7d0a038f4f8121d5881906d96c17fa4d0bc0c0", + "rlp" : "0xf901fcf901f7a07ba794fab718b2da8311d8aca118f9063bf22b2d5d78c4bc281ce982f05b7f3fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b18395884d55f5dc870bc46e565a5dbdc5659325f66cc457b38bcecb01662f78a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830385c002832fefd880845627cc3380a04653d985a1391e115b22ed3b421fbbc8f08e1d17ea4431d619c8ae56727cff3788478dbde47f93c97cc0c0", "transactions" : [ ], "uncleHeaders" : [ @@ -1857,9 +1662,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "6aab9fc348a1137614fd7493bffd8069faf8623440bf2669f3b3e1b6739d122b", - "mixHash" : "7df1f98666a1a1530a41bdc26363e97d6654bb20824c17bc9f0e53163ca6d655", - "nonce" : "94892f238c65f5dd", + "hash" : "78bff09d8cfa41eda4b7a988e43f4830497eecec0e2ccb2732f1db38bb39ec26", + "mixHash" : "379b99edf77b5cb80a316df0bbe68d2f4c92d08c6cadfb7635638271bfbc4ffe", + "nonce" : "f4ef3f4029439fcb", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1868,8 +1673,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a07df1f98666a1a1530a41bdc26363e97d6654bb20824c17bc9f0e53163ca6d6558894892f238c65f5ddc0c0", - "lastblockhash" : "8a2f8db544b6d65d1ca99a61a9afea0f7ff97f253ef293adb764fd893298b986", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830386a080832fefd8808454c98c8142a0379b99edf77b5cb80a316df0bbe68d2f4c92d08c6cadfb7635638271bfbc4ffe88f4ef3f4029439fcbc0c0", + "lastblockhash" : "1a7582c90ac19360220a4384fb170a2bc117a633f132539af61a6197321cd6c8", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x13ec", @@ -1918,30 +1723,30 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x020000", "extraData" : "0x", - "gasLimit" : "0x2fe3de", + "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "ed9d2f59e63cdd914799f58ba90cfd88e74fb6cfce9f0471e65ab387edca0186", - "mixHash" : "7f2b44632d02c094801cc87f5a4c3b046df84b2560490e387d73e0d03c1cee02", - "nonce" : "c91331bc23d7928d", + "hash" : "266a3fbd1d5d810c4ec3bb0a22d46ad44c1549796e361c7ddf9e9de35ba5c331", + "mixHash" : "9395dc2890bae3f3945d95486dc18275996bb98a3a9c2d5f741060887de573f0", + "nonce" : "212b15035fee4fe3", "number" : "0x01", - "parentHash" : "aa26c99940f2c9da1900dd7c8fc3734691572d7f9f323644d8666217bde3cd42", + "parentHash" : "98cd6a1c706bba09fff17938a4744925604e7229732d4d07d2297884fc767d4c", "receiptTrie" : "e13e6a83dd076e2589464165628f05caf91a7c54975779549344656b17a89962", "stateRoot" : "ae2d2b287506883322f1c2dae3015b4f2a393332eb0f0aacf11750175ee1ef53", - "timestamp" : "0x55d5f3cf", - "transactionsTrie" : "498785da562aa0c5dd5937cf15f22139b0b1bcf3b4fc48986e1bb1dae9292796", + "timestamp" : "0x5627cc43", + "transactionsTrie" : "42e9e30e5944d7094b5181ecbf6b69bd0f6a36d509a4e6b0e2a73b6f0194ab5a", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90265f901f9a0aa26c99940f2c9da1900dd7c8fc3734691572d7f9f323644d8666217bde3cd42a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ae2d2b287506883322f1c2dae3015b4f2a393332eb0f0aacf11750175ee1ef53a0498785da562aa0c5dd5937cf15f22139b0b1bcf3b4fc48986e1bb1dae9292796a0e13e6a83dd076e2589464165628f05caf91a7c54975779549344656b17a89962b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fe3de8252088455d5f3cf80a07f2b44632d02c094801cc87f5a4c3b046df84b2560490e387d73e0d03c1cee0288c91331bc23d7928df866f864800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d8785012a05f200801ca0ee0b9ec878fbd4258a9473199d8ecc32996a20c323c004e79e0cda20e0418ce3a04e6bc63927d1510bab54f37e46fa036faf4b2c465d271920d9afea1fadf7bd21c0", + "rlp" : "0xf90265f901f9a098cd6a1c706bba09fff17938a4744925604e7229732d4d07d2297884fc767d4ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ae2d2b287506883322f1c2dae3015b4f2a393332eb0f0aacf11750175ee1ef53a042e9e30e5944d7094b5181ecbf6b69bd0f6a36d509a4e6b0e2a73b6f0194ab5aa0e13e6a83dd076e2589464165628f05caf91a7c54975779549344656b17a89962b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845627cc4380a09395dc2890bae3f3945d95486dc18275996bb98a3a9c2d5f741060887de573f088212b15035fee4fe3f866f864800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d8785012a05f200801ba0eb5fd24c579eacd0f5ba952b326101c6bb75674eeee3eca98c8e142bdc3c32c3a0bad27100b2773c74b767112b26e58fb21a7b6fc550a590daefbf37ff9d9f5777c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0xc350", "gasPrice" : "0x0a", "nonce" : "0x00", - "r" : "0xee0b9ec878fbd4258a9473199d8ecc32996a20c323c004e79e0cda20e0418ce3", - "s" : "0x4e6bc63927d1510bab54f37e46fa036faf4b2c465d271920d9afea1fadf7bd21", + "r" : "0xeb5fd24c579eacd0f5ba952b326101c6bb75674eeee3eca98c8e142bdc3c32c3", + "s" : "0xbad27100b2773c74b767112b26e58fb21a7b6fc550a590daefbf37ff9d9f5777", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1c", + "v" : "0x1b", "value" : "0x012a05f200" } ], @@ -1956,9 +1761,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "aa26c99940f2c9da1900dd7c8fc3734691572d7f9f323644d8666217bde3cd42", - "mixHash" : "e7fc98b9e9f997750f11975832e15a84aca2f6c01f81e96e0a3bc1535b17aac6", - "nonce" : "5cbb7f6f582ab25c", + "hash" : "98cd6a1c706bba09fff17938a4744925604e7229732d4d07d2297884fc767d4c", + "mixHash" : "e309a7a318927fd92c2590c38b49da7876d1ed900b44df42da753d99a1b39d75", + "nonce" : "2fefead2571dcfb2", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1967,8 +1772,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0e7fc98b9e9f997750f11975832e15a84aca2f6c01f81e96e0a3bc1535b17aac6885cbb7f6f582ab25cc0c0", - "lastblockhash" : "ed9d2f59e63cdd914799f58ba90cfd88e74fb6cfce9f0471e65ab387edca0186", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0e309a7a318927fd92c2590c38b49da7876d1ed900b44df42da753d99a1b39d75882fefead2571dcfb2c0c0", + "lastblockhash" : "266a3fbd1d5d810c4ec3bb0a22d46ad44c1549796e361c7ddf9e9de35ba5c331", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x012a05f200", @@ -2010,30 +1815,30 @@ "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", "difficulty" : "0x020000", "extraData" : "0x", - "gasLimit" : "0x2fe3de", + "gasLimit" : "0x2fefd8", "gasUsed" : "0x5208", - "hash" : "094eb118175f79f80fdbc3140d379e0c0b04bef7cd285ea61a1184a8201f5a1f", - "mixHash" : "c3af16a9ee71f47e48ed294aab34d26141e9b3badbf537f42afba78e73e485fd", - "nonce" : "2d1073468aa45fcc", + "hash" : "6f3f44f1a1d12a94e643fddc5383d3ef6fe6d7cab5261de60c76cd396e03c90d", + "mixHash" : "38d6e55c21507ca0532b7be1bc57464047969f9180912ea41bbd61382c1a0fee", + "nonce" : "1b0cd7abc36fea8d", "number" : "0x01", - "parentHash" : "4460b49f668be62df7cfb79e680a532688a1ea2b84f31e7c5cfca612871efef8", + "parentHash" : "620afb5e22f27df8de99ef45ff646d7cbf7467aa1bff9f447cd1c2d7ad3e07a5", "receiptTrie" : "67bf4b6c7db8be32886532357198d3a32f204c9001b0980747ab8fa9e937e1a2", "stateRoot" : "f0f9da9e88dbc17e483569ef49113473ac1d0fef5f63a3b2564b2c1ee8898ab0", - "timestamp" : "0x55d5f3d7", - "transactionsTrie" : "2e4a44bb8e3ee134ec210f7f92c1138ad2e3c29f19a821fd17f262254cd15840", + "timestamp" : "0x5627cc48", + "transactionsTrie" : "1213124ef0d90d50b5ed17263961b882cbbc53d407aad89a3625a108cf26c43b", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "rlp" : "0xf90265f901f9a04460b49f668be62df7cfb79e680a532688a1ea2b84f31e7c5cfca612871efef8a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f0f9da9e88dbc17e483569ef49113473ac1d0fef5f63a3b2564b2c1ee8898ab0a02e4a44bb8e3ee134ec210f7f92c1138ad2e3c29f19a821fd17f262254cd15840a067bf4b6c7db8be32886532357198d3a32f204c9001b0980747ab8fa9e937e1a2b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fe3de8252088455d5f3d780a0c3af16a9ee71f47e48ed294aab34d26141e9b3badbf537f42afba78e73e485fd882d1073468aa45fccf866f864800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d878501dcd65000801ba0ebb726ae53468a164a482cd9e3a5a23607185985c93b922e3be620b04b30e9bda0047360f7f081043ccb735c9fa5c20fc4ecba55ceca57bf96f4d7686371af0dc9c0", + "rlp" : "0xf90265f901f9a0620afb5e22f27df8de99ef45ff646d7cbf7467aa1bff9f447cd1c2d7ad3e07a5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f0f9da9e88dbc17e483569ef49113473ac1d0fef5f63a3b2564b2c1ee8898ab0a01213124ef0d90d50b5ed17263961b882cbbc53d407aad89a3625a108cf26c43ba067bf4b6c7db8be32886532357198d3a32f204c9001b0980747ab8fa9e937e1a2b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845627cc4880a038d6e55c21507ca0532b7be1bc57464047969f9180912ea41bbd61382c1a0fee881b0cd7abc36fea8df866f864800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d878501dcd65000801ca089f470926de93f4df2866c330fabd444b11d395b7416055f28b9ed7bb47cb20ba0cb1ed01bcac5e6b87854eed8acc200dc390d620468a640711fdc1eaea5c38908c0", "transactions" : [ { "data" : "0x", "gasLimit" : "0xc350", "gasPrice" : "0x0a", "nonce" : "0x00", - "r" : "0xebb726ae53468a164a482cd9e3a5a23607185985c93b922e3be620b04b30e9bd", - "s" : "0x047360f7f081043ccb735c9fa5c20fc4ecba55ceca57bf96f4d7686371af0dc9", + "r" : "0x89f470926de93f4df2866c330fabd444b11d395b7416055f28b9ed7bb47cb20b", + "s" : "0xcb1ed01bcac5e6b87854eed8acc200dc390d620468a640711fdc1eaea5c38908", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "v" : "0x1b", + "v" : "0x1c", "value" : "0x01dcd65000" } ], @@ -2048,9 +1853,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "4460b49f668be62df7cfb79e680a532688a1ea2b84f31e7c5cfca612871efef8", - "mixHash" : "29fc027153197af656eba7187179b7e5e45d6235fe1b26f2e692e084a5c9596d", - "nonce" : "f0b89f070195f820", + "hash" : "620afb5e22f27df8de99ef45ff646d7cbf7467aa1bff9f447cd1c2d7ad3e07a5", + "mixHash" : "af5c45e7b0072b26be8d35186cdc6b6414cee976806127ef3e9e2f0c9d4ae3c0", + "nonce" : "c337188f1608ac83", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -2059,8 +1864,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a029fc027153197af656eba7187179b7e5e45d6235fe1b26f2e692e084a5c9596d88f0b89f070195f820c0c0", - "lastblockhash" : "094eb118175f79f80fdbc3140d379e0c0b04bef7cd285ea61a1184a8201f5a1f", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0af5c45e7b0072b26be8d35186cdc6b6414cee976806127ef3e9e2f0c9d4ae3c088c337188f1608ac83c0c0", + "lastblockhash" : "6f3f44f1a1d12a94e643fddc5383d3ef6fe6d7cab5261de60c76cd396e03c90d", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x01dcd65000", @@ -2094,4 +1899,4 @@ } } } -} +} \ No newline at end of file diff --git a/tests/files/StateTests/stCallCreateCallCodeTest.json b/tests/files/StateTests/stCallCreateCallCodeTest.json index 9f7f73985..47084ff5b 100644 --- a/tests/files/StateTests/stCallCreateCallCodeTest.json +++ b/tests/files/StateTests/stCallCreateCallCodeTest.json @@ -159,7 +159,7 @@ "env" : { "currentCoinbase" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", "currentDifficulty" : "0x02b8feb0", - "currentGasLimit" : "0xffffffffffffffffffffffffffffffff", + "currentGasLimit" : "0xffffffffffffffffffffffffffffffffffff", "currentNumber" : "0x00", "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" @@ -169,7 +169,7 @@ "out" : "0x", "post" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0xffffffffffffffffffffeffffffe7ab0", + "balance" : "0x0fffffffffffffffffffffeffffffe7ab0", "code" : "0x", "nonce" : "0x01", "storage" : { @@ -200,10 +200,10 @@ } } }, - "postStateRoot" : "c2d514dec44ee673a4f694d5c5ae7b9e8d3db4a6f288175fd4d3033509b7569e", + "postStateRoot" : "0e28b14b17542dc03eb8e0397c1c658947420a9d95fc96ca2926a38620d593aa", "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0xffffffffffffffffffffffffffffffff", + "balance" : "0x0fffffffffffffffffffffffffffffffff", "code" : "0x", "nonce" : "0x00", "storage" : { @@ -226,7 +226,7 @@ }, "transaction" : { "data" : "", - "gasLimit" : "0xfffffffffffffffffffffffffffffff", + "gasLimit" : "0xffffffffffffffffffffffffffffffff", "gasPrice" : "0x01", "nonce" : "0x00", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", diff --git a/tests/files/StateTests/stPreCompiledContracts.json b/tests/files/StateTests/stPreCompiledContracts.json index 1db3db63f..7af011873 100644 --- a/tests/files/StateTests/stPreCompiledContracts.json +++ b/tests/files/StateTests/stPreCompiledContracts.json @@ -3569,77 +3569,6 @@ "value" : "0x0186a0" } }, - "CallEcrecoverPointAtInfinity" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "0x0100", - "currentGasLimit" : "0x989680", - "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "logs" : [ - ], - "out" : "0x", - "post" : { - "0000000000000000000000000000000000000001" : { - "balance" : "0x00", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - }, - "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x0132b3a0", - "code" : "0x7f3030303030303030303030303030303030303030303030303030303030303030600052601b6020527f54934de9c6d574e3c3483b14fe14aa7d804f8aaf2c6e925b2dbcf4f5ea418bb66040527ff66053ef25bc2fc9583d5ecaaf454a5746c3b2ee74ee6c2ef5998355baf6e113606052602060806080600060006001620493e0f160025560a060020a608051066000556000543214600155", - "nonce" : "0x00", - "storage" : { - "0x00" : "0x00", - "0x02" : "0x01" - } - }, - "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "0x13570", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0xde0b6b3a76143f0", - "code" : "0x", - "nonce" : "0x01", - "storage" : { - } - } - }, - "postStateRoot" : "01db8d537ef9c4105f8bdcf498f91d27afab98ebd33970cae678a29d613bfe97", - "pre" : { - "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x01312d00", - "code" : "0x7f3030303030303030303030303030303030303030303030303030303030303030600052601b6020527f54934de9c6d574e3c3483b14fe14aa7d804f8aaf2c6e925b2dbcf4f5ea418bb66040527ff66053ef25bc2fc9583d5ecaaf454a5746c3b2ee74ee6c2ef5998355baf6e113606052602060806080600060006001620493e0f160025560a060020a608051066000556000543214600155", - "nonce" : "0x00", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x0de0b6b3a7640000", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - } - }, - "transaction" : { - "data" : "", - "gasLimit" : "0x37ba90", - "gasPrice" : "0x01", - "nonce" : "0x00", - "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "0x0186a0" - } - }, "CallEcrecoverR_prefixed0" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -5852,4 +5781,4 @@ "value" : "0x0186a0" } } -} +} \ No newline at end of file diff --git a/tests/files/StateTests/stRefundTest.json b/tests/files/StateTests/stRefundTest.json index ee92f9610..932fe239f 100644 --- a/tests/files/StateTests/stRefundTest.json +++ b/tests/files/StateTests/stRefundTest.json @@ -813,78 +813,6 @@ "value" : "0x0a" } }, - "refund_multiple_internal_call_plus_suicide" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "0x0100", - "currentGasLimit" : "0x989680", - "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "logs" : [ - ], - "out" : "0x", - "post" : { - "aaae7baea6a6c7c4c2dfeb977efac326af552aaa" : { - "balance" : "0x0de0b6b3a7640000", - "code" : "0x73095e7baea6a6c7c4c2dfeb977efac326af552d87ff", - "nonce" : "0x00", - "storage" : { - "0x01" : "0x01" - } - }, - "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "0x2d1a1", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0xde0b6a99d572455", - "code" : "0x", - "nonce" : "0x02", - "storage" : { - } - } - }, - "postStateRoot" : "37c66597ede8e84f30922a801be6c54cf985c984352becfd20deb5814598998d", - "pre" : { - "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x", - "code" : "0x60606040526000357c010000000000000000000000000000000000000000000000000000000090048063c6542cdb14610044578063f8b0a0701461005157610042565b005b61004f600450610079565b005b61005c60045061005e565b005b3373ffffffffffffffffffffffffffffffffffffffff16ff5b565b60006000309150600090505b600a8160ff1610156100bc578060ff16600060005082600a81101561000257909001600050819055505b8080600101915050610085565b8173ffffffffffffffffffffffffffffffffffffffff1663f8b0a070604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506000604051808303816000876161da5a03f115610002575050508173ffffffffffffffffffffffffffffffffffffffff1663f8b0a070604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506000604051808303816000876161da5a03f115610002575050508173ffffffffffffffffffffffffffffffffffffffff1663f8b0a070604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506000604051808303816000876161da5a03f115610002575050508173ffffffffffffffffffffffffffffffffffffffff1663f8b0a070604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506000604051808303816000876161da5a03f115610002575050505b505056", - "nonce" : "0x00", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x0de0b6b3a7640000", - "code" : "0x", - "nonce" : "0x01", - "storage" : { - } - }, - "aaae7baea6a6c7c4c2dfeb977efac326af552aaa" : { - "balance" : "0x0de0b6b3a7640000", - "code" : "0x73095e7baea6a6c7c4c2dfeb977efac326af552d87ff", - "nonce" : "0x00", - "storage" : { - "0x01" : "0x01" - } - } - }, - "transaction" : { - "data" : "0xc6542cdb", - "gasLimit" : "0x989680", - "gasPrice" : "0x01", - "nonce" : "0x01", - "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "0x0a0a0a0a0a" - } - }, - "refund_NoOOG_1" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -1266,4 +1194,4 @@ "value" : "0x0a" } } -} +} \ No newline at end of file diff --git a/tests/files/StateTests/stSpecialTest.json b/tests/files/StateTests/stSpecialTest.json index 2c3db09ef..f9e8c49d2 100644 --- a/tests/files/StateTests/stSpecialTest.json +++ b/tests/files/StateTests/stSpecialTest.json @@ -226,6 +226,61 @@ "value" : "0x01f5" } }, + "StackDepthLimitSEC" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x600060006000600060003060405a03f1", + "post" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "0x69e8", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "balance" : "0x0a", + "code" : "0x600060006000600060003060405a03f1", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x05f5770e", + "code" : "0x", + "nonce" : "0x01", + "storage" : { + } + } + }, + "postStateRoot" : "00056a5cf74634e496d1eba26e3a027b0d2c679333b923053fad7918e882c9aa", + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x05f5e100", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + }, + "transaction" : { + "data" : "305032503350600460006000396000515060046000600037600051506f600060006000600060003060405a03f160005260106010f3", + "gasLimit" : "0x0f4240", + "gasPrice" : "0x01", + "nonce" : "0x00", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "", + "value" : "0x0a" + } + }, "block504980" : { "env" : { "currentCoinbase" : "1cdc8315bdb1362de8b7b2fa9ee75dc873037179", @@ -922,4 +977,4 @@ "value" : "0x0186a0" } } -} +} \ No newline at end of file diff --git a/tests/files/StateTests/stSystemOperationsTest.json b/tests/files/StateTests/stSystemOperationsTest.json index 94ca013e3..7f7cb1220 100644 --- a/tests/files/StateTests/stSystemOperationsTest.json +++ b/tests/files/StateTests/stSystemOperationsTest.json @@ -18676,61 +18676,6 @@ "value" : "0x0186a0" } }, - "suicideSendEtherPostDeath" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "0x0100", - "currentGasLimit" : "0x989680", - "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "logs" : [ - ], - "out" : "0x0000000000000000000000000000000000000000000000000000000000000000", - "post" : { - "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "0x2aa8", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x0de0b6b3a7624eb8", - "code" : "0x", - "nonce" : "0x01", - "storage" : { - } - } - }, - "postStateRoot" : "9f3c63ff818c14e4b56e5fa1fc03a76725f598bcac256668185ec51dfc1d7f5f", - "pre" : { - "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0x0de0b6b3a7640000", - "code" : "0x60606040526000357c01000000000000000000000000000000000000000000000000000000009004806335f46994146100445780634d536fe31461005157610042565b005b61004f600450610072565b005b61005c60045061008d565b6040518082815260200191505060405180910390f35b3073ffffffffffffffffffffffffffffffffffffffff16ff5b565b600060003073ffffffffffffffffffffffffffffffffffffffff166335f46994604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506000604051808303816000876161da5a03f115610002575050503073ffffffffffffffffffffffffffffffffffffffff163190503373ffffffffffffffffffffffffffffffffffffffff16600082604051809050600060405180830381858888f1935050505050809150610147565b509056", - "nonce" : "0x00", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "0x0de0b6b3a7640000", - "code" : "0x", - "nonce" : "0x00", - "storage" : { - } - } - }, - "transaction" : { - "data" : "0x4d536fe3", - "gasLimit" : "0x2dc6c0", - "gasPrice" : "0x01", - "nonce" : "0x00", - "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "0x0186a0" - } - }, "suicideSendEtherToMe" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", diff --git a/tests/files/VMTests/vmBitwiseLogicOperationTest.json b/tests/files/VMTests/vmBitwiseLogicOperationTest.json index 65539c8cb..72a7204d1 100644 --- a/tests/files/VMTests/vmBitwiseLogicOperationTest.json +++ b/tests/files/VMTests/vmBitwiseLogicOperationTest.json @@ -7,8 +7,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -52,8 +51,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -96,8 +94,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -141,8 +138,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -186,8 +182,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -231,8 +226,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -276,8 +270,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -321,8 +314,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -366,8 +358,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -410,8 +401,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -454,8 +444,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -499,8 +488,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -544,8 +532,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -589,8 +576,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -634,8 +620,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -679,8 +664,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -724,8 +708,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -768,8 +751,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -812,8 +794,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -856,8 +837,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -901,8 +881,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -946,8 +925,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -991,8 +969,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1035,8 +1012,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1080,8 +1056,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1124,8 +1099,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1169,8 +1143,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1214,8 +1187,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1259,8 +1231,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1303,8 +1274,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1348,8 +1318,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1392,8 +1361,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1437,8 +1405,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1482,8 +1449,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1526,8 +1492,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1570,8 +1535,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1614,8 +1578,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1658,8 +1621,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1703,8 +1665,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1748,8 +1709,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1793,8 +1753,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1838,8 +1797,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1883,8 +1841,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1928,8 +1885,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1973,8 +1929,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2017,8 +1972,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2062,8 +2016,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2106,8 +2059,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2151,8 +2103,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2195,8 +2146,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2240,8 +2190,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2284,8 +2233,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2329,8 +2277,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2373,8 +2320,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2418,8 +2364,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2462,8 +2407,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2507,8 +2451,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2552,8 +2495,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2597,8 +2539,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2642,8 +2583,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", diff --git a/tests/files/VMTests/vmBlockInfoTest.json b/tests/files/VMTests/vmBlockInfoTest.json index f10990b4d..dce899f6f 100644 --- a/tests/files/VMTests/vmBlockInfoTest.json +++ b/tests/files/VMTests/vmBlockInfoTest.json @@ -7,8 +7,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x0101", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -51,8 +50,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x0102", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -95,8 +93,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x0101", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -142,8 +139,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x01", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -186,8 +182,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x01", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -230,8 +225,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x0101", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -272,8 +266,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x01", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -303,8 +296,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -348,8 +340,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -393,8 +384,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -438,8 +428,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x01", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -483,8 +472,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", diff --git a/tests/files/VMTests/vmEnvironmentalInfoTest.json b/tests/files/VMTests/vmEnvironmentalInfoTest.json index c838f02aa..567b20ea0 100644 --- a/tests/files/VMTests/vmEnvironmentalInfoTest.json +++ b/tests/files/VMTests/vmEnvironmentalInfoTest.json @@ -7,8 +7,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -52,8 +51,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -103,8 +101,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -148,8 +145,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "cd1722f3947def4cf144679da39c4c32bdc35681", @@ -193,8 +189,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -244,8 +239,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -303,8 +297,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -348,8 +341,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -400,8 +392,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -451,8 +442,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -496,8 +486,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -547,8 +536,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -599,8 +587,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -644,8 +631,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -689,8 +675,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -734,8 +719,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -786,8 +770,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -830,8 +813,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -872,8 +854,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -909,8 +890,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -953,8 +933,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -997,8 +976,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1041,8 +1019,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1085,8 +1062,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1129,8 +1105,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1173,8 +1148,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1218,8 +1192,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1263,8 +1236,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1308,8 +1280,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1353,8 +1324,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1397,8 +1367,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1442,8 +1411,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1486,8 +1454,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1531,8 +1498,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1576,8 +1542,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1621,8 +1586,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1666,8 +1630,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1711,8 +1674,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1756,8 +1718,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1800,8 +1761,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1844,8 +1804,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1901,8 +1860,7 @@ "currentDifficulty" : "0x0dd24211", "currentGasLimit" : "0x98968d", "currentNumber" : "0x145b", - "currentTimestamp" : "0x2a", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x2a" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1938,8 +1896,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1997,8 +1954,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2056,8 +2012,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2121,8 +2076,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2179,8 +2133,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2223,8 +2176,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2282,8 +2234,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "cd1722f3947def4cf144679da39c4c32bdc35681", @@ -2339,8 +2290,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2377,8 +2327,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2422,8 +2371,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", diff --git a/tests/files/VMTests/vmIOandFlowOperationsTest.json b/tests/files/VMTests/vmIOandFlowOperationsTest.json index 0eb6a4365..04288672a 100644 --- a/tests/files/VMTests/vmIOandFlowOperationsTest.json +++ b/tests/files/VMTests/vmIOandFlowOperationsTest.json @@ -2184,6 +2184,49 @@ } } }, + "deadCode_1" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x0100", + "currentGasLimit" : "0x0f4240", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6001600053596000f300000000000000005b00", + "data" : "0x", + "gas" : "0x0186a0", + "gasPrice" : "0x5af3107a4000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "0x0de0b6b3a7640000" + }, + "gas" : "0x01868f", + "logs" : [ + ], + "out" : "0x0100000000000000000000000000000000000000000000000000000000000000", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x6001600053596000f300000000000000005b00", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "0x152d02c7e14af6800000", + "code" : "0x6001600053596000f300000000000000005b00", + "nonce" : "0x00", + "storage" : { + } + } + } + }, "dupAt51becameMload" : { "callcreates" : [ ], @@ -3608,7 +3651,7 @@ "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x33604555602d8060106000396000f300604554331415602c575b366080511015602b576020608051013560805135556040608051016080526009565b5b", + "code" : "0x33604555602d80600f6000396000f3604554331415602c575b366080511015602b576020608051013560805135556040608051016080526009565b5b", "data" : "0x", "gas" : "0x0186a0", "gasPrice" : "0x5af3107a4000", @@ -3622,7 +3665,7 @@ "post" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0x152d02c7e14af6800000", - "code" : "0x33604555602d8060106000396000f300604554331415602c575b366080511015602b576020608051013560805135556040608051016080526009565b5b", + "code" : "0x33604555602d80600f6000396000f3604554331415602c575b366080511015602b576020608051013560805135556040608051016080526009565b5b", "nonce" : "0x00", "storage" : { "0x45" : "0xcd1722f3947def4cf144679da39c4c32bdc35681" @@ -3632,7 +3675,7 @@ "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0x152d02c7e14af6800000", - "code" : "0x33604555602d8060106000396000f300604554331415602c575b366080511015602b576020608051013560805135556040608051016080526009565b5b", + "code" : "0x33604555602d80600f6000396000f3604554331415602c575b366080511015602b576020608051013560805135556040608051016080526009565b5b", "nonce" : "0x00", "storage" : { } diff --git a/tests/files/VMTests/vmLogTest.json b/tests/files/VMTests/vmLogTest.json index 024de038f..d2a28abbc 100644 --- a/tests/files/VMTests/vmLogTest.json +++ b/tests/files/VMTests/vmLogTest.json @@ -7,8 +7,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -56,8 +55,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -85,8 +83,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -116,8 +113,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -167,8 +163,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -218,8 +213,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -269,8 +263,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -320,8 +313,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -372,8 +364,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -424,8 +415,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -474,8 +464,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -503,8 +492,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -534,8 +522,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -586,8 +573,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -638,8 +624,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -690,8 +675,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -742,8 +726,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -795,8 +778,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -848,8 +830,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -899,8 +880,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -928,8 +908,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -959,8 +938,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1012,8 +990,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1065,8 +1042,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1118,8 +1094,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1171,8 +1146,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1225,8 +1199,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1279,8 +1252,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1333,8 +1305,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1385,8 +1356,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1414,8 +1384,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1445,8 +1414,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1499,8 +1467,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1553,8 +1520,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1607,8 +1573,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1661,8 +1626,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1705,8 +1669,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1760,8 +1723,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1804,8 +1766,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1857,8 +1818,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1886,8 +1846,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1917,8 +1876,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1972,8 +1930,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2027,8 +1984,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2082,8 +2038,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2137,8 +2092,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", diff --git a/tests/files/VMTests/vmPushDupSwapTest.json b/tests/files/VMTests/vmPushDupSwapTest.json index 41ebe27c9..a6406cbd4 100644 --- a/tests/files/VMTests/vmPushDupSwapTest.json +++ b/tests/files/VMTests/vmPushDupSwapTest.json @@ -7,8 +7,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -52,8 +51,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -97,8 +95,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -142,8 +139,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -187,8 +183,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -232,8 +227,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -277,8 +271,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -322,8 +315,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -367,8 +359,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -410,8 +401,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -441,8 +431,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -486,8 +475,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -531,8 +519,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -576,8 +563,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -621,8 +607,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -666,8 +651,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -711,8 +695,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -756,8 +739,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -801,8 +783,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -846,8 +827,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -891,8 +871,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -936,8 +915,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -981,8 +959,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1026,8 +1003,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1071,8 +1047,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1116,8 +1091,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1161,8 +1135,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1206,8 +1179,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1251,8 +1223,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1295,8 +1266,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1340,8 +1310,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1385,8 +1354,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1430,8 +1398,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1475,8 +1442,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1520,8 +1486,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1565,8 +1530,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1610,8 +1574,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1655,8 +1618,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1700,8 +1662,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1745,8 +1706,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1790,8 +1750,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1835,8 +1794,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1880,8 +1838,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1925,8 +1882,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1970,8 +1926,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2014,8 +1969,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2058,8 +2012,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2102,8 +2055,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2145,8 +2097,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2176,8 +2127,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2221,8 +2171,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2266,8 +2215,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2311,8 +2259,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2356,8 +2303,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2401,8 +2347,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2446,8 +2391,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2491,8 +2435,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2536,8 +2479,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2581,8 +2523,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2626,8 +2567,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2671,8 +2611,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2716,8 +2655,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2761,8 +2699,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2806,8 +2743,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2849,8 +2785,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2880,8 +2815,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2925,8 +2859,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -2970,8 +2903,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -3015,8 +2947,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -3060,8 +2991,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -3105,8 +3035,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -3150,8 +3079,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -3195,8 +3123,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", diff --git a/tests/files/VMTests/vmSha3Test.json b/tests/files/VMTests/vmSha3Test.json index ca958f4ee..471e146b2 100644 --- a/tests/files/VMTests/vmSha3Test.json +++ b/tests/files/VMTests/vmSha3Test.json @@ -7,8 +7,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -52,8 +51,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -97,8 +95,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -140,8 +137,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -169,8 +165,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -198,8 +193,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -227,8 +221,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -256,8 +249,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -287,8 +279,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -330,8 +321,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -361,8 +351,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -406,8 +395,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -451,8 +439,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -496,8 +483,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -541,8 +527,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -586,8 +571,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -631,8 +615,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -676,8 +659,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", diff --git a/tests/files/VMTests/vmSystemOperationsTest.json b/tests/files/VMTests/vmSystemOperationsTest.json index a3a82db77..975f869a0 100644 --- a/tests/files/VMTests/vmSystemOperationsTest.json +++ b/tests/files/VMTests/vmSystemOperationsTest.json @@ -13,8 +13,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -70,8 +69,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -106,8 +104,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -142,8 +139,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -186,8 +182,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -243,8 +238,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -308,8 +302,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -372,8 +365,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -424,8 +416,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -476,8 +467,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -528,8 +518,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -585,8 +574,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -621,8 +609,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -657,8 +644,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -693,8 +679,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -729,8 +714,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -765,8 +749,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -809,8 +792,7 @@ "currentDifficulty" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x02", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x02" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -860,8 +842,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -919,8 +900,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -977,8 +957,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1035,8 +1014,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1086,8 +1064,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1151,8 +1128,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1210,8 +1186,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1269,8 +1244,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1334,8 +1308,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1377,8 +1350,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1406,8 +1378,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1437,8 +1408,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1481,8 +1451,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "cd1722f3947def4cf144679da39c4c32bdc35681", @@ -1526,8 +1495,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "cd1722f3947def4cf144679da39c4c32bdc35681", @@ -1571,8 +1539,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "cd1722f3947def4cf144679da39c4c32bdc35681", @@ -1616,8 +1583,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1667,8 +1633,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -1725,8 +1690,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x989680", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", diff --git a/tests/files/VMTests/vmtests.json b/tests/files/VMTests/vmtests.json index be2a21fe0..c46da6773 100644 --- a/tests/files/VMTests/vmtests.json +++ b/tests/files/VMTests/vmtests.json @@ -5,8 +5,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -34,8 +33,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -63,8 +61,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", @@ -94,8 +91,7 @@ "currentDifficulty" : "0x0100", "currentGasLimit" : "0x0f4240", "currentNumber" : "0x00", - "currentTimestamp" : "0x01", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + "currentTimestamp" : "0x01" }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", -- cgit v1.2.3 From 6b5d077c09e8ba8419dc2aef4320e01cdd8d9dd9 Mon Sep 17 00:00:00 2001 From: zelig Date: Fri, 23 Oct 2015 20:37:12 +0200 Subject: fix console history, lines with leadning whitespace NOT included --- cmd/geth/js.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/geth/js.go b/cmd/geth/js.go index 8ebb04bce..7f7f19d78 100644 --- a/cmd/geth/js.go +++ b/cmd/geth/js.go @@ -439,7 +439,7 @@ func (self *jsre) interactive() { func mustLogInHistory(input string) bool { return len(input) == 0 || passwordRegexp.MatchString(input) || - leadingSpace.MatchString(input) + !leadingSpace.MatchString(input) } func (self *jsre) withHistory(datadir string, op func(*os.File)) { -- cgit v1.2.3 From 3b4ffacd0c63952ceda96b3fafb050c91e72b420 Mon Sep 17 00:00:00 2001 From: caktux Date: Sun, 25 Oct 2015 17:49:01 -0400 Subject: bump VERSION to 1.3.0 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 26aaba0e8..f0bb29e76 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.0 +1.3.0 -- cgit v1.2.3 From 4d005a2c1d2929dc770acd3a2bfed59495c70557 Mon Sep 17 00:00:00 2001 From: zelig Date: Mon, 26 Oct 2015 22:24:09 +0100 Subject: rpc api: eth_getNatSpec * xeth, rpc: implement eth_getNatSpec for tx confirmations * rename silly docserver -> httpclient * eth/backend: httpclient now accessible via eth.Ethereum init-d via config.DocRoot * cmd: introduce separate CLI flag for DocRoot (defaults to homedir) * common/path: delete unused assetpath func, separate HomeDir func --- cmd/geth/js.go | 31 ++++----- cmd/geth/js_test.go | 10 +-- cmd/utils/flags.go | 10 ++- common/docserver/docserver.go | 120 --------------------------------- common/docserver/docserver_test.go | 77 ---------------------- common/httpclient/httpclient.go | 124 +++++++++++++++++++++++++++++++++++ common/httpclient/httpclient_test.go | 77 ++++++++++++++++++++++ common/natspec/natspec.go | 14 ++-- common/natspec/natspec_e2e_test.go | 6 +- common/path.go | 44 ++----------- eth/backend.go | 11 ++++ rpc/api/admin.go | 13 ++-- rpc/api/api_test.go | 8 +-- rpc/api/eth.go | 14 ++++ rpc/api/eth_js.go | 6 ++ rpc/api/utils.go | 5 +- 16 files changed, 285 insertions(+), 285 deletions(-) delete mode 100644 common/docserver/docserver.go delete mode 100644 common/docserver/docserver_test.go create mode 100644 common/httpclient/httpclient.go create mode 100644 common/httpclient/httpclient_test.go diff --git a/cmd/geth/js.go b/cmd/geth/js.go index 7f7f19d78..4d5462539 100644 --- a/cmd/geth/js.go +++ b/cmd/geth/js.go @@ -30,7 +30,6 @@ import ( "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/docserver" "github.com/ethereum/go-ethereum/common/natspec" "github.com/ethereum/go-ethereum/common/registrar" "github.com/ethereum/go-ethereum/eth" @@ -77,8 +76,6 @@ func (r dumbterm) PasswordPrompt(p string) (string, error) { func (r dumbterm) AppendHistory(string) {} type jsre struct { - docRoot string - ds *docserver.DocServer re *re.JSRE ethereum *eth.Ethereum xeth *xeth.XEth @@ -153,7 +150,6 @@ func newLightweightJSRE(docRoot string, client comms.EthereumClient, datadir str js := &jsre{ps1: "> "} js.wait = make(chan *big.Int) js.client = client - js.ds = docserver.New(docRoot) // update state in separare forever blocks js.re = re.New(docRoot) @@ -181,18 +177,17 @@ func newLightweightJSRE(docRoot string, client comms.EthereumClient, datadir str } func newJSRE(ethereum *eth.Ethereum, docRoot, corsDomain string, client comms.EthereumClient, interactive bool, f xeth.Frontend) *jsre { - js := &jsre{ethereum: ethereum, ps1: "> ", docRoot: docRoot} + js := &jsre{ethereum: ethereum, ps1: "> "} // set default cors domain used by startRpc from CLI flag js.corsDomain = corsDomain if f == nil { f = js } - js.ds = docserver.New(docRoot) js.xeth = xeth.New(ethereum, f) js.wait = js.xeth.UpdateState() js.client = client if clt, ok := js.client.(*comms.InProcClient); ok { - if offeredApis, err := api.ParseApiString(shared.AllApis, codec.JSON, js.xeth, ethereum, docRoot); err == nil { + if offeredApis, err := api.ParseApiString(shared.AllApis, codec.JSON, js.xeth, ethereum); err == nil { clt.Initialize(api.Merge(offeredApis...)) } } @@ -248,14 +243,14 @@ func (self *jsre) batch(statement string) { // show summary of current geth instance func (self *jsre) welcome() { self.re.Run(` - (function () { - console.log('instance: ' + web3.version.client); - console.log(' datadir: ' + admin.datadir); - console.log("coinbase: " + eth.coinbase); - var ts = 1000 * eth.getBlock(eth.blockNumber).timestamp; - console.log("at block: " + eth.blockNumber + " (" + new Date(ts) + ")"); - })(); - `) + (function () { + console.log('instance: ' + web3.version.client); + console.log(' datadir: ' + admin.datadir); + console.log("coinbase: " + eth.coinbase); + var ts = 1000 * eth.getBlock(eth.blockNumber).timestamp; + console.log("at block: " + eth.blockNumber + " (" + new Date(ts) + ")"); + })(); + `) if modules, err := self.supportedApis(); err == nil { loadedModules := make([]string, 0) for api, version := range modules { @@ -281,7 +276,7 @@ func (js *jsre) apiBindings(f xeth.Frontend) error { apiNames = append(apiNames, a) } - apiImpl, err := api.ParseApiString(strings.Join(apiNames, ","), codec.JSON, js.xeth, js.ethereum, js.docRoot) + apiImpl, err := api.ParseApiString(strings.Join(apiNames, ","), codec.JSON, js.xeth, js.ethereum) if err != nil { utils.Fatalf("Unable to determine supported api's: %v", err) } @@ -334,7 +329,7 @@ func (js *jsre) apiBindings(f xeth.Frontend) error { utils.Fatalf("Error setting namespaces: %v", err) } - js.re.Run(`var GlobalRegistrar = eth.contract(` + registrar.GlobalRegistrarAbi + `); registrar = GlobalRegistrar.at("` + registrar.GlobalRegistrarAddr + `");`) + js.re.Run(`var GlobalRegistrar = eth.contract(` + registrar.GlobalRegistrarAbi + `); registrar = GlobalRegistrar.at("` + registrar.GlobalRegistrarAddr + `");`) return nil } @@ -348,7 +343,7 @@ func (self *jsre) AskPassword() (string, bool) { func (self *jsre) ConfirmTransaction(tx string) bool { if self.ethereum.NatSpec { - notice := natspec.GetNotice(self.xeth, tx, self.ds) + notice := natspec.GetNotice(self.xeth, tx, self.ethereum.HTTPClient()) fmt.Println(notice) answer, _ := self.Prompt("Confirm Transaction [y/n]") return strings.HasPrefix(strings.Trim(answer, " "), "y") diff --git a/cmd/geth/js_test.go b/cmd/geth/js_test.go index 09cc88519..477079706 100644 --- a/cmd/geth/js_test.go +++ b/cmd/geth/js_test.go @@ -31,7 +31,7 @@ import ( "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/compiler" - "github.com/ethereum/go-ethereum/common/docserver" + "github.com/ethereum/go-ethereum/common/httpclient" "github.com/ethereum/go-ethereum/common/natspec" "github.com/ethereum/go-ethereum/common/registrar" "github.com/ethereum/go-ethereum/core" @@ -62,7 +62,7 @@ var ( type testjethre struct { *jsre lastConfirm string - ds *docserver.DocServer + client *httpclient.HTTPClient } func (self *testjethre) UnlockAccount(acc []byte) bool { @@ -75,7 +75,7 @@ func (self *testjethre) UnlockAccount(acc []byte) bool { func (self *testjethre) ConfirmTransaction(tx string) bool { if self.ethereum.NatSpec { - self.lastConfirm = natspec.GetNotice(self.xeth, tx, self.ds) + self.lastConfirm = natspec.GetNotice(self.xeth, tx, self.client) } return true } @@ -101,6 +101,7 @@ func testREPL(t *testing.T, config func(*eth.Config)) (string, *testjethre, *eth AccountManager: am, MaxPeers: 0, Name: "test", + DocRoot: "/", SolcPath: testSolcPath, PowTest: true, NewDB: func(path string) (ethdb.Database, error) { return db, nil }, @@ -130,8 +131,7 @@ func testREPL(t *testing.T, config func(*eth.Config)) (string, *testjethre, *eth assetPath := filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "cmd", "mist", "assets", "ext") client := comms.NewInProcClient(codec.JSON) - ds := docserver.New("/") - tf := &testjethre{ds: ds} + tf := &testjethre{client: ethereum.HTTPClient()} repl := newJSRE(ethereum, assetPath, "", client, false, tf) tf.jsre = repl return tmp, tf, ethereum diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 66ec46f80..79c86c52a 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -139,6 +139,11 @@ var ( Name: "natspec", Usage: "Enable NatSpec confirmation notice", } + DocRootFlag = DirectoryFlag{ + Name: "docroot", + Usage: "Document Root for HTTPClient file scheme", + Value: DirectoryString{common.HomeDir()}, + } CacheFlag = cli.IntFlag{ Name: "cache", Usage: "Megabytes of memory allocated to internal caching", @@ -452,6 +457,7 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config { Olympic: ctx.GlobalBool(OlympicFlag.Name), NAT: MakeNAT(ctx), NatSpec: ctx.GlobalBool(NatspecEnabledFlag.Name), + DocRoot: ctx.GlobalString(DocRootFlag.Name), Discovery: !ctx.GlobalBool(NoDiscoverFlag.Name), NodeKey: MakeNodeKey(ctx), Shh: ctx.GlobalBool(WhisperEnabledFlag.Name), @@ -616,7 +622,7 @@ func StartIPC(eth *eth.Ethereum, ctx *cli.Context) error { xeth := xeth.New(eth, fe) codec := codec.JSON - apis, err := api.ParseApiString(ctx.GlobalString(IPCApiFlag.Name), codec, xeth, eth, ctx.GlobalString(JSpathFlag.Name)) + apis, err := api.ParseApiString(ctx.GlobalString(IPCApiFlag.Name), codec, xeth, eth) if err != nil { return nil, err } @@ -637,7 +643,7 @@ func StartRPC(eth *eth.Ethereum, ctx *cli.Context) error { xeth := xeth.New(eth, nil) codec := codec.JSON - apis, err := api.ParseApiString(ctx.GlobalString(RpcApiFlag.Name), codec, xeth, eth, ctx.GlobalString(JSpathFlag.Name)) + apis, err := api.ParseApiString(ctx.GlobalString(RpcApiFlag.Name), codec, xeth, eth) if err != nil { return err } diff --git a/common/docserver/docserver.go b/common/docserver/docserver.go deleted file mode 100644 index cfc4e3b26..000000000 --- a/common/docserver/docserver.go +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package docserver - -import ( - "fmt" - "io/ioutil" - "net/http" - "path/filepath" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" -) - -type DocServer struct { - *http.Transport - DocRoot string - schemes []string -} - -func New(docRoot string) (self *DocServer) { - self = &DocServer{ - Transport: &http.Transport{}, - DocRoot: docRoot, - schemes: []string{"file"}, - } - self.RegisterProtocol("file", http.NewFileTransport(http.Dir(self.DocRoot))) - return -} - -// Clients should be reused instead of created as needed. Clients are safe for concurrent use by multiple goroutines. - -// A Client is higher-level than a RoundTripper (such as Transport) and additionally handles HTTP details such as cookies and redirects. - -func (self *DocServer) Client() *http.Client { - return &http.Client{ - Transport: self, - } -} - -func (self *DocServer) RegisterScheme(scheme string, rt http.RoundTripper) { - self.schemes = append(self.schemes, scheme) - self.RegisterProtocol(scheme, rt) -} - -func (self *DocServer) HasScheme(scheme string) bool { - for _, s := range self.schemes { - if s == scheme { - return true - } - } - return false -} - -func (self *DocServer) GetAuthContent(uri string, hash common.Hash) (content []byte, err error) { - // retrieve content - content, err = self.Get(uri, "") - if err != nil { - return - } - - // check hash to authenticate content - chash := crypto.Sha3Hash(content) - if chash != hash { - content = nil - err = fmt.Errorf("content hash mismatch %x != %x (exp)", hash[:], chash[:]) - } - - return - -} - -// Get(uri, path) downloads the document at uri, if path is non-empty it -// is interpreted as a filepath to which the contents are saved -func (self *DocServer) Get(uri, path string) (content []byte, err error) { - // retrieve content - resp, err := self.Client().Get(uri) - - defer func() { - if resp != nil { - resp.Body.Close() - } - }() - - if err != nil { - return - } - - content, err = ioutil.ReadAll(resp.Body) - if err != nil { - return - } - - if resp.StatusCode/100 != 2 { - return content, fmt.Errorf("HTTP error: %s", resp.Status) - } - - if path != "" { - var abspath string - abspath, err = filepath.Abs(path) - ioutil.WriteFile(abspath, content, 0700) - } - - return - -} diff --git a/common/docserver/docserver_test.go b/common/docserver/docserver_test.go deleted file mode 100644 index 632603add..000000000 --- a/common/docserver/docserver_test.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package docserver - -import ( - "io/ioutil" - "net/http" - "os" - "path" - "testing" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" -) - -func TestGetAuthContent(t *testing.T) { - dir, err := ioutil.TempDir("", "docserver-test") - if err != nil { - t.Fatal("cannot create temporary directory:", err) - } - defer os.RemoveAll(dir) - ds := New(dir) - - text := "test" - hash := crypto.Sha3Hash([]byte(text)) - if err := ioutil.WriteFile(path.Join(dir, "test.content"), []byte(text), os.ModePerm); err != nil { - t.Fatal("could not write test file", err) - } - content, err := ds.GetAuthContent("file:///test.content", hash) - if err != nil { - t.Errorf("no error expected, got %v", err) - } - if string(content) != text { - t.Errorf("incorrect content. expected %v, got %v", text, string(content)) - } - - hash = common.Hash{} - content, err = ds.GetAuthContent("file:///test.content", hash) - expected := "content hash mismatch 0000000000000000000000000000000000000000000000000000000000000000 != 9c22ff5f21f0b81b113e63f7db6da94fedef11b2119b4088b89664fb9a3cb658 (exp)" - if err == nil { - t.Errorf("expected error, got nothing") - } else { - if err.Error() != expected { - t.Errorf("expected error '%s' got '%v'", expected, err) - } - } - -} - -type rt struct{} - -func (rt) RoundTrip(req *http.Request) (resp *http.Response, err error) { return } - -func TestRegisterScheme(t *testing.T) { - ds := New("/tmp/") - if ds.HasScheme("scheme") { - t.Errorf("expected scheme not to be registered") - } - ds.RegisterScheme("scheme", rt{}) - if !ds.HasScheme("scheme") { - t.Errorf("expected scheme to be registered") - } -} \ No newline at end of file diff --git a/common/httpclient/httpclient.go b/common/httpclient/httpclient.go new file mode 100644 index 000000000..23373ecaf --- /dev/null +++ b/common/httpclient/httpclient.go @@ -0,0 +1,124 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package httpclient + +import ( + "fmt" + "io/ioutil" + "net/http" + "path/filepath" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" +) + +type HTTPClient struct { + *http.Transport + DocRoot string + schemes []string +} + +func New(docRoot string) (self *HTTPClient) { + self = &HTTPClient{ + Transport: &http.Transport{}, + DocRoot: docRoot, + schemes: []string{"file"}, + } + self.RegisterProtocol("file", http.NewFileTransport(http.Dir(self.DocRoot))) + return +} + +// Clients should be reused instead of created as needed. Clients are safe for concurrent use by multiple goroutines. + +// A Client is higher-level than a RoundTripper (such as Transport) and additionally handles HTTP details such as cookies and redirects. + +func (self *HTTPClient) Client() *http.Client { + return &http.Client{ + Transport: self, + } +} + +func (self *HTTPClient) RegisterScheme(scheme string, rt http.RoundTripper) { + self.schemes = append(self.schemes, scheme) + self.RegisterProtocol(scheme, rt) +} + +func (self *HTTPClient) HasScheme(scheme string) bool { + for _, s := range self.schemes { + if s == scheme { + return true + } + } + return false +} + +func (self *HTTPClient) GetAuthContent(uri string, hash common.Hash) ([]byte, error) { + // retrieve content + content, err := self.Get(uri, "") + if err != nil { + return nil, err + } + + // check hash to authenticate content + chash := crypto.Sha3Hash(content) + if chash != hash { + return nil, fmt.Errorf("content hash mismatch %x != %x (exp)", hash[:], chash[:]) + } + + return content, nil + +} + +// Get(uri, path) downloads the document at uri, if path is non-empty it +// is interpreted as a filepath to which the contents are saved +func (self *HTTPClient) Get(uri, path string) ([]byte, error) { + // retrieve content + resp, err := self.Client().Get(uri) + if err != nil { + return nil, err + } + defer func() { + if resp != nil { + resp.Body.Close() + } + }() + + var content []byte + content, err = ioutil.ReadAll(resp.Body) + if err != nil { + return nil, err + } + + if resp.StatusCode/100 != 2 { + return content, fmt.Errorf("HTTP error: %s", resp.Status) + } + + if path != "" { + var abspath string + abspath, err = filepath.Abs(path) + if err != nil { + return nil, err + } + err = ioutil.WriteFile(abspath, content, 0600) + if err != nil { + return nil, err + } + } + + return content, nil + +} diff --git a/common/httpclient/httpclient_test.go b/common/httpclient/httpclient_test.go new file mode 100644 index 000000000..6c3782e15 --- /dev/null +++ b/common/httpclient/httpclient_test.go @@ -0,0 +1,77 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package httpclient + +import ( + "io/ioutil" + "net/http" + "os" + "path" + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" +) + +func TestGetAuthContent(t *testing.T) { + dir, err := ioutil.TempDir("", "httpclient-test") + if err != nil { + t.Fatal("cannot create temporary directory:", err) + } + defer os.RemoveAll(dir) + client := New(dir) + + text := "test" + hash := crypto.Sha3Hash([]byte(text)) + if err := ioutil.WriteFile(path.Join(dir, "test.content"), []byte(text), os.ModePerm); err != nil { + t.Fatal("could not write test file", err) + } + content, err := client.GetAuthContent("file:///test.content", hash) + if err != nil { + t.Errorf("no error expected, got %v", err) + } + if string(content) != text { + t.Errorf("incorrect content. expected %v, got %v", text, string(content)) + } + + hash = common.Hash{} + content, err = client.GetAuthContent("file:///test.content", hash) + expected := "content hash mismatch 0000000000000000000000000000000000000000000000000000000000000000 != 9c22ff5f21f0b81b113e63f7db6da94fedef11b2119b4088b89664fb9a3cb658 (exp)" + if err == nil { + t.Errorf("expected error, got nothing") + } else { + if err.Error() != expected { + t.Errorf("expected error '%s' got '%v'", expected, err) + } + } + +} + +type rt struct{} + +func (rt) RoundTrip(req *http.Request) (resp *http.Response, err error) { return } + +func TestRegisterScheme(t *testing.T) { + client := New("/tmp/") + if client.HasScheme("scheme") { + t.Errorf("expected scheme not to be registered") + } + client.RegisterScheme("scheme", rt{}) + if !client.HasScheme("scheme") { + t.Errorf("expected scheme to be registered") + } +} diff --git a/common/natspec/natspec.go b/common/natspec/natspec.go index 0265c2e13..d9627b4e1 100644 --- a/common/natspec/natspec.go +++ b/common/natspec/natspec.go @@ -23,7 +23,7 @@ import ( "strings" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/docserver" + "github.com/ethereum/go-ethereum/common/httpclient" "github.com/ethereum/go-ethereum/common/registrar" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/xeth" @@ -43,7 +43,7 @@ type NatSpec struct { // the implementation is frontend friendly in that it always gives back // a notice that is safe to display // :FIXME: the second return value is an error, which can be used to fine-tune bahaviour -func GetNotice(xeth *xeth.XEth, tx string, http *docserver.DocServer) (notice string) { +func GetNotice(xeth *xeth.XEth, tx string, http *httpclient.HTTPClient) (notice string) { ns, err := New(xeth, tx, http) if err != nil { if ns == nil { @@ -83,7 +83,7 @@ type contractInfo struct { DeveloperDoc json.RawMessage `json:"developerDoc"` } -func New(xeth *xeth.XEth, jsontx string, http *docserver.DocServer) (self *NatSpec, err error) { +func New(xeth *xeth.XEth, jsontx string, http *httpclient.HTTPClient) (self *NatSpec, err error) { // extract contract address from tx var tx jsonTx @@ -104,7 +104,7 @@ func New(xeth *xeth.XEth, jsontx string, http *docserver.DocServer) (self *NatSp } // also called by admin.contractInfo.get -func FetchDocsForContract(contractAddress string, xeth *xeth.XEth, ds *docserver.DocServer) (content []byte, err error) { +func FetchDocsForContract(contractAddress string, xeth *xeth.XEth, client *httpclient.HTTPClient) (content []byte, err error) { // retrieve contract hash from state codehex := xeth.CodeAt(contractAddress) codeb := xeth.CodeAtBytes(contractAddress) @@ -122,8 +122,8 @@ func FetchDocsForContract(contractAddress string, xeth *xeth.XEth, ds *docserver if err != nil { return } - if ds.HasScheme("bzz") { - content, err = ds.Get("bzz://"+hash.Hex()[2:], "") + if client.HasScheme("bzz") { + content, err = client.Get("bzz://"+hash.Hex()[2:], "") if err == nil { // non-fatal return } @@ -137,7 +137,7 @@ func FetchDocsForContract(contractAddress string, xeth *xeth.XEth, ds *docserver } // get content via http client and authenticate content using hash - content, err = ds.GetAuthContent(uri, hash) + content, err = client.GetAuthContent(uri, hash) if err != nil { return } diff --git a/common/natspec/natspec_e2e_test.go b/common/natspec/natspec_e2e_test.go index 4149314c3..706a294ec 100644 --- a/common/natspec/natspec_e2e_test.go +++ b/common/natspec/natspec_e2e_test.go @@ -28,7 +28,7 @@ import ( "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/docserver" + "github.com/ethereum/go-ethereum/common/httpclient" "github.com/ethereum/go-ethereum/common/registrar" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/crypto" @@ -113,8 +113,8 @@ func (self *testFrontend) UnlockAccount(acc []byte) bool { func (self *testFrontend) ConfirmTransaction(tx string) bool { if self.wantNatSpec { - ds := docserver.New("/tmp/") - self.lastConfirm = GetNotice(self.xeth, tx, ds) + client := httpclient.New("/tmp/") + self.lastConfirm = GetNotice(self.xeth, tx, client) } return true } diff --git a/common/path.go b/common/path.go index 1253c424c..39eacacee 100644 --- a/common/path.go +++ b/common/path.go @@ -23,8 +23,6 @@ import ( "path/filepath" "runtime" "strings" - - "github.com/kardianos/osext" ) // MakeName creates a node name that follows the ethereum convention @@ -65,48 +63,18 @@ func AbsolutePath(Datadir string, filename string) string { return filepath.Join(Datadir, filename) } -func DefaultAssetPath() string { - var assetPath string - pwd, _ := os.Getwd() - srcdir := filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "cmd", "mist") - - // If the current working directory is the go-ethereum dir - // assume a debug build and use the source directory as - // asset directory. - if pwd == srcdir { - assetPath = filepath.Join(pwd, "assets") +func HomeDir() (home string) { + if usr, err := user.Current(); err == nil { + home = usr.HomeDir } else { - switch runtime.GOOS { - case "darwin": - // Get Binary Directory - exedir, _ := osext.ExecutableFolder() - assetPath = filepath.Join(exedir, "..", "Resources") - case "linux": - assetPath = filepath.Join("usr", "share", "mist") - case "windows": - assetPath = filepath.Join(".", "assets") - default: - assetPath = "." - } - } - - // Check if the assetPath exists. If not, try the source directory - // This happens when binary is run from outside cmd/mist directory - if _, err := os.Stat(assetPath); os.IsNotExist(err) { - assetPath = filepath.Join(srcdir, "assets") + home = os.Getenv("HOME") } - - return assetPath + return } func DefaultDataDir() string { // Try to place the data folder in the user's home dir - var home string - if usr, err := user.Current(); err == nil { - home = usr.HomeDir - } else { - home = os.Getenv("HOME") - } + home := HomeDir() if home != "" { if runtime.GOOS == "darwin" { return filepath.Join(home, "Library", "Ethereum") diff --git a/eth/backend.go b/eth/backend.go index 6ce0d0eb0..ee857e146 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -35,6 +35,7 @@ import ( "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/compiler" + "github.com/ethereum/go-ethereum/common/httpclient" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" @@ -106,6 +107,7 @@ type Config struct { LogJSON string VmDebug bool NatSpec bool + DocRoot string AutoDAG bool PowTest bool ExtraData []byte @@ -249,6 +251,8 @@ type Ethereum struct { GpobaseStepUp int GpobaseCorrectionFactor int + httpclient *httpclient.HTTPClient + net *p2p.Server eventMux *event.TypeMux miner *miner.Miner @@ -400,6 +404,7 @@ func New(config *Config) (*Ethereum, error) { GpobaseStepDown: config.GpobaseStepDown, GpobaseStepUp: config.GpobaseStepUp, GpobaseCorrectionFactor: config.GpobaseCorrectionFactor, + httpclient: httpclient.New(config.DocRoot), } if config.PowTest { @@ -702,6 +707,12 @@ func (self *Ethereum) StopAutoDAG() { glog.V(logger.Info).Infof("Automatic pregeneration of ethash DAG OFF (ethash dir: %s)", ethash.DefaultDir) } +// HTTPClient returns the light http client used for fetching offchain docs +// (natspec, source for verification) +func (self *Ethereum) HTTPClient() *httpclient.HTTPClient { + return self.httpclient +} + func (self *Ethereum) Solc() (*compiler.Solidity, error) { var err error if self.solc == nil { diff --git a/rpc/api/admin.go b/rpc/api/admin.go index eed8d8366..eb08fbc5d 100644 --- a/rpc/api/admin.go +++ b/rpc/api/admin.go @@ -25,7 +25,6 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/compiler" - "github.com/ethereum/go-ethereum/common/docserver" "github.com/ethereum/go-ethereum/common/natspec" "github.com/ethereum/go-ethereum/common/registrar" "github.com/ethereum/go-ethereum/core" @@ -84,19 +83,15 @@ type adminApi struct { ethereum *eth.Ethereum codec codec.Codec coder codec.ApiCoder - docRoot string - ds *docserver.DocServer } // create a new admin api instance -func NewAdminApi(xeth *xeth.XEth, ethereum *eth.Ethereum, codec codec.Codec, docRoot string) *adminApi { +func NewAdminApi(xeth *xeth.XEth, ethereum *eth.Ethereum, codec codec.Codec) *adminApi { return &adminApi{ xeth: xeth, ethereum: ethereum, codec: codec, coder: codec.New(nil), - docRoot: docRoot, - ds: docserver.New(docRoot), } } @@ -258,7 +253,7 @@ func (self *adminApi) StartRPC(req *shared.Request) (interface{}, error) { CorsDomain: args.CorsDomain, } - apis, err := ParseApiString(args.Apis, self.codec, self.xeth, self.ethereum, self.docRoot) + apis, err := ParseApiString(args.Apis, self.codec, self.xeth, self.ethereum) if err != nil { return false, err } @@ -439,7 +434,7 @@ func (self *adminApi) GetContractInfo(req *shared.Request) (interface{}, error) return nil, shared.NewDecodeParamError(err.Error()) } - infoDoc, err := natspec.FetchDocsForContract(args.Contract, self.xeth, self.ds) + infoDoc, err := natspec.FetchDocsForContract(args.Contract, self.xeth, self.ethereum.HTTPClient()) if err != nil { return nil, err } @@ -459,7 +454,7 @@ func (self *adminApi) HttpGet(req *shared.Request) (interface{}, error) { return nil, shared.NewDecodeParamError(err.Error()) } - resp, err := self.ds.Get(args.Uri, args.Path) + resp, err := self.ethereum.HTTPClient().Get(args.Uri, args.Path) if err != nil { return nil, err } diff --git a/rpc/api/api_test.go b/rpc/api/api_test.go index a4efb09c1..131ef68f8 100644 --- a/rpc/api/api_test.go +++ b/rpc/api/api_test.go @@ -30,7 +30,7 @@ import ( ) func TestParseApiString(t *testing.T) { - apis, err := ParseApiString("", codec.JSON, nil, nil, "") + apis, err := ParseApiString("", codec.JSON, nil, nil) if err == nil { t.Errorf("Expected an err from parsing empty API string but got nil") } @@ -39,7 +39,7 @@ func TestParseApiString(t *testing.T) { t.Errorf("Expected 0 apis from empty API string") } - apis, err = ParseApiString("eth", codec.JSON, nil, nil, "") + apis, err = ParseApiString("eth", codec.JSON, nil, nil) if err != nil { t.Errorf("Expected nil err from parsing empty API string but got %v", err) } @@ -48,7 +48,7 @@ func TestParseApiString(t *testing.T) { t.Errorf("Expected 1 apis but got %d - %v", apis, apis) } - apis, err = ParseApiString("eth,eth", codec.JSON, nil, nil, "") + apis, err = ParseApiString("eth,eth", codec.JSON, nil, nil) if err != nil { t.Errorf("Expected nil err from parsing empty API string but got \"%v\"", err) } @@ -57,7 +57,7 @@ func TestParseApiString(t *testing.T) { t.Errorf("Expected 2 apis but got %d - %v", apis, apis) } - apis, err = ParseApiString("eth,invalid", codec.JSON, nil, nil, "") + apis, err = ParseApiString("eth,invalid", codec.JSON, nil, nil) if err == nil { t.Errorf("Expected an err but got no err") } diff --git a/rpc/api/eth.go b/rpc/api/eth.go index 4722682ff..b84ae31da 100644 --- a/rpc/api/eth.go +++ b/rpc/api/eth.go @@ -24,6 +24,7 @@ import ( "fmt" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/natspec" "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/rpc/codec" "github.com/ethereum/go-ethereum/rpc/shared" @@ -67,6 +68,7 @@ var ( "eth_getUncleCountByBlockNumber": (*ethApi).GetUncleCountByBlockNumber, "eth_getData": (*ethApi).GetData, "eth_getCode": (*ethApi).GetData, + "eth_getNatSpec": (*ethApi).GetNatSpec, "eth_sign": (*ethApi).Sign, "eth_sendRawTransaction": (*ethApi).SendRawTransaction, "eth_sendTransaction": (*ethApi).SendTransaction, @@ -322,6 +324,18 @@ func (self *ethApi) SendTransaction(req *shared.Request) (interface{}, error) { return v, nil } +func (self *ethApi) GetNatSpec(req *shared.Request) (interface{}, error) { + args := new(NewTxArgs) + if err := self.codec.Decode(req.Params, &args); err != nil { + return nil, shared.NewDecodeParamError(err.Error()) + } + + var jsontx = fmt.Sprintf(`{"params":[{"to":"%s","data": "%s"}]}`, args.To, args.Data) + notice := natspec.GetNotice(self.xeth, jsontx, self.ethereum.HTTPClient()) + + return notice, nil +} + func (self *ethApi) EstimateGas(req *shared.Request) (interface{}, error) { _, gas, err := self.doCall(req.Params) if err != nil { diff --git a/rpc/api/eth_js.go b/rpc/api/eth_js.go index 393dac22f..75c103c9d 100644 --- a/rpc/api/eth_js.go +++ b/rpc/api/eth_js.go @@ -35,6 +35,12 @@ web3._extend({ call: 'eth_resend', params: 3, inputFormatter: [web3._extend.formatters.inputTransactionFormatter, web3._extend.utils.fromDecimal, web3._extend.utils.fromDecimal] + }), + new web3._extend.Method({ + name: 'getNatSpec', + call: 'eth_getNatSpec', + params: 1, + inputFormatter: [web3._extend.formatters.inputTransactionFormatter] }) ], properties: diff --git a/rpc/api/utils.go b/rpc/api/utils.go index 719cb8074..5a3ade46b 100644 --- a/rpc/api/utils.go +++ b/rpc/api/utils.go @@ -89,6 +89,7 @@ var ( "getBlockTransactionCount", "getBlockUncleCount", "getCode", + "getNatSpec", "getCompilers", "gasPrice", "getStorageAt", @@ -153,7 +154,7 @@ var ( ) // Parse a comma separated API string to individual api's -func ParseApiString(apistr string, codec codec.Codec, xeth *xeth.XEth, eth *eth.Ethereum, docRoot string) ([]shared.EthereumApi, error) { +func ParseApiString(apistr string, codec codec.Codec, xeth *xeth.XEth, eth *eth.Ethereum) ([]shared.EthereumApi, error) { if len(strings.TrimSpace(apistr)) == 0 { return nil, fmt.Errorf("Empty apistr provided") } @@ -164,7 +165,7 @@ func ParseApiString(apistr string, codec codec.Codec, xeth *xeth.XEth, eth *eth. for i, name := range names { switch strings.ToLower(strings.TrimSpace(name)) { case shared.AdminApiName: - apis[i] = NewAdminApi(xeth, eth, codec, docRoot) + apis[i] = NewAdminApi(xeth, eth, codec) case shared.DebugApiName: apis[i] = NewDebugApi(xeth, eth, codec) case shared.DbApiName: -- cgit v1.2.3 From 57ab1473887b4eaeac2ec6912e3d738d4839b48a Mon Sep 17 00:00:00 2001 From: caktux Date: Mon, 26 Oct 2015 18:06:19 -0400 Subject: update Dockerfile, remove supervisord and unattended-upgrades --- docker/Dockerfile | 14 ++------------ docker/supervisord.conf | 23 ----------------------- 2 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 docker/supervisord.conf diff --git a/docker/Dockerfile b/docker/Dockerfile index b608e4ab6..ba5b05d14 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:utopic +FROM ubuntu:wily MAINTAINER caktux ENV DEBIAN_FRONTEND noninteractive @@ -8,9 +8,6 @@ RUN apt-get update RUN apt-get upgrade -q -y RUN apt-get dist-upgrade -q -y -# Let our containers upgrade themselves -RUN apt-get install -q -y unattended-upgrades - # Install Ethereum RUN apt-get install -q -y software-properties-common RUN add-apt-repository ppa:ethereum/ethereum @@ -18,14 +15,7 @@ RUN add-apt-repository ppa:ethereum/ethereum-dev RUN apt-get update RUN apt-get install -q -y geth -# Install supervisor -RUN apt-get install -q -y supervisor - -# Add supervisor configs -ADD supervisord.conf supervisord.conf - EXPOSE 8545 EXPOSE 30303 -CMD ["-n", "-c", "/supervisord.conf"] -ENTRYPOINT ["/usr/bin/supervisord"] +ENTRYPOINT ["/usr/bin/geth"] diff --git a/docker/supervisord.conf b/docker/supervisord.conf deleted file mode 100644 index 33cba0c14..000000000 --- a/docker/supervisord.conf +++ /dev/null @@ -1,23 +0,0 @@ -[supervisord] -nodaemon=false - -[program:geth] -priority=30 -directory=/ -command=geth --rpc -user=root -autostart=true -autorestart=true -startsecs=10 -stopsignal=QUIT -stdout_logfile=/var/log/geth.log -stderr_logfile=/var/log/geth.err - -[unix_http_server] -file=%(here)s/supervisor.sock - -[supervisorctl] -serverurl=unix://%(here)s/supervisor.sock - -[rpcinterface:supervisor] -supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface \ No newline at end of file -- cgit v1.2.3 From ae1b5b3ff2611af1232643d38e13a77d704dae28 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 26 Oct 2015 21:42:24 +0100 Subject: eth, xeth: fix GasPriceOracle goroutine leak XEth.gpo was being initialized as needed. WithState copies the XEth struct including the gpo field. If gpo was nil at the time of the copy and Call or Transact were invoked on it, an additional GPO listenLoop would be spawned. Move the lazy initialization to GasPriceOracle instead so the same GPO instance is shared among all created XEths. Fixes #1317 Might help with #1930 --- eth/gasprice.go | 107 ++++++++++++++++++++++++++++++-------------------------- xeth/xeth.go | 41 +++++++++------------- 2 files changed, 75 insertions(+), 73 deletions(-) diff --git a/eth/gasprice.go b/eth/gasprice.go index b4409f346..b752c22dd 100644 --- a/eth/gasprice.go +++ b/eth/gasprice.go @@ -23,49 +23,66 @@ import ( "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" ) -const gpoProcessPastBlocks = 100 +const ( + gpoProcessPastBlocks = 100 + + // for testing + gpoDefaultBaseCorrectionFactor = 110 + gpoDefaultMinGasPrice = 10000000000000 +) type blockPriceInfo struct { baseGasPrice *big.Int } +// GasPriceOracle recommends gas prices based on the content of recent +// blocks. type GasPriceOracle struct { - eth *Ethereum - chain *core.BlockChain - events event.Subscription + eth *Ethereum + initOnce sync.Once + minPrice *big.Int + lastBaseMutex sync.Mutex + lastBase *big.Int + + // state of listenLoop blocks map[uint64]*blockPriceInfo firstProcessed, lastProcessed uint64 - lastBaseMutex sync.Mutex - lastBase, minBase *big.Int + minBase *big.Int +} + +// NewGasPriceOracle returns a new oracle. +func NewGasPriceOracle(eth *Ethereum) *GasPriceOracle { + minprice := eth.GpoMinGasPrice + if minprice == nil { + minprice = big.NewInt(gpoDefaultMinGasPrice) + } + minbase := new(big.Int).Mul(minprice, big.NewInt(100)) + if eth.GpobaseCorrectionFactor > 0 { + minbase = minbase.Div(minbase, big.NewInt(int64(eth.GpobaseCorrectionFactor))) + } + return &GasPriceOracle{ + eth: eth, + blocks: make(map[uint64]*blockPriceInfo), + minBase: minbase, + minPrice: minprice, + lastBase: minprice, + } } -func NewGasPriceOracle(eth *Ethereum) (self *GasPriceOracle) { - self = &GasPriceOracle{} - self.blocks = make(map[uint64]*blockPriceInfo) - self.eth = eth - self.chain = eth.blockchain - self.events = eth.EventMux().Subscribe( - core.ChainEvent{}, - core.ChainSplitEvent{}, - ) - - minbase := new(big.Int).Mul(self.eth.GpoMinGasPrice, big.NewInt(100)) - minbase = minbase.Div(minbase, big.NewInt(int64(self.eth.GpobaseCorrectionFactor))) - self.minBase = minbase - - self.processPastBlocks() - go self.listenLoop() - return +func (gpo *GasPriceOracle) init() { + gpo.initOnce.Do(func() { + gpo.processPastBlocks(gpo.eth.BlockChain()) + go gpo.listenLoop() + }) } -func (self *GasPriceOracle) processPastBlocks() { +func (self *GasPriceOracle) processPastBlocks(chain *core.BlockChain) { last := int64(-1) - cblock := self.chain.CurrentBlock() + cblock := chain.CurrentBlock() if cblock != nil { last = int64(cblock.NumberU64()) } @@ -75,7 +92,7 @@ func (self *GasPriceOracle) processPastBlocks() { } self.firstProcessed = uint64(first) for i := first; i <= last; i++ { - block := self.chain.GetBlockByNumber(uint64(i)) + block := chain.GetBlockByNumber(uint64(i)) if block != nil { self.processBlock(block) } @@ -84,9 +101,10 @@ func (self *GasPriceOracle) processPastBlocks() { } func (self *GasPriceOracle) listenLoop() { - defer self.events.Unsubscribe() + events := self.eth.EventMux().Subscribe(core.ChainEvent{}, core.ChainSplitEvent{}) + defer events.Unsubscribe() - for event := range self.events.Chan() { + for event := range events.Chan() { switch event := event.Data.(type) { case core.ChainEvent: self.processBlock(event.Block) @@ -102,7 +120,7 @@ func (self *GasPriceOracle) processBlock(block *types.Block) { self.lastProcessed = i } - lastBase := self.eth.GpoMinGasPrice + lastBase := self.minPrice bpl := self.blocks[i-1] if bpl != nil { lastBase = bpl.baseGasPrice @@ -176,28 +194,19 @@ func (self *GasPriceOracle) lowestPrice(block *types.Block) *big.Int { return minPrice } +// SuggestPrice returns the recommended gas price. func (self *GasPriceOracle) SuggestPrice() *big.Int { + self.init() self.lastBaseMutex.Lock() - base := self.lastBase + price := new(big.Int).Set(self.lastBase) self.lastBaseMutex.Unlock() - if base == nil { - base = self.eth.GpoMinGasPrice + price.Mul(price, big.NewInt(int64(self.eth.GpobaseCorrectionFactor))) + price.Div(price, big.NewInt(100)) + if price.Cmp(self.minPrice) < 0 { + price.Set(self.minPrice) + } else if self.eth.GpoMaxGasPrice != nil && price.Cmp(self.eth.GpoMaxGasPrice) > 0 { + price.Set(self.eth.GpoMaxGasPrice) } - if base == nil { - return big.NewInt(10000000000000) // apparently MinGasPrice is not initialized during some tests - } - - baseCorr := new(big.Int).Mul(base, big.NewInt(int64(self.eth.GpobaseCorrectionFactor))) - baseCorr.Div(baseCorr, big.NewInt(100)) - - if baseCorr.Cmp(self.eth.GpoMinGasPrice) < 0 { - return self.eth.GpoMinGasPrice - } - - if baseCorr.Cmp(self.eth.GpoMaxGasPrice) > 0 { - return self.eth.GpoMaxGasPrice - } - - return baseCorr + return price } diff --git a/xeth/xeth.go b/xeth/xeth.go index 1cb072f0d..f1e8cc5ee 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -59,24 +59,8 @@ const ( LogFilterTy ) -func DefaultGas() *big.Int { return new(big.Int).Set(defaultGas) } - -func (self *XEth) DefaultGasPrice() *big.Int { - if self.gpo == nil { - self.gpo = eth.NewGasPriceOracle(self.backend) - } - return self.gpo.SuggestPrice() -} - type XEth struct { - backend *eth.Ethereum - frontend Frontend - - state *State - whisper *Whisper - - quit chan struct{} - filterManager *filters.FilterSystem + quit chan struct{} logMu sync.RWMutex logQueue map[int]*logQueue @@ -92,16 +76,18 @@ type XEth struct { transactMu sync.Mutex - agent *miner.RemoteAgent - - gpo *eth.GasPriceOracle + // read-only fields + backend *eth.Ethereum + frontend Frontend + agent *miner.RemoteAgent + gpo *eth.GasPriceOracle + state *State + whisper *Whisper + filterManager *filters.FilterSystem } func NewTest(eth *eth.Ethereum, frontend Frontend) *XEth { - return &XEth{ - backend: eth, - frontend: frontend, - } + return &XEth{backend: eth, frontend: frontend} } // New creates an XEth that uses the given frontend. @@ -118,6 +104,7 @@ func New(ethereum *eth.Ethereum, frontend Frontend) *XEth { transactionQueue: make(map[int]*hashQueue), messages: make(map[int]*whisperFilter), agent: miner.NewRemoteAgent(), + gpo: eth.NewGasPriceOracle(ethereum), } if ethereum.Whisper() != nil { xeth.whisper = NewWhisper(ethereum.Whisper()) @@ -207,6 +194,12 @@ func cTopics(t [][]string) [][]common.Hash { return topics } +func DefaultGas() *big.Int { return new(big.Int).Set(defaultGas) } + +func (self *XEth) DefaultGasPrice() *big.Int { + return self.gpo.SuggestPrice() +} + func (self *XEth) RemoteMining() *miner.RemoteAgent { return self.agent } func (self *XEth) AtStateNum(num int64) *XEth { -- cgit v1.2.3 From 04f8d05bd47a715bfff7f637f5b7d35f087fb004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 28 Oct 2015 12:25:35 +0200 Subject: makefile: fix evm ld flags, pass them to xgo too --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 56f250a92..1bd0f9eb3 100644 --- a/Makefile +++ b/Makefile @@ -15,29 +15,30 @@ geth-cross: geth-linux geth-darwin geth-windows geth-android @ls -l $(GOBIN)/geth-* geth-linux: xgo - build/env.sh $(GOBIN)/xgo --dest=$(GOBIN) --deps=https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2 --targets=linux/* -v ./cmd/geth + build/env.sh $(GOBIN)/xgo --dest=$(GOBIN) --deps=https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2 --targets=linux/* -v $(shell build/flags.sh) ./cmd/geth @echo "Linux cross compilation done:" @ls -l $(GOBIN)/geth-linux-* geth-darwin: xgo - build/env.sh $(GOBIN)/xgo --dest=$(GOBIN) --deps=https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2 --targets=darwin/* -v ./cmd/geth + build/env.sh $(GOBIN)/xgo --dest=$(GOBIN) --deps=https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2 --targets=darwin/* -v $(shell build/flags.sh) ./cmd/geth @echo "Darwin cross compilation done:" @ls -l $(GOBIN)/geth-darwin-* geth-windows: xgo - build/env.sh $(GOBIN)/xgo --dest=$(GOBIN) --deps=https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2 --targets=windows/* -v ./cmd/geth + build/env.sh $(GOBIN)/xgo --dest=$(GOBIN) --deps=https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2 --targets=windows/* -v $(shell build/flags.sh) ./cmd/geth @echo "Windows cross compilation done:" @ls -l $(GOBIN)/geth-windows-* geth-android: xgo - build/env.sh $(GOBIN)/xgo --dest=$(GOBIN) --deps=https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2 --targets=android-16/*,android-21/* -v ./cmd/geth + build/env.sh $(GOBIN)/xgo --dest=$(GOBIN) --deps=https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2 --targets=android-16/*,android-21/* -v $(shell build/flags.sh) ./cmd/geth @echo "Android cross compilation done:" @ls -l $(GOBIN)/geth-android-* evm: - build/env.sh $(GOROOT)/bin/go install -v $(shell build/ldflags.sh) ./cmd/evm + build/env.sh $(GOROOT)/bin/go install -v $(shell build/flags.sh) ./cmd/evm @echo "Done building." @echo "Run \"$(GOBIN)/evm to start the evm." + mist: build/env.sh go install -v $(shell build/flags.sh) ./cmd/mist @echo "Done building." -- cgit v1.2.3 From e6556262689f8003ba356436fe63fe5237449edc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 28 Oct 2015 12:34:40 +0200 Subject: makefile: dump mist leftover, add phony targets --- Makefile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 1bd0f9eb3..d2b57e13f 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # with Go source code. If you know what GOPATH is then you probably # don't need to bother with make. -.PHONY: geth evm mist all test travis-test-with-coverage clean +.PHONY: geth geth-cross geth-linux geth-darwin geth-windows geth-android evm all test travis-test-with-coverage xgo clean GOBIN = build/bin geth: @@ -39,11 +39,6 @@ evm: @echo "Done building." @echo "Run \"$(GOBIN)/evm to start the evm." -mist: - build/env.sh go install -v $(shell build/flags.sh) ./cmd/mist - @echo "Done building." - @echo "Run \"$(GOBIN)/mist --asset_path=cmd/mist/assets\" to launch mist." - all: build/env.sh go install -v $(shell build/flags.sh) ./... -- cgit v1.2.3 From 2019ed71b4758956a8bd9671c73ba98a244f4a7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 28 Oct 2015 16:41:01 +0200 Subject: eth: don't block sync goroutines that short circuit --- eth/downloader/downloader.go | 6 ++++-- eth/sync.go | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 4bcbd8557..153427ee4 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -248,10 +248,11 @@ func (d *Downloader) UnregisterPeer(id string) error { // Synchronise tries to sync up our local block chain with a remote peer, both // adding various sanity checks as well as wrapping it with various log entries. -func (d *Downloader) Synchronise(id string, head common.Hash, td *big.Int, mode SyncMode) { +func (d *Downloader) Synchronise(id string, head common.Hash, td *big.Int, mode SyncMode) error { glog.V(logger.Detail).Infof("Attempting synchronisation: %v, head [%x…], TD %v", id, head[:4], td) - switch err := d.synchronise(id, head, td, mode); err { + err := d.synchronise(id, head, td, mode) + switch err { case nil: glog.V(logger.Detail).Infof("Synchronisation completed") @@ -268,6 +269,7 @@ func (d *Downloader) Synchronise(id string, head common.Hash, td *big.Int, mode default: glog.V(logger.Warn).Infof("Synchronisation failed: %v", err) } + return err } // synchronise will select the peer and use it for synchronising. If an empty string is given diff --git a/eth/sync.go b/eth/sync.go index b69a24556..bbf2abc04 100644 --- a/eth/sync.go +++ b/eth/sync.go @@ -170,13 +170,16 @@ func (pm *ProtocolManager) synchronise(peer *peer) { if pm.fastSync { mode = downloader.FastSync } - pm.downloader.Synchronise(peer.id, peer.Head(), peer.Td(), mode) - + if err := pm.downloader.Synchronise(peer.id, peer.Head(), peer.Td(), mode); err != nil { + return + } // If fast sync was enabled, and we synced up, disable it if pm.fastSync { + // Wait until all pending imports finish processing for pm.downloader.Synchronising() { time.Sleep(100 * time.Millisecond) } + // Disable fast sync if we indeed have something in our chain if pm.blockchain.CurrentBlock().NumberU64() > 0 { glog.V(logger.Info).Infof("fast sync complete, auto disabling") pm.fastSync = false -- cgit v1.2.3 From 667987e7d0a677fbb0e2c54c31efedb11ebc5f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 28 Oct 2015 17:40:24 +0200 Subject: core: only reset head header/fastblock if stale --- core/blockchain.go | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index f14ff363c..cea346e38 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -411,11 +411,14 @@ func (self *BlockChain) ExportN(w io.Writer, first uint64, last uint64) error { // insert injects a new head block into the current block chain. This method // assumes that the block is indeed a true head. It will also reset the head -// header and the head fast sync block to this very same block to prevent them -// from pointing to a possibly old canonical chain (i.e. side chain by now). +// header and the head fast sync block to this very same block if they are older +// or if they are on a different side chain. // // Note, this function assumes that the `mu` mutex is held! func (bc *BlockChain) insert(block *types.Block) { + // If the block is on a side chain or an unknown one, force other heads onto it too + updateHeads := GetCanonicalHash(bc.chainDb, block.NumberU64()) != block.Hash() + // Add the block to the canonical chain number scheme and mark as the head if err := WriteCanonicalHash(bc.chainDb, block.Hash(), block.NumberU64()); err != nil { glog.Fatalf("failed to insert block number: %v", err) @@ -423,16 +426,20 @@ func (bc *BlockChain) insert(block *types.Block) { if err := WriteHeadBlockHash(bc.chainDb, block.Hash()); err != nil { glog.Fatalf("failed to insert head block hash: %v", err) } - if err := WriteHeadHeaderHash(bc.chainDb, block.Hash()); err != nil { - glog.Fatalf("failed to insert head header hash: %v", err) - } - if err := WriteHeadFastBlockHash(bc.chainDb, block.Hash()); err != nil { - glog.Fatalf("failed to insert head fast block hash: %v", err) - } - // Update the internal state with the head block bc.currentBlock = block - bc.currentHeader = block.Header() - bc.currentFastBlock = block + + // If the block is better than out head or is on a different chain, force update heads + if updateHeads { + if err := WriteHeadHeaderHash(bc.chainDb, block.Hash()); err != nil { + glog.Fatalf("failed to insert head header hash: %v", err) + } + bc.currentHeader = block.Header() + + if err := WriteHeadFastBlockHash(bc.chainDb, block.Hash()); err != nil { + glog.Fatalf("failed to insert head fast block hash: %v", err) + } + bc.currentFastBlock = block + } } // Accessors -- cgit v1.2.3 From 05ea8926c32a97d9f193a69076037b7a704d6d92 Mon Sep 17 00:00:00 2001 From: Drake Burroughs Date: Fri, 23 Oct 2015 16:49:36 +0200 Subject: cmd/utils, crypto: add --lightkdf flag for lighter KDF --- cmd/utils/flags.go | 12 ++++++++++- common/natspec/natspec_e2e_test.go | 2 +- common/natspec/natspec_e2e_test.go.orig | 2 +- crypto/crypto.go | 2 +- crypto/key_store_passphrase.go | 35 +++++++++++++++++++++------------ crypto/key_store_test.go | 8 ++++---- tests/block_test_util.go | 2 +- 7 files changed, 41 insertions(+), 22 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 79c86c52a..c2b92be46 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -157,6 +157,10 @@ var ( Name: "fast", Usage: "Enables fast syncing through state downloads", } + LightKDFFlag = cli.BoolFlag{ + Name: "lightkdf", + Usage: "Reduce KDF memory & CPU usage at some expense of KDF strength", + } // miner settings // TODO: refactor CPU vs GPU mining flags @@ -579,7 +583,13 @@ func MakeAccountManager(ctx *cli.Context) *accounts.Manager { if ctx.GlobalBool(TestNetFlag.Name) { dataDir += "/testnet" } - ks := crypto.NewKeyStorePassphrase(filepath.Join(dataDir, "keystore")) + scryptN := crypto.StandardScryptN + scryptP := crypto.StandardScryptP + if ctx.GlobalBool(LightKDFFlag.Name) { + scryptN = crypto.LightScryptN + scryptP = crypto.LightScryptP + } + ks := crypto.NewKeyStorePassphrase(filepath.Join(dataDir, "keystore"), scryptN, scryptP) return accounts.NewManager(ks) } diff --git a/common/natspec/natspec_e2e_test.go b/common/natspec/natspec_e2e_test.go index 706a294ec..5c0d43091 100644 --- a/common/natspec/natspec_e2e_test.go +++ b/common/natspec/natspec_e2e_test.go @@ -128,7 +128,7 @@ func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { db, _ := ethdb.NewMemDatabase() addr := common.HexToAddress(testAddress) core.WriteGenesisBlockForTesting(db, core.GenesisAccount{addr, common.String2Big(testBalance)}) - ks := crypto.NewKeyStorePassphrase(filepath.Join(tmp, "keystore")) + ks := crypto.NewKeyStorePassphrase(filepath.Join(tmp, "keystore"), crypto.LightScryptN, crypto.LightScryptP) am := accounts.NewManager(ks) keyb, err := crypto.HexToECDSA(testKey) if err != nil { diff --git a/common/natspec/natspec_e2e_test.go.orig b/common/natspec/natspec_e2e_test.go.orig index ae8e17ad9..601a9edbd 100644 --- a/common/natspec/natspec_e2e_test.go.orig +++ b/common/natspec/natspec_e2e_test.go.orig @@ -106,7 +106,7 @@ func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { } // create a testAddress - ks := crypto.NewKeyStorePassphrase("/tmp/eth-natspec/keystore") + ks := crypto.NewKeyStorePassphrase("/tmp/eth-natspec/keystore", crypto.LightScryptN, crypto.LightScryptP) am := accounts.NewManager(ks) testAccount, err := am.NewAccount("password") if err != nil { diff --git a/crypto/crypto.go b/crypto/crypto.go index 035d2ab80..8685d62d3 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -215,7 +215,7 @@ func Decrypt(prv *ecdsa.PrivateKey, ct []byte) ([]byte, error) { // Used only by block tests. func ImportBlockTestKey(privKeyBytes []byte) error { - ks := NewKeyStorePassphrase(common.DefaultDataDir() + "/keystore") + ks := NewKeyStorePassphrase(common.DefaultDataDir()+"/keystore", LightScryptN, LightScryptP) ecKey := ToECDSA(privKeyBytes) key := &Key{ Id: uuid.NewRandom(), diff --git a/crypto/key_store_passphrase.go b/crypto/key_store_passphrase.go index c7ee00987..94411d2f9 100644 --- a/crypto/key_store_passphrase.go +++ b/crypto/key_store_passphrase.go @@ -45,19 +45,29 @@ import ( const ( keyHeaderKDF = "scrypt" - // 2^18 / 8 / 1 uses 256MB memory and approx 1s CPU time on a modern CPU. - scryptN = 1 << 18 - scryptr = 8 - scryptp = 1 - scryptdkLen = 32 + + // n,r,p = 2^18, 8, 1 uses 256MB memory and approx 1s CPU time on a modern CPU. + StandardScryptN = 1 << 18 + StandardScryptP = 1 + + // n,r,p = 2^12, 8, 6 uses 4MB memory and approx 100ms CPU time on a modern CPU. + LightScryptN = 1 << 12 + LightScryptP = 6 + + scryptR = 8 + scryptDKLen = 32 ) type keyStorePassphrase struct { keysDirPath string + scryptN int + scryptP int + scryptR int + scryptDKLen int } -func NewKeyStorePassphrase(path string) KeyStore { - return &keyStorePassphrase{path} +func NewKeyStorePassphrase(path string, scryptN int, scryptP int) KeyStore { + return &keyStorePassphrase{path, scryptN, scryptP, scryptR, scryptDKLen} } func (ks keyStorePassphrase) GenerateNewKey(rand io.Reader, auth string) (key *Key, err error) { @@ -87,11 +97,10 @@ func (ks keyStorePassphrase) GetKeyAddresses() (addresses []common.Address, err func (ks keyStorePassphrase) StoreKey(key *Key, auth string) (err error) { authArray := []byte(auth) salt := randentropy.GetEntropyCSPRNG(32) - derivedKey, err := scrypt.Key(authArray, salt, scryptN, scryptr, scryptp, scryptdkLen) + derivedKey, err := scrypt.Key(authArray, salt, ks.scryptN, ks.scryptR, ks.scryptP, ks.scryptDKLen) if err != nil { return err } - encryptKey := derivedKey[:16] keyBytes := FromECDSA(key.PrivateKey) @@ -104,10 +113,10 @@ func (ks keyStorePassphrase) StoreKey(key *Key, auth string) (err error) { mac := Sha3(derivedKey[16:32], cipherText) scryptParamsJSON := make(map[string]interface{}, 5) - scryptParamsJSON["n"] = scryptN - scryptParamsJSON["r"] = scryptr - scryptParamsJSON["p"] = scryptp - scryptParamsJSON["dklen"] = scryptdkLen + scryptParamsJSON["n"] = ks.scryptN + scryptParamsJSON["r"] = ks.scryptR + scryptParamsJSON["p"] = ks.scryptP + scryptParamsJSON["dklen"] = ks.scryptDKLen scryptParamsJSON["salt"] = hex.EncodeToString(salt) cipherParamsJSON := cipherparamsJSON{ diff --git a/crypto/key_store_test.go b/crypto/key_store_test.go index de4a21dcf..5a44a6026 100644 --- a/crypto/key_store_test.go +++ b/crypto/key_store_test.go @@ -56,7 +56,7 @@ func TestKeyStorePlain(t *testing.T) { } func TestKeyStorePassphrase(t *testing.T) { - ks := NewKeyStorePassphrase(common.DefaultDataDir()) + ks := NewKeyStorePassphrase(common.DefaultDataDir(), LightScryptN, LightScryptP) pass := "foo" k1, err := ks.GenerateNewKey(randentropy.Reader, pass) if err != nil { @@ -82,7 +82,7 @@ func TestKeyStorePassphrase(t *testing.T) { } func TestKeyStorePassphraseDecryptionFail(t *testing.T) { - ks := NewKeyStorePassphrase(common.DefaultDataDir()) + ks := NewKeyStorePassphrase(common.DefaultDataDir(), LightScryptN, LightScryptP) pass := "foo" k1, err := ks.GenerateNewKey(randentropy.Reader, pass) if err != nil { @@ -110,7 +110,7 @@ func TestImportPreSaleKey(t *testing.T) { // python pyethsaletool.py genwallet // with password "foo" fileContent := "{\"encseed\": \"26d87f5f2bf9835f9a47eefae571bc09f9107bb13d54ff12a4ec095d01f83897494cf34f7bed2ed34126ecba9db7b62de56c9d7cd136520a0427bfb11b8954ba7ac39b90d4650d3448e31185affcd74226a68f1e94b1108e6e0a4a91cdd83eba\", \"ethaddr\": \"d4584b5f6229b7be90727b0fc8c6b91bb427821f\", \"email\": \"gustav.simonsson@gmail.com\", \"btcaddr\": \"1EVknXyFC68kKNLkh6YnKzW41svSRoaAcx\"}" - ks := NewKeyStorePassphrase(common.DefaultDataDir()) + ks := NewKeyStorePassphrase(common.DefaultDataDir(), LightScryptN, LightScryptP) pass := "foo" _, err := ImportPreSaleKey(ks, []byte(fileContent), pass) if err != nil { @@ -168,7 +168,7 @@ func TestV1_1(t *testing.T) { } func TestV1_2(t *testing.T) { - ks := NewKeyStorePassphrase("tests/v1") + ks := NewKeyStorePassphrase("tests/v1", LightScryptN, LightScryptP) addr := common.HexToAddress("cb61d5a9c4896fb9658090b597ef0e7be6f7b67e") k, err := ks.GetKey(addr, "g") if err != nil { diff --git a/tests/block_test_util.go b/tests/block_test_util.go index 4c329631a..6a2eb96a4 100644 --- a/tests/block_test_util.go +++ b/tests/block_test_util.go @@ -162,7 +162,7 @@ func runBlockTests(bt map[string]*BlockTest, skipTests []string) error { } func runBlockTest(test *BlockTest) error { - ks := crypto.NewKeyStorePassphrase(filepath.Join(common.DefaultDataDir(), "keystore")) + ks := crypto.NewKeyStorePassphrase(filepath.Join(common.DefaultDataDir(), "keystore"), crypto.StandardScryptN, crypto.StandardScryptP) am := accounts.NewManager(ks) db, _ := ethdb.NewMemDatabase() cfg := ð.Config{ -- cgit v1.2.3 From c3c5f8b654f9ddaeedeb2d3d5d1caf000e08320e Mon Sep 17 00:00:00 2001 From: Bas van Kervel Date: Thu, 29 Oct 2015 08:40:07 +0100 Subject: rpc: fixed params parsing problem which could lead to a panic check argument type before parsing params recover from panic in ipc channel --- rpc/api/eth_args.go | 14 +++++++++++--- rpc/comms/comms.go | 11 +++++++---- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/rpc/api/eth_args.go b/rpc/api/eth_args.go index 6aca6a663..457350d74 100644 --- a/rpc/api/eth_args.go +++ b/rpc/api/eth_args.go @@ -626,7 +626,12 @@ func (args *GetBlockByHashArgs) UnmarshalJSON(b []byte) (err error) { args.IncludeTxs = obj[1].(bool) - return nil + if inclTx, ok := obj[1].(bool); ok { + args.IncludeTxs = inclTx + return nil + } + + return shared.NewInvalidTypeError("includeTxs", "not a bool") } type GetBlockByNumberArgs struct { @@ -648,9 +653,12 @@ func (args *GetBlockByNumberArgs) UnmarshalJSON(b []byte) (err error) { return err } - args.IncludeTxs = obj[1].(bool) + if inclTx, ok := obj[1].(bool); ok { + args.IncludeTxs = inclTx + return nil + } - return nil + return shared.NewInvalidTypeError("includeTxs", "not a bool") } type BlockFilterArgs struct { diff --git a/rpc/comms/comms.go b/rpc/comms/comms.go index 731b2f62e..61fba5722 100644 --- a/rpc/comms/comms.go +++ b/rpc/comms/comms.go @@ -62,13 +62,18 @@ type EthereumClient interface { func handle(id int, conn net.Conn, api shared.EthereumApi, c codec.Codec) { codec := c.New(conn) + defer func() { + if r := recover(); r != nil { + glog.Errorf("panic: %v\n", r) + } + codec.Close() + }() + for { requests, isBatch, err := codec.ReadRequest() if err == io.EOF { - codec.Close() return } else if err != nil { - codec.Close() glog.V(logger.Debug).Infof("Closed IPC Conn %06d recv err - %v\n", id, err) return } @@ -87,7 +92,6 @@ func handle(id int, conn net.Conn, api shared.EthereumApi, c codec.Codec) { err = codec.WriteResponse(responses[:responseCount]) if err != nil { - codec.Close() glog.V(logger.Debug).Infof("Closed IPC Conn %06d send err - %v\n", id, err) return } @@ -98,7 +102,6 @@ func handle(id int, conn net.Conn, api shared.EthereumApi, c codec.Codec) { rpcResponse = shared.NewRpcResponse(requests[0].Id, requests[0].Jsonrpc, res, err) err = codec.WriteResponse(rpcResponse) if err != nil { - codec.Close() glog.V(logger.Debug).Infof("Closed IPC Conn %06d send err - %v\n", id, err) return } -- cgit v1.2.3 From fbdb44dcc17240a01b45e55d3aa4e4b8db0868cd Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 29 Oct 2015 13:28:00 +0100 Subject: cmd/utils, rpc/comms: stop XEth when IPC connection ends There are a bunch of changes required to make this work: - in miner: allow unregistering agents, fix RemoteAgent.Stop - in eth/filters: make FilterSystem.Stop not crash - in rpc/comms: move listen loop to platform-independent code Fixes #1930. I ran the shell loop there for a few minutes and didn't see any changes in the memory profile. --- cmd/utils/flags.go | 11 ++---- eth/filters/filter_system.go | 88 ++++++++++++++++++-------------------------- miner/miner.go | 7 +++- miner/remote_agent.go | 15 +++++--- miner/worker.go | 30 ++++++++------- rpc/comms/ipc.go | 43 +++++++++++++++++++++- rpc/comms/ipc_unix.go | 40 +++----------------- rpc/comms/ipc_windows.go | 36 ++---------------- xeth/xeth.go | 14 +++---- 9 files changed, 127 insertions(+), 157 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index c2b92be46..299ab4abb 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -627,17 +627,14 @@ func StartIPC(eth *eth.Ethereum, ctx *cli.Context) error { Endpoint: IpcSocketPath(ctx), } - initializer := func(conn net.Conn) (shared.EthereumApi, error) { + initializer := func(conn net.Conn) (comms.Stopper, shared.EthereumApi, error) { fe := useragent.NewRemoteFrontend(conn, eth.AccountManager()) xeth := xeth.New(eth, fe) - codec := codec.JSON - - apis, err := api.ParseApiString(ctx.GlobalString(IPCApiFlag.Name), codec, xeth, eth) + apis, err := api.ParseApiString(ctx.GlobalString(IPCApiFlag.Name), codec.JSON, xeth, eth) if err != nil { - return nil, err + return nil, nil, err } - - return api.Merge(apis...), nil + return xeth, api.Merge(apis...), nil } return comms.StartIpc(config, codec.JSON, initializer) diff --git a/eth/filters/filter_system.go b/eth/filters/filter_system.go index ae6093525..df3ce90c6 100644 --- a/eth/filters/filter_system.go +++ b/eth/filters/filter_system.go @@ -31,30 +31,32 @@ import ( // block, transaction and log events. The Filtering system can be used to listen // for specific LOG events fired by the EVM (Ethereum Virtual Machine). type FilterSystem struct { - eventMux *event.TypeMux - filterMu sync.RWMutex filterId int filters map[int]*Filter created map[int]time.Time - - quit chan struct{} + sub event.Subscription } // NewFilterSystem returns a newly allocated filter manager func NewFilterSystem(mux *event.TypeMux) *FilterSystem { fs := &FilterSystem{ - eventMux: mux, - filters: make(map[int]*Filter), - created: make(map[int]time.Time), + filters: make(map[int]*Filter), + created: make(map[int]time.Time), } + fs.sub = mux.Subscribe( + //core.PendingBlockEvent{}, + core.ChainEvent{}, + core.TxPreEvent{}, + vm.Logs(nil), + ) go fs.filterLoop() return fs } // Stop quits the filter loop required for polling events func (fs *FilterSystem) Stop() { - close(fs.quit) + fs.sub.Unsubscribe() } // Add adds a filter to the filter manager @@ -89,57 +91,37 @@ func (fs *FilterSystem) Get(id int) *Filter { // filterLoop waits for specific events from ethereum and fires their handlers // when the filter matches the requirements. func (fs *FilterSystem) filterLoop() { - // Subscribe to events - eventCh := fs.eventMux.Subscribe( - //core.PendingBlockEvent{}, - core.ChainEvent{}, - core.TxPreEvent{}, - vm.Logs(nil), - ).Chan() - -out: - for { - select { - case <-fs.quit: - break out - case event, ok := <-eventCh: - if !ok { - // Event subscription closed, set the channel to nil to stop spinning - eventCh = nil - continue - } - // A real event arrived, notify the registered filters - switch ev := event.Data.(type) { - case core.ChainEvent: - fs.filterMu.RLock() - for id, filter := range fs.filters { - if filter.BlockCallback != nil && fs.created[id].Before(event.Time) { - filter.BlockCallback(ev.Block, ev.Logs) - } + for event := range fs.sub.Chan() { + switch ev := event.Data.(type) { + case core.ChainEvent: + fs.filterMu.RLock() + for id, filter := range fs.filters { + if filter.BlockCallback != nil && fs.created[id].Before(event.Time) { + filter.BlockCallback(ev.Block, ev.Logs) } - fs.filterMu.RUnlock() + } + fs.filterMu.RUnlock() - case core.TxPreEvent: - fs.filterMu.RLock() - for id, filter := range fs.filters { - if filter.TransactionCallback != nil && fs.created[id].Before(event.Time) { - filter.TransactionCallback(ev.Tx) - } + case core.TxPreEvent: + fs.filterMu.RLock() + for id, filter := range fs.filters { + if filter.TransactionCallback != nil && fs.created[id].Before(event.Time) { + filter.TransactionCallback(ev.Tx) } - fs.filterMu.RUnlock() - - case vm.Logs: - fs.filterMu.RLock() - for id, filter := range fs.filters { - if filter.LogsCallback != nil && fs.created[id].Before(event.Time) { - msgs := filter.FilterLogs(ev) - if len(msgs) > 0 { - filter.LogsCallback(msgs) - } + } + fs.filterMu.RUnlock() + + case vm.Logs: + fs.filterMu.RLock() + for id, filter := range fs.filters { + if filter.LogsCallback != nil && fs.created[id].Before(event.Time) { + msgs := filter.FilterLogs(ev) + if len(msgs) > 0 { + filter.LogsCallback(msgs) } } - fs.filterMu.RUnlock() } + fs.filterMu.RUnlock() } } } diff --git a/miner/miner.go b/miner/miner.go index 769db79d1..6d4a84f1a 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -133,10 +133,13 @@ func (self *Miner) Register(agent Agent) { if self.Mining() { agent.Start() } - self.worker.register(agent) } +func (self *Miner) Unregister(agent Agent) { + self.worker.unregister(agent) +} + func (self *Miner) Mining() bool { return atomic.LoadInt32(&self.mining) > 0 } @@ -146,7 +149,7 @@ func (self *Miner) HashRate() (tot int64) { // do we care this might race? is it worth we're rewriting some // aspects of the worker/locking up agents so we can get an accurate // hashrate? - for _, agent := range self.worker.agents { + for agent := range self.worker.agents { tot += agent.GetHashRate() } return diff --git a/miner/remote_agent.go b/miner/remote_agent.go index 9e4453ce8..18ddf121c 100644 --- a/miner/remote_agent.go +++ b/miner/remote_agent.go @@ -48,9 +48,10 @@ type RemoteAgent struct { } func NewRemoteAgent() *RemoteAgent { - agent := &RemoteAgent{work: make(map[common.Hash]*Work), hashrate: make(map[common.Hash]hashrate)} - - return agent + return &RemoteAgent{ + work: make(map[common.Hash]*Work), + hashrate: make(map[common.Hash]hashrate), + } } func (a *RemoteAgent) SubmitHashrate(id common.Hash, rate uint64) { @@ -75,8 +76,12 @@ func (a *RemoteAgent) Start() { } func (a *RemoteAgent) Stop() { - close(a.quit) - close(a.workCh) + if a.quit != nil { + close(a.quit) + } + if a.workCh != nil { + close(a.workCh) + } } // GetHashRate returns the accumulated hashrate of all identifier combined diff --git a/miner/worker.go b/miner/worker.go index 3519e1506..2d072ef60 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -92,7 +92,7 @@ type Result struct { type worker struct { mu sync.Mutex - agents []Agent + agents map[Agent]struct{} recv chan *Result mux *event.TypeMux quit chan struct{} @@ -136,6 +136,7 @@ func newWorker(coinbase common.Address, eth core.Backend) *worker { coinbase: coinbase, txQueue: make(map[common.Hash]*types.Transaction), quit: make(chan struct{}), + agents: make(map[Agent]struct{}), fullValidation: false, } go worker.update() @@ -180,7 +181,7 @@ func (self *worker) start() { atomic.StoreInt32(&self.mining, 1) // spin up agents - for _, agent := range self.agents { + for agent := range self.agents { agent.Start() } } @@ -190,16 +191,14 @@ func (self *worker) stop() { defer self.mu.Unlock() if atomic.LoadInt32(&self.mining) == 1 { - var keep []Agent - // stop all agents - for _, agent := range self.agents { + // Stop all agents. + for agent := range self.agents { agent.Stop() - // keep all that's not a cpu agent - if _, ok := agent.(*CpuAgent); !ok { - keep = append(keep, agent) + // Remove CPU agents. + if _, ok := agent.(*CpuAgent); ok { + delete(self.agents, agent) } } - self.agents = keep } atomic.StoreInt32(&self.mining, 0) @@ -209,10 +208,17 @@ func (self *worker) stop() { func (self *worker) register(agent Agent) { self.mu.Lock() defer self.mu.Unlock() - self.agents = append(self.agents, agent) + self.agents[agent] = struct{}{} agent.SetReturnCh(self.recv) } +func (self *worker) unregister(agent Agent) { + self.mu.Lock() + defer self.mu.Unlock() + delete(self.agents, agent) + agent.Stop() +} + func (self *worker) update() { eventSub := self.mux.Subscribe(core.ChainHeadEvent{}, core.ChainSideEvent{}, core.TxPreEvent{}) defer eventSub.Unsubscribe() @@ -341,11 +347,9 @@ func (self *worker) push(work *Work) { glog.Infoln("You turn back and abort mining") return } - // push new work to agents - for _, agent := range self.agents { + for agent := range self.agents { atomic.AddInt32(&self.atWork, 1) - if agent.Work() != nil { agent.Work() <- work } diff --git a/rpc/comms/ipc.go b/rpc/comms/ipc.go index 3de659b65..882d62ab4 100644 --- a/rpc/comms/ipc.go +++ b/rpc/comms/ipc.go @@ -20,13 +20,22 @@ import ( "fmt" "math/rand" "net" + "os" "encoding/json" + "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/rpc/codec" "github.com/ethereum/go-ethereum/rpc/shared" ) +type Stopper interface { + Stop() +} + +type InitFunc func(conn net.Conn) (Stopper, shared.EthereumApi, error) + type IpcConfig struct { Endpoint string } @@ -90,8 +99,38 @@ func NewIpcClient(cfg IpcConfig, codec codec.Codec) (*ipcClient, error) { } // Start IPC server -func StartIpc(cfg IpcConfig, codec codec.Codec, initializer func(conn net.Conn) (shared.EthereumApi, error)) error { - return startIpc(cfg, codec, initializer) +func StartIpc(cfg IpcConfig, codec codec.Codec, initializer InitFunc) error { + l, err := ipcListen(cfg) + if err != nil { + return err + } + go ipcLoop(cfg, codec, initializer, l) + return nil +} + +func ipcLoop(cfg IpcConfig, codec codec.Codec, initializer InitFunc, l net.Listener) { + glog.V(logger.Info).Infof("IPC service started (%s)\n", cfg.Endpoint) + defer os.Remove(cfg.Endpoint) + defer l.Close() + for { + conn, err := l.Accept() + if err != nil { + glog.V(logger.Debug).Infof("accept: %v", err) + return + } + id := newIpcConnId() + go func() { + defer conn.Close() + glog.V(logger.Debug).Infof("new connection with id %06d started", id) + stopper, api, err := initializer(conn) + if err != nil { + glog.V(logger.Error).Infof("Unable to initialize IPC connection: %v", err) + return + } + defer stopper.Stop() + handle(id, conn, api, codec) + }() + } } func newIpcConnId() int { diff --git a/rpc/comms/ipc_unix.go b/rpc/comms/ipc_unix.go index d68363a45..4b839572a 100644 --- a/rpc/comms/ipc_unix.go +++ b/rpc/comms/ipc_unix.go @@ -23,8 +23,6 @@ import ( "os" "path/filepath" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/rpc/codec" "github.com/ethereum/go-ethereum/rpc/shared" "github.com/ethereum/go-ethereum/rpc/useragent" @@ -69,44 +67,16 @@ func (self *ipcClient) reconnect() error { return err } -func startIpc(cfg IpcConfig, codec codec.Codec, initializer func(conn net.Conn) (shared.EthereumApi, error)) error { +func ipcListen(cfg IpcConfig) (net.Listener, error) { // Ensure the IPC path exists and remove any previous leftover if err := os.MkdirAll(filepath.Dir(cfg.Endpoint), 0751); err != nil { - return err + return nil, err } os.Remove(cfg.Endpoint) - - l, err := net.ListenUnix("unix", &net.UnixAddr{Name: cfg.Endpoint, Net: "unix"}) + l, err := net.Listen("unix", cfg.Endpoint) if err != nil { - return err + return nil, err } os.Chmod(cfg.Endpoint, 0600) - - go func() { - for { - conn, err := l.AcceptUnix() - if err != nil { - glog.V(logger.Error).Infof("Error accepting ipc connection - %v\n", err) - continue - } - - id := newIpcConnId() - glog.V(logger.Debug).Infof("New IPC connection with id %06d started\n", id) - - api, err := initializer(conn) - if err != nil { - glog.V(logger.Error).Infof("Unable to initialize IPC connection - %v\n", err) - conn.Close() - continue - } - - go handle(id, conn, api, codec) - } - - os.Remove(cfg.Endpoint) - }() - - glog.V(logger.Info).Infof("IPC service started (%s)\n", cfg.Endpoint) - - return nil + return l, nil } diff --git a/rpc/comms/ipc_windows.go b/rpc/comms/ipc_windows.go index 47edd9e5b..e25fba253 100644 --- a/rpc/comms/ipc_windows.go +++ b/rpc/comms/ipc_windows.go @@ -28,8 +28,6 @@ import ( "time" "unsafe" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/rpc/codec" "github.com/ethereum/go-ethereum/rpc/shared" "github.com/ethereum/go-ethereum/rpc/useragent" @@ -688,40 +686,12 @@ func (self *ipcClient) reconnect() error { return err } -func startIpc(cfg IpcConfig, codec codec.Codec, initializer func(conn net.Conn) (shared.EthereumApi, error)) error { +func ipcListen(cfg IpcConfig) (net.Listener, error) { os.Remove(cfg.Endpoint) // in case it still exists from a previous run - l, err := Listen(cfg.Endpoint) if err != nil { - return err + return nil, err } os.Chmod(cfg.Endpoint, 0600) - - go func() { - for { - conn, err := l.Accept() - if err != nil { - glog.V(logger.Error).Infof("Error accepting ipc connection - %v\n", err) - continue - } - - id := newIpcConnId() - glog.V(logger.Debug).Infof("New IPC connection with id %06d started\n", id) - - api, err := initializer(conn) - if err != nil { - glog.V(logger.Error).Infof("Unable to initialize IPC connection - %v\n", err) - conn.Close() - continue - } - - go handle(id, conn, api, codec) - } - - os.Remove(cfg.Endpoint) - }() - - glog.V(logger.Info).Infof("IPC service started (%s)\n", cfg.Endpoint) - - return nil + return l, nil } diff --git a/xeth/xeth.go b/xeth/xeth.go index f1e8cc5ee..35e6dd52d 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -113,19 +113,15 @@ func New(ethereum *eth.Ethereum, frontend Frontend) *XEth { if frontend == nil { xeth.frontend = dummyFrontend{} } - state, err := xeth.backend.BlockChain().State() - if err != nil { - return nil - } + state, _ := xeth.backend.BlockChain().State() xeth.state = NewState(xeth, state) - go xeth.start() - return xeth } func (self *XEth) start() { timer := time.NewTicker(2 * time.Second) + defer timer.Stop() done: for { select { @@ -171,8 +167,12 @@ done: } } -func (self *XEth) stop() { +// Stop releases any resources associated with self. +// It may not be called more than once. +func (self *XEth) Stop() { close(self.quit) + self.filterManager.Stop() + self.backend.Miner().Unregister(self.agent) } func cAddress(a []string) []common.Address { -- cgit v1.2.3 From bf11a47f22311a21639fa4f7794a41cf2f9b809e Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 29 Oct 2015 22:53:53 +0100 Subject: Godeps: upgrade github.com/huin/goupnp to 90f71cb5 --- Godeps/Godeps.json | 2 +- .../src/github.com/huin/goupnp/.gitignore | 1 + .../src/github.com/huin/goupnp/README.md | 34 +- .../example_ssdp_registry/example_ssdp_registry.go | 27 + .../src/github.com/huin/goupnp/dcps/av1/av1.go | 8452 ++++++++++++++++++++ .../dcps/internetgateway1/internetgateway1.go | 940 +-- .../dcps/internetgateway2/internetgateway2.go | 1733 ++-- .../github.com/huin/goupnp/example/example_test.go | 62 - .../github.com/huin/goupnp/gotasks/specgen_task.go | 378 +- .../src/github.com/huin/goupnp/goupnp.go | 52 +- .../src/github.com/huin/goupnp/service_client.go | 62 +- .../src/github.com/huin/goupnp/soap/soap_test.go | 85 - .../src/github.com/huin/goupnp/soap/types.go | 11 + .../src/github.com/huin/goupnp/soap/types_test.go | 481 -- .../src/github.com/huin/goupnp/ssdp/registry.go | 132 +- p2p/nat/natupnp.go | 7 +- 16 files changed, 10223 insertions(+), 2236 deletions(-) create mode 100644 Godeps/_workspace/src/github.com/huin/goupnp/.gitignore create mode 100644 Godeps/_workspace/src/github.com/huin/goupnp/cmd/example_ssdp_registry/example_ssdp_registry.go create mode 100644 Godeps/_workspace/src/github.com/huin/goupnp/dcps/av1/av1.go delete mode 100644 Godeps/_workspace/src/github.com/huin/goupnp/example/example_test.go delete mode 100644 Godeps/_workspace/src/github.com/huin/goupnp/soap/soap_test.go delete mode 100644 Godeps/_workspace/src/github.com/huin/goupnp/soap/types_test.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index ee77a1c76..9c7c67a49 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -34,7 +34,7 @@ }, { "ImportPath": "github.com/huin/goupnp", - "Rev": "5cff77a69fb22f5f1774c4451ea2aab63d4d2f20" + "Rev": "90f71cb5dd6d4606388666d2cda4ce2f563d2185" }, { "ImportPath": "github.com/jackpal/go-nat-pmp", diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/.gitignore b/Godeps/_workspace/src/github.com/huin/goupnp/.gitignore new file mode 100644 index 000000000..09ef375e8 --- /dev/null +++ b/Godeps/_workspace/src/github.com/huin/goupnp/.gitignore @@ -0,0 +1 @@ +/gotasks/specs diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/README.md b/Godeps/_workspace/src/github.com/huin/goupnp/README.md index ea2c155a1..a228ccea6 100644 --- a/Godeps/_workspace/src/github.com/huin/goupnp/README.md +++ b/Godeps/_workspace/src/github.com/huin/goupnp/README.md @@ -5,10 +5,40 @@ Installation Run `go get -u github.com/huin/goupnp`. +Documentation +------------- + +All doc links below are for ![GoDoc](https://godoc.org/github.com/huin/goupnp?status.svg). + +Supported DCPs (you probably want to start with one of these): +* [av1](https://godoc.org/github.com/huin/goupnp/dcps/av1) - Client for UPnP Device Control Protocol MediaServer v1 and MediaRenderer v1. +* [internetgateway1](https://godoc.org/github.com/huin/goupnp/dcps/internetgateway1) - Client for UPnP Device Control Protocol Internet Gateway Device v1. +* [internetgateway2](https://godoc.org/github.com/huin/goupnp/dcps/internetgateway2) - Client for UPnP Device Control Protocol Internet Gateway Device v2. + +Core components: +* [(goupnp)](https://godoc.org/github.com/huin/goupnp) core library - contains datastructures and utilities typically used by the implemented DCPs. +* [httpu](https://godoc.org/github.com/huin/goupnp/httpu) HTTPU implementation, underlies SSDP. +* [ssdp](https://godoc.org/github.com/huin/goupnp/ssdp) SSDP client implementation (simple service discovery protocol) - used to discover UPnP services on a network. +* [soap](https://godoc.org/github.com/huin/goupnp/soap) SOAP client implementation (simple object access protocol) - used to communicate with discovered services. + + Regenerating dcps generated source code: ---------------------------------------- 1. Install gotasks: `go get -u github.com/jingweno/gotask` 2. Change to the gotasks directory: `cd gotasks` -3. Download UPnP specification data (if not done already): `wget http://upnp.org/resources/upnpresources.zip` -4. Regenerate source code: `gotask specgen -s upnpresources.zip -o ../dcps` +3. Run specgen task: `gotask specgen` + +Supporting additional UPnP devices and services: +------------------------------------------------ + +Supporting additional services is, in the trivial case, simply a matter of +adding the service to the `dcpMetadata` whitelist in `gotasks/specgen_task.go`, +regenerating the source code (see above), and committing that source code. + +However, it would be helpful if anyone needing such a service could test the +service against the service they have, and then reporting any trouble +encountered as an [issue on this +project](https://github.com/huin/goupnp/issues/new). If it just works, then +please report at least minimal working functionality as an issue, and +optionally contribute the metadata upstream. diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/cmd/example_ssdp_registry/example_ssdp_registry.go b/Godeps/_workspace/src/github.com/huin/goupnp/cmd/example_ssdp_registry/example_ssdp_registry.go new file mode 100644 index 000000000..05f0df003 --- /dev/null +++ b/Godeps/_workspace/src/github.com/huin/goupnp/cmd/example_ssdp_registry/example_ssdp_registry.go @@ -0,0 +1,27 @@ +package main + +import ( + "log" + + "github.com/huin/goupnp/ssdp" +) + +func main() { + c := make(chan ssdp.Update) + srv, reg := ssdp.NewServerAndRegistry() + reg.AddListener(c) + go listener(c) + if err := srv.ListenAndServe(); err != nil { + log.Print("ListenAndServe failed: ", err) + } +} + +func listener(c <-chan ssdp.Update) { + for u := range c { + if u.Entry != nil { + log.Printf("Event: %v USN: %s Entry: %#v", u.EventType, u.USN, *u.Entry) + } else { + log.Printf("Event: %v USN: %s Entry: ", u.EventType, u.USN) + } + } +} diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/dcps/av1/av1.go b/Godeps/_workspace/src/github.com/huin/goupnp/dcps/av1/av1.go new file mode 100644 index 000000000..5f9683d1f --- /dev/null +++ b/Godeps/_workspace/src/github.com/huin/goupnp/dcps/av1/av1.go @@ -0,0 +1,8452 @@ +// Client for UPnP Device Control Protocol MediaServer v1 and MediaRenderer v1. +// +// This DCP is documented in detail at: http://upnp.org/specs/av/av1/ +// +// Typically, use one of the New* functions to create clients for services. +package av1 + +// Generated file - do not edit by hand. See README.md + +import ( + "net/url" + "time" + + "github.com/huin/goupnp" + "github.com/huin/goupnp/soap" +) + +// Hack to avoid Go complaining if time isn't used. +var _ time.Time + +// Device URNs: +const () + +// Service URNs: +const ( + URN_AVTransport_1 = "urn:schemas-upnp-org:service:AVTransport:1" + URN_AVTransport_2 = "urn:schemas-upnp-org:service:AVTransport:2" + URN_ConnectionManager_1 = "urn:schemas-upnp-org:service:ConnectionManager:1" + URN_ConnectionManager_2 = "urn:schemas-upnp-org:service:ConnectionManager:2" + URN_ContentDirectory_1 = "urn:schemas-upnp-org:service:ContentDirectory:1" + URN_ContentDirectory_2 = "urn:schemas-upnp-org:service:ContentDirectory:2" + URN_ContentDirectory_3 = "urn:schemas-upnp-org:service:ContentDirectory:3" + URN_RenderingControl_1 = "urn:schemas-upnp-org:service:RenderingControl:1" + URN_RenderingControl_2 = "urn:schemas-upnp-org:service:RenderingControl:2" + URN_ScheduledRecording_1 = "urn:schemas-upnp-org:service:ScheduledRecording:1" + URN_ScheduledRecording_2 = "urn:schemas-upnp-org:service:ScheduledRecording:2" +) + +// AVTransport1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:AVTransport:1". See +// goupnp.ServiceClient, which contains RootDevice and Service attributes which +// are provided for informational value. +type AVTransport1 struct { + goupnp.ServiceClient +} + +// NewAVTransport1Clients discovers instances of the service on the network, +// and returns clients to any that are found. errors will contain an error for +// any devices that replied but which could not be queried, and err will be set +// if the discovery process failed outright. +// +// This is a typical entry calling point into this package. +func NewAVTransport1Clients() (clients []*AVTransport1, errors []error, err error) { + var genericClients []goupnp.ServiceClient + if genericClients, errors, err = goupnp.NewServiceClients(URN_AVTransport_1); err != nil { + return + } + clients = newAVTransport1ClientsFromGenericClients(genericClients) + return +} + +// NewAVTransport1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewAVTransport1ClientsByURL(loc *url.URL) ([]*AVTransport1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_AVTransport_1) + if err != nil { + return nil, err + } + return newAVTransport1ClientsFromGenericClients(genericClients), nil +} + +// NewAVTransport1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewAVTransport1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*AVTransport1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_AVTransport_1) + if err != nil { + return nil, err + } + return newAVTransport1ClientsFromGenericClients(genericClients), nil +} + +func newAVTransport1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*AVTransport1 { + clients := make([]*AVTransport1, len(genericClients)) + for i := range genericClients { + clients[i] = &AVTransport1{genericClients[i]} + } + return clients +} + +func (client *AVTransport1) SetAVTransportURI(InstanceID uint32, CurrentURI string, CurrentURIMetaData string) (err error) { + // Request structure. + request := &struct { + InstanceID string + + CurrentURI string + + CurrentURIMetaData string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.CurrentURI, err = soap.MarshalString(CurrentURI); err != nil { + return + } + if request.CurrentURIMetaData, err = soap.MarshalString(CurrentURIMetaData); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "SetAVTransportURI", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport1) SetNextAVTransportURI(InstanceID uint32, NextURI string, NextURIMetaData string) (err error) { + // Request structure. + request := &struct { + InstanceID string + + NextURI string + + NextURIMetaData string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.NextURI, err = soap.MarshalString(NextURI); err != nil { + return + } + if request.NextURIMetaData, err = soap.MarshalString(NextURIMetaData); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "SetNextAVTransportURI", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * NrTracks: allowed value range: minimum=0 +func (client *AVTransport1) GetMediaInfo(InstanceID uint32) (NrTracks uint32, MediaDuration string, CurrentURI string, CurrentURIMetaData string, NextURI string, NextURIMetaData string, PlayMedium string, RecordMedium string, WriteStatus string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NrTracks string + + MediaDuration string + + CurrentURI string + + CurrentURIMetaData string + + NextURI string + + NextURIMetaData string + + PlayMedium string + + RecordMedium string + + WriteStatus string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "GetMediaInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NrTracks, err = soap.UnmarshalUi4(response.NrTracks); err != nil { + return + } + if MediaDuration, err = soap.UnmarshalString(response.MediaDuration); err != nil { + return + } + if CurrentURI, err = soap.UnmarshalString(response.CurrentURI); err != nil { + return + } + if CurrentURIMetaData, err = soap.UnmarshalString(response.CurrentURIMetaData); err != nil { + return + } + if NextURI, err = soap.UnmarshalString(response.NextURI); err != nil { + return + } + if NextURIMetaData, err = soap.UnmarshalString(response.NextURIMetaData); err != nil { + return + } + if PlayMedium, err = soap.UnmarshalString(response.PlayMedium); err != nil { + return + } + if RecordMedium, err = soap.UnmarshalString(response.RecordMedium); err != nil { + return + } + if WriteStatus, err = soap.UnmarshalString(response.WriteStatus); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentTransportState: allowed values: STOPPED, PLAYING +// +// * CurrentTransportStatus: allowed values: OK, ERROR_OCCURRED +// +// * CurrentSpeed: allowed values: 1 +func (client *AVTransport1) GetTransportInfo(InstanceID uint32) (CurrentTransportState string, CurrentTransportStatus string, CurrentSpeed string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentTransportState string + + CurrentTransportStatus string + + CurrentSpeed string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "GetTransportInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentTransportState, err = soap.UnmarshalString(response.CurrentTransportState); err != nil { + return + } + if CurrentTransportStatus, err = soap.UnmarshalString(response.CurrentTransportStatus); err != nil { + return + } + if CurrentSpeed, err = soap.UnmarshalString(response.CurrentSpeed); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * Track: allowed value range: minimum=0, step=1 +func (client *AVTransport1) GetPositionInfo(InstanceID uint32) (Track uint32, TrackDuration string, TrackMetaData string, TrackURI string, RelTime string, AbsTime string, RelCount int32, AbsCount int32, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Track string + + TrackDuration string + + TrackMetaData string + + TrackURI string + + RelTime string + + AbsTime string + + RelCount string + + AbsCount string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "GetPositionInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Track, err = soap.UnmarshalUi4(response.Track); err != nil { + return + } + if TrackDuration, err = soap.UnmarshalString(response.TrackDuration); err != nil { + return + } + if TrackMetaData, err = soap.UnmarshalString(response.TrackMetaData); err != nil { + return + } + if TrackURI, err = soap.UnmarshalString(response.TrackURI); err != nil { + return + } + if RelTime, err = soap.UnmarshalString(response.RelTime); err != nil { + return + } + if AbsTime, err = soap.UnmarshalString(response.AbsTime); err != nil { + return + } + if RelCount, err = soap.UnmarshalI4(response.RelCount); err != nil { + return + } + if AbsCount, err = soap.UnmarshalI4(response.AbsCount); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport1) GetDeviceCapabilities(InstanceID uint32) (PlayMedia string, RecMedia string, RecQualityModes string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + PlayMedia string + + RecMedia string + + RecQualityModes string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "GetDeviceCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if PlayMedia, err = soap.UnmarshalString(response.PlayMedia); err != nil { + return + } + if RecMedia, err = soap.UnmarshalString(response.RecMedia); err != nil { + return + } + if RecQualityModes, err = soap.UnmarshalString(response.RecQualityModes); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * PlayMode: allowed values: NORMAL +func (client *AVTransport1) GetTransportSettings(InstanceID uint32) (PlayMode string, RecQualityMode string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + PlayMode string + + RecQualityMode string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "GetTransportSettings", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if PlayMode, err = soap.UnmarshalString(response.PlayMode); err != nil { + return + } + if RecQualityMode, err = soap.UnmarshalString(response.RecQualityMode); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport1) Stop(InstanceID uint32) (err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Stop", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Speed: allowed values: 1 + +func (client *AVTransport1) Play(InstanceID uint32, Speed string) (err error) { + // Request structure. + request := &struct { + InstanceID string + + Speed string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Speed, err = soap.MarshalString(Speed); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Play", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport1) Pause(InstanceID uint32) (err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Pause", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport1) Record(InstanceID uint32) (err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Record", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Unit: allowed values: TRACK_NR + +func (client *AVTransport1) Seek(InstanceID uint32, Unit string, Target string) (err error) { + // Request structure. + request := &struct { + InstanceID string + + Unit string + + Target string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Unit, err = soap.MarshalString(Unit); err != nil { + return + } + if request.Target, err = soap.MarshalString(Target); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Seek", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport1) Next(InstanceID uint32) (err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Next", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport1) Previous(InstanceID uint32) (err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "Previous", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * NewPlayMode: allowed values: NORMAL + +func (client *AVTransport1) SetPlayMode(InstanceID uint32, NewPlayMode string) (err error) { + // Request structure. + request := &struct { + InstanceID string + + NewPlayMode string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.NewPlayMode, err = soap.MarshalString(NewPlayMode); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "SetPlayMode", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport1) SetRecordQualityMode(InstanceID uint32, NewRecordQualityMode string) (err error) { + // Request structure. + request := &struct { + InstanceID string + + NewRecordQualityMode string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.NewRecordQualityMode, err = soap.MarshalString(NewRecordQualityMode); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "SetRecordQualityMode", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport1) GetCurrentTransportActions(InstanceID uint32) (Actions string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Actions string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_1, "GetCurrentTransportActions", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Actions, err = soap.UnmarshalString(response.Actions); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// AVTransport2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:AVTransport:2". See +// goupnp.ServiceClient, which contains RootDevice and Service attributes which +// are provided for informational value. +type AVTransport2 struct { + goupnp.ServiceClient +} + +// NewAVTransport2Clients discovers instances of the service on the network, +// and returns clients to any that are found. errors will contain an error for +// any devices that replied but which could not be queried, and err will be set +// if the discovery process failed outright. +// +// This is a typical entry calling point into this package. +func NewAVTransport2Clients() (clients []*AVTransport2, errors []error, err error) { + var genericClients []goupnp.ServiceClient + if genericClients, errors, err = goupnp.NewServiceClients(URN_AVTransport_2); err != nil { + return + } + clients = newAVTransport2ClientsFromGenericClients(genericClients) + return +} + +// NewAVTransport2ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewAVTransport2ClientsByURL(loc *url.URL) ([]*AVTransport2, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_AVTransport_2) + if err != nil { + return nil, err + } + return newAVTransport2ClientsFromGenericClients(genericClients), nil +} + +// NewAVTransport2ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewAVTransport2ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*AVTransport2, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_AVTransport_2) + if err != nil { + return nil, err + } + return newAVTransport2ClientsFromGenericClients(genericClients), nil +} + +func newAVTransport2ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*AVTransport2 { + clients := make([]*AVTransport2, len(genericClients)) + for i := range genericClients { + clients[i] = &AVTransport2{genericClients[i]} + } + return clients +} + +func (client *AVTransport2) SetAVTransportURI(InstanceID uint32, CurrentURI string, CurrentURIMetaData string) (err error) { + // Request structure. + request := &struct { + InstanceID string + + CurrentURI string + + CurrentURIMetaData string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.CurrentURI, err = soap.MarshalString(CurrentURI); err != nil { + return + } + if request.CurrentURIMetaData, err = soap.MarshalString(CurrentURIMetaData); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "SetAVTransportURI", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport2) SetNextAVTransportURI(InstanceID uint32, NextURI string, NextURIMetaData string) (err error) { + // Request structure. + request := &struct { + InstanceID string + + NextURI string + + NextURIMetaData string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.NextURI, err = soap.MarshalString(NextURI); err != nil { + return + } + if request.NextURIMetaData, err = soap.MarshalString(NextURIMetaData); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "SetNextAVTransportURI", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * NrTracks: allowed value range: minimum=0 +func (client *AVTransport2) GetMediaInfo(InstanceID uint32) (NrTracks uint32, MediaDuration string, CurrentURI string, CurrentURIMetaData string, NextURI string, NextURIMetaData string, PlayMedium string, RecordMedium string, WriteStatus string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NrTracks string + + MediaDuration string + + CurrentURI string + + CurrentURIMetaData string + + NextURI string + + NextURIMetaData string + + PlayMedium string + + RecordMedium string + + WriteStatus string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetMediaInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NrTracks, err = soap.UnmarshalUi4(response.NrTracks); err != nil { + return + } + if MediaDuration, err = soap.UnmarshalString(response.MediaDuration); err != nil { + return + } + if CurrentURI, err = soap.UnmarshalString(response.CurrentURI); err != nil { + return + } + if CurrentURIMetaData, err = soap.UnmarshalString(response.CurrentURIMetaData); err != nil { + return + } + if NextURI, err = soap.UnmarshalString(response.NextURI); err != nil { + return + } + if NextURIMetaData, err = soap.UnmarshalString(response.NextURIMetaData); err != nil { + return + } + if PlayMedium, err = soap.UnmarshalString(response.PlayMedium); err != nil { + return + } + if RecordMedium, err = soap.UnmarshalString(response.RecordMedium); err != nil { + return + } + if WriteStatus, err = soap.UnmarshalString(response.WriteStatus); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentType: allowed values: NO_MEDIA, TRACK_AWARE, TRACK_UNAWARE +// +// * NrTracks: allowed value range: minimum=0 +func (client *AVTransport2) GetMediaInfo_Ext(InstanceID uint32) (CurrentType string, NrTracks uint32, MediaDuration string, CurrentURI string, CurrentURIMetaData string, NextURI string, NextURIMetaData string, PlayMedium string, RecordMedium string, WriteStatus string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentType string + + NrTracks string + + MediaDuration string + + CurrentURI string + + CurrentURIMetaData string + + NextURI string + + NextURIMetaData string + + PlayMedium string + + RecordMedium string + + WriteStatus string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetMediaInfo_Ext", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentType, err = soap.UnmarshalString(response.CurrentType); err != nil { + return + } + if NrTracks, err = soap.UnmarshalUi4(response.NrTracks); err != nil { + return + } + if MediaDuration, err = soap.UnmarshalString(response.MediaDuration); err != nil { + return + } + if CurrentURI, err = soap.UnmarshalString(response.CurrentURI); err != nil { + return + } + if CurrentURIMetaData, err = soap.UnmarshalString(response.CurrentURIMetaData); err != nil { + return + } + if NextURI, err = soap.UnmarshalString(response.NextURI); err != nil { + return + } + if NextURIMetaData, err = soap.UnmarshalString(response.NextURIMetaData); err != nil { + return + } + if PlayMedium, err = soap.UnmarshalString(response.PlayMedium); err != nil { + return + } + if RecordMedium, err = soap.UnmarshalString(response.RecordMedium); err != nil { + return + } + if WriteStatus, err = soap.UnmarshalString(response.WriteStatus); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentTransportState: allowed values: STOPPED, PLAYING +// +// * CurrentTransportStatus: allowed values: OK, ERROR_OCCURRED +// +// * CurrentSpeed: allowed values: 1 +func (client *AVTransport2) GetTransportInfo(InstanceID uint32) (CurrentTransportState string, CurrentTransportStatus string, CurrentSpeed string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentTransportState string + + CurrentTransportStatus string + + CurrentSpeed string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetTransportInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentTransportState, err = soap.UnmarshalString(response.CurrentTransportState); err != nil { + return + } + if CurrentTransportStatus, err = soap.UnmarshalString(response.CurrentTransportStatus); err != nil { + return + } + if CurrentSpeed, err = soap.UnmarshalString(response.CurrentSpeed); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * Track: allowed value range: minimum=0, step=1 +func (client *AVTransport2) GetPositionInfo(InstanceID uint32) (Track uint32, TrackDuration string, TrackMetaData string, TrackURI string, RelTime string, AbsTime string, RelCount int32, AbsCount int32, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Track string + + TrackDuration string + + TrackMetaData string + + TrackURI string + + RelTime string + + AbsTime string + + RelCount string + + AbsCount string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetPositionInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Track, err = soap.UnmarshalUi4(response.Track); err != nil { + return + } + if TrackDuration, err = soap.UnmarshalString(response.TrackDuration); err != nil { + return + } + if TrackMetaData, err = soap.UnmarshalString(response.TrackMetaData); err != nil { + return + } + if TrackURI, err = soap.UnmarshalString(response.TrackURI); err != nil { + return + } + if RelTime, err = soap.UnmarshalString(response.RelTime); err != nil { + return + } + if AbsTime, err = soap.UnmarshalString(response.AbsTime); err != nil { + return + } + if RelCount, err = soap.UnmarshalI4(response.RelCount); err != nil { + return + } + if AbsCount, err = soap.UnmarshalI4(response.AbsCount); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport2) GetDeviceCapabilities(InstanceID uint32) (PlayMedia string, RecMedia string, RecQualityModes string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + PlayMedia string + + RecMedia string + + RecQualityModes string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetDeviceCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if PlayMedia, err = soap.UnmarshalString(response.PlayMedia); err != nil { + return + } + if RecMedia, err = soap.UnmarshalString(response.RecMedia); err != nil { + return + } + if RecQualityModes, err = soap.UnmarshalString(response.RecQualityModes); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * PlayMode: allowed values: NORMAL +func (client *AVTransport2) GetTransportSettings(InstanceID uint32) (PlayMode string, RecQualityMode string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + PlayMode string + + RecQualityMode string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetTransportSettings", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if PlayMode, err = soap.UnmarshalString(response.PlayMode); err != nil { + return + } + if RecQualityMode, err = soap.UnmarshalString(response.RecQualityMode); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport2) Stop(InstanceID uint32) (err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Stop", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Speed: allowed values: 1 + +func (client *AVTransport2) Play(InstanceID uint32, Speed string) (err error) { + // Request structure. + request := &struct { + InstanceID string + + Speed string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Speed, err = soap.MarshalString(Speed); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Play", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport2) Pause(InstanceID uint32) (err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Pause", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport2) Record(InstanceID uint32) (err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Record", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Unit: allowed values: TRACK_NR + +func (client *AVTransport2) Seek(InstanceID uint32, Unit string, Target string) (err error) { + // Request structure. + request := &struct { + InstanceID string + + Unit string + + Target string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Unit, err = soap.MarshalString(Unit); err != nil { + return + } + if request.Target, err = soap.MarshalString(Target); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Seek", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport2) Next(InstanceID uint32) (err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Next", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport2) Previous(InstanceID uint32) (err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "Previous", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * NewPlayMode: allowed values: NORMAL + +func (client *AVTransport2) SetPlayMode(InstanceID uint32, NewPlayMode string) (err error) { + // Request structure. + request := &struct { + InstanceID string + + NewPlayMode string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.NewPlayMode, err = soap.MarshalString(NewPlayMode); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "SetPlayMode", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport2) SetRecordQualityMode(InstanceID uint32, NewRecordQualityMode string) (err error) { + // Request structure. + request := &struct { + InstanceID string + + NewRecordQualityMode string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.NewRecordQualityMode, err = soap.MarshalString(NewRecordQualityMode); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "SetRecordQualityMode", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport2) GetCurrentTransportActions(InstanceID uint32) (Actions string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Actions string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetCurrentTransportActions", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Actions, err = soap.UnmarshalString(response.Actions); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentDRMState: allowed values: OK +func (client *AVTransport2) GetDRMState(InstanceID uint32) (CurrentDRMState string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentDRMState string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetDRMState", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentDRMState, err = soap.UnmarshalString(response.CurrentDRMState); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport2) GetStateVariables(InstanceID uint32, StateVariableList string) (StateVariableValuePairs string, err error) { + // Request structure. + request := &struct { + InstanceID string + + StateVariableList string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.StateVariableList, err = soap.MarshalString(StateVariableList); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + StateVariableValuePairs string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "GetStateVariables", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if StateVariableValuePairs, err = soap.UnmarshalString(response.StateVariableValuePairs); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *AVTransport2) SetStateVariables(InstanceID uint32, AVTransportUDN string, ServiceType string, ServiceId string, StateVariableValuePairs string) (StateVariableList string, err error) { + // Request structure. + request := &struct { + InstanceID string + + AVTransportUDN string + + ServiceType string + + ServiceId string + + StateVariableValuePairs string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.AVTransportUDN, err = soap.MarshalString(AVTransportUDN); err != nil { + return + } + if request.ServiceType, err = soap.MarshalString(ServiceType); err != nil { + return + } + if request.ServiceId, err = soap.MarshalString(ServiceId); err != nil { + return + } + if request.StateVariableValuePairs, err = soap.MarshalString(StateVariableValuePairs); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + StateVariableList string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_AVTransport_2, "SetStateVariables", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if StateVariableList, err = soap.UnmarshalString(response.StateVariableList); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// ConnectionManager1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ConnectionManager:1". See +// goupnp.ServiceClient, which contains RootDevice and Service attributes which +// are provided for informational value. +type ConnectionManager1 struct { + goupnp.ServiceClient +} + +// NewConnectionManager1Clients discovers instances of the service on the network, +// and returns clients to any that are found. errors will contain an error for +// any devices that replied but which could not be queried, and err will be set +// if the discovery process failed outright. +// +// This is a typical entry calling point into this package. +func NewConnectionManager1Clients() (clients []*ConnectionManager1, errors []error, err error) { + var genericClients []goupnp.ServiceClient + if genericClients, errors, err = goupnp.NewServiceClients(URN_ConnectionManager_1); err != nil { + return + } + clients = newConnectionManager1ClientsFromGenericClients(genericClients) + return +} + +// NewConnectionManager1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewConnectionManager1ClientsByURL(loc *url.URL) ([]*ConnectionManager1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ConnectionManager_1) + if err != nil { + return nil, err + } + return newConnectionManager1ClientsFromGenericClients(genericClients), nil +} + +// NewConnectionManager1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewConnectionManager1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ConnectionManager1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ConnectionManager_1) + if err != nil { + return nil, err + } + return newConnectionManager1ClientsFromGenericClients(genericClients), nil +} + +func newConnectionManager1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ConnectionManager1 { + clients := make([]*ConnectionManager1, len(genericClients)) + for i := range genericClients { + clients[i] = &ConnectionManager1{genericClients[i]} + } + return clients +} + +func (client *ConnectionManager1) GetProtocolInfo() (Source string, Sink string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Source string + + Sink string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ConnectionManager_1, "GetProtocolInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Source, err = soap.UnmarshalString(response.Source); err != nil { + return + } + if Sink, err = soap.UnmarshalString(response.Sink); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Direction: allowed values: Input, Output + +func (client *ConnectionManager1) PrepareForConnection(RemoteProtocolInfo string, PeerConnectionManager string, PeerConnectionID int32, Direction string) (ConnectionID int32, AVTransportID int32, RcsID int32, err error) { + // Request structure. + request := &struct { + RemoteProtocolInfo string + + PeerConnectionManager string + + PeerConnectionID string + + Direction string + }{} + // BEGIN Marshal arguments into request. + + if request.RemoteProtocolInfo, err = soap.MarshalString(RemoteProtocolInfo); err != nil { + return + } + if request.PeerConnectionManager, err = soap.MarshalString(PeerConnectionManager); err != nil { + return + } + if request.PeerConnectionID, err = soap.MarshalI4(PeerConnectionID); err != nil { + return + } + if request.Direction, err = soap.MarshalString(Direction); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + ConnectionID string + + AVTransportID string + + RcsID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ConnectionManager_1, "PrepareForConnection", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if ConnectionID, err = soap.UnmarshalI4(response.ConnectionID); err != nil { + return + } + if AVTransportID, err = soap.UnmarshalI4(response.AVTransportID); err != nil { + return + } + if RcsID, err = soap.UnmarshalI4(response.RcsID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ConnectionManager1) ConnectionComplete(ConnectionID int32) (err error) { + // Request structure. + request := &struct { + ConnectionID string + }{} + // BEGIN Marshal arguments into request. + + if request.ConnectionID, err = soap.MarshalI4(ConnectionID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ConnectionManager_1, "ConnectionComplete", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ConnectionManager1) GetCurrentConnectionIDs() (ConnectionIDs string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + ConnectionIDs string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ConnectionManager_1, "GetCurrentConnectionIDs", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if ConnectionIDs, err = soap.UnmarshalString(response.ConnectionIDs); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * Direction: allowed values: Input, Output +// +// * Status: allowed values: OK, ContentFormatMismatch, InsufficientBandwidth, UnreliableChannel, Unknown +func (client *ConnectionManager1) GetCurrentConnectionInfo(ConnectionID int32) (RcsID int32, AVTransportID int32, ProtocolInfo string, PeerConnectionManager string, PeerConnectionID int32, Direction string, Status string, err error) { + // Request structure. + request := &struct { + ConnectionID string + }{} + // BEGIN Marshal arguments into request. + + if request.ConnectionID, err = soap.MarshalI4(ConnectionID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + RcsID string + + AVTransportID string + + ProtocolInfo string + + PeerConnectionManager string + + PeerConnectionID string + + Direction string + + Status string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ConnectionManager_1, "GetCurrentConnectionInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if RcsID, err = soap.UnmarshalI4(response.RcsID); err != nil { + return + } + if AVTransportID, err = soap.UnmarshalI4(response.AVTransportID); err != nil { + return + } + if ProtocolInfo, err = soap.UnmarshalString(response.ProtocolInfo); err != nil { + return + } + if PeerConnectionManager, err = soap.UnmarshalString(response.PeerConnectionManager); err != nil { + return + } + if PeerConnectionID, err = soap.UnmarshalI4(response.PeerConnectionID); err != nil { + return + } + if Direction, err = soap.UnmarshalString(response.Direction); err != nil { + return + } + if Status, err = soap.UnmarshalString(response.Status); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// ConnectionManager2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ConnectionManager:2". See +// goupnp.ServiceClient, which contains RootDevice and Service attributes which +// are provided for informational value. +type ConnectionManager2 struct { + goupnp.ServiceClient +} + +// NewConnectionManager2Clients discovers instances of the service on the network, +// and returns clients to any that are found. errors will contain an error for +// any devices that replied but which could not be queried, and err will be set +// if the discovery process failed outright. +// +// This is a typical entry calling point into this package. +func NewConnectionManager2Clients() (clients []*ConnectionManager2, errors []error, err error) { + var genericClients []goupnp.ServiceClient + if genericClients, errors, err = goupnp.NewServiceClients(URN_ConnectionManager_2); err != nil { + return + } + clients = newConnectionManager2ClientsFromGenericClients(genericClients) + return +} + +// NewConnectionManager2ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewConnectionManager2ClientsByURL(loc *url.URL) ([]*ConnectionManager2, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ConnectionManager_2) + if err != nil { + return nil, err + } + return newConnectionManager2ClientsFromGenericClients(genericClients), nil +} + +// NewConnectionManager2ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewConnectionManager2ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ConnectionManager2, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ConnectionManager_2) + if err != nil { + return nil, err + } + return newConnectionManager2ClientsFromGenericClients(genericClients), nil +} + +func newConnectionManager2ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ConnectionManager2 { + clients := make([]*ConnectionManager2, len(genericClients)) + for i := range genericClients { + clients[i] = &ConnectionManager2{genericClients[i]} + } + return clients +} + +func (client *ConnectionManager2) GetProtocolInfo() (Source string, Sink string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Source string + + Sink string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ConnectionManager_2, "GetProtocolInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Source, err = soap.UnmarshalString(response.Source); err != nil { + return + } + if Sink, err = soap.UnmarshalString(response.Sink); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Direction: allowed values: Input, Output + +func (client *ConnectionManager2) PrepareForConnection(RemoteProtocolInfo string, PeerConnectionManager string, PeerConnectionID int32, Direction string) (ConnectionID int32, AVTransportID int32, RcsID int32, err error) { + // Request structure. + request := &struct { + RemoteProtocolInfo string + + PeerConnectionManager string + + PeerConnectionID string + + Direction string + }{} + // BEGIN Marshal arguments into request. + + if request.RemoteProtocolInfo, err = soap.MarshalString(RemoteProtocolInfo); err != nil { + return + } + if request.PeerConnectionManager, err = soap.MarshalString(PeerConnectionManager); err != nil { + return + } + if request.PeerConnectionID, err = soap.MarshalI4(PeerConnectionID); err != nil { + return + } + if request.Direction, err = soap.MarshalString(Direction); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + ConnectionID string + + AVTransportID string + + RcsID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ConnectionManager_2, "PrepareForConnection", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if ConnectionID, err = soap.UnmarshalI4(response.ConnectionID); err != nil { + return + } + if AVTransportID, err = soap.UnmarshalI4(response.AVTransportID); err != nil { + return + } + if RcsID, err = soap.UnmarshalI4(response.RcsID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ConnectionManager2) ConnectionComplete(ConnectionID int32) (err error) { + // Request structure. + request := &struct { + ConnectionID string + }{} + // BEGIN Marshal arguments into request. + + if request.ConnectionID, err = soap.MarshalI4(ConnectionID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ConnectionManager_2, "ConnectionComplete", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ConnectionManager2) GetCurrentConnectionIDs() (ConnectionIDs string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + ConnectionIDs string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ConnectionManager_2, "GetCurrentConnectionIDs", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if ConnectionIDs, err = soap.UnmarshalString(response.ConnectionIDs); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * Direction: allowed values: Input, Output +// +// * Status: allowed values: OK, ContentFormatMismatch, InsufficientBandwidth, UnreliableChannel, Unknown +func (client *ConnectionManager2) GetCurrentConnectionInfo(ConnectionID int32) (RcsID int32, AVTransportID int32, ProtocolInfo string, PeerConnectionManager string, PeerConnectionID int32, Direction string, Status string, err error) { + // Request structure. + request := &struct { + ConnectionID string + }{} + // BEGIN Marshal arguments into request. + + if request.ConnectionID, err = soap.MarshalI4(ConnectionID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + RcsID string + + AVTransportID string + + ProtocolInfo string + + PeerConnectionManager string + + PeerConnectionID string + + Direction string + + Status string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ConnectionManager_2, "GetCurrentConnectionInfo", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if RcsID, err = soap.UnmarshalI4(response.RcsID); err != nil { + return + } + if AVTransportID, err = soap.UnmarshalI4(response.AVTransportID); err != nil { + return + } + if ProtocolInfo, err = soap.UnmarshalString(response.ProtocolInfo); err != nil { + return + } + if PeerConnectionManager, err = soap.UnmarshalString(response.PeerConnectionManager); err != nil { + return + } + if PeerConnectionID, err = soap.UnmarshalI4(response.PeerConnectionID); err != nil { + return + } + if Direction, err = soap.UnmarshalString(response.Direction); err != nil { + return + } + if Status, err = soap.UnmarshalString(response.Status); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// ContentDirectory1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ContentDirectory:1". See +// goupnp.ServiceClient, which contains RootDevice and Service attributes which +// are provided for informational value. +type ContentDirectory1 struct { + goupnp.ServiceClient +} + +// NewContentDirectory1Clients discovers instances of the service on the network, +// and returns clients to any that are found. errors will contain an error for +// any devices that replied but which could not be queried, and err will be set +// if the discovery process failed outright. +// +// This is a typical entry calling point into this package. +func NewContentDirectory1Clients() (clients []*ContentDirectory1, errors []error, err error) { + var genericClients []goupnp.ServiceClient + if genericClients, errors, err = goupnp.NewServiceClients(URN_ContentDirectory_1); err != nil { + return + } + clients = newContentDirectory1ClientsFromGenericClients(genericClients) + return +} + +// NewContentDirectory1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewContentDirectory1ClientsByURL(loc *url.URL) ([]*ContentDirectory1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ContentDirectory_1) + if err != nil { + return nil, err + } + return newContentDirectory1ClientsFromGenericClients(genericClients), nil +} + +// NewContentDirectory1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewContentDirectory1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ContentDirectory1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ContentDirectory_1) + if err != nil { + return nil, err + } + return newContentDirectory1ClientsFromGenericClients(genericClients), nil +} + +func newContentDirectory1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ContentDirectory1 { + clients := make([]*ContentDirectory1, len(genericClients)) + for i := range genericClients { + clients[i] = &ContentDirectory1{genericClients[i]} + } + return clients +} + +func (client *ContentDirectory1) GetSearchCapabilities() (SearchCaps string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + SearchCaps string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "GetSearchCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if SearchCaps, err = soap.UnmarshalString(response.SearchCaps); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory1) GetSortCapabilities() (SortCaps string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + SortCaps string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "GetSortCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory1) GetSystemUpdateID() (Id uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Id string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "GetSystemUpdateID", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Id, err = soap.UnmarshalUi4(response.Id); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * BrowseFlag: allowed values: BrowseMetadata, BrowseDirectChildren + +func (client *ContentDirectory1) Browse(ObjectID string, BrowseFlag string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) { + // Request structure. + request := &struct { + ObjectID string + + BrowseFlag string + + Filter string + + StartingIndex string + + RequestedCount string + + SortCriteria string + }{} + // BEGIN Marshal arguments into request. + + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + if request.BrowseFlag, err = soap.MarshalString(BrowseFlag); err != nil { + return + } + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil { + return + } + if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil { + return + } + if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Result string + + NumberReturned string + + TotalMatches string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "Browse", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil { + return + } + if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory1) Search(ContainerID string, SearchCriteria string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) { + // Request structure. + request := &struct { + ContainerID string + + SearchCriteria string + + Filter string + + StartingIndex string + + RequestedCount string + + SortCriteria string + }{} + // BEGIN Marshal arguments into request. + + if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { + return + } + if request.SearchCriteria, err = soap.MarshalString(SearchCriteria); err != nil { + return + } + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil { + return + } + if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil { + return + } + if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Result string + + NumberReturned string + + TotalMatches string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "Search", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil { + return + } + if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory1) CreateObject(ContainerID string, Elements string) (ObjectID string, Result string, err error) { + // Request structure. + request := &struct { + ContainerID string + + Elements string + }{} + // BEGIN Marshal arguments into request. + + if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { + return + } + if request.Elements, err = soap.MarshalString(Elements); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + ObjectID string + + Result string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "CreateObject", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if ObjectID, err = soap.UnmarshalString(response.ObjectID); err != nil { + return + } + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory1) DestroyObject(ObjectID string) (err error) { + // Request structure. + request := &struct { + ObjectID string + }{} + // BEGIN Marshal arguments into request. + + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "DestroyObject", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory1) UpdateObject(ObjectID string, CurrentTagValue string, NewTagValue string) (err error) { + // Request structure. + request := &struct { + ObjectID string + + CurrentTagValue string + + NewTagValue string + }{} + // BEGIN Marshal arguments into request. + + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + if request.CurrentTagValue, err = soap.MarshalString(CurrentTagValue); err != nil { + return + } + if request.NewTagValue, err = soap.MarshalString(NewTagValue); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "UpdateObject", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory1) ImportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) { + // Request structure. + request := &struct { + SourceURI string + + DestinationURI string + }{} + // BEGIN Marshal arguments into request. + + if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil { + return + } + if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + TransferID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "ImportResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory1) ExportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) { + // Request structure. + request := &struct { + SourceURI string + + DestinationURI string + }{} + // BEGIN Marshal arguments into request. + + if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil { + return + } + if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + TransferID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "ExportResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory1) StopTransferResource(TransferID uint32) (err error) { + // Request structure. + request := &struct { + TransferID string + }{} + // BEGIN Marshal arguments into request. + + if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "StopTransferResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * TransferStatus: allowed values: COMPLETED, ERROR, IN_PROGRESS, STOPPED +func (client *ContentDirectory1) GetTransferProgress(TransferID uint32) (TransferStatus string, TransferLength string, TransferTotal string, err error) { + // Request structure. + request := &struct { + TransferID string + }{} + // BEGIN Marshal arguments into request. + + if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + TransferStatus string + + TransferLength string + + TransferTotal string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "GetTransferProgress", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if TransferStatus, err = soap.UnmarshalString(response.TransferStatus); err != nil { + return + } + if TransferLength, err = soap.UnmarshalString(response.TransferLength); err != nil { + return + } + if TransferTotal, err = soap.UnmarshalString(response.TransferTotal); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory1) DeleteResource(ResourceURI *url.URL) (err error) { + // Request structure. + request := &struct { + ResourceURI string + }{} + // BEGIN Marshal arguments into request. + + if request.ResourceURI, err = soap.MarshalURI(ResourceURI); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "DeleteResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory1) CreateReference(ContainerID string, ObjectID string) (NewID string, err error) { + // Request structure. + request := &struct { + ContainerID string + + ObjectID string + }{} + // BEGIN Marshal arguments into request. + + if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { + return + } + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_1, "CreateReference", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewID, err = soap.UnmarshalString(response.NewID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// ContentDirectory2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ContentDirectory:2". See +// goupnp.ServiceClient, which contains RootDevice and Service attributes which +// are provided for informational value. +type ContentDirectory2 struct { + goupnp.ServiceClient +} + +// NewContentDirectory2Clients discovers instances of the service on the network, +// and returns clients to any that are found. errors will contain an error for +// any devices that replied but which could not be queried, and err will be set +// if the discovery process failed outright. +// +// This is a typical entry calling point into this package. +func NewContentDirectory2Clients() (clients []*ContentDirectory2, errors []error, err error) { + var genericClients []goupnp.ServiceClient + if genericClients, errors, err = goupnp.NewServiceClients(URN_ContentDirectory_2); err != nil { + return + } + clients = newContentDirectory2ClientsFromGenericClients(genericClients) + return +} + +// NewContentDirectory2ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewContentDirectory2ClientsByURL(loc *url.URL) ([]*ContentDirectory2, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ContentDirectory_2) + if err != nil { + return nil, err + } + return newContentDirectory2ClientsFromGenericClients(genericClients), nil +} + +// NewContentDirectory2ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewContentDirectory2ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ContentDirectory2, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ContentDirectory_2) + if err != nil { + return nil, err + } + return newContentDirectory2ClientsFromGenericClients(genericClients), nil +} + +func newContentDirectory2ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ContentDirectory2 { + clients := make([]*ContentDirectory2, len(genericClients)) + for i := range genericClients { + clients[i] = &ContentDirectory2{genericClients[i]} + } + return clients +} + +func (client *ContentDirectory2) GetSearchCapabilities() (SearchCaps string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + SearchCaps string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "GetSearchCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if SearchCaps, err = soap.UnmarshalString(response.SearchCaps); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory2) GetSortCapabilities() (SortCaps string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + SortCaps string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "GetSortCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory2) GetSortExtensionCapabilities() (SortExtensionCaps string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + SortExtensionCaps string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "GetSortExtensionCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if SortExtensionCaps, err = soap.UnmarshalString(response.SortExtensionCaps); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory2) GetFeatureList() (FeatureList string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + FeatureList string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "GetFeatureList", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if FeatureList, err = soap.UnmarshalString(response.FeatureList); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory2) GetSystemUpdateID() (Id uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Id string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "GetSystemUpdateID", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Id, err = soap.UnmarshalUi4(response.Id); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * BrowseFlag: allowed values: BrowseMetadata, BrowseDirectChildren + +func (client *ContentDirectory2) Browse(ObjectID string, BrowseFlag string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) { + // Request structure. + request := &struct { + ObjectID string + + BrowseFlag string + + Filter string + + StartingIndex string + + RequestedCount string + + SortCriteria string + }{} + // BEGIN Marshal arguments into request. + + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + if request.BrowseFlag, err = soap.MarshalString(BrowseFlag); err != nil { + return + } + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil { + return + } + if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil { + return + } + if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Result string + + NumberReturned string + + TotalMatches string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "Browse", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil { + return + } + if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory2) Search(ContainerID string, SearchCriteria string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) { + // Request structure. + request := &struct { + ContainerID string + + SearchCriteria string + + Filter string + + StartingIndex string + + RequestedCount string + + SortCriteria string + }{} + // BEGIN Marshal arguments into request. + + if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { + return + } + if request.SearchCriteria, err = soap.MarshalString(SearchCriteria); err != nil { + return + } + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil { + return + } + if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil { + return + } + if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Result string + + NumberReturned string + + TotalMatches string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "Search", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil { + return + } + if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory2) CreateObject(ContainerID string, Elements string) (ObjectID string, Result string, err error) { + // Request structure. + request := &struct { + ContainerID string + + Elements string + }{} + // BEGIN Marshal arguments into request. + + if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { + return + } + if request.Elements, err = soap.MarshalString(Elements); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + ObjectID string + + Result string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "CreateObject", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if ObjectID, err = soap.UnmarshalString(response.ObjectID); err != nil { + return + } + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory2) DestroyObject(ObjectID string) (err error) { + // Request structure. + request := &struct { + ObjectID string + }{} + // BEGIN Marshal arguments into request. + + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "DestroyObject", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory2) UpdateObject(ObjectID string, CurrentTagValue string, NewTagValue string) (err error) { + // Request structure. + request := &struct { + ObjectID string + + CurrentTagValue string + + NewTagValue string + }{} + // BEGIN Marshal arguments into request. + + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + if request.CurrentTagValue, err = soap.MarshalString(CurrentTagValue); err != nil { + return + } + if request.NewTagValue, err = soap.MarshalString(NewTagValue); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "UpdateObject", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory2) MoveObject(ObjectID string, NewParentID string) (NewObjectID string, err error) { + // Request structure. + request := &struct { + ObjectID string + + NewParentID string + }{} + // BEGIN Marshal arguments into request. + + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + if request.NewParentID, err = soap.MarshalString(NewParentID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewObjectID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "MoveObject", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewObjectID, err = soap.UnmarshalString(response.NewObjectID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory2) ImportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) { + // Request structure. + request := &struct { + SourceURI string + + DestinationURI string + }{} + // BEGIN Marshal arguments into request. + + if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil { + return + } + if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + TransferID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "ImportResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory2) ExportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) { + // Request structure. + request := &struct { + SourceURI string + + DestinationURI string + }{} + // BEGIN Marshal arguments into request. + + if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil { + return + } + if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + TransferID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "ExportResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory2) DeleteResource(ResourceURI *url.URL) (err error) { + // Request structure. + request := &struct { + ResourceURI string + }{} + // BEGIN Marshal arguments into request. + + if request.ResourceURI, err = soap.MarshalURI(ResourceURI); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "DeleteResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory2) StopTransferResource(TransferID uint32) (err error) { + // Request structure. + request := &struct { + TransferID string + }{} + // BEGIN Marshal arguments into request. + + if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "StopTransferResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * TransferStatus: allowed values: COMPLETED, ERROR, IN_PROGRESS, STOPPED +func (client *ContentDirectory2) GetTransferProgress(TransferID uint32) (TransferStatus string, TransferLength string, TransferTotal string, err error) { + // Request structure. + request := &struct { + TransferID string + }{} + // BEGIN Marshal arguments into request. + + if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + TransferStatus string + + TransferLength string + + TransferTotal string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "GetTransferProgress", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if TransferStatus, err = soap.UnmarshalString(response.TransferStatus); err != nil { + return + } + if TransferLength, err = soap.UnmarshalString(response.TransferLength); err != nil { + return + } + if TransferTotal, err = soap.UnmarshalString(response.TransferTotal); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory2) CreateReference(ContainerID string, ObjectID string) (NewID string, err error) { + // Request structure. + request := &struct { + ContainerID string + + ObjectID string + }{} + // BEGIN Marshal arguments into request. + + if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { + return + } + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_2, "CreateReference", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewID, err = soap.UnmarshalString(response.NewID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// ContentDirectory3 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ContentDirectory:3". See +// goupnp.ServiceClient, which contains RootDevice and Service attributes which +// are provided for informational value. +type ContentDirectory3 struct { + goupnp.ServiceClient +} + +// NewContentDirectory3Clients discovers instances of the service on the network, +// and returns clients to any that are found. errors will contain an error for +// any devices that replied but which could not be queried, and err will be set +// if the discovery process failed outright. +// +// This is a typical entry calling point into this package. +func NewContentDirectory3Clients() (clients []*ContentDirectory3, errors []error, err error) { + var genericClients []goupnp.ServiceClient + if genericClients, errors, err = goupnp.NewServiceClients(URN_ContentDirectory_3); err != nil { + return + } + clients = newContentDirectory3ClientsFromGenericClients(genericClients) + return +} + +// NewContentDirectory3ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewContentDirectory3ClientsByURL(loc *url.URL) ([]*ContentDirectory3, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ContentDirectory_3) + if err != nil { + return nil, err + } + return newContentDirectory3ClientsFromGenericClients(genericClients), nil +} + +// NewContentDirectory3ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewContentDirectory3ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ContentDirectory3, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ContentDirectory_3) + if err != nil { + return nil, err + } + return newContentDirectory3ClientsFromGenericClients(genericClients), nil +} + +func newContentDirectory3ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ContentDirectory3 { + clients := make([]*ContentDirectory3, len(genericClients)) + for i := range genericClients { + clients[i] = &ContentDirectory3{genericClients[i]} + } + return clients +} + +func (client *ContentDirectory3) GetSearchCapabilities() (SearchCaps string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + SearchCaps string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetSearchCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if SearchCaps, err = soap.UnmarshalString(response.SearchCaps); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory3) GetSortCapabilities() (SortCaps string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + SortCaps string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetSortCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory3) GetSortExtensionCapabilities() (SortExtensionCaps string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + SortExtensionCaps string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetSortExtensionCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if SortExtensionCaps, err = soap.UnmarshalString(response.SortExtensionCaps); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory3) GetFeatureList() (FeatureList string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + FeatureList string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetFeatureList", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if FeatureList, err = soap.UnmarshalString(response.FeatureList); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory3) GetSystemUpdateID() (Id uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Id string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetSystemUpdateID", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Id, err = soap.UnmarshalUi4(response.Id); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory3) GetServiceResetToken() (ResetToken string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + ResetToken string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetServiceResetToken", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if ResetToken, err = soap.UnmarshalString(response.ResetToken); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * BrowseFlag: allowed values: BrowseMetadata, BrowseDirectChildren + +func (client *ContentDirectory3) Browse(ObjectID string, BrowseFlag string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) { + // Request structure. + request := &struct { + ObjectID string + + BrowseFlag string + + Filter string + + StartingIndex string + + RequestedCount string + + SortCriteria string + }{} + // BEGIN Marshal arguments into request. + + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + if request.BrowseFlag, err = soap.MarshalString(BrowseFlag); err != nil { + return + } + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil { + return + } + if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil { + return + } + if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Result string + + NumberReturned string + + TotalMatches string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "Browse", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil { + return + } + if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory3) Search(ContainerID string, SearchCriteria string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) { + // Request structure. + request := &struct { + ContainerID string + + SearchCriteria string + + Filter string + + StartingIndex string + + RequestedCount string + + SortCriteria string + }{} + // BEGIN Marshal arguments into request. + + if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { + return + } + if request.SearchCriteria, err = soap.MarshalString(SearchCriteria); err != nil { + return + } + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil { + return + } + if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil { + return + } + if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Result string + + NumberReturned string + + TotalMatches string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "Search", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil { + return + } + if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory3) CreateObject(ContainerID string, Elements string) (ObjectID string, Result string, err error) { + // Request structure. + request := &struct { + ContainerID string + + Elements string + }{} + // BEGIN Marshal arguments into request. + + if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { + return + } + if request.Elements, err = soap.MarshalString(Elements); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + ObjectID string + + Result string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "CreateObject", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if ObjectID, err = soap.UnmarshalString(response.ObjectID); err != nil { + return + } + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory3) DestroyObject(ObjectID string) (err error) { + // Request structure. + request := &struct { + ObjectID string + }{} + // BEGIN Marshal arguments into request. + + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "DestroyObject", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory3) UpdateObject(ObjectID string, CurrentTagValue string, NewTagValue string) (err error) { + // Request structure. + request := &struct { + ObjectID string + + CurrentTagValue string + + NewTagValue string + }{} + // BEGIN Marshal arguments into request. + + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + if request.CurrentTagValue, err = soap.MarshalString(CurrentTagValue); err != nil { + return + } + if request.NewTagValue, err = soap.MarshalString(NewTagValue); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "UpdateObject", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory3) MoveObject(ObjectID string, NewParentID string) (NewObjectID string, err error) { + // Request structure. + request := &struct { + ObjectID string + + NewParentID string + }{} + // BEGIN Marshal arguments into request. + + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + if request.NewParentID, err = soap.MarshalString(NewParentID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewObjectID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "MoveObject", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewObjectID, err = soap.UnmarshalString(response.NewObjectID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory3) ImportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) { + // Request structure. + request := &struct { + SourceURI string + + DestinationURI string + }{} + // BEGIN Marshal arguments into request. + + if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil { + return + } + if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + TransferID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "ImportResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory3) ExportResource(SourceURI *url.URL, DestinationURI *url.URL) (TransferID uint32, err error) { + // Request structure. + request := &struct { + SourceURI string + + DestinationURI string + }{} + // BEGIN Marshal arguments into request. + + if request.SourceURI, err = soap.MarshalURI(SourceURI); err != nil { + return + } + if request.DestinationURI, err = soap.MarshalURI(DestinationURI); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + TransferID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "ExportResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if TransferID, err = soap.UnmarshalUi4(response.TransferID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory3) DeleteResource(ResourceURI *url.URL) (err error) { + // Request structure. + request := &struct { + ResourceURI string + }{} + // BEGIN Marshal arguments into request. + + if request.ResourceURI, err = soap.MarshalURI(ResourceURI); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "DeleteResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory3) StopTransferResource(TransferID uint32) (err error) { + // Request structure. + request := &struct { + TransferID string + }{} + // BEGIN Marshal arguments into request. + + if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "StopTransferResource", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * TransferStatus: allowed values: COMPLETED, ERROR, IN_PROGRESS, STOPPED +func (client *ContentDirectory3) GetTransferProgress(TransferID uint32) (TransferStatus string, TransferLength string, TransferTotal string, err error) { + // Request structure. + request := &struct { + TransferID string + }{} + // BEGIN Marshal arguments into request. + + if request.TransferID, err = soap.MarshalUi4(TransferID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + TransferStatus string + + TransferLength string + + TransferTotal string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetTransferProgress", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if TransferStatus, err = soap.UnmarshalString(response.TransferStatus); err != nil { + return + } + if TransferLength, err = soap.UnmarshalString(response.TransferLength); err != nil { + return + } + if TransferTotal, err = soap.UnmarshalString(response.TransferTotal); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory3) CreateReference(ContainerID string, ObjectID string) (NewID string, err error) { + // Request structure. + request := &struct { + ContainerID string + + ObjectID string + }{} + // BEGIN Marshal arguments into request. + + if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { + return + } + if request.ObjectID, err = soap.MarshalString(ObjectID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + NewID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "CreateReference", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if NewID, err = soap.UnmarshalString(response.NewID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory3) FreeFormQuery(ContainerID string, CDSView uint32, QueryRequest string) (QueryResult string, UpdateID uint32, err error) { + // Request structure. + request := &struct { + ContainerID string + + CDSView string + + QueryRequest string + }{} + // BEGIN Marshal arguments into request. + + if request.ContainerID, err = soap.MarshalString(ContainerID); err != nil { + return + } + if request.CDSView, err = soap.MarshalUi4(CDSView); err != nil { + return + } + if request.QueryRequest, err = soap.MarshalString(QueryRequest); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + QueryResult string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "FreeFormQuery", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if QueryResult, err = soap.UnmarshalString(response.QueryResult); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ContentDirectory3) GetFreeFormQueryCapabilities() (FFQCapabilities string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + FFQCapabilities string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ContentDirectory_3, "GetFreeFormQueryCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if FFQCapabilities, err = soap.UnmarshalString(response.FFQCapabilities); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// RenderingControl1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:RenderingControl:1". See +// goupnp.ServiceClient, which contains RootDevice and Service attributes which +// are provided for informational value. +type RenderingControl1 struct { + goupnp.ServiceClient +} + +// NewRenderingControl1Clients discovers instances of the service on the network, +// and returns clients to any that are found. errors will contain an error for +// any devices that replied but which could not be queried, and err will be set +// if the discovery process failed outright. +// +// This is a typical entry calling point into this package. +func NewRenderingControl1Clients() (clients []*RenderingControl1, errors []error, err error) { + var genericClients []goupnp.ServiceClient + if genericClients, errors, err = goupnp.NewServiceClients(URN_RenderingControl_1); err != nil { + return + } + clients = newRenderingControl1ClientsFromGenericClients(genericClients) + return +} + +// NewRenderingControl1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewRenderingControl1ClientsByURL(loc *url.URL) ([]*RenderingControl1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_RenderingControl_1) + if err != nil { + return nil, err + } + return newRenderingControl1ClientsFromGenericClients(genericClients), nil +} + +// NewRenderingControl1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewRenderingControl1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*RenderingControl1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_RenderingControl_1) + if err != nil { + return nil, err + } + return newRenderingControl1ClientsFromGenericClients(genericClients), nil +} + +func newRenderingControl1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*RenderingControl1 { + clients := make([]*RenderingControl1, len(genericClients)) + for i := range genericClients { + clients[i] = &RenderingControl1{genericClients[i]} + } + return clients +} + +func (client *RenderingControl1) ListPresets(InstanceID uint32) (CurrentPresetNameList string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentPresetNameList string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "ListPresets", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentPresetNameList, err = soap.UnmarshalString(response.CurrentPresetNameList); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * PresetName: allowed values: FactoryDefaults + +func (client *RenderingControl1) SelectPreset(InstanceID uint32, PresetName string) (err error) { + // Request structure. + request := &struct { + InstanceID string + + PresetName string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.PresetName, err = soap.MarshalString(PresetName); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SelectPreset", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentBrightness: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetBrightness(InstanceID uint32) (CurrentBrightness uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentBrightness string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetBrightness", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentBrightness, err = soap.UnmarshalUi2(response.CurrentBrightness); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredBrightness: allowed value range: minimum=0, step=1 + +func (client *RenderingControl1) SetBrightness(InstanceID uint32, DesiredBrightness uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredBrightness string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredBrightness, err = soap.MarshalUi2(DesiredBrightness); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetBrightness", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentContrast: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetContrast(InstanceID uint32) (CurrentContrast uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentContrast string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetContrast", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentContrast, err = soap.UnmarshalUi2(response.CurrentContrast); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredContrast: allowed value range: minimum=0, step=1 + +func (client *RenderingControl1) SetContrast(InstanceID uint32, DesiredContrast uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredContrast string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredContrast, err = soap.MarshalUi2(DesiredContrast); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetContrast", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentSharpness: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetSharpness(InstanceID uint32) (CurrentSharpness uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentSharpness string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetSharpness", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentSharpness, err = soap.UnmarshalUi2(response.CurrentSharpness); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredSharpness: allowed value range: minimum=0, step=1 + +func (client *RenderingControl1) SetSharpness(InstanceID uint32, DesiredSharpness uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredSharpness string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredSharpness, err = soap.MarshalUi2(DesiredSharpness); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetSharpness", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *RenderingControl1) GetRedVideoGain(InstanceID uint32) (CurrentRedVideoGain uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentRedVideoGain string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetRedVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentRedVideoGain, err = soap.UnmarshalUi2(response.CurrentRedVideoGain); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *RenderingControl1) SetRedVideoGain(InstanceID uint32, DesiredRedVideoGain uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredRedVideoGain string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredRedVideoGain, err = soap.MarshalUi2(DesiredRedVideoGain); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetRedVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentGreenVideoGain: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetGreenVideoGain(InstanceID uint32) (CurrentGreenVideoGain uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentGreenVideoGain string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetGreenVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentGreenVideoGain, err = soap.UnmarshalUi2(response.CurrentGreenVideoGain); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredGreenVideoGain: allowed value range: minimum=0, step=1 + +func (client *RenderingControl1) SetGreenVideoGain(InstanceID uint32, DesiredGreenVideoGain uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredGreenVideoGain string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredGreenVideoGain, err = soap.MarshalUi2(DesiredGreenVideoGain); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetGreenVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentBlueVideoGain: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetBlueVideoGain(InstanceID uint32) (CurrentBlueVideoGain uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentBlueVideoGain string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetBlueVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentBlueVideoGain, err = soap.UnmarshalUi2(response.CurrentBlueVideoGain); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredBlueVideoGain: allowed value range: minimum=0, step=1 + +func (client *RenderingControl1) SetBlueVideoGain(InstanceID uint32, DesiredBlueVideoGain uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredBlueVideoGain string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredBlueVideoGain, err = soap.MarshalUi2(DesiredBlueVideoGain); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetBlueVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentRedVideoBlackLevel: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetRedVideoBlackLevel(InstanceID uint32) (CurrentRedVideoBlackLevel uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentRedVideoBlackLevel string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetRedVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentRedVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentRedVideoBlackLevel); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredRedVideoBlackLevel: allowed value range: minimum=0, step=1 + +func (client *RenderingControl1) SetRedVideoBlackLevel(InstanceID uint32, DesiredRedVideoBlackLevel uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredRedVideoBlackLevel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredRedVideoBlackLevel, err = soap.MarshalUi2(DesiredRedVideoBlackLevel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetRedVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentGreenVideoBlackLevel: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetGreenVideoBlackLevel(InstanceID uint32) (CurrentGreenVideoBlackLevel uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentGreenVideoBlackLevel string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetGreenVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentGreenVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentGreenVideoBlackLevel); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredGreenVideoBlackLevel: allowed value range: minimum=0, step=1 + +func (client *RenderingControl1) SetGreenVideoBlackLevel(InstanceID uint32, DesiredGreenVideoBlackLevel uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredGreenVideoBlackLevel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredGreenVideoBlackLevel, err = soap.MarshalUi2(DesiredGreenVideoBlackLevel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetGreenVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentBlueVideoBlackLevel: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetBlueVideoBlackLevel(InstanceID uint32) (CurrentBlueVideoBlackLevel uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentBlueVideoBlackLevel string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetBlueVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentBlueVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentBlueVideoBlackLevel); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredBlueVideoBlackLevel: allowed value range: minimum=0, step=1 + +func (client *RenderingControl1) SetBlueVideoBlackLevel(InstanceID uint32, DesiredBlueVideoBlackLevel uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredBlueVideoBlackLevel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredBlueVideoBlackLevel, err = soap.MarshalUi2(DesiredBlueVideoBlackLevel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetBlueVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentColorTemperature: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetColorTemperature(InstanceID uint32) (CurrentColorTemperature uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentColorTemperature string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetColorTemperature", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentColorTemperature, err = soap.UnmarshalUi2(response.CurrentColorTemperature); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredColorTemperature: allowed value range: minimum=0, step=1 + +func (client *RenderingControl1) SetColorTemperature(InstanceID uint32, DesiredColorTemperature uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredColorTemperature string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredColorTemperature, err = soap.MarshalUi2(DesiredColorTemperature); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetColorTemperature", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentHorizontalKeystone: allowed value range: step=1 +func (client *RenderingControl1) GetHorizontalKeystone(InstanceID uint32) (CurrentHorizontalKeystone int16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentHorizontalKeystone string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetHorizontalKeystone", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentHorizontalKeystone, err = soap.UnmarshalI2(response.CurrentHorizontalKeystone); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredHorizontalKeystone: allowed value range: step=1 + +func (client *RenderingControl1) SetHorizontalKeystone(InstanceID uint32, DesiredHorizontalKeystone int16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredHorizontalKeystone string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredHorizontalKeystone, err = soap.MarshalI2(DesiredHorizontalKeystone); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetHorizontalKeystone", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentVerticalKeystone: allowed value range: step=1 +func (client *RenderingControl1) GetVerticalKeystone(InstanceID uint32) (CurrentVerticalKeystone int16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentVerticalKeystone string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetVerticalKeystone", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentVerticalKeystone, err = soap.UnmarshalI2(response.CurrentVerticalKeystone); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredVerticalKeystone: allowed value range: step=1 + +func (client *RenderingControl1) SetVerticalKeystone(InstanceID uint32, DesiredVerticalKeystone int16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredVerticalKeystone string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredVerticalKeystone, err = soap.MarshalI2(DesiredVerticalKeystone); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetVerticalKeystone", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl1) GetMute(InstanceID uint32, Channel string) (CurrentMute bool, err error) { + // Request structure. + request := &struct { + InstanceID string + + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentMute string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetMute", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentMute, err = soap.UnmarshalBoolean(response.CurrentMute); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl1) SetMute(InstanceID uint32, Channel string, DesiredMute bool) (err error) { + // Request structure. + request := &struct { + InstanceID string + + Channel string + + DesiredMute string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + if request.DesiredMute, err = soap.MarshalBoolean(DesiredMute); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetMute", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +// +// Return values: +// +// * CurrentVolume: allowed value range: minimum=0, step=1 +func (client *RenderingControl1) GetVolume(InstanceID uint32, Channel string) (CurrentVolume uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentVolume string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetVolume", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentVolume, err = soap.UnmarshalUi2(response.CurrentVolume); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Channel: allowed values: Master +// +// * DesiredVolume: allowed value range: minimum=0, step=1 + +func (client *RenderingControl1) SetVolume(InstanceID uint32, Channel string, DesiredVolume uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + Channel string + + DesiredVolume string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + if request.DesiredVolume, err = soap.MarshalUi2(DesiredVolume); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetVolume", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl1) GetVolumeDB(InstanceID uint32, Channel string) (CurrentVolume int16, err error) { + // Request structure. + request := &struct { + InstanceID string + + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentVolume string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetVolumeDB", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentVolume, err = soap.UnmarshalI2(response.CurrentVolume); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl1) SetVolumeDB(InstanceID uint32, Channel string, DesiredVolume int16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + Channel string + + DesiredVolume string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + if request.DesiredVolume, err = soap.MarshalI2(DesiredVolume); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetVolumeDB", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl1) GetVolumeDBRange(InstanceID uint32, Channel string) (MinValue int16, MaxValue int16, err error) { + // Request structure. + request := &struct { + InstanceID string + + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + MinValue string + + MaxValue string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetVolumeDBRange", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if MinValue, err = soap.UnmarshalI2(response.MinValue); err != nil { + return + } + if MaxValue, err = soap.UnmarshalI2(response.MaxValue); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl1) GetLoudness(InstanceID uint32, Channel string) (CurrentLoudness bool, err error) { + // Request structure. + request := &struct { + InstanceID string + + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentLoudness string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "GetLoudness", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentLoudness, err = soap.UnmarshalBoolean(response.CurrentLoudness); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl1) SetLoudness(InstanceID uint32, Channel string, DesiredLoudness bool) (err error) { + // Request structure. + request := &struct { + InstanceID string + + Channel string + + DesiredLoudness string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + if request.DesiredLoudness, err = soap.MarshalBoolean(DesiredLoudness); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SetLoudness", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// RenderingControl2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:RenderingControl:2". See +// goupnp.ServiceClient, which contains RootDevice and Service attributes which +// are provided for informational value. +type RenderingControl2 struct { + goupnp.ServiceClient +} + +// NewRenderingControl2Clients discovers instances of the service on the network, +// and returns clients to any that are found. errors will contain an error for +// any devices that replied but which could not be queried, and err will be set +// if the discovery process failed outright. +// +// This is a typical entry calling point into this package. +func NewRenderingControl2Clients() (clients []*RenderingControl2, errors []error, err error) { + var genericClients []goupnp.ServiceClient + if genericClients, errors, err = goupnp.NewServiceClients(URN_RenderingControl_2); err != nil { + return + } + clients = newRenderingControl2ClientsFromGenericClients(genericClients) + return +} + +// NewRenderingControl2ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewRenderingControl2ClientsByURL(loc *url.URL) ([]*RenderingControl2, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_RenderingControl_2) + if err != nil { + return nil, err + } + return newRenderingControl2ClientsFromGenericClients(genericClients), nil +} + +// NewRenderingControl2ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewRenderingControl2ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*RenderingControl2, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_RenderingControl_2) + if err != nil { + return nil, err + } + return newRenderingControl2ClientsFromGenericClients(genericClients), nil +} + +func newRenderingControl2ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*RenderingControl2 { + clients := make([]*RenderingControl2, len(genericClients)) + for i := range genericClients { + clients[i] = &RenderingControl2{genericClients[i]} + } + return clients +} + +func (client *RenderingControl2) ListPresets(InstanceID uint32) (CurrentPresetNameList string, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentPresetNameList string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "ListPresets", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentPresetNameList, err = soap.UnmarshalString(response.CurrentPresetNameList); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * PresetName: allowed values: FactoryDefaults + +func (client *RenderingControl2) SelectPreset(InstanceID uint32, PresetName string) (err error) { + // Request structure. + request := &struct { + InstanceID string + + PresetName string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.PresetName, err = soap.MarshalString(PresetName); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SelectPreset", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentBrightness: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetBrightness(InstanceID uint32) (CurrentBrightness uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentBrightness string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetBrightness", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentBrightness, err = soap.UnmarshalUi2(response.CurrentBrightness); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredBrightness: allowed value range: minimum=0, step=1 + +func (client *RenderingControl2) SetBrightness(InstanceID uint32, DesiredBrightness uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredBrightness string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredBrightness, err = soap.MarshalUi2(DesiredBrightness); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetBrightness", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentContrast: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetContrast(InstanceID uint32) (CurrentContrast uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentContrast string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetContrast", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentContrast, err = soap.UnmarshalUi2(response.CurrentContrast); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredContrast: allowed value range: minimum=0, step=1 + +func (client *RenderingControl2) SetContrast(InstanceID uint32, DesiredContrast uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredContrast string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredContrast, err = soap.MarshalUi2(DesiredContrast); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetContrast", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentSharpness: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetSharpness(InstanceID uint32) (CurrentSharpness uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentSharpness string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetSharpness", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentSharpness, err = soap.UnmarshalUi2(response.CurrentSharpness); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredSharpness: allowed value range: minimum=0, step=1 + +func (client *RenderingControl2) SetSharpness(InstanceID uint32, DesiredSharpness uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredSharpness string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredSharpness, err = soap.MarshalUi2(DesiredSharpness); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetSharpness", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentRedVideoGain: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetRedVideoGain(InstanceID uint32) (CurrentRedVideoGain uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentRedVideoGain string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetRedVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentRedVideoGain, err = soap.UnmarshalUi2(response.CurrentRedVideoGain); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredRedVideoGain: allowed value range: minimum=0, step=1 + +func (client *RenderingControl2) SetRedVideoGain(InstanceID uint32, DesiredRedVideoGain uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredRedVideoGain string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredRedVideoGain, err = soap.MarshalUi2(DesiredRedVideoGain); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetRedVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentGreenVideoGain: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetGreenVideoGain(InstanceID uint32) (CurrentGreenVideoGain uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentGreenVideoGain string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetGreenVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentGreenVideoGain, err = soap.UnmarshalUi2(response.CurrentGreenVideoGain); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredGreenVideoGain: allowed value range: minimum=0, step=1 + +func (client *RenderingControl2) SetGreenVideoGain(InstanceID uint32, DesiredGreenVideoGain uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredGreenVideoGain string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredGreenVideoGain, err = soap.MarshalUi2(DesiredGreenVideoGain); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetGreenVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentBlueVideoGain: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetBlueVideoGain(InstanceID uint32) (CurrentBlueVideoGain uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentBlueVideoGain string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetBlueVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentBlueVideoGain, err = soap.UnmarshalUi2(response.CurrentBlueVideoGain); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredBlueVideoGain: allowed value range: minimum=0, step=1 + +func (client *RenderingControl2) SetBlueVideoGain(InstanceID uint32, DesiredBlueVideoGain uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredBlueVideoGain string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredBlueVideoGain, err = soap.MarshalUi2(DesiredBlueVideoGain); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetBlueVideoGain", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentRedVideoBlackLevel: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetRedVideoBlackLevel(InstanceID uint32) (CurrentRedVideoBlackLevel uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentRedVideoBlackLevel string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetRedVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentRedVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentRedVideoBlackLevel); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredRedVideoBlackLevel: allowed value range: minimum=0, step=1 + +func (client *RenderingControl2) SetRedVideoBlackLevel(InstanceID uint32, DesiredRedVideoBlackLevel uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredRedVideoBlackLevel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredRedVideoBlackLevel, err = soap.MarshalUi2(DesiredRedVideoBlackLevel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetRedVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentGreenVideoBlackLevel: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetGreenVideoBlackLevel(InstanceID uint32) (CurrentGreenVideoBlackLevel uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentGreenVideoBlackLevel string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetGreenVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentGreenVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentGreenVideoBlackLevel); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredGreenVideoBlackLevel: allowed value range: minimum=0, step=1 + +func (client *RenderingControl2) SetGreenVideoBlackLevel(InstanceID uint32, DesiredGreenVideoBlackLevel uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredGreenVideoBlackLevel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredGreenVideoBlackLevel, err = soap.MarshalUi2(DesiredGreenVideoBlackLevel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetGreenVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentBlueVideoBlackLevel: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetBlueVideoBlackLevel(InstanceID uint32) (CurrentBlueVideoBlackLevel uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentBlueVideoBlackLevel string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetBlueVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentBlueVideoBlackLevel, err = soap.UnmarshalUi2(response.CurrentBlueVideoBlackLevel); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredBlueVideoBlackLevel: allowed value range: minimum=0, step=1 + +func (client *RenderingControl2) SetBlueVideoBlackLevel(InstanceID uint32, DesiredBlueVideoBlackLevel uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredBlueVideoBlackLevel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredBlueVideoBlackLevel, err = soap.MarshalUi2(DesiredBlueVideoBlackLevel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetBlueVideoBlackLevel", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentColorTemperature: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetColorTemperature(InstanceID uint32) (CurrentColorTemperature uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentColorTemperature string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetColorTemperature", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentColorTemperature, err = soap.UnmarshalUi2(response.CurrentColorTemperature); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredColorTemperature: allowed value range: minimum=0, step=1 + +func (client *RenderingControl2) SetColorTemperature(InstanceID uint32, DesiredColorTemperature uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredColorTemperature string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredColorTemperature, err = soap.MarshalUi2(DesiredColorTemperature); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetColorTemperature", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentHorizontalKeystone: allowed value range: step=1 +func (client *RenderingControl2) GetHorizontalKeystone(InstanceID uint32) (CurrentHorizontalKeystone int16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentHorizontalKeystone string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetHorizontalKeystone", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentHorizontalKeystone, err = soap.UnmarshalI2(response.CurrentHorizontalKeystone); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredHorizontalKeystone: allowed value range: step=1 + +func (client *RenderingControl2) SetHorizontalKeystone(InstanceID uint32, DesiredHorizontalKeystone int16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredHorizontalKeystone string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredHorizontalKeystone, err = soap.MarshalI2(DesiredHorizontalKeystone); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetHorizontalKeystone", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Return values: +// +// * CurrentVerticalKeystone: allowed value range: step=1 +func (client *RenderingControl2) GetVerticalKeystone(InstanceID uint32) (CurrentVerticalKeystone int16, err error) { + // Request structure. + request := &struct { + InstanceID string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentVerticalKeystone string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetVerticalKeystone", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentVerticalKeystone, err = soap.UnmarshalI2(response.CurrentVerticalKeystone); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DesiredVerticalKeystone: allowed value range: step=1 + +func (client *RenderingControl2) SetVerticalKeystone(InstanceID uint32, DesiredVerticalKeystone int16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + DesiredVerticalKeystone string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.DesiredVerticalKeystone, err = soap.MarshalI2(DesiredVerticalKeystone); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetVerticalKeystone", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl2) GetMute(InstanceID uint32, Channel string) (CurrentMute bool, err error) { + // Request structure. + request := &struct { + InstanceID string + + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentMute string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetMute", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentMute, err = soap.UnmarshalBoolean(response.CurrentMute); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl2) SetMute(InstanceID uint32, Channel string, DesiredMute bool) (err error) { + // Request structure. + request := &struct { + InstanceID string + + Channel string + + DesiredMute string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + if request.DesiredMute, err = soap.MarshalBoolean(DesiredMute); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetMute", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +// +// Return values: +// +// * CurrentVolume: allowed value range: minimum=0, step=1 +func (client *RenderingControl2) GetVolume(InstanceID uint32, Channel string) (CurrentVolume uint16, err error) { + // Request structure. + request := &struct { + InstanceID string + + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentVolume string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetVolume", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentVolume, err = soap.UnmarshalUi2(response.CurrentVolume); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Channel: allowed values: Master +// +// * DesiredVolume: allowed value range: minimum=0, step=1 + +func (client *RenderingControl2) SetVolume(InstanceID uint32, Channel string, DesiredVolume uint16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + Channel string + + DesiredVolume string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + if request.DesiredVolume, err = soap.MarshalUi2(DesiredVolume); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetVolume", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl2) GetVolumeDB(InstanceID uint32, Channel string) (CurrentVolume int16, err error) { + // Request structure. + request := &struct { + InstanceID string + + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentVolume string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetVolumeDB", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentVolume, err = soap.UnmarshalI2(response.CurrentVolume); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl2) SetVolumeDB(InstanceID uint32, Channel string, DesiredVolume int16) (err error) { + // Request structure. + request := &struct { + InstanceID string + + Channel string + + DesiredVolume string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + if request.DesiredVolume, err = soap.MarshalI2(DesiredVolume); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetVolumeDB", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl2) GetVolumeDBRange(InstanceID uint32, Channel string) (MinValue int16, MaxValue int16, err error) { + // Request structure. + request := &struct { + InstanceID string + + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + MinValue string + + MaxValue string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetVolumeDBRange", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if MinValue, err = soap.UnmarshalI2(response.MinValue); err != nil { + return + } + if MaxValue, err = soap.UnmarshalI2(response.MaxValue); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl2) GetLoudness(InstanceID uint32, Channel string) (CurrentLoudness bool, err error) { + // Request structure. + request := &struct { + InstanceID string + + Channel string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + CurrentLoudness string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetLoudness", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if CurrentLoudness, err = soap.UnmarshalBoolean(response.CurrentLoudness); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * Channel: allowed values: Master + +func (client *RenderingControl2) SetLoudness(InstanceID uint32, Channel string, DesiredLoudness bool) (err error) { + // Request structure. + request := &struct { + InstanceID string + + Channel string + + DesiredLoudness string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.Channel, err = soap.MarshalString(Channel); err != nil { + return + } + if request.DesiredLoudness, err = soap.MarshalBoolean(DesiredLoudness); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetLoudness", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *RenderingControl2) GetStateVariables(InstanceID uint32, StateVariableList string) (StateVariableValuePairs string, err error) { + // Request structure. + request := &struct { + InstanceID string + + StateVariableList string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.StateVariableList, err = soap.MarshalString(StateVariableList); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + StateVariableValuePairs string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "GetStateVariables", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if StateVariableValuePairs, err = soap.UnmarshalString(response.StateVariableValuePairs); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *RenderingControl2) SetStateVariables(InstanceID uint32, RenderingControlUDN string, ServiceType string, ServiceId string, StateVariableValuePairs string) (StateVariableList string, err error) { + // Request structure. + request := &struct { + InstanceID string + + RenderingControlUDN string + + ServiceType string + + ServiceId string + + StateVariableValuePairs string + }{} + // BEGIN Marshal arguments into request. + + if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil { + return + } + if request.RenderingControlUDN, err = soap.MarshalString(RenderingControlUDN); err != nil { + return + } + if request.ServiceType, err = soap.MarshalString(ServiceType); err != nil { + return + } + if request.ServiceId, err = soap.MarshalString(ServiceId); err != nil { + return + } + if request.StateVariableValuePairs, err = soap.MarshalString(StateVariableValuePairs); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + StateVariableList string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_RenderingControl_2, "SetStateVariables", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if StateVariableList, err = soap.UnmarshalString(response.StateVariableList); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// ScheduledRecording1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ScheduledRecording:1". See +// goupnp.ServiceClient, which contains RootDevice and Service attributes which +// are provided for informational value. +type ScheduledRecording1 struct { + goupnp.ServiceClient +} + +// NewScheduledRecording1Clients discovers instances of the service on the network, +// and returns clients to any that are found. errors will contain an error for +// any devices that replied but which could not be queried, and err will be set +// if the discovery process failed outright. +// +// This is a typical entry calling point into this package. +func NewScheduledRecording1Clients() (clients []*ScheduledRecording1, errors []error, err error) { + var genericClients []goupnp.ServiceClient + if genericClients, errors, err = goupnp.NewServiceClients(URN_ScheduledRecording_1); err != nil { + return + } + clients = newScheduledRecording1ClientsFromGenericClients(genericClients) + return +} + +// NewScheduledRecording1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewScheduledRecording1ClientsByURL(loc *url.URL) ([]*ScheduledRecording1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ScheduledRecording_1) + if err != nil { + return nil, err + } + return newScheduledRecording1ClientsFromGenericClients(genericClients), nil +} + +// NewScheduledRecording1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewScheduledRecording1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ScheduledRecording1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ScheduledRecording_1) + if err != nil { + return nil, err + } + return newScheduledRecording1ClientsFromGenericClients(genericClients), nil +} + +func newScheduledRecording1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ScheduledRecording1 { + clients := make([]*ScheduledRecording1, len(genericClients)) + for i := range genericClients { + clients[i] = &ScheduledRecording1{genericClients[i]} + } + return clients +} + +func (client *ScheduledRecording1) GetSortCapabilities() (SortCaps string, SortLevelCap uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + SortCaps string + + SortLevelCap string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetSortCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil { + return + } + if SortLevelCap, err = soap.UnmarshalUi4(response.SortLevelCap); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts + +func (client *ScheduledRecording1) GetPropertyList(DataTypeID string) (PropertyList string, err error) { + // Request structure. + request := &struct { + DataTypeID string + }{} + // BEGIN Marshal arguments into request. + + if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + PropertyList string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetPropertyList", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if PropertyList, err = soap.UnmarshalString(response.PropertyList); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts + +func (client *ScheduledRecording1) GetAllowedValues(DataTypeID string, Filter string) (PropertyInfo string, err error) { + // Request structure. + request := &struct { + DataTypeID string + + Filter string + }{} + // BEGIN Marshal arguments into request. + + if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil { + return + } + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + PropertyInfo string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetAllowedValues", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if PropertyInfo, err = soap.UnmarshalString(response.PropertyInfo); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording1) GetStateUpdateID() (Id uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Id string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetStateUpdateID", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Id, err = soap.UnmarshalUi4(response.Id); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording1) BrowseRecordSchedules(Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) { + // Request structure. + request := &struct { + Filter string + + StartingIndex string + + RequestedCount string + + SortCriteria string + }{} + // BEGIN Marshal arguments into request. + + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil { + return + } + if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil { + return + } + if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Result string + + NumberReturned string + + TotalMatches string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "BrowseRecordSchedules", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil { + return + } + if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording1) BrowseRecordTasks(RecordScheduleID string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) { + // Request structure. + request := &struct { + RecordScheduleID string + + Filter string + + StartingIndex string + + RequestedCount string + + SortCriteria string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { + return + } + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil { + return + } + if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil { + return + } + if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Result string + + NumberReturned string + + TotalMatches string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "BrowseRecordTasks", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil { + return + } + if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording1) CreateRecordSchedule(Elements string) (RecordScheduleID string, Result string, UpdateID uint32, err error) { + // Request structure. + request := &struct { + Elements string + }{} + // BEGIN Marshal arguments into request. + + if request.Elements, err = soap.MarshalString(Elements); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + RecordScheduleID string + + Result string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "CreateRecordSchedule", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if RecordScheduleID, err = soap.UnmarshalString(response.RecordScheduleID); err != nil { + return + } + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording1) DeleteRecordSchedule(RecordScheduleID string) (err error) { + // Request structure. + request := &struct { + RecordScheduleID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "DeleteRecordSchedule", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording1) GetRecordSchedule(RecordScheduleID string, Filter string) (Result string, UpdateID uint32, err error) { + // Request structure. + request := &struct { + RecordScheduleID string + + Filter string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { + return + } + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Result string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetRecordSchedule", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording1) EnableRecordSchedule(RecordScheduleID string) (err error) { + // Request structure. + request := &struct { + RecordScheduleID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "EnableRecordSchedule", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording1) DisableRecordSchedule(RecordScheduleID string) (err error) { + // Request structure. + request := &struct { + RecordScheduleID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "DisableRecordSchedule", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording1) DeleteRecordTask(RecordTaskID string) (err error) { + // Request structure. + request := &struct { + RecordTaskID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "DeleteRecordTask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording1) GetRecordTask(RecordTaskID string, Filter string) (Result string, UpdateID uint32, err error) { + // Request structure. + request := &struct { + RecordTaskID string + + Filter string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Result string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetRecordTask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording1) EnableRecordTask(RecordTaskID string) (err error) { + // Request structure. + request := &struct { + RecordTaskID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "EnableRecordTask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording1) DisableRecordTask(RecordTaskID string) (err error) { + // Request structure. + request := &struct { + RecordTaskID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "DisableRecordTask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording1) ResetRecordTask(RecordTaskID string) (err error) { + // Request structure. + request := &struct { + RecordTaskID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "ResetRecordTask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording1) GetRecordScheduleConflicts(RecordScheduleID string) (RecordScheduleConflictIDList string, UpdateID uint32, err error) { + // Request structure. + request := &struct { + RecordScheduleID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + RecordScheduleConflictIDList string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetRecordScheduleConflicts", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if RecordScheduleConflictIDList, err = soap.UnmarshalString(response.RecordScheduleConflictIDList); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording1) GetRecordTaskConflicts(RecordTaskID string) (RecordTaskConflictIDList string, UpdateID uint32, err error) { + // Request structure. + request := &struct { + RecordTaskID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + RecordTaskConflictIDList string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_1, "GetRecordTaskConflicts", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if RecordTaskConflictIDList, err = soap.UnmarshalString(response.RecordTaskConflictIDList); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// ScheduledRecording2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:ScheduledRecording:2". See +// goupnp.ServiceClient, which contains RootDevice and Service attributes which +// are provided for informational value. +type ScheduledRecording2 struct { + goupnp.ServiceClient +} + +// NewScheduledRecording2Clients discovers instances of the service on the network, +// and returns clients to any that are found. errors will contain an error for +// any devices that replied but which could not be queried, and err will be set +// if the discovery process failed outright. +// +// This is a typical entry calling point into this package. +func NewScheduledRecording2Clients() (clients []*ScheduledRecording2, errors []error, err error) { + var genericClients []goupnp.ServiceClient + if genericClients, errors, err = goupnp.NewServiceClients(URN_ScheduledRecording_2); err != nil { + return + } + clients = newScheduledRecording2ClientsFromGenericClients(genericClients) + return +} + +// NewScheduledRecording2ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewScheduledRecording2ClientsByURL(loc *url.URL) ([]*ScheduledRecording2, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_ScheduledRecording_2) + if err != nil { + return nil, err + } + return newScheduledRecording2ClientsFromGenericClients(genericClients), nil +} + +// NewScheduledRecording2ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewScheduledRecording2ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*ScheduledRecording2, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_ScheduledRecording_2) + if err != nil { + return nil, err + } + return newScheduledRecording2ClientsFromGenericClients(genericClients), nil +} + +func newScheduledRecording2ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*ScheduledRecording2 { + clients := make([]*ScheduledRecording2, len(genericClients)) + for i := range genericClients { + clients[i] = &ScheduledRecording2{genericClients[i]} + } + return clients +} + +func (client *ScheduledRecording2) GetSortCapabilities() (SortCaps string, SortLevelCap uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + SortCaps string + + SortLevelCap string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetSortCapabilities", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if SortCaps, err = soap.UnmarshalString(response.SortCaps); err != nil { + return + } + if SortLevelCap, err = soap.UnmarshalUi4(response.SortLevelCap); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts + +func (client *ScheduledRecording2) GetPropertyList(DataTypeID string) (PropertyList string, err error) { + // Request structure. + request := &struct { + DataTypeID string + }{} + // BEGIN Marshal arguments into request. + + if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + PropertyList string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetPropertyList", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if PropertyList, err = soap.UnmarshalString(response.PropertyList); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +// +// Arguments: +// +// * DataTypeID: allowed values: A_ARG_TYPE_RecordSchedule, A_ARG_TYPE_RecordTask, A_ARG_TYPE_RecordScheduleParts + +func (client *ScheduledRecording2) GetAllowedValues(DataTypeID string, Filter string) (PropertyInfo string, err error) { + // Request structure. + request := &struct { + DataTypeID string + + Filter string + }{} + // BEGIN Marshal arguments into request. + + if request.DataTypeID, err = soap.MarshalString(DataTypeID); err != nil { + return + } + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + PropertyInfo string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetAllowedValues", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if PropertyInfo, err = soap.UnmarshalString(response.PropertyInfo); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording2) GetStateUpdateID() (Id uint32, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Id string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetStateUpdateID", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Id, err = soap.UnmarshalUi4(response.Id); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording2) BrowseRecordSchedules(Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) { + // Request structure. + request := &struct { + Filter string + + StartingIndex string + + RequestedCount string + + SortCriteria string + }{} + // BEGIN Marshal arguments into request. + + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil { + return + } + if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil { + return + } + if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Result string + + NumberReturned string + + TotalMatches string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "BrowseRecordSchedules", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil { + return + } + if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording2) BrowseRecordTasks(RecordScheduleID string, Filter string, StartingIndex uint32, RequestedCount uint32, SortCriteria string) (Result string, NumberReturned uint32, TotalMatches uint32, UpdateID uint32, err error) { + // Request structure. + request := &struct { + RecordScheduleID string + + Filter string + + StartingIndex string + + RequestedCount string + + SortCriteria string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { + return + } + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + if request.StartingIndex, err = soap.MarshalUi4(StartingIndex); err != nil { + return + } + if request.RequestedCount, err = soap.MarshalUi4(RequestedCount); err != nil { + return + } + if request.SortCriteria, err = soap.MarshalString(SortCriteria); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Result string + + NumberReturned string + + TotalMatches string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "BrowseRecordTasks", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + if NumberReturned, err = soap.UnmarshalUi4(response.NumberReturned); err != nil { + return + } + if TotalMatches, err = soap.UnmarshalUi4(response.TotalMatches); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording2) CreateRecordSchedule(Elements string) (RecordScheduleID string, Result string, UpdateID uint32, err error) { + // Request structure. + request := &struct { + Elements string + }{} + // BEGIN Marshal arguments into request. + + if request.Elements, err = soap.MarshalString(Elements); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + RecordScheduleID string + + Result string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "CreateRecordSchedule", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if RecordScheduleID, err = soap.UnmarshalString(response.RecordScheduleID); err != nil { + return + } + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording2) DeleteRecordSchedule(RecordScheduleID string) (err error) { + // Request structure. + request := &struct { + RecordScheduleID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "DeleteRecordSchedule", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording2) GetRecordSchedule(RecordScheduleID string, Filter string) (Result string, UpdateID uint32, err error) { + // Request structure. + request := &struct { + RecordScheduleID string + + Filter string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { + return + } + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Result string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetRecordSchedule", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording2) EnableRecordSchedule(RecordScheduleID string) (err error) { + // Request structure. + request := &struct { + RecordScheduleID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "EnableRecordSchedule", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording2) DisableRecordSchedule(RecordScheduleID string) (err error) { + // Request structure. + request := &struct { + RecordScheduleID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "DisableRecordSchedule", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording2) DeleteRecordTask(RecordTaskID string) (err error) { + // Request structure. + request := &struct { + RecordTaskID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "DeleteRecordTask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording2) GetRecordTask(RecordTaskID string, Filter string) (Result string, UpdateID uint32, err error) { + // Request structure. + request := &struct { + RecordTaskID string + + Filter string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + if request.Filter, err = soap.MarshalString(Filter); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Result string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetRecordTask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Result, err = soap.UnmarshalString(response.Result); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording2) EnableRecordTask(RecordTaskID string) (err error) { + // Request structure. + request := &struct { + RecordTaskID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "EnableRecordTask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording2) DisableRecordTask(RecordTaskID string) (err error) { + // Request structure. + request := &struct { + RecordTaskID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "DisableRecordTask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording2) ResetRecordTask(RecordTaskID string) (err error) { + // Request structure. + request := &struct { + RecordTaskID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "ResetRecordTask", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording2) GetRecordScheduleConflicts(RecordScheduleID string) (RecordScheduleConflictIDList string, UpdateID uint32, err error) { + // Request structure. + request := &struct { + RecordScheduleID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordScheduleID, err = soap.MarshalString(RecordScheduleID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + RecordScheduleConflictIDList string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetRecordScheduleConflicts", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if RecordScheduleConflictIDList, err = soap.UnmarshalString(response.RecordScheduleConflictIDList); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *ScheduledRecording2) GetRecordTaskConflicts(RecordTaskID string) (RecordTaskConflictIDList string, UpdateID uint32, err error) { + // Request structure. + request := &struct { + RecordTaskID string + }{} + // BEGIN Marshal arguments into request. + + if request.RecordTaskID, err = soap.MarshalString(RecordTaskID); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + RecordTaskConflictIDList string + + UpdateID string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_ScheduledRecording_2, "GetRecordTaskConflicts", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if RecordTaskConflictIDList, err = soap.UnmarshalString(response.RecordTaskConflictIDList); err != nil { + return + } + if UpdateID, err = soap.UnmarshalUi4(response.UpdateID); err != nil { + return + } + // END Unmarshal arguments from response. + return +} diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway1/internetgateway1.go b/Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway1/internetgateway1.go index be71855a9..1e0802cd4 100644 --- a/Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway1/internetgateway1.go +++ b/Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway1/internetgateway1.go @@ -2,13 +2,13 @@ // // This DCP is documented in detail at: http://upnp.org/specs/gw/UPnP-gw-InternetGatewayDevice-v1-Device.pdf // -// Typically, use one of the New* functions to discover services on the local -// network. +// Typically, use one of the New* functions to create clients for services. package internetgateway1 // Generated file - do not edit by hand. See README.md import ( + "net/url" "time" "github.com/huin/goupnp" @@ -56,18 +56,48 @@ func NewLANHostConfigManagement1Clients() (clients []*LANHostConfigManagement1, if genericClients, errors, err = goupnp.NewServiceClients(URN_LANHostConfigManagement_1); err != nil { return } - clients = make([]*LANHostConfigManagement1, len(genericClients)) - for i := range genericClients { - clients[i] = &LANHostConfigManagement1{genericClients[i]} - } + clients = newLANHostConfigManagement1ClientsFromGenericClients(genericClients) return } -// Arguments: -// -// * NewDHCPServerConfigurable: +// NewLANHostConfigManagement1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewLANHostConfigManagement1ClientsByURL(loc *url.URL) ([]*LANHostConfigManagement1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_LANHostConfigManagement_1) + if err != nil { + return nil, err + } + return newLANHostConfigManagement1ClientsFromGenericClients(genericClients), nil +} + +// NewLANHostConfigManagement1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewLANHostConfigManagement1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*LANHostConfigManagement1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_LANHostConfigManagement_1) + if err != nil { + return nil, err + } + return newLANHostConfigManagement1ClientsFromGenericClients(genericClients), nil +} + +func newLANHostConfigManagement1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*LANHostConfigManagement1 { + clients := make([]*LANHostConfigManagement1, len(genericClients)) + for i := range genericClients { + clients[i] = &LANHostConfigManagement1{genericClients[i]} + } + return clients +} + func (client *LANHostConfigManagement1) SetDHCPServerConfigurable(NewDHCPServerConfigurable bool) (err error) { // Request structure. request := &struct { @@ -94,11 +124,6 @@ func (client *LANHostConfigManagement1) SetDHCPServerConfigurable(NewDHCPServerC return } -// -// -// Return values: -// -// * NewDHCPServerConfigurable: func (client *LANHostConfigManagement1) GetDHCPServerConfigurable() (NewDHCPServerConfigurable bool, err error) { // Request structure. request := interface{}(nil) @@ -125,11 +150,6 @@ func (client *LANHostConfigManagement1) GetDHCPServerConfigurable() (NewDHCPServ return } -// Arguments: -// -// * NewDHCPRelay: -// -// func (client *LANHostConfigManagement1) SetDHCPRelay(NewDHCPRelay bool) (err error) { // Request structure. request := &struct { @@ -156,11 +176,6 @@ func (client *LANHostConfigManagement1) SetDHCPRelay(NewDHCPRelay bool) (err err return } -// -// -// Return values: -// -// * NewDHCPRelay: func (client *LANHostConfigManagement1) GetDHCPRelay() (NewDHCPRelay bool, err error) { // Request structure. request := interface{}(nil) @@ -187,11 +202,6 @@ func (client *LANHostConfigManagement1) GetDHCPRelay() (NewDHCPRelay bool, err e return } -// Arguments: -// -// * NewSubnetMask: -// -// func (client *LANHostConfigManagement1) SetSubnetMask(NewSubnetMask string) (err error) { // Request structure. request := &struct { @@ -218,11 +228,6 @@ func (client *LANHostConfigManagement1) SetSubnetMask(NewSubnetMask string) (err return } -// -// -// Return values: -// -// * NewSubnetMask: func (client *LANHostConfigManagement1) GetSubnetMask() (NewSubnetMask string, err error) { // Request structure. request := interface{}(nil) @@ -249,11 +254,6 @@ func (client *LANHostConfigManagement1) GetSubnetMask() (NewSubnetMask string, e return } -// Arguments: -// -// * NewIPRouters: -// -// func (client *LANHostConfigManagement1) SetIPRouter(NewIPRouters string) (err error) { // Request structure. request := &struct { @@ -280,11 +280,6 @@ func (client *LANHostConfigManagement1) SetIPRouter(NewIPRouters string) (err er return } -// Arguments: -// -// * NewIPRouters: -// -// func (client *LANHostConfigManagement1) DeleteIPRouter(NewIPRouters string) (err error) { // Request structure. request := &struct { @@ -311,11 +306,6 @@ func (client *LANHostConfigManagement1) DeleteIPRouter(NewIPRouters string) (err return } -// -// -// Return values: -// -// * NewIPRouters: func (client *LANHostConfigManagement1) GetIPRoutersList() (NewIPRouters string, err error) { // Request structure. request := interface{}(nil) @@ -342,11 +332,6 @@ func (client *LANHostConfigManagement1) GetIPRoutersList() (NewIPRouters string, return } -// Arguments: -// -// * NewDomainName: -// -// func (client *LANHostConfigManagement1) SetDomainName(NewDomainName string) (err error) { // Request structure. request := &struct { @@ -373,11 +358,6 @@ func (client *LANHostConfigManagement1) SetDomainName(NewDomainName string) (err return } -// -// -// Return values: -// -// * NewDomainName: func (client *LANHostConfigManagement1) GetDomainName() (NewDomainName string, err error) { // Request structure. request := interface{}(nil) @@ -404,13 +384,6 @@ func (client *LANHostConfigManagement1) GetDomainName() (NewDomainName string, e return } -// Arguments: -// -// * NewMinAddress: -// -// * NewMaxAddress: -// -// func (client *LANHostConfigManagement1) SetAddressRange(NewMinAddress string, NewMaxAddress string) (err error) { // Request structure. request := &struct { @@ -442,13 +415,6 @@ func (client *LANHostConfigManagement1) SetAddressRange(NewMinAddress string, Ne return } -// -// -// Return values: -// -// * NewMinAddress: -// -// * NewMaxAddress: func (client *LANHostConfigManagement1) GetAddressRange() (NewMinAddress string, NewMaxAddress string, err error) { // Request structure. request := interface{}(nil) @@ -480,11 +446,6 @@ func (client *LANHostConfigManagement1) GetAddressRange() (NewMinAddress string, return } -// Arguments: -// -// * NewReservedAddresses: -// -// func (client *LANHostConfigManagement1) SetReservedAddress(NewReservedAddresses string) (err error) { // Request structure. request := &struct { @@ -511,11 +472,6 @@ func (client *LANHostConfigManagement1) SetReservedAddress(NewReservedAddresses return } -// Arguments: -// -// * NewReservedAddresses: -// -// func (client *LANHostConfigManagement1) DeleteReservedAddress(NewReservedAddresses string) (err error) { // Request structure. request := &struct { @@ -542,11 +498,6 @@ func (client *LANHostConfigManagement1) DeleteReservedAddress(NewReservedAddress return } -// -// -// Return values: -// -// * NewReservedAddresses: func (client *LANHostConfigManagement1) GetReservedAddresses() (NewReservedAddresses string, err error) { // Request structure. request := interface{}(nil) @@ -573,11 +524,6 @@ func (client *LANHostConfigManagement1) GetReservedAddresses() (NewReservedAddre return } -// Arguments: -// -// * NewDNSServers: -// -// func (client *LANHostConfigManagement1) SetDNSServer(NewDNSServers string) (err error) { // Request structure. request := &struct { @@ -604,11 +550,6 @@ func (client *LANHostConfigManagement1) SetDNSServer(NewDNSServers string) (err return } -// Arguments: -// -// * NewDNSServers: -// -// func (client *LANHostConfigManagement1) DeleteDNSServer(NewDNSServers string) (err error) { // Request structure. request := &struct { @@ -635,11 +576,6 @@ func (client *LANHostConfigManagement1) DeleteDNSServer(NewDNSServers string) (e return } -// -// -// Return values: -// -// * NewDNSServers: func (client *LANHostConfigManagement1) GetDNSServers() (NewDNSServers string, err error) { // Request structure. request := interface{}(nil) @@ -684,18 +620,48 @@ func NewLayer3Forwarding1Clients() (clients []*Layer3Forwarding1, errors []error if genericClients, errors, err = goupnp.NewServiceClients(URN_Layer3Forwarding_1); err != nil { return } - clients = make([]*Layer3Forwarding1, len(genericClients)) - for i := range genericClients { - clients[i] = &Layer3Forwarding1{genericClients[i]} - } + clients = newLayer3Forwarding1ClientsFromGenericClients(genericClients) return } -// Arguments: -// -// * NewDefaultConnectionService: +// NewLayer3Forwarding1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewLayer3Forwarding1ClientsByURL(loc *url.URL) ([]*Layer3Forwarding1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_Layer3Forwarding_1) + if err != nil { + return nil, err + } + return newLayer3Forwarding1ClientsFromGenericClients(genericClients), nil +} + +// NewLayer3Forwarding1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewLayer3Forwarding1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*Layer3Forwarding1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_Layer3Forwarding_1) + if err != nil { + return nil, err + } + return newLayer3Forwarding1ClientsFromGenericClients(genericClients), nil +} + +func newLayer3Forwarding1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*Layer3Forwarding1 { + clients := make([]*Layer3Forwarding1, len(genericClients)) + for i := range genericClients { + clients[i] = &Layer3Forwarding1{genericClients[i]} + } + return clients +} + func (client *Layer3Forwarding1) SetDefaultConnectionService(NewDefaultConnectionService string) (err error) { // Request structure. request := &struct { @@ -722,11 +688,6 @@ func (client *Layer3Forwarding1) SetDefaultConnectionService(NewDefaultConnectio return } -// -// -// Return values: -// -// * NewDefaultConnectionService: func (client *Layer3Forwarding1) GetDefaultConnectionService() (NewDefaultConnectionService string, err error) { // Request structure. request := interface{}(nil) @@ -771,14 +732,48 @@ func NewWANCableLinkConfig1Clients() (clients []*WANCableLinkConfig1, errors []e if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCableLinkConfig_1); err != nil { return } - clients = make([]*WANCableLinkConfig1, len(genericClients)) + clients = newWANCableLinkConfig1ClientsFromGenericClients(genericClients) + return +} + +// NewWANCableLinkConfig1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANCableLinkConfig1ClientsByURL(loc *url.URL) ([]*WANCableLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANCableLinkConfig_1) + if err != nil { + return nil, err + } + return newWANCableLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +// NewWANCableLinkConfig1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANCableLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANCableLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANCableLinkConfig_1) + if err != nil { + return nil, err + } + return newWANCableLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +func newWANCableLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANCableLinkConfig1 { + clients := make([]*WANCableLinkConfig1, len(genericClients)) for i := range genericClients { clients[i] = &WANCableLinkConfig1{genericClients[i]} } - return + return clients } -// // // Return values: // @@ -816,11 +811,6 @@ func (client *WANCableLinkConfig1) GetCableLinkConfigInfo() (NewCableLinkConfigS return } -// -// -// Return values: -// -// * NewDownstreamFrequency: func (client *WANCableLinkConfig1) GetDownstreamFrequency() (NewDownstreamFrequency uint32, err error) { // Request structure. request := interface{}(nil) @@ -847,7 +837,6 @@ func (client *WANCableLinkConfig1) GetDownstreamFrequency() (NewDownstreamFreque return } -// // // Return values: // @@ -878,11 +867,6 @@ func (client *WANCableLinkConfig1) GetDownstreamModulation() (NewDownstreamModul return } -// -// -// Return values: -// -// * NewUpstreamFrequency: func (client *WANCableLinkConfig1) GetUpstreamFrequency() (NewUpstreamFrequency uint32, err error) { // Request structure. request := interface{}(nil) @@ -909,7 +893,6 @@ func (client *WANCableLinkConfig1) GetUpstreamFrequency() (NewUpstreamFrequency return } -// // // Return values: // @@ -940,11 +923,6 @@ func (client *WANCableLinkConfig1) GetUpstreamModulation() (NewUpstreamModulatio return } -// -// -// Return values: -// -// * NewUpstreamChannelID: func (client *WANCableLinkConfig1) GetUpstreamChannelID() (NewUpstreamChannelID uint32, err error) { // Request structure. request := interface{}(nil) @@ -971,11 +949,6 @@ func (client *WANCableLinkConfig1) GetUpstreamChannelID() (NewUpstreamChannelID return } -// -// -// Return values: -// -// * NewUpstreamPowerLevel: func (client *WANCableLinkConfig1) GetUpstreamPowerLevel() (NewUpstreamPowerLevel uint32, err error) { // Request structure. request := interface{}(nil) @@ -1002,11 +975,6 @@ func (client *WANCableLinkConfig1) GetUpstreamPowerLevel() (NewUpstreamPowerLeve return } -// -// -// Return values: -// -// * NewBPIEncryptionEnabled: func (client *WANCableLinkConfig1) GetBPIEncryptionEnabled() (NewBPIEncryptionEnabled bool, err error) { // Request structure. request := interface{}(nil) @@ -1033,11 +1001,6 @@ func (client *WANCableLinkConfig1) GetBPIEncryptionEnabled() (NewBPIEncryptionEn return } -// -// -// Return values: -// -// * NewConfigFile: func (client *WANCableLinkConfig1) GetConfigFile() (NewConfigFile string, err error) { // Request structure. request := interface{}(nil) @@ -1064,11 +1027,6 @@ func (client *WANCableLinkConfig1) GetConfigFile() (NewConfigFile string, err er return } -// -// -// Return values: -// -// * NewTFTPServer: func (client *WANCableLinkConfig1) GetTFTPServer() (NewTFTPServer string, err error) { // Request structure. request := interface{}(nil) @@ -1113,18 +1071,48 @@ func NewWANCommonInterfaceConfig1Clients() (clients []*WANCommonInterfaceConfig1 if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCommonInterfaceConfig_1); err != nil { return } - clients = make([]*WANCommonInterfaceConfig1, len(genericClients)) - for i := range genericClients { - clients[i] = &WANCommonInterfaceConfig1{genericClients[i]} - } + clients = newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients) return } -// Arguments: -// -// * NewEnabledForInternet: +// NewWANCommonInterfaceConfig1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANCommonInterfaceConfig1ClientsByURL(loc *url.URL) ([]*WANCommonInterfaceConfig1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANCommonInterfaceConfig_1) + if err != nil { + return nil, err + } + return newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients), nil +} + +// NewWANCommonInterfaceConfig1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANCommonInterfaceConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANCommonInterfaceConfig1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANCommonInterfaceConfig_1) + if err != nil { + return nil, err + } + return newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients), nil +} + +func newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANCommonInterfaceConfig1 { + clients := make([]*WANCommonInterfaceConfig1, len(genericClients)) + for i := range genericClients { + clients[i] = &WANCommonInterfaceConfig1{genericClients[i]} + } + return clients +} + func (client *WANCommonInterfaceConfig1) SetEnabledForInternet(NewEnabledForInternet bool) (err error) { // Request structure. request := &struct { @@ -1151,11 +1139,6 @@ func (client *WANCommonInterfaceConfig1) SetEnabledForInternet(NewEnabledForInte return } -// -// -// Return values: -// -// * NewEnabledForInternet: func (client *WANCommonInterfaceConfig1) GetEnabledForInternet() (NewEnabledForInternet bool, err error) { // Request structure. request := interface{}(nil) @@ -1182,16 +1165,11 @@ func (client *WANCommonInterfaceConfig1) GetEnabledForInternet() (NewEnabledForI return } -// // // Return values: // // * NewWANAccessType: allowed values: DSL, POTS, Cable, Ethernet // -// * NewLayer1UpstreamMaxBitRate: -// -// * NewLayer1DownstreamMaxBitRate: -// // * NewPhysicalLinkStatus: allowed values: Up, Down func (client *WANCommonInterfaceConfig1) GetCommonLinkProperties() (NewWANAccessType string, NewLayer1UpstreamMaxBitRate uint32, NewLayer1DownstreamMaxBitRate uint32, NewPhysicalLinkStatus string, err error) { // Request structure. @@ -1234,11 +1212,6 @@ func (client *WANCommonInterfaceConfig1) GetCommonLinkProperties() (NewWANAccess return } -// -// -// Return values: -// -// * NewWANAccessProvider: func (client *WANCommonInterfaceConfig1) GetWANAccessProvider() (NewWANAccessProvider string, err error) { // Request structure. request := interface{}(nil) @@ -1265,7 +1238,6 @@ func (client *WANCommonInterfaceConfig1) GetWANAccessProvider() (NewWANAccessPro return } -// // // Return values: // @@ -1296,11 +1268,6 @@ func (client *WANCommonInterfaceConfig1) GetMaximumActiveConnections() (NewMaxim return } -// -// -// Return values: -// -// * NewTotalBytesSent: func (client *WANCommonInterfaceConfig1) GetTotalBytesSent() (NewTotalBytesSent uint32, err error) { // Request structure. request := interface{}(nil) @@ -1327,11 +1294,6 @@ func (client *WANCommonInterfaceConfig1) GetTotalBytesSent() (NewTotalBytesSent return } -// -// -// Return values: -// -// * NewTotalBytesReceived: func (client *WANCommonInterfaceConfig1) GetTotalBytesReceived() (NewTotalBytesReceived uint32, err error) { // Request structure. request := interface{}(nil) @@ -1358,11 +1320,6 @@ func (client *WANCommonInterfaceConfig1) GetTotalBytesReceived() (NewTotalBytesR return } -// -// -// Return values: -// -// * NewTotalPacketsSent: func (client *WANCommonInterfaceConfig1) GetTotalPacketsSent() (NewTotalPacketsSent uint32, err error) { // Request structure. request := interface{}(nil) @@ -1389,11 +1346,6 @@ func (client *WANCommonInterfaceConfig1) GetTotalPacketsSent() (NewTotalPacketsS return } -// -// -// Return values: -// -// * NewTotalPacketsReceived: func (client *WANCommonInterfaceConfig1) GetTotalPacketsReceived() (NewTotalPacketsReceived uint32, err error) { // Request structure. request := interface{}(nil) @@ -1420,15 +1372,6 @@ func (client *WANCommonInterfaceConfig1) GetTotalPacketsReceived() (NewTotalPack return } -// Arguments: -// -// * NewActiveConnectionIndex: -// -// Return values: -// -// * NewActiveConnDeviceContainer: -// -// * NewActiveConnectionServiceID: func (client *WANCommonInterfaceConfig1) GetActiveConnection(NewActiveConnectionIndex uint16) (NewActiveConnDeviceContainer string, NewActiveConnectionServiceID string, err error) { // Request structure. request := &struct { @@ -1483,18 +1426,48 @@ func NewWANDSLLinkConfig1Clients() (clients []*WANDSLLinkConfig1, errors []error if genericClients, errors, err = goupnp.NewServiceClients(URN_WANDSLLinkConfig_1); err != nil { return } - clients = make([]*WANDSLLinkConfig1, len(genericClients)) - for i := range genericClients { - clients[i] = &WANDSLLinkConfig1{genericClients[i]} - } + clients = newWANDSLLinkConfig1ClientsFromGenericClients(genericClients) return } -// Arguments: -// -// * NewLinkType: +// NewWANDSLLinkConfig1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANDSLLinkConfig1ClientsByURL(loc *url.URL) ([]*WANDSLLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANDSLLinkConfig_1) + if err != nil { + return nil, err + } + return newWANDSLLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +// NewWANDSLLinkConfig1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANDSLLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANDSLLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANDSLLinkConfig_1) + if err != nil { + return nil, err + } + return newWANDSLLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +func newWANDSLLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANDSLLinkConfig1 { + clients := make([]*WANDSLLinkConfig1, len(genericClients)) + for i := range genericClients { + clients[i] = &WANDSLLinkConfig1{genericClients[i]} + } + return clients +} + func (client *WANDSLLinkConfig1) SetDSLLinkType(NewLinkType string) (err error) { // Request structure. request := &struct { @@ -1521,12 +1494,9 @@ func (client *WANDSLLinkConfig1) SetDSLLinkType(NewLinkType string) (err error) return } -// // // Return values: // -// * NewLinkType: -// // * NewLinkStatus: allowed values: Up, Down func (client *WANDSLLinkConfig1) GetDSLLinkInfo() (NewLinkType string, NewLinkStatus string, err error) { // Request structure. @@ -1559,11 +1529,6 @@ func (client *WANDSLLinkConfig1) GetDSLLinkInfo() (NewLinkType string, NewLinkSt return } -// -// -// Return values: -// -// * NewAutoConfig: func (client *WANDSLLinkConfig1) GetAutoConfig() (NewAutoConfig bool, err error) { // Request structure. request := interface{}(nil) @@ -1590,11 +1555,6 @@ func (client *WANDSLLinkConfig1) GetAutoConfig() (NewAutoConfig bool, err error) return } -// -// -// Return values: -// -// * NewModulationType: func (client *WANDSLLinkConfig1) GetModulationType() (NewModulationType string, err error) { // Request structure. request := interface{}(nil) @@ -1621,11 +1581,6 @@ func (client *WANDSLLinkConfig1) GetModulationType() (NewModulationType string, return } -// Arguments: -// -// * NewDestinationAddress: -// -// func (client *WANDSLLinkConfig1) SetDestinationAddress(NewDestinationAddress string) (err error) { // Request structure. request := &struct { @@ -1652,11 +1607,6 @@ func (client *WANDSLLinkConfig1) SetDestinationAddress(NewDestinationAddress str return } -// -// -// Return values: -// -// * NewDestinationAddress: func (client *WANDSLLinkConfig1) GetDestinationAddress() (NewDestinationAddress string, err error) { // Request structure. request := interface{}(nil) @@ -1683,11 +1633,6 @@ func (client *WANDSLLinkConfig1) GetDestinationAddress() (NewDestinationAddress return } -// Arguments: -// -// * NewATMEncapsulation: -// -// func (client *WANDSLLinkConfig1) SetATMEncapsulation(NewATMEncapsulation string) (err error) { // Request structure. request := &struct { @@ -1714,11 +1659,6 @@ func (client *WANDSLLinkConfig1) SetATMEncapsulation(NewATMEncapsulation string) return } -// -// -// Return values: -// -// * NewATMEncapsulation: func (client *WANDSLLinkConfig1) GetATMEncapsulation() (NewATMEncapsulation string, err error) { // Request structure. request := interface{}(nil) @@ -1745,11 +1685,6 @@ func (client *WANDSLLinkConfig1) GetATMEncapsulation() (NewATMEncapsulation stri return } -// Arguments: -// -// * NewFCSPreserved: -// -// func (client *WANDSLLinkConfig1) SetFCSPreserved(NewFCSPreserved bool) (err error) { // Request structure. request := &struct { @@ -1776,11 +1711,6 @@ func (client *WANDSLLinkConfig1) SetFCSPreserved(NewFCSPreserved bool) (err erro return } -// -// -// Return values: -// -// * NewFCSPreserved: func (client *WANDSLLinkConfig1) GetFCSPreserved() (NewFCSPreserved bool, err error) { // Request structure. request := interface{}(nil) @@ -1825,14 +1755,48 @@ func NewWANEthernetLinkConfig1Clients() (clients []*WANEthernetLinkConfig1, erro if genericClients, errors, err = goupnp.NewServiceClients(URN_WANEthernetLinkConfig_1); err != nil { return } - clients = make([]*WANEthernetLinkConfig1, len(genericClients)) + clients = newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients) + return +} + +// NewWANEthernetLinkConfig1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANEthernetLinkConfig1ClientsByURL(loc *url.URL) ([]*WANEthernetLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANEthernetLinkConfig_1) + if err != nil { + return nil, err + } + return newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +// NewWANEthernetLinkConfig1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANEthernetLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANEthernetLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANEthernetLinkConfig_1) + if err != nil { + return nil, err + } + return newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +func newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANEthernetLinkConfig1 { + clients := make([]*WANEthernetLinkConfig1, len(genericClients)) for i := range genericClients { clients[i] = &WANEthernetLinkConfig1{genericClients[i]} } - return + return clients } -// // // Return values: // @@ -1881,18 +1845,48 @@ func NewWANIPConnection1Clients() (clients []*WANIPConnection1, errors []error, if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPConnection_1); err != nil { return } - clients = make([]*WANIPConnection1, len(genericClients)) - for i := range genericClients { - clients[i] = &WANIPConnection1{genericClients[i]} - } + clients = newWANIPConnection1ClientsFromGenericClients(genericClients) return } -// Arguments: -// -// * NewConnectionType: +// NewWANIPConnection1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANIPConnection1ClientsByURL(loc *url.URL) ([]*WANIPConnection1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANIPConnection_1) + if err != nil { + return nil, err + } + return newWANIPConnection1ClientsFromGenericClients(genericClients), nil +} + +// NewWANIPConnection1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANIPConnection1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANIPConnection1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANIPConnection_1) + if err != nil { + return nil, err + } + return newWANIPConnection1ClientsFromGenericClients(genericClients), nil +} + +func newWANIPConnection1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANIPConnection1 { + clients := make([]*WANIPConnection1, len(genericClients)) + for i := range genericClients { + clients[i] = &WANIPConnection1{genericClients[i]} + } + return clients +} + func (client *WANIPConnection1) SetConnectionType(NewConnectionType string) (err error) { // Request structure. request := &struct { @@ -1919,12 +1913,9 @@ func (client *WANIPConnection1) SetConnectionType(NewConnectionType string) (err return } -// // // Return values: // -// * NewConnectionType: -// // * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, IP_Bridged func (client *WANIPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) { // Request structure. @@ -1957,9 +1948,6 @@ func (client *WANIPConnection1) GetConnectionTypeInfo() (NewConnectionType strin return } -// -// -// func (client *WANIPConnection1) RequestConnection() (err error) { // Request structure. request := interface{}(nil) @@ -1980,10 +1968,7 @@ func (client *WANIPConnection1) RequestConnection() (err error) { // END Unmarshal arguments from response. return } - -// -// -// + func (client *WANIPConnection1) RequestTermination() (err error) { // Request structure. request := interface{}(nil) @@ -2005,9 +1990,6 @@ func (client *WANIPConnection1) RequestTermination() (err error) { return } -// -// -// func (client *WANIPConnection1) ForceTermination() (err error) { // Request structure. request := interface{}(nil) @@ -2029,11 +2011,6 @@ func (client *WANIPConnection1) ForceTermination() (err error) { return } -// Arguments: -// -// * NewAutoDisconnectTime: -// -// func (client *WANIPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) { // Request structure. request := &struct { @@ -2060,11 +2037,6 @@ func (client *WANIPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint return } -// Arguments: -// -// * NewIdleDisconnectTime: -// -// func (client *WANIPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) { // Request structure. request := &struct { @@ -2091,11 +2063,6 @@ func (client *WANIPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint return } -// Arguments: -// -// * NewWarnDisconnectDelay: -// -// func (client *WANIPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) { // Request structure. request := &struct { @@ -2122,15 +2089,12 @@ func (client *WANIPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay ui return } -// // // Return values: // // * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected // // * NewLastConnectionError: allowed values: ERROR_NONE -// -// * NewUptime: func (client *WANIPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { // Request structure. request := interface{}(nil) @@ -2167,11 +2131,6 @@ func (client *WANIPConnection1) GetStatusInfo() (NewConnectionStatus string, New return } -// -// -// Return values: -// -// * NewAutoDisconnectTime: func (client *WANIPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) { // Request structure. request := interface{}(nil) @@ -2198,11 +2157,6 @@ func (client *WANIPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime u return } -// -// -// Return values: -// -// * NewIdleDisconnectTime: func (client *WANIPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) { // Request structure. request := interface{}(nil) @@ -2229,11 +2183,6 @@ func (client *WANIPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime u return } -// -// -// Return values: -// -// * NewWarnDisconnectDelay: func (client *WANIPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) { // Request structure. request := interface{}(nil) @@ -2260,13 +2209,6 @@ func (client *WANIPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay return } -// -// -// Return values: -// -// * NewRSIPAvailable: -// -// * NewNATEnabled: func (client *WANIPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) { // Request structure. request := interface{}(nil) @@ -2298,27 +2240,10 @@ func (client *WANIPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNA return } -// Arguments: -// -// * NewPortMappingIndex: // // Return values: // -// * NewRemoteHost: -// -// * NewExternalPort: -// // * NewProtocol: allowed values: TCP, UDP -// -// * NewInternalPort: -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: func (client *WANIPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { // Request structure. request := &struct { @@ -2385,25 +2310,11 @@ func (client *WANIPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex u return } -// Arguments: -// -// * NewRemoteHost: // -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// Return values: -// -// * NewInternalPort: -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: + func (client *WANIPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { // Request structure. request := &struct { @@ -2465,25 +2376,11 @@ func (client *WANIPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string return } -// Arguments: // -// * NewRemoteHost: -// -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// * NewInternalPort: -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: -// -// + func (client *WANIPConnection1) AddPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (err error) { // Request structure. request := &struct { @@ -2545,15 +2442,11 @@ func (client *WANIPConnection1) AddPortMapping(NewRemoteHost string, NewExternal return } -// Arguments: -// -// * NewRemoteHost: // -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// + func (client *WANIPConnection1) DeletePortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (err error) { // Request structure. request := &struct { @@ -2590,11 +2483,6 @@ func (client *WANIPConnection1) DeletePortMapping(NewRemoteHost string, NewExter return } -// -// -// Return values: -// -// * NewExternalIPAddress: func (client *WANIPConnection1) GetExternalIPAddress() (NewExternalIPAddress string, err error) { // Request structure. request := interface{}(nil) @@ -2639,22 +2527,53 @@ func NewWANPOTSLinkConfig1Clients() (clients []*WANPOTSLinkConfig1, errors []err if genericClients, errors, err = goupnp.NewServiceClients(URN_WANPOTSLinkConfig_1); err != nil { return } - clients = make([]*WANPOTSLinkConfig1, len(genericClients)) + clients = newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients) + return +} + +// NewWANPOTSLinkConfig1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANPOTSLinkConfig1ClientsByURL(loc *url.URL) ([]*WANPOTSLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANPOTSLinkConfig_1) + if err != nil { + return nil, err + } + return newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +// NewWANPOTSLinkConfig1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANPOTSLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANPOTSLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANPOTSLinkConfig_1) + if err != nil { + return nil, err + } + return newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +func newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANPOTSLinkConfig1 { + clients := make([]*WANPOTSLinkConfig1, len(genericClients)) for i := range genericClients { clients[i] = &WANPOTSLinkConfig1{genericClients[i]} } - return + return clients } -// Arguments: -// -// * NewISPPhoneNumber: // -// * NewISPInfo: +// Arguments: // // * NewLinkType: allowed values: PPP_Dialup -// -// + func (client *WANPOTSLinkConfig1) SetISPInfo(NewISPPhoneNumber string, NewISPInfo string, NewLinkType string) (err error) { // Request structure. request := &struct { @@ -2691,13 +2610,6 @@ func (client *WANPOTSLinkConfig1) SetISPInfo(NewISPPhoneNumber string, NewISPInf return } -// Arguments: -// -// * NewNumberOfRetries: -// -// * NewDelayBetweenRetries: -// -// func (client *WANPOTSLinkConfig1) SetCallRetryInfo(NewNumberOfRetries uint32, NewDelayBetweenRetries uint32) (err error) { // Request structure. request := &struct { @@ -2729,14 +2641,9 @@ func (client *WANPOTSLinkConfig1) SetCallRetryInfo(NewNumberOfRetries uint32, Ne return } -// // // Return values: // -// * NewISPPhoneNumber: -// -// * NewISPInfo: -// // * NewLinkType: allowed values: PPP_Dialup func (client *WANPOTSLinkConfig1) GetISPInfo() (NewISPPhoneNumber string, NewISPInfo string, NewLinkType string, err error) { // Request structure. @@ -2774,13 +2681,6 @@ func (client *WANPOTSLinkConfig1) GetISPInfo() (NewISPPhoneNumber string, NewISP return } -// -// -// Return values: -// -// * NewNumberOfRetries: -// -// * NewDelayBetweenRetries: func (client *WANPOTSLinkConfig1) GetCallRetryInfo() (NewNumberOfRetries uint32, NewDelayBetweenRetries uint32, err error) { // Request structure. request := interface{}(nil) @@ -2812,11 +2712,6 @@ func (client *WANPOTSLinkConfig1) GetCallRetryInfo() (NewNumberOfRetries uint32, return } -// -// -// Return values: -// -// * NewFclass: func (client *WANPOTSLinkConfig1) GetFclass() (NewFclass string, err error) { // Request structure. request := interface{}(nil) @@ -2843,11 +2738,6 @@ func (client *WANPOTSLinkConfig1) GetFclass() (NewFclass string, err error) { return } -// -// -// Return values: -// -// * NewDataModulationSupported: func (client *WANPOTSLinkConfig1) GetDataModulationSupported() (NewDataModulationSupported string, err error) { // Request structure. request := interface{}(nil) @@ -2874,11 +2764,6 @@ func (client *WANPOTSLinkConfig1) GetDataModulationSupported() (NewDataModulatio return } -// -// -// Return values: -// -// * NewDataProtocol: func (client *WANPOTSLinkConfig1) GetDataProtocol() (NewDataProtocol string, err error) { // Request structure. request := interface{}(nil) @@ -2905,11 +2790,6 @@ func (client *WANPOTSLinkConfig1) GetDataProtocol() (NewDataProtocol string, err return } -// -// -// Return values: -// -// * NewDataCompression: func (client *WANPOTSLinkConfig1) GetDataCompression() (NewDataCompression string, err error) { // Request structure. request := interface{}(nil) @@ -2936,11 +2816,6 @@ func (client *WANPOTSLinkConfig1) GetDataCompression() (NewDataCompression strin return } -// -// -// Return values: -// -// * NewPlusVTRCommandSupported: func (client *WANPOTSLinkConfig1) GetPlusVTRCommandSupported() (NewPlusVTRCommandSupported bool, err error) { // Request structure. request := interface{}(nil) @@ -2985,18 +2860,48 @@ func NewWANPPPConnection1Clients() (clients []*WANPPPConnection1, errors []error if genericClients, errors, err = goupnp.NewServiceClients(URN_WANPPPConnection_1); err != nil { return } - clients = make([]*WANPPPConnection1, len(genericClients)) - for i := range genericClients { - clients[i] = &WANPPPConnection1{genericClients[i]} - } + clients = newWANPPPConnection1ClientsFromGenericClients(genericClients) return } -// Arguments: -// -// * NewConnectionType: +// NewWANPPPConnection1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANPPPConnection1ClientsByURL(loc *url.URL) ([]*WANPPPConnection1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANPPPConnection_1) + if err != nil { + return nil, err + } + return newWANPPPConnection1ClientsFromGenericClients(genericClients), nil +} + +// NewWANPPPConnection1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANPPPConnection1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANPPPConnection1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANPPPConnection_1) + if err != nil { + return nil, err + } + return newWANPPPConnection1ClientsFromGenericClients(genericClients), nil +} + +func newWANPPPConnection1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANPPPConnection1 { + clients := make([]*WANPPPConnection1, len(genericClients)) + for i := range genericClients { + clients[i] = &WANPPPConnection1{genericClients[i]} + } + return clients +} + func (client *WANPPPConnection1) SetConnectionType(NewConnectionType string) (err error) { // Request structure. request := &struct { @@ -3023,12 +2928,9 @@ func (client *WANPPPConnection1) SetConnectionType(NewConnectionType string) (er return } -// // // Return values: // -// * NewConnectionType: -// // * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, DHCP_Spoofed, PPPoE_Bridged, PPTP_Relay, L2TP_Relay, PPPoE_Relay func (client *WANPPPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) { // Request structure. @@ -3061,13 +2963,6 @@ func (client *WANPPPConnection1) GetConnectionTypeInfo() (NewConnectionType stri return } -// Arguments: -// -// * NewUserName: -// -// * NewPassword: -// -// func (client *WANPPPConnection1) ConfigureConnection(NewUserName string, NewPassword string) (err error) { // Request structure. request := &struct { @@ -3099,9 +2994,6 @@ func (client *WANPPPConnection1) ConfigureConnection(NewUserName string, NewPass return } -// -// -// func (client *WANPPPConnection1) RequestConnection() (err error) { // Request structure. request := interface{}(nil) @@ -3123,9 +3015,6 @@ func (client *WANPPPConnection1) RequestConnection() (err error) { return } -// -// -// func (client *WANPPPConnection1) RequestTermination() (err error) { // Request structure. request := interface{}(nil) @@ -3147,9 +3036,6 @@ func (client *WANPPPConnection1) RequestTermination() (err error) { return } -// -// -// func (client *WANPPPConnection1) ForceTermination() (err error) { // Request structure. request := interface{}(nil) @@ -3171,11 +3057,6 @@ func (client *WANPPPConnection1) ForceTermination() (err error) { return } -// Arguments: -// -// * NewAutoDisconnectTime: -// -// func (client *WANPPPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) { // Request structure. request := &struct { @@ -3202,11 +3083,6 @@ func (client *WANPPPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uin return } -// Arguments: -// -// * NewIdleDisconnectTime: -// -// func (client *WANPPPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) { // Request structure. request := &struct { @@ -3233,11 +3109,6 @@ func (client *WANPPPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uin return } -// Arguments: -// -// * NewWarnDisconnectDelay: -// -// func (client *WANPPPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) { // Request structure. request := &struct { @@ -3264,15 +3135,12 @@ func (client *WANPPPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay u return } -// // // Return values: // // * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected // // * NewLastConnectionError: allowed values: ERROR_NONE -// -// * NewUptime: func (client *WANPPPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { // Request structure. request := interface{}(nil) @@ -3309,13 +3177,6 @@ func (client *WANPPPConnection1) GetStatusInfo() (NewConnectionStatus string, Ne return } -// -// -// Return values: -// -// * NewUpstreamMaxBitRate: -// -// * NewDownstreamMaxBitRate: func (client *WANPPPConnection1) GetLinkLayerMaxBitRates() (NewUpstreamMaxBitRate uint32, NewDownstreamMaxBitRate uint32, err error) { // Request structure. request := interface{}(nil) @@ -3347,11 +3208,6 @@ func (client *WANPPPConnection1) GetLinkLayerMaxBitRates() (NewUpstreamMaxBitRat return } -// -// -// Return values: -// -// * NewPPPEncryptionProtocol: func (client *WANPPPConnection1) GetPPPEncryptionProtocol() (NewPPPEncryptionProtocol string, err error) { // Request structure. request := interface{}(nil) @@ -3378,11 +3234,6 @@ func (client *WANPPPConnection1) GetPPPEncryptionProtocol() (NewPPPEncryptionPro return } -// -// -// Return values: -// -// * NewPPPCompressionProtocol: func (client *WANPPPConnection1) GetPPPCompressionProtocol() (NewPPPCompressionProtocol string, err error) { // Request structure. request := interface{}(nil) @@ -3409,11 +3260,6 @@ func (client *WANPPPConnection1) GetPPPCompressionProtocol() (NewPPPCompressionP return } -// -// -// Return values: -// -// * NewPPPAuthenticationProtocol: func (client *WANPPPConnection1) GetPPPAuthenticationProtocol() (NewPPPAuthenticationProtocol string, err error) { // Request structure. request := interface{}(nil) @@ -3440,11 +3286,6 @@ func (client *WANPPPConnection1) GetPPPAuthenticationProtocol() (NewPPPAuthentic return } -// -// -// Return values: -// -// * NewUserName: func (client *WANPPPConnection1) GetUserName() (NewUserName string, err error) { // Request structure. request := interface{}(nil) @@ -3471,11 +3312,6 @@ func (client *WANPPPConnection1) GetUserName() (NewUserName string, err error) { return } -// -// -// Return values: -// -// * NewPassword: func (client *WANPPPConnection1) GetPassword() (NewPassword string, err error) { // Request structure. request := interface{}(nil) @@ -3502,11 +3338,6 @@ func (client *WANPPPConnection1) GetPassword() (NewPassword string, err error) { return } -// -// -// Return values: -// -// * NewAutoDisconnectTime: func (client *WANPPPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) { // Request structure. request := interface{}(nil) @@ -3533,11 +3364,6 @@ func (client *WANPPPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime return } -// -// -// Return values: -// -// * NewIdleDisconnectTime: func (client *WANPPPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) { // Request structure. request := interface{}(nil) @@ -3564,11 +3390,6 @@ func (client *WANPPPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime return } -// -// -// Return values: -// -// * NewWarnDisconnectDelay: func (client *WANPPPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) { // Request structure. request := interface{}(nil) @@ -3595,13 +3416,6 @@ func (client *WANPPPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDela return } -// -// -// Return values: -// -// * NewRSIPAvailable: -// -// * NewNATEnabled: func (client *WANPPPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) { // Request structure. request := interface{}(nil) @@ -3633,27 +3447,10 @@ func (client *WANPPPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewN return } -// Arguments: -// -// * NewPortMappingIndex: // // Return values: // -// * NewRemoteHost: -// -// * NewExternalPort: -// // * NewProtocol: allowed values: TCP, UDP -// -// * NewInternalPort: -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: func (client *WANPPPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { // Request structure. request := &struct { @@ -3720,25 +3517,11 @@ func (client *WANPPPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex return } -// Arguments: -// -// * NewRemoteHost: // -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// Return values: -// -// * NewInternalPort: -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: + func (client *WANPPPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { // Request structure. request := &struct { @@ -3800,25 +3583,11 @@ func (client *WANPPPConnection1) GetSpecificPortMappingEntry(NewRemoteHost strin return } -// Arguments: // -// * NewRemoteHost: -// -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// * NewInternalPort: -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: -// -// + func (client *WANPPPConnection1) AddPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (err error) { // Request structure. request := &struct { @@ -3880,15 +3649,11 @@ func (client *WANPPPConnection1) AddPortMapping(NewRemoteHost string, NewExterna return } -// Arguments: -// -// * NewRemoteHost: // -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// + func (client *WANPPPConnection1) DeletePortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (err error) { // Request structure. request := &struct { @@ -3925,11 +3690,6 @@ func (client *WANPPPConnection1) DeletePortMapping(NewRemoteHost string, NewExte return } -// -// -// Return values: -// -// * NewExternalIPAddress: func (client *WANPPPConnection1) GetExternalIPAddress() (NewExternalIPAddress string, err error) { // Request structure. request := interface{}(nil) diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway2/internetgateway2.go b/Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway2/internetgateway2.go index a5892288e..2d67a4a2e 100644 --- a/Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway2/internetgateway2.go +++ b/Godeps/_workspace/src/github.com/huin/goupnp/dcps/internetgateway2/internetgateway2.go @@ -2,13 +2,13 @@ // // This DCP is documented in detail at: http://upnp.org/specs/gw/UPnP-gw-InternetGatewayDevice-v2-Device.pdf // -// Typically, use one of the New* functions to discover services on the local -// network. +// Typically, use one of the New* functions to create clients for services. package internetgateway2 // Generated file - do not edit by hand. See README.md import ( + "net/url" "time" "github.com/huin/goupnp" @@ -29,6 +29,7 @@ const ( // Service URNs: const ( + URN_DeviceProtection_1 = "urn:schemas-upnp-org:service:DeviceProtection:1" URN_LANHostConfigManagement_1 = "urn:schemas-upnp-org:service:LANHostConfigManagement:1" URN_Layer3Forwarding_1 = "urn:schemas-upnp-org:service:Layer3Forwarding:1" URN_WANCableLinkConfig_1 = "urn:schemas-upnp-org:service:WANCableLinkConfig:1" @@ -42,6 +43,484 @@ const ( URN_WANPPPConnection_1 = "urn:schemas-upnp-org:service:WANPPPConnection:1" ) +// DeviceProtection1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:DeviceProtection:1". See +// goupnp.ServiceClient, which contains RootDevice and Service attributes which +// are provided for informational value. +type DeviceProtection1 struct { + goupnp.ServiceClient +} + +// NewDeviceProtection1Clients discovers instances of the service on the network, +// and returns clients to any that are found. errors will contain an error for +// any devices that replied but which could not be queried, and err will be set +// if the discovery process failed outright. +// +// This is a typical entry calling point into this package. +func NewDeviceProtection1Clients() (clients []*DeviceProtection1, errors []error, err error) { + var genericClients []goupnp.ServiceClient + if genericClients, errors, err = goupnp.NewServiceClients(URN_DeviceProtection_1); err != nil { + return + } + clients = newDeviceProtection1ClientsFromGenericClients(genericClients) + return +} + +// NewDeviceProtection1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewDeviceProtection1ClientsByURL(loc *url.URL) ([]*DeviceProtection1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_DeviceProtection_1) + if err != nil { + return nil, err + } + return newDeviceProtection1ClientsFromGenericClients(genericClients), nil +} + +// NewDeviceProtection1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewDeviceProtection1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*DeviceProtection1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_DeviceProtection_1) + if err != nil { + return nil, err + } + return newDeviceProtection1ClientsFromGenericClients(genericClients), nil +} + +func newDeviceProtection1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*DeviceProtection1 { + clients := make([]*DeviceProtection1, len(genericClients)) + for i := range genericClients { + clients[i] = &DeviceProtection1{genericClients[i]} + } + return clients +} + +func (client *DeviceProtection1) SendSetupMessage(ProtocolType string, InMessage []byte) (OutMessage []byte, err error) { + // Request structure. + request := &struct { + ProtocolType string + + InMessage string + }{} + // BEGIN Marshal arguments into request. + + if request.ProtocolType, err = soap.MarshalString(ProtocolType); err != nil { + return + } + if request.InMessage, err = soap.MarshalBinBase64(InMessage); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + OutMessage string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "SendSetupMessage", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if OutMessage, err = soap.UnmarshalBinBase64(response.OutMessage); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *DeviceProtection1) GetSupportedProtocols() (ProtocolList string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + ProtocolList string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "GetSupportedProtocols", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if ProtocolList, err = soap.UnmarshalString(response.ProtocolList); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *DeviceProtection1) GetAssignedRoles() (RoleList string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + RoleList string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "GetAssignedRoles", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if RoleList, err = soap.UnmarshalString(response.RoleList); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *DeviceProtection1) GetRolesForAction(DeviceUDN string, ServiceId string, ActionName string) (RoleList string, RestrictedRoleList string, err error) { + // Request structure. + request := &struct { + DeviceUDN string + + ServiceId string + + ActionName string + }{} + // BEGIN Marshal arguments into request. + + if request.DeviceUDN, err = soap.MarshalString(DeviceUDN); err != nil { + return + } + if request.ServiceId, err = soap.MarshalString(ServiceId); err != nil { + return + } + if request.ActionName, err = soap.MarshalString(ActionName); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + RoleList string + + RestrictedRoleList string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "GetRolesForAction", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if RoleList, err = soap.UnmarshalString(response.RoleList); err != nil { + return + } + if RestrictedRoleList, err = soap.UnmarshalString(response.RestrictedRoleList); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *DeviceProtection1) GetUserLoginChallenge(ProtocolType string, Name string) (Salt []byte, Challenge []byte, err error) { + // Request structure. + request := &struct { + ProtocolType string + + Name string + }{} + // BEGIN Marshal arguments into request. + + if request.ProtocolType, err = soap.MarshalString(ProtocolType); err != nil { + return + } + if request.Name, err = soap.MarshalString(Name); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + Salt string + + Challenge string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "GetUserLoginChallenge", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if Salt, err = soap.UnmarshalBinBase64(response.Salt); err != nil { + return + } + if Challenge, err = soap.UnmarshalBinBase64(response.Challenge); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *DeviceProtection1) UserLogin(ProtocolType string, Challenge []byte, Authenticator []byte) (err error) { + // Request structure. + request := &struct { + ProtocolType string + + Challenge string + + Authenticator string + }{} + // BEGIN Marshal arguments into request. + + if request.ProtocolType, err = soap.MarshalString(ProtocolType); err != nil { + return + } + if request.Challenge, err = soap.MarshalBinBase64(Challenge); err != nil { + return + } + if request.Authenticator, err = soap.MarshalBinBase64(Authenticator); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "UserLogin", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *DeviceProtection1) UserLogout() (err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "UserLogout", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *DeviceProtection1) GetACLData() (ACL string, err error) { + // Request structure. + request := interface{}(nil) + // BEGIN Marshal arguments into request. + + // END Marshal arguments into request. + + // Response structure. + response := &struct { + ACL string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "GetACLData", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if ACL, err = soap.UnmarshalString(response.ACL); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *DeviceProtection1) AddIdentityList(IdentityList string) (IdentityListResult string, err error) { + // Request structure. + request := &struct { + IdentityList string + }{} + // BEGIN Marshal arguments into request. + + if request.IdentityList, err = soap.MarshalString(IdentityList); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := &struct { + IdentityListResult string + }{} + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "AddIdentityList", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + if IdentityListResult, err = soap.UnmarshalString(response.IdentityListResult); err != nil { + return + } + // END Unmarshal arguments from response. + return +} + +func (client *DeviceProtection1) RemoveIdentity(Identity string) (err error) { + // Request structure. + request := &struct { + Identity string + }{} + // BEGIN Marshal arguments into request. + + if request.Identity, err = soap.MarshalString(Identity); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "RemoveIdentity", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *DeviceProtection1) SetUserLoginPassword(ProtocolType string, Name string, Stored []byte, Salt []byte) (err error) { + // Request structure. + request := &struct { + ProtocolType string + + Name string + + Stored string + + Salt string + }{} + // BEGIN Marshal arguments into request. + + if request.ProtocolType, err = soap.MarshalString(ProtocolType); err != nil { + return + } + if request.Name, err = soap.MarshalString(Name); err != nil { + return + } + if request.Stored, err = soap.MarshalBinBase64(Stored); err != nil { + return + } + if request.Salt, err = soap.MarshalBinBase64(Salt); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "SetUserLoginPassword", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *DeviceProtection1) AddRolesForIdentity(Identity string, RoleList string) (err error) { + // Request structure. + request := &struct { + Identity string + + RoleList string + }{} + // BEGIN Marshal arguments into request. + + if request.Identity, err = soap.MarshalString(Identity); err != nil { + return + } + if request.RoleList, err = soap.MarshalString(RoleList); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "AddRolesForIdentity", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + +func (client *DeviceProtection1) RemoveRolesForIdentity(Identity string, RoleList string) (err error) { + // Request structure. + request := &struct { + Identity string + + RoleList string + }{} + // BEGIN Marshal arguments into request. + + if request.Identity, err = soap.MarshalString(Identity); err != nil { + return + } + if request.RoleList, err = soap.MarshalString(RoleList); err != nil { + return + } + // END Marshal arguments into request. + + // Response structure. + response := interface{}(nil) + + // Perform the SOAP call. + if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "RemoveRolesForIdentity", request, response); err != nil { + return + } + + // BEGIN Unmarshal arguments from response. + + // END Unmarshal arguments from response. + return +} + // LANHostConfigManagement1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:LANHostConfigManagement:1". See // goupnp.ServiceClient, which contains RootDevice and Service attributes which // are provided for informational value. @@ -60,18 +539,48 @@ func NewLANHostConfigManagement1Clients() (clients []*LANHostConfigManagement1, if genericClients, errors, err = goupnp.NewServiceClients(URN_LANHostConfigManagement_1); err != nil { return } - clients = make([]*LANHostConfigManagement1, len(genericClients)) - for i := range genericClients { - clients[i] = &LANHostConfigManagement1{genericClients[i]} - } + clients = newLANHostConfigManagement1ClientsFromGenericClients(genericClients) return } -// Arguments: -// -// * NewDHCPServerConfigurable: +// NewLANHostConfigManagement1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewLANHostConfigManagement1ClientsByURL(loc *url.URL) ([]*LANHostConfigManagement1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_LANHostConfigManagement_1) + if err != nil { + return nil, err + } + return newLANHostConfigManagement1ClientsFromGenericClients(genericClients), nil +} + +// NewLANHostConfigManagement1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewLANHostConfigManagement1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*LANHostConfigManagement1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_LANHostConfigManagement_1) + if err != nil { + return nil, err + } + return newLANHostConfigManagement1ClientsFromGenericClients(genericClients), nil +} + +func newLANHostConfigManagement1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*LANHostConfigManagement1 { + clients := make([]*LANHostConfigManagement1, len(genericClients)) + for i := range genericClients { + clients[i] = &LANHostConfigManagement1{genericClients[i]} + } + return clients +} + func (client *LANHostConfigManagement1) SetDHCPServerConfigurable(NewDHCPServerConfigurable bool) (err error) { // Request structure. request := &struct { @@ -98,11 +607,6 @@ func (client *LANHostConfigManagement1) SetDHCPServerConfigurable(NewDHCPServerC return } -// -// -// Return values: -// -// * NewDHCPServerConfigurable: func (client *LANHostConfigManagement1) GetDHCPServerConfigurable() (NewDHCPServerConfigurable bool, err error) { // Request structure. request := interface{}(nil) @@ -129,11 +633,6 @@ func (client *LANHostConfigManagement1) GetDHCPServerConfigurable() (NewDHCPServ return } -// Arguments: -// -// * NewDHCPRelay: -// -// func (client *LANHostConfigManagement1) SetDHCPRelay(NewDHCPRelay bool) (err error) { // Request structure. request := &struct { @@ -160,11 +659,6 @@ func (client *LANHostConfigManagement1) SetDHCPRelay(NewDHCPRelay bool) (err err return } -// -// -// Return values: -// -// * NewDHCPRelay: func (client *LANHostConfigManagement1) GetDHCPRelay() (NewDHCPRelay bool, err error) { // Request structure. request := interface{}(nil) @@ -191,11 +685,6 @@ func (client *LANHostConfigManagement1) GetDHCPRelay() (NewDHCPRelay bool, err e return } -// Arguments: -// -// * NewSubnetMask: -// -// func (client *LANHostConfigManagement1) SetSubnetMask(NewSubnetMask string) (err error) { // Request structure. request := &struct { @@ -222,11 +711,6 @@ func (client *LANHostConfigManagement1) SetSubnetMask(NewSubnetMask string) (err return } -// -// -// Return values: -// -// * NewSubnetMask: func (client *LANHostConfigManagement1) GetSubnetMask() (NewSubnetMask string, err error) { // Request structure. request := interface{}(nil) @@ -253,11 +737,6 @@ func (client *LANHostConfigManagement1) GetSubnetMask() (NewSubnetMask string, e return } -// Arguments: -// -// * NewIPRouters: -// -// func (client *LANHostConfigManagement1) SetIPRouter(NewIPRouters string) (err error) { // Request structure. request := &struct { @@ -284,11 +763,6 @@ func (client *LANHostConfigManagement1) SetIPRouter(NewIPRouters string) (err er return } -// Arguments: -// -// * NewIPRouters: -// -// func (client *LANHostConfigManagement1) DeleteIPRouter(NewIPRouters string) (err error) { // Request structure. request := &struct { @@ -315,11 +789,6 @@ func (client *LANHostConfigManagement1) DeleteIPRouter(NewIPRouters string) (err return } -// -// -// Return values: -// -// * NewIPRouters: func (client *LANHostConfigManagement1) GetIPRoutersList() (NewIPRouters string, err error) { // Request structure. request := interface{}(nil) @@ -346,11 +815,6 @@ func (client *LANHostConfigManagement1) GetIPRoutersList() (NewIPRouters string, return } -// Arguments: -// -// * NewDomainName: -// -// func (client *LANHostConfigManagement1) SetDomainName(NewDomainName string) (err error) { // Request structure. request := &struct { @@ -377,11 +841,6 @@ func (client *LANHostConfigManagement1) SetDomainName(NewDomainName string) (err return } -// -// -// Return values: -// -// * NewDomainName: func (client *LANHostConfigManagement1) GetDomainName() (NewDomainName string, err error) { // Request structure. request := interface{}(nil) @@ -408,13 +867,6 @@ func (client *LANHostConfigManagement1) GetDomainName() (NewDomainName string, e return } -// Arguments: -// -// * NewMinAddress: -// -// * NewMaxAddress: -// -// func (client *LANHostConfigManagement1) SetAddressRange(NewMinAddress string, NewMaxAddress string) (err error) { // Request structure. request := &struct { @@ -446,13 +898,6 @@ func (client *LANHostConfigManagement1) SetAddressRange(NewMinAddress string, Ne return } -// -// -// Return values: -// -// * NewMinAddress: -// -// * NewMaxAddress: func (client *LANHostConfigManagement1) GetAddressRange() (NewMinAddress string, NewMaxAddress string, err error) { // Request structure. request := interface{}(nil) @@ -484,11 +929,6 @@ func (client *LANHostConfigManagement1) GetAddressRange() (NewMinAddress string, return } -// Arguments: -// -// * NewReservedAddresses: -// -// func (client *LANHostConfigManagement1) SetReservedAddress(NewReservedAddresses string) (err error) { // Request structure. request := &struct { @@ -515,11 +955,6 @@ func (client *LANHostConfigManagement1) SetReservedAddress(NewReservedAddresses return } -// Arguments: -// -// * NewReservedAddresses: -// -// func (client *LANHostConfigManagement1) DeleteReservedAddress(NewReservedAddresses string) (err error) { // Request structure. request := &struct { @@ -546,11 +981,6 @@ func (client *LANHostConfigManagement1) DeleteReservedAddress(NewReservedAddress return } -// -// -// Return values: -// -// * NewReservedAddresses: func (client *LANHostConfigManagement1) GetReservedAddresses() (NewReservedAddresses string, err error) { // Request structure. request := interface{}(nil) @@ -577,11 +1007,6 @@ func (client *LANHostConfigManagement1) GetReservedAddresses() (NewReservedAddre return } -// Arguments: -// -// * NewDNSServers: -// -// func (client *LANHostConfigManagement1) SetDNSServer(NewDNSServers string) (err error) { // Request structure. request := &struct { @@ -608,11 +1033,6 @@ func (client *LANHostConfigManagement1) SetDNSServer(NewDNSServers string) (err return } -// Arguments: -// -// * NewDNSServers: -// -// func (client *LANHostConfigManagement1) DeleteDNSServer(NewDNSServers string) (err error) { // Request structure. request := &struct { @@ -639,11 +1059,6 @@ func (client *LANHostConfigManagement1) DeleteDNSServer(NewDNSServers string) (e return } -// -// -// Return values: -// -// * NewDNSServers: func (client *LANHostConfigManagement1) GetDNSServers() (NewDNSServers string, err error) { // Request structure. request := interface{}(nil) @@ -688,18 +1103,48 @@ func NewLayer3Forwarding1Clients() (clients []*Layer3Forwarding1, errors []error if genericClients, errors, err = goupnp.NewServiceClients(URN_Layer3Forwarding_1); err != nil { return } - clients = make([]*Layer3Forwarding1, len(genericClients)) - for i := range genericClients { - clients[i] = &Layer3Forwarding1{genericClients[i]} - } + clients = newLayer3Forwarding1ClientsFromGenericClients(genericClients) return } -// Arguments: -// -// * NewDefaultConnectionService: +// NewLayer3Forwarding1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewLayer3Forwarding1ClientsByURL(loc *url.URL) ([]*Layer3Forwarding1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_Layer3Forwarding_1) + if err != nil { + return nil, err + } + return newLayer3Forwarding1ClientsFromGenericClients(genericClients), nil +} + +// NewLayer3Forwarding1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewLayer3Forwarding1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*Layer3Forwarding1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_Layer3Forwarding_1) + if err != nil { + return nil, err + } + return newLayer3Forwarding1ClientsFromGenericClients(genericClients), nil +} + +func newLayer3Forwarding1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*Layer3Forwarding1 { + clients := make([]*Layer3Forwarding1, len(genericClients)) + for i := range genericClients { + clients[i] = &Layer3Forwarding1{genericClients[i]} + } + return clients +} + func (client *Layer3Forwarding1) SetDefaultConnectionService(NewDefaultConnectionService string) (err error) { // Request structure. request := &struct { @@ -726,11 +1171,6 @@ func (client *Layer3Forwarding1) SetDefaultConnectionService(NewDefaultConnectio return } -// -// -// Return values: -// -// * NewDefaultConnectionService: func (client *Layer3Forwarding1) GetDefaultConnectionService() (NewDefaultConnectionService string, err error) { // Request structure. request := interface{}(nil) @@ -775,14 +1215,48 @@ func NewWANCableLinkConfig1Clients() (clients []*WANCableLinkConfig1, errors []e if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCableLinkConfig_1); err != nil { return } - clients = make([]*WANCableLinkConfig1, len(genericClients)) + clients = newWANCableLinkConfig1ClientsFromGenericClients(genericClients) + return +} + +// NewWANCableLinkConfig1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANCableLinkConfig1ClientsByURL(loc *url.URL) ([]*WANCableLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANCableLinkConfig_1) + if err != nil { + return nil, err + } + return newWANCableLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +// NewWANCableLinkConfig1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANCableLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANCableLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANCableLinkConfig_1) + if err != nil { + return nil, err + } + return newWANCableLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +func newWANCableLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANCableLinkConfig1 { + clients := make([]*WANCableLinkConfig1, len(genericClients)) for i := range genericClients { clients[i] = &WANCableLinkConfig1{genericClients[i]} } - return + return clients } -// // // Return values: // @@ -820,11 +1294,6 @@ func (client *WANCableLinkConfig1) GetCableLinkConfigInfo() (NewCableLinkConfigS return } -// -// -// Return values: -// -// * NewDownstreamFrequency: func (client *WANCableLinkConfig1) GetDownstreamFrequency() (NewDownstreamFrequency uint32, err error) { // Request structure. request := interface{}(nil) @@ -851,7 +1320,6 @@ func (client *WANCableLinkConfig1) GetDownstreamFrequency() (NewDownstreamFreque return } -// // // Return values: // @@ -882,11 +1350,6 @@ func (client *WANCableLinkConfig1) GetDownstreamModulation() (NewDownstreamModul return } -// -// -// Return values: -// -// * NewUpstreamFrequency: func (client *WANCableLinkConfig1) GetUpstreamFrequency() (NewUpstreamFrequency uint32, err error) { // Request structure. request := interface{}(nil) @@ -913,7 +1376,6 @@ func (client *WANCableLinkConfig1) GetUpstreamFrequency() (NewUpstreamFrequency return } -// // // Return values: // @@ -944,11 +1406,6 @@ func (client *WANCableLinkConfig1) GetUpstreamModulation() (NewUpstreamModulatio return } -// -// -// Return values: -// -// * NewUpstreamChannelID: func (client *WANCableLinkConfig1) GetUpstreamChannelID() (NewUpstreamChannelID uint32, err error) { // Request structure. request := interface{}(nil) @@ -975,11 +1432,6 @@ func (client *WANCableLinkConfig1) GetUpstreamChannelID() (NewUpstreamChannelID return } -// -// -// Return values: -// -// * NewUpstreamPowerLevel: func (client *WANCableLinkConfig1) GetUpstreamPowerLevel() (NewUpstreamPowerLevel uint32, err error) { // Request structure. request := interface{}(nil) @@ -1006,11 +1458,6 @@ func (client *WANCableLinkConfig1) GetUpstreamPowerLevel() (NewUpstreamPowerLeve return } -// -// -// Return values: -// -// * NewBPIEncryptionEnabled: func (client *WANCableLinkConfig1) GetBPIEncryptionEnabled() (NewBPIEncryptionEnabled bool, err error) { // Request structure. request := interface{}(nil) @@ -1037,11 +1484,6 @@ func (client *WANCableLinkConfig1) GetBPIEncryptionEnabled() (NewBPIEncryptionEn return } -// -// -// Return values: -// -// * NewConfigFile: func (client *WANCableLinkConfig1) GetConfigFile() (NewConfigFile string, err error) { // Request structure. request := interface{}(nil) @@ -1068,11 +1510,6 @@ func (client *WANCableLinkConfig1) GetConfigFile() (NewConfigFile string, err er return } -// -// -// Return values: -// -// * NewTFTPServer: func (client *WANCableLinkConfig1) GetTFTPServer() (NewTFTPServer string, err error) { // Request structure. request := interface{}(nil) @@ -1117,18 +1554,48 @@ func NewWANCommonInterfaceConfig1Clients() (clients []*WANCommonInterfaceConfig1 if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCommonInterfaceConfig_1); err != nil { return } - clients = make([]*WANCommonInterfaceConfig1, len(genericClients)) - for i := range genericClients { - clients[i] = &WANCommonInterfaceConfig1{genericClients[i]} - } + clients = newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients) return } -// Arguments: -// -// * NewEnabledForInternet: +// NewWANCommonInterfaceConfig1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANCommonInterfaceConfig1ClientsByURL(loc *url.URL) ([]*WANCommonInterfaceConfig1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANCommonInterfaceConfig_1) + if err != nil { + return nil, err + } + return newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients), nil +} + +// NewWANCommonInterfaceConfig1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANCommonInterfaceConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANCommonInterfaceConfig1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANCommonInterfaceConfig_1) + if err != nil { + return nil, err + } + return newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients), nil +} + +func newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANCommonInterfaceConfig1 { + clients := make([]*WANCommonInterfaceConfig1, len(genericClients)) + for i := range genericClients { + clients[i] = &WANCommonInterfaceConfig1{genericClients[i]} + } + return clients +} + func (client *WANCommonInterfaceConfig1) SetEnabledForInternet(NewEnabledForInternet bool) (err error) { // Request structure. request := &struct { @@ -1155,11 +1622,6 @@ func (client *WANCommonInterfaceConfig1) SetEnabledForInternet(NewEnabledForInte return } -// -// -// Return values: -// -// * NewEnabledForInternet: func (client *WANCommonInterfaceConfig1) GetEnabledForInternet() (NewEnabledForInternet bool, err error) { // Request structure. request := interface{}(nil) @@ -1186,16 +1648,11 @@ func (client *WANCommonInterfaceConfig1) GetEnabledForInternet() (NewEnabledForI return } -// // // Return values: // // * NewWANAccessType: allowed values: DSL, POTS, Cable, Ethernet // -// * NewLayer1UpstreamMaxBitRate: -// -// * NewLayer1DownstreamMaxBitRate: -// // * NewPhysicalLinkStatus: allowed values: Up, Down func (client *WANCommonInterfaceConfig1) GetCommonLinkProperties() (NewWANAccessType string, NewLayer1UpstreamMaxBitRate uint32, NewLayer1DownstreamMaxBitRate uint32, NewPhysicalLinkStatus string, err error) { // Request structure. @@ -1238,11 +1695,6 @@ func (client *WANCommonInterfaceConfig1) GetCommonLinkProperties() (NewWANAccess return } -// -// -// Return values: -// -// * NewWANAccessProvider: func (client *WANCommonInterfaceConfig1) GetWANAccessProvider() (NewWANAccessProvider string, err error) { // Request structure. request := interface{}(nil) @@ -1269,7 +1721,6 @@ func (client *WANCommonInterfaceConfig1) GetWANAccessProvider() (NewWANAccessPro return } -// // // Return values: // @@ -1300,11 +1751,6 @@ func (client *WANCommonInterfaceConfig1) GetMaximumActiveConnections() (NewMaxim return } -// -// -// Return values: -// -// * NewTotalBytesSent: func (client *WANCommonInterfaceConfig1) GetTotalBytesSent() (NewTotalBytesSent uint32, err error) { // Request structure. request := interface{}(nil) @@ -1331,11 +1777,6 @@ func (client *WANCommonInterfaceConfig1) GetTotalBytesSent() (NewTotalBytesSent return } -// -// -// Return values: -// -// * NewTotalBytesReceived: func (client *WANCommonInterfaceConfig1) GetTotalBytesReceived() (NewTotalBytesReceived uint32, err error) { // Request structure. request := interface{}(nil) @@ -1362,11 +1803,6 @@ func (client *WANCommonInterfaceConfig1) GetTotalBytesReceived() (NewTotalBytesR return } -// -// -// Return values: -// -// * NewTotalPacketsSent: func (client *WANCommonInterfaceConfig1) GetTotalPacketsSent() (NewTotalPacketsSent uint32, err error) { // Request structure. request := interface{}(nil) @@ -1393,11 +1829,6 @@ func (client *WANCommonInterfaceConfig1) GetTotalPacketsSent() (NewTotalPacketsS return } -// -// -// Return values: -// -// * NewTotalPacketsReceived: func (client *WANCommonInterfaceConfig1) GetTotalPacketsReceived() (NewTotalPacketsReceived uint32, err error) { // Request structure. request := interface{}(nil) @@ -1424,15 +1855,6 @@ func (client *WANCommonInterfaceConfig1) GetTotalPacketsReceived() (NewTotalPack return } -// Arguments: -// -// * NewActiveConnectionIndex: -// -// Return values: -// -// * NewActiveConnDeviceContainer: -// -// * NewActiveConnectionServiceID: func (client *WANCommonInterfaceConfig1) GetActiveConnection(NewActiveConnectionIndex uint16) (NewActiveConnDeviceContainer string, NewActiveConnectionServiceID string, err error) { // Request structure. request := &struct { @@ -1487,18 +1909,48 @@ func NewWANDSLLinkConfig1Clients() (clients []*WANDSLLinkConfig1, errors []error if genericClients, errors, err = goupnp.NewServiceClients(URN_WANDSLLinkConfig_1); err != nil { return } - clients = make([]*WANDSLLinkConfig1, len(genericClients)) - for i := range genericClients { - clients[i] = &WANDSLLinkConfig1{genericClients[i]} - } + clients = newWANDSLLinkConfig1ClientsFromGenericClients(genericClients) return } -// Arguments: -// -// * NewLinkType: +// NewWANDSLLinkConfig1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANDSLLinkConfig1ClientsByURL(loc *url.URL) ([]*WANDSLLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANDSLLinkConfig_1) + if err != nil { + return nil, err + } + return newWANDSLLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +// NewWANDSLLinkConfig1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANDSLLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANDSLLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANDSLLinkConfig_1) + if err != nil { + return nil, err + } + return newWANDSLLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +func newWANDSLLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANDSLLinkConfig1 { + clients := make([]*WANDSLLinkConfig1, len(genericClients)) + for i := range genericClients { + clients[i] = &WANDSLLinkConfig1{genericClients[i]} + } + return clients +} + func (client *WANDSLLinkConfig1) SetDSLLinkType(NewLinkType string) (err error) { // Request structure. request := &struct { @@ -1525,12 +1977,9 @@ func (client *WANDSLLinkConfig1) SetDSLLinkType(NewLinkType string) (err error) return } -// // // Return values: // -// * NewLinkType: -// // * NewLinkStatus: allowed values: Up, Down func (client *WANDSLLinkConfig1) GetDSLLinkInfo() (NewLinkType string, NewLinkStatus string, err error) { // Request structure. @@ -1563,11 +2012,6 @@ func (client *WANDSLLinkConfig1) GetDSLLinkInfo() (NewLinkType string, NewLinkSt return } -// -// -// Return values: -// -// * NewAutoConfig: func (client *WANDSLLinkConfig1) GetAutoConfig() (NewAutoConfig bool, err error) { // Request structure. request := interface{}(nil) @@ -1594,11 +2038,6 @@ func (client *WANDSLLinkConfig1) GetAutoConfig() (NewAutoConfig bool, err error) return } -// -// -// Return values: -// -// * NewModulationType: func (client *WANDSLLinkConfig1) GetModulationType() (NewModulationType string, err error) { // Request structure. request := interface{}(nil) @@ -1625,11 +2064,6 @@ func (client *WANDSLLinkConfig1) GetModulationType() (NewModulationType string, return } -// Arguments: -// -// * NewDestinationAddress: -// -// func (client *WANDSLLinkConfig1) SetDestinationAddress(NewDestinationAddress string) (err error) { // Request structure. request := &struct { @@ -1656,11 +2090,6 @@ func (client *WANDSLLinkConfig1) SetDestinationAddress(NewDestinationAddress str return } -// -// -// Return values: -// -// * NewDestinationAddress: func (client *WANDSLLinkConfig1) GetDestinationAddress() (NewDestinationAddress string, err error) { // Request structure. request := interface{}(nil) @@ -1687,11 +2116,6 @@ func (client *WANDSLLinkConfig1) GetDestinationAddress() (NewDestinationAddress return } -// Arguments: -// -// * NewATMEncapsulation: -// -// func (client *WANDSLLinkConfig1) SetATMEncapsulation(NewATMEncapsulation string) (err error) { // Request structure. request := &struct { @@ -1718,11 +2142,6 @@ func (client *WANDSLLinkConfig1) SetATMEncapsulation(NewATMEncapsulation string) return } -// -// -// Return values: -// -// * NewATMEncapsulation: func (client *WANDSLLinkConfig1) GetATMEncapsulation() (NewATMEncapsulation string, err error) { // Request structure. request := interface{}(nil) @@ -1749,11 +2168,6 @@ func (client *WANDSLLinkConfig1) GetATMEncapsulation() (NewATMEncapsulation stri return } -// Arguments: -// -// * NewFCSPreserved: -// -// func (client *WANDSLLinkConfig1) SetFCSPreserved(NewFCSPreserved bool) (err error) { // Request structure. request := &struct { @@ -1780,11 +2194,6 @@ func (client *WANDSLLinkConfig1) SetFCSPreserved(NewFCSPreserved bool) (err erro return } -// -// -// Return values: -// -// * NewFCSPreserved: func (client *WANDSLLinkConfig1) GetFCSPreserved() (NewFCSPreserved bool, err error) { // Request structure. request := interface{}(nil) @@ -1829,14 +2238,48 @@ func NewWANEthernetLinkConfig1Clients() (clients []*WANEthernetLinkConfig1, erro if genericClients, errors, err = goupnp.NewServiceClients(URN_WANEthernetLinkConfig_1); err != nil { return } - clients = make([]*WANEthernetLinkConfig1, len(genericClients)) + clients = newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients) + return +} + +// NewWANEthernetLinkConfig1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANEthernetLinkConfig1ClientsByURL(loc *url.URL) ([]*WANEthernetLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANEthernetLinkConfig_1) + if err != nil { + return nil, err + } + return newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +// NewWANEthernetLinkConfig1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANEthernetLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANEthernetLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANEthernetLinkConfig_1) + if err != nil { + return nil, err + } + return newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +func newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANEthernetLinkConfig1 { + clients := make([]*WANEthernetLinkConfig1, len(genericClients)) for i := range genericClients { clients[i] = &WANEthernetLinkConfig1{genericClients[i]} } - return + return clients } -// // // Return values: // @@ -1885,18 +2328,48 @@ func NewWANIPConnection1Clients() (clients []*WANIPConnection1, errors []error, if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPConnection_1); err != nil { return } - clients = make([]*WANIPConnection1, len(genericClients)) - for i := range genericClients { - clients[i] = &WANIPConnection1{genericClients[i]} - } + clients = newWANIPConnection1ClientsFromGenericClients(genericClients) return } -// Arguments: -// -// * NewConnectionType: +// NewWANIPConnection1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANIPConnection1ClientsByURL(loc *url.URL) ([]*WANIPConnection1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANIPConnection_1) + if err != nil { + return nil, err + } + return newWANIPConnection1ClientsFromGenericClients(genericClients), nil +} + +// NewWANIPConnection1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANIPConnection1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANIPConnection1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANIPConnection_1) + if err != nil { + return nil, err + } + return newWANIPConnection1ClientsFromGenericClients(genericClients), nil +} + +func newWANIPConnection1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANIPConnection1 { + clients := make([]*WANIPConnection1, len(genericClients)) + for i := range genericClients { + clients[i] = &WANIPConnection1{genericClients[i]} + } + return clients +} + func (client *WANIPConnection1) SetConnectionType(NewConnectionType string) (err error) { // Request structure. request := &struct { @@ -1923,12 +2396,9 @@ func (client *WANIPConnection1) SetConnectionType(NewConnectionType string) (err return } -// // // Return values: // -// * NewConnectionType: -// // * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, IP_Bridged func (client *WANIPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) { // Request structure. @@ -1961,9 +2431,6 @@ func (client *WANIPConnection1) GetConnectionTypeInfo() (NewConnectionType strin return } -// -// -// func (client *WANIPConnection1) RequestConnection() (err error) { // Request structure. request := interface{}(nil) @@ -1985,9 +2452,6 @@ func (client *WANIPConnection1) RequestConnection() (err error) { return } -// -// -// func (client *WANIPConnection1) RequestTermination() (err error) { // Request structure. request := interface{}(nil) @@ -2009,9 +2473,6 @@ func (client *WANIPConnection1) RequestTermination() (err error) { return } -// -// -// func (client *WANIPConnection1) ForceTermination() (err error) { // Request structure. request := interface{}(nil) @@ -2033,11 +2494,6 @@ func (client *WANIPConnection1) ForceTermination() (err error) { return } -// Arguments: -// -// * NewAutoDisconnectTime: -// -// func (client *WANIPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) { // Request structure. request := &struct { @@ -2064,11 +2520,6 @@ func (client *WANIPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint return } -// Arguments: -// -// * NewIdleDisconnectTime: -// -// func (client *WANIPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) { // Request structure. request := &struct { @@ -2095,11 +2546,6 @@ func (client *WANIPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint return } -// Arguments: -// -// * NewWarnDisconnectDelay: -// -// func (client *WANIPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) { // Request structure. request := &struct { @@ -2126,15 +2572,12 @@ func (client *WANIPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay ui return } -// // // Return values: // // * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected // // * NewLastConnectionError: allowed values: ERROR_NONE -// -// * NewUptime: func (client *WANIPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { // Request structure. request := interface{}(nil) @@ -2171,11 +2614,6 @@ func (client *WANIPConnection1) GetStatusInfo() (NewConnectionStatus string, New return } -// -// -// Return values: -// -// * NewAutoDisconnectTime: func (client *WANIPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) { // Request structure. request := interface{}(nil) @@ -2202,11 +2640,6 @@ func (client *WANIPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime u return } -// -// -// Return values: -// -// * NewIdleDisconnectTime: func (client *WANIPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) { // Request structure. request := interface{}(nil) @@ -2233,11 +2666,6 @@ func (client *WANIPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime u return } -// -// -// Return values: -// -// * NewWarnDisconnectDelay: func (client *WANIPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) { // Request structure. request := interface{}(nil) @@ -2264,13 +2692,6 @@ func (client *WANIPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay return } -// -// -// Return values: -// -// * NewRSIPAvailable: -// -// * NewNATEnabled: func (client *WANIPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) { // Request structure. request := interface{}(nil) @@ -2302,27 +2723,10 @@ func (client *WANIPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNA return } -// Arguments: -// -// * NewPortMappingIndex: // // Return values: // -// * NewRemoteHost: -// -// * NewExternalPort: -// // * NewProtocol: allowed values: TCP, UDP -// -// * NewInternalPort: -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: func (client *WANIPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { // Request structure. request := &struct { @@ -2389,25 +2793,11 @@ func (client *WANIPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex u return } -// Arguments: // -// * NewRemoteHost: -// -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// Return values: -// -// * NewInternalPort: -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: + func (client *WANIPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { // Request structure. request := &struct { @@ -2469,25 +2859,11 @@ func (client *WANIPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string return } -// Arguments: -// -// * NewRemoteHost: // -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// * NewInternalPort: -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: -// -// + func (client *WANIPConnection1) AddPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (err error) { // Request structure. request := &struct { @@ -2549,15 +2925,11 @@ func (client *WANIPConnection1) AddPortMapping(NewRemoteHost string, NewExternal return } -// Arguments: // -// * NewRemoteHost: -// -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// + func (client *WANIPConnection1) DeletePortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (err error) { // Request structure. request := &struct { @@ -2594,11 +2966,6 @@ func (client *WANIPConnection1) DeletePortMapping(NewRemoteHost string, NewExter return } -// -// -// Return values: -// -// * NewExternalIPAddress: func (client *WANIPConnection1) GetExternalIPAddress() (NewExternalIPAddress string, err error) { // Request structure. request := interface{}(nil) @@ -2643,18 +3010,48 @@ func NewWANIPConnection2Clients() (clients []*WANIPConnection2, errors []error, if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPConnection_2); err != nil { return } - clients = make([]*WANIPConnection2, len(genericClients)) - for i := range genericClients { - clients[i] = &WANIPConnection2{genericClients[i]} - } + clients = newWANIPConnection2ClientsFromGenericClients(genericClients) return } -// Arguments: -// -// * NewConnectionType: allowed values: Unconfigured, IP_Routed, IP_Bridged +// NewWANIPConnection2ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANIPConnection2ClientsByURL(loc *url.URL) ([]*WANIPConnection2, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANIPConnection_2) + if err != nil { + return nil, err + } + return newWANIPConnection2ClientsFromGenericClients(genericClients), nil +} + +// NewWANIPConnection2ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANIPConnection2ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANIPConnection2, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANIPConnection_2) + if err != nil { + return nil, err + } + return newWANIPConnection2ClientsFromGenericClients(genericClients), nil +} + +func newWANIPConnection2ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANIPConnection2 { + clients := make([]*WANIPConnection2, len(genericClients)) + for i := range genericClients { + clients[i] = &WANIPConnection2{genericClients[i]} + } + return clients +} + func (client *WANIPConnection2) SetConnectionType(NewConnectionType string) (err error) { // Request structure. request := &struct { @@ -2681,13 +3078,6 @@ func (client *WANIPConnection2) SetConnectionType(NewConnectionType string) (err return } -// -// -// Return values: -// -// * NewConnectionType: allowed values: Unconfigured, IP_Routed, IP_Bridged -// -// * NewPossibleConnectionTypes: func (client *WANIPConnection2) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) { // Request structure. request := interface{}(nil) @@ -2719,9 +3109,6 @@ func (client *WANIPConnection2) GetConnectionTypeInfo() (NewConnectionType strin return } -// -// -// func (client *WANIPConnection2) RequestConnection() (err error) { // Request structure. request := interface{}(nil) @@ -2743,9 +3130,6 @@ func (client *WANIPConnection2) RequestConnection() (err error) { return } -// -// -// func (client *WANIPConnection2) RequestTermination() (err error) { // Request structure. request := interface{}(nil) @@ -2767,9 +3151,6 @@ func (client *WANIPConnection2) RequestTermination() (err error) { return } -// -// -// func (client *WANIPConnection2) ForceTermination() (err error) { // Request structure. request := interface{}(nil) @@ -2791,11 +3172,6 @@ func (client *WANIPConnection2) ForceTermination() (err error) { return } -// Arguments: -// -// * NewAutoDisconnectTime: -// -// func (client *WANIPConnection2) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) { // Request structure. request := &struct { @@ -2822,11 +3198,6 @@ func (client *WANIPConnection2) SetAutoDisconnectTime(NewAutoDisconnectTime uint return } -// Arguments: -// -// * NewIdleDisconnectTime: -// -// func (client *WANIPConnection2) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) { // Request structure. request := &struct { @@ -2853,11 +3224,6 @@ func (client *WANIPConnection2) SetIdleDisconnectTime(NewIdleDisconnectTime uint return } -// Arguments: -// -// * NewWarnDisconnectDelay: -// -// func (client *WANIPConnection2) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) { // Request structure. request := &struct { @@ -2884,15 +3250,12 @@ func (client *WANIPConnection2) SetWarnDisconnectDelay(NewWarnDisconnectDelay ui return } -// // // Return values: // -// * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected -// -// * NewLastConnectionError: allowed values: ERROR_NONE +// * NewConnectionStatus: allowed values: Unconfigured, Connecting, Connected, PendingDisconnect, Disconnecting, Disconnected // -// * NewUptime: +// * NewLastConnectionError: allowed values: ERROR_NONE, ERROR_COMMAND_ABORTED, ERROR_NOT_ENABLED_FOR_INTERNET, ERROR_USER_DISCONNECT, ERROR_ISP_DISCONNECT, ERROR_IDLE_DISCONNECT, ERROR_FORCED_DISCONNECT, ERROR_NO_CARRIER, ERROR_IP_CONFIGURATION, ERROR_UNKNOWN func (client *WANIPConnection2) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { // Request structure. request := interface{}(nil) @@ -2929,11 +3292,6 @@ func (client *WANIPConnection2) GetStatusInfo() (NewConnectionStatus string, New return } -// -// -// Return values: -// -// * NewAutoDisconnectTime: func (client *WANIPConnection2) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) { // Request structure. request := interface{}(nil) @@ -2960,11 +3318,6 @@ func (client *WANIPConnection2) GetAutoDisconnectTime() (NewAutoDisconnectTime u return } -// -// -// Return values: -// -// * NewIdleDisconnectTime: func (client *WANIPConnection2) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) { // Request structure. request := interface{}(nil) @@ -2991,11 +3344,6 @@ func (client *WANIPConnection2) GetIdleDisconnectTime() (NewIdleDisconnectTime u return } -// -// -// Return values: -// -// * NewWarnDisconnectDelay: func (client *WANIPConnection2) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) { // Request structure. request := interface{}(nil) @@ -3022,13 +3370,6 @@ func (client *WANIPConnection2) GetWarnDisconnectDelay() (NewWarnDisconnectDelay return } -// -// -// Return values: -// -// * NewRSIPAvailable: -// -// * NewNATEnabled: func (client *WANIPConnection2) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) { // Request structure. request := interface{}(nil) @@ -3060,27 +3401,10 @@ func (client *WANIPConnection2) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNA return } -// Arguments: -// -// * NewPortMappingIndex: // // Return values: // -// * NewRemoteHost: -// -// * NewExternalPort: -// // * NewProtocol: allowed values: TCP, UDP -// -// * NewInternalPort: allowed value range: minimum=1, maximum=65535 -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: allowed value range: minimum=0, maximum=604800 func (client *WANIPConnection2) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { // Request structure. request := &struct { @@ -3147,25 +3471,11 @@ func (client *WANIPConnection2) GetGenericPortMappingEntry(NewPortMappingIndex u return } -// Arguments: // -// * NewRemoteHost: -// -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// Return values: -// -// * NewInternalPort: allowed value range: minimum=1, maximum=65535 -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: allowed value range: minimum=0, maximum=604800 + func (client *WANIPConnection2) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { // Request structure. request := &struct { @@ -3227,25 +3537,11 @@ func (client *WANIPConnection2) GetSpecificPortMappingEntry(NewRemoteHost string return } -// Arguments: -// -// * NewRemoteHost: // -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// * NewInternalPort: allowed value range: minimum=1, maximum=65535 -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: allowed value range: minimum=0, maximum=604800 -// -// + func (client *WANIPConnection2) AddPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (err error) { // Request structure. request := &struct { @@ -3307,15 +3603,11 @@ func (client *WANIPConnection2) AddPortMapping(NewRemoteHost string, NewExternal return } -// Arguments: // -// * NewRemoteHost: -// -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// + func (client *WANIPConnection2) DeletePortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (err error) { // Request structure. request := &struct { @@ -3352,17 +3644,11 @@ func (client *WANIPConnection2) DeletePortMapping(NewRemoteHost string, NewExter return } -// Arguments: // -// * NewStartPort: -// -// * NewEndPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// * NewManage: -// -// + func (client *WANIPConnection2) DeletePortMappingRange(NewStartPort uint16, NewEndPort uint16, NewProtocol string, NewManage bool) (err error) { // Request structure. request := &struct { @@ -3404,11 +3690,6 @@ func (client *WANIPConnection2) DeletePortMappingRange(NewStartPort uint16, NewE return } -// -// -// Return values: -// -// * NewExternalIPAddress: func (client *WANIPConnection2) GetExternalIPAddress() (NewExternalIPAddress string, err error) { // Request structure. request := interface{}(nil) @@ -3435,21 +3716,11 @@ func (client *WANIPConnection2) GetExternalIPAddress() (NewExternalIPAddress str return } -// Arguments: -// -// * NewStartPort: // -// * NewEndPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// * NewManage: -// -// * NewNumberOfPorts: -// -// Return values: -// -// * NewPortListing: + func (client *WANIPConnection2) GetListOfPortMappings(NewStartPort uint16, NewEndPort uint16, NewProtocol string, NewManage bool, NewNumberOfPorts uint16) (NewPortListing string, err error) { // Request structure. request := &struct { @@ -3501,27 +3772,11 @@ func (client *WANIPConnection2) GetListOfPortMappings(NewStartPort uint16, NewEn return } -// Arguments: // -// * NewRemoteHost: -// -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// * NewInternalPort: allowed value range: minimum=1, maximum=65535 -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: allowed value range: minimum=0, maximum=604800 -// -// Return values: -// -// * NewReservedPort: + func (client *WANIPConnection2) AddAnyPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (NewReservedPort uint16, err error) { // Request structure. request := &struct { @@ -3606,20 +3861,48 @@ func NewWANIPv6FirewallControl1Clients() (clients []*WANIPv6FirewallControl1, er if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPv6FirewallControl_1); err != nil { return } - clients = make([]*WANIPv6FirewallControl1, len(genericClients)) - for i := range genericClients { - clients[i] = &WANIPv6FirewallControl1{genericClients[i]} - } + clients = newWANIPv6FirewallControl1ClientsFromGenericClients(genericClients) return } +// NewWANIPv6FirewallControl1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANIPv6FirewallControl1ClientsByURL(loc *url.URL) ([]*WANIPv6FirewallControl1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANIPv6FirewallControl_1) + if err != nil { + return nil, err + } + return newWANIPv6FirewallControl1ClientsFromGenericClients(genericClients), nil +} + +// NewWANIPv6FirewallControl1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // -// Return values: -// -// * FirewallEnabled: -// -// * InboundPinholeAllowed: +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANIPv6FirewallControl1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANIPv6FirewallControl1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANIPv6FirewallControl_1) + if err != nil { + return nil, err + } + return newWANIPv6FirewallControl1ClientsFromGenericClients(genericClients), nil +} + +func newWANIPv6FirewallControl1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANIPv6FirewallControl1 { + clients := make([]*WANIPv6FirewallControl1, len(genericClients)) + for i := range genericClients { + clients[i] = &WANIPv6FirewallControl1{genericClients[i]} + } + return clients +} + func (client *WANIPv6FirewallControl1) GetFirewallStatus() (FirewallEnabled bool, InboundPinholeAllowed bool, err error) { // Request structure. request := interface{}(nil) @@ -3651,21 +3934,6 @@ func (client *WANIPv6FirewallControl1) GetFirewallStatus() (FirewallEnabled bool return } -// Arguments: -// -// * RemoteHost: -// -// * RemotePort: -// -// * InternalClient: -// -// * InternalPort: -// -// * Protocol: -// -// Return values: -// -// * OutboundPinholeTimeout: func (client *WANIPv6FirewallControl1) GetOutboundPinholeTimeout(RemoteHost string, RemotePort uint16, InternalClient string, InternalPort uint16, Protocol uint16) (OutboundPinholeTimeout uint32, err error) { // Request structure. request := &struct { @@ -3717,23 +3985,11 @@ func (client *WANIPv6FirewallControl1) GetOutboundPinholeTimeout(RemoteHost stri return } -// Arguments: // -// * RemoteHost: -// -// * RemotePort: -// -// * InternalClient: -// -// * InternalPort: -// -// * Protocol: +// Arguments: // // * LeaseTime: allowed value range: minimum=1, maximum=86400 -// -// Return values: -// -// * UniqueID: + func (client *WANIPv6FirewallControl1) AddPinhole(RemoteHost string, RemotePort uint16, InternalClient string, InternalPort uint16, Protocol uint16, LeaseTime uint32) (UniqueID uint16, err error) { // Request structure. request := &struct { @@ -3790,13 +4046,11 @@ func (client *WANIPv6FirewallControl1) AddPinhole(RemoteHost string, RemotePort return } -// Arguments: // -// * UniqueID: +// Arguments: // // * NewLeaseTime: allowed value range: minimum=1, maximum=86400 -// -// + func (client *WANIPv6FirewallControl1) UpdatePinhole(UniqueID uint16, NewLeaseTime uint32) (err error) { // Request structure. request := &struct { @@ -3828,11 +4082,6 @@ func (client *WANIPv6FirewallControl1) UpdatePinhole(UniqueID uint16, NewLeaseTi return } -// Arguments: -// -// * UniqueID: -// -// func (client *WANIPv6FirewallControl1) DeletePinhole(UniqueID uint16) (err error) { // Request structure. request := &struct { @@ -3859,13 +4108,6 @@ func (client *WANIPv6FirewallControl1) DeletePinhole(UniqueID uint16) (err error return } -// Arguments: -// -// * UniqueID: -// -// Return values: -// -// * PinholePackets: func (client *WANIPv6FirewallControl1) GetPinholePackets(UniqueID uint16) (PinholePackets uint32, err error) { // Request structure. request := &struct { @@ -3897,13 +4139,6 @@ func (client *WANIPv6FirewallControl1) GetPinholePackets(UniqueID uint16) (Pinho return } -// Arguments: -// -// * UniqueID: -// -// Return values: -// -// * IsWorking: func (client *WANIPv6FirewallControl1) CheckPinholeWorking(UniqueID uint16) (IsWorking bool, err error) { // Request structure. request := &struct { @@ -3953,22 +4188,53 @@ func NewWANPOTSLinkConfig1Clients() (clients []*WANPOTSLinkConfig1, errors []err if genericClients, errors, err = goupnp.NewServiceClients(URN_WANPOTSLinkConfig_1); err != nil { return } - clients = make([]*WANPOTSLinkConfig1, len(genericClients)) + clients = newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients) + return +} + +// NewWANPOTSLinkConfig1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANPOTSLinkConfig1ClientsByURL(loc *url.URL) ([]*WANPOTSLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANPOTSLinkConfig_1) + if err != nil { + return nil, err + } + return newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +// NewWANPOTSLinkConfig1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANPOTSLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANPOTSLinkConfig1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANPOTSLinkConfig_1) + if err != nil { + return nil, err + } + return newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients), nil +} + +func newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANPOTSLinkConfig1 { + clients := make([]*WANPOTSLinkConfig1, len(genericClients)) for i := range genericClients { clients[i] = &WANPOTSLinkConfig1{genericClients[i]} } - return + return clients } -// Arguments: -// -// * NewISPPhoneNumber: // -// * NewISPInfo: +// Arguments: // // * NewLinkType: allowed values: PPP_Dialup -// -// + func (client *WANPOTSLinkConfig1) SetISPInfo(NewISPPhoneNumber string, NewISPInfo string, NewLinkType string) (err error) { // Request structure. request := &struct { @@ -4005,13 +4271,6 @@ func (client *WANPOTSLinkConfig1) SetISPInfo(NewISPPhoneNumber string, NewISPInf return } -// Arguments: -// -// * NewNumberOfRetries: -// -// * NewDelayBetweenRetries: -// -// func (client *WANPOTSLinkConfig1) SetCallRetryInfo(NewNumberOfRetries uint32, NewDelayBetweenRetries uint32) (err error) { // Request structure. request := &struct { @@ -4043,14 +4302,9 @@ func (client *WANPOTSLinkConfig1) SetCallRetryInfo(NewNumberOfRetries uint32, Ne return } -// // // Return values: // -// * NewISPPhoneNumber: -// -// * NewISPInfo: -// // * NewLinkType: allowed values: PPP_Dialup func (client *WANPOTSLinkConfig1) GetISPInfo() (NewISPPhoneNumber string, NewISPInfo string, NewLinkType string, err error) { // Request structure. @@ -4088,13 +4342,6 @@ func (client *WANPOTSLinkConfig1) GetISPInfo() (NewISPPhoneNumber string, NewISP return } -// -// -// Return values: -// -// * NewNumberOfRetries: -// -// * NewDelayBetweenRetries: func (client *WANPOTSLinkConfig1) GetCallRetryInfo() (NewNumberOfRetries uint32, NewDelayBetweenRetries uint32, err error) { // Request structure. request := interface{}(nil) @@ -4126,11 +4373,6 @@ func (client *WANPOTSLinkConfig1) GetCallRetryInfo() (NewNumberOfRetries uint32, return } -// -// -// Return values: -// -// * NewFclass: func (client *WANPOTSLinkConfig1) GetFclass() (NewFclass string, err error) { // Request structure. request := interface{}(nil) @@ -4157,11 +4399,6 @@ func (client *WANPOTSLinkConfig1) GetFclass() (NewFclass string, err error) { return } -// -// -// Return values: -// -// * NewDataModulationSupported: func (client *WANPOTSLinkConfig1) GetDataModulationSupported() (NewDataModulationSupported string, err error) { // Request structure. request := interface{}(nil) @@ -4188,11 +4425,6 @@ func (client *WANPOTSLinkConfig1) GetDataModulationSupported() (NewDataModulatio return } -// -// -// Return values: -// -// * NewDataProtocol: func (client *WANPOTSLinkConfig1) GetDataProtocol() (NewDataProtocol string, err error) { // Request structure. request := interface{}(nil) @@ -4219,11 +4451,6 @@ func (client *WANPOTSLinkConfig1) GetDataProtocol() (NewDataProtocol string, err return } -// -// -// Return values: -// -// * NewDataCompression: func (client *WANPOTSLinkConfig1) GetDataCompression() (NewDataCompression string, err error) { // Request structure. request := interface{}(nil) @@ -4250,11 +4477,6 @@ func (client *WANPOTSLinkConfig1) GetDataCompression() (NewDataCompression strin return } -// -// -// Return values: -// -// * NewPlusVTRCommandSupported: func (client *WANPOTSLinkConfig1) GetPlusVTRCommandSupported() (NewPlusVTRCommandSupported bool, err error) { // Request structure. request := interface{}(nil) @@ -4299,18 +4521,48 @@ func NewWANPPPConnection1Clients() (clients []*WANPPPConnection1, errors []error if genericClients, errors, err = goupnp.NewServiceClients(URN_WANPPPConnection_1); err != nil { return } - clients = make([]*WANPPPConnection1, len(genericClients)) - for i := range genericClients { - clients[i] = &WANPPPConnection1{genericClients[i]} - } + clients = newWANPPPConnection1ClientsFromGenericClients(genericClients) return } -// Arguments: -// -// * NewConnectionType: +// NewWANPPPConnection1ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. // +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func NewWANPPPConnection1ClientsByURL(loc *url.URL) ([]*WANPPPConnection1, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANPPPConnection_1) + if err != nil { + return nil, err + } + return newWANPPPConnection1ClientsFromGenericClients(genericClients), nil +} + +// NewWANPPPConnection1ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). // +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func NewWANPPPConnection1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANPPPConnection1, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANPPPConnection_1) + if err != nil { + return nil, err + } + return newWANPPPConnection1ClientsFromGenericClients(genericClients), nil +} + +func newWANPPPConnection1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANPPPConnection1 { + clients := make([]*WANPPPConnection1, len(genericClients)) + for i := range genericClients { + clients[i] = &WANPPPConnection1{genericClients[i]} + } + return clients +} + func (client *WANPPPConnection1) SetConnectionType(NewConnectionType string) (err error) { // Request structure. request := &struct { @@ -4337,12 +4589,9 @@ func (client *WANPPPConnection1) SetConnectionType(NewConnectionType string) (er return } -// // // Return values: // -// * NewConnectionType: -// // * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, DHCP_Spoofed, PPPoE_Bridged, PPTP_Relay, L2TP_Relay, PPPoE_Relay func (client *WANPPPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) { // Request structure. @@ -4375,13 +4624,6 @@ func (client *WANPPPConnection1) GetConnectionTypeInfo() (NewConnectionType stri return } -// Arguments: -// -// * NewUserName: -// -// * NewPassword: -// -// func (client *WANPPPConnection1) ConfigureConnection(NewUserName string, NewPassword string) (err error) { // Request structure. request := &struct { @@ -4413,9 +4655,6 @@ func (client *WANPPPConnection1) ConfigureConnection(NewUserName string, NewPass return } -// -// -// func (client *WANPPPConnection1) RequestConnection() (err error) { // Request structure. request := interface{}(nil) @@ -4437,9 +4676,6 @@ func (client *WANPPPConnection1) RequestConnection() (err error) { return } -// -// -// func (client *WANPPPConnection1) RequestTermination() (err error) { // Request structure. request := interface{}(nil) @@ -4461,9 +4697,6 @@ func (client *WANPPPConnection1) RequestTermination() (err error) { return } -// -// -// func (client *WANPPPConnection1) ForceTermination() (err error) { // Request structure. request := interface{}(nil) @@ -4485,11 +4718,6 @@ func (client *WANPPPConnection1) ForceTermination() (err error) { return } -// Arguments: -// -// * NewAutoDisconnectTime: -// -// func (client *WANPPPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) { // Request structure. request := &struct { @@ -4516,11 +4744,6 @@ func (client *WANPPPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uin return } -// Arguments: -// -// * NewIdleDisconnectTime: -// -// func (client *WANPPPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) { // Request structure. request := &struct { @@ -4547,11 +4770,6 @@ func (client *WANPPPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uin return } -// Arguments: -// -// * NewWarnDisconnectDelay: -// -// func (client *WANPPPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) { // Request structure. request := &struct { @@ -4578,15 +4796,12 @@ func (client *WANPPPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay u return } -// // // Return values: // // * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected // // * NewLastConnectionError: allowed values: ERROR_NONE -// -// * NewUptime: func (client *WANPPPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) { // Request structure. request := interface{}(nil) @@ -4623,13 +4838,6 @@ func (client *WANPPPConnection1) GetStatusInfo() (NewConnectionStatus string, Ne return } -// -// -// Return values: -// -// * NewUpstreamMaxBitRate: -// -// * NewDownstreamMaxBitRate: func (client *WANPPPConnection1) GetLinkLayerMaxBitRates() (NewUpstreamMaxBitRate uint32, NewDownstreamMaxBitRate uint32, err error) { // Request structure. request := interface{}(nil) @@ -4661,11 +4869,6 @@ func (client *WANPPPConnection1) GetLinkLayerMaxBitRates() (NewUpstreamMaxBitRat return } -// -// -// Return values: -// -// * NewPPPEncryptionProtocol: func (client *WANPPPConnection1) GetPPPEncryptionProtocol() (NewPPPEncryptionProtocol string, err error) { // Request structure. request := interface{}(nil) @@ -4692,11 +4895,6 @@ func (client *WANPPPConnection1) GetPPPEncryptionProtocol() (NewPPPEncryptionPro return } -// -// -// Return values: -// -// * NewPPPCompressionProtocol: func (client *WANPPPConnection1) GetPPPCompressionProtocol() (NewPPPCompressionProtocol string, err error) { // Request structure. request := interface{}(nil) @@ -4723,11 +4921,6 @@ func (client *WANPPPConnection1) GetPPPCompressionProtocol() (NewPPPCompressionP return } -// -// -// Return values: -// -// * NewPPPAuthenticationProtocol: func (client *WANPPPConnection1) GetPPPAuthenticationProtocol() (NewPPPAuthenticationProtocol string, err error) { // Request structure. request := interface{}(nil) @@ -4754,11 +4947,6 @@ func (client *WANPPPConnection1) GetPPPAuthenticationProtocol() (NewPPPAuthentic return } -// -// -// Return values: -// -// * NewUserName: func (client *WANPPPConnection1) GetUserName() (NewUserName string, err error) { // Request structure. request := interface{}(nil) @@ -4785,11 +4973,6 @@ func (client *WANPPPConnection1) GetUserName() (NewUserName string, err error) { return } -// -// -// Return values: -// -// * NewPassword: func (client *WANPPPConnection1) GetPassword() (NewPassword string, err error) { // Request structure. request := interface{}(nil) @@ -4816,11 +4999,6 @@ func (client *WANPPPConnection1) GetPassword() (NewPassword string, err error) { return } -// -// -// Return values: -// -// * NewAutoDisconnectTime: func (client *WANPPPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) { // Request structure. request := interface{}(nil) @@ -4847,11 +5025,6 @@ func (client *WANPPPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime return } -// -// -// Return values: -// -// * NewIdleDisconnectTime: func (client *WANPPPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) { // Request structure. request := interface{}(nil) @@ -4878,11 +5051,6 @@ func (client *WANPPPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime return } -// -// -// Return values: -// -// * NewWarnDisconnectDelay: func (client *WANPPPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) { // Request structure. request := interface{}(nil) @@ -4909,13 +5077,6 @@ func (client *WANPPPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDela return } -// -// -// Return values: -// -// * NewRSIPAvailable: -// -// * NewNATEnabled: func (client *WANPPPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) { // Request structure. request := interface{}(nil) @@ -4947,27 +5108,10 @@ func (client *WANPPPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewN return } -// Arguments: -// -// * NewPortMappingIndex: // // Return values: // -// * NewRemoteHost: -// -// * NewExternalPort: -// // * NewProtocol: allowed values: TCP, UDP -// -// * NewInternalPort: -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: func (client *WANPPPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { // Request structure. request := &struct { @@ -5034,25 +5178,11 @@ func (client *WANPPPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex return } -// Arguments: -// -// * NewRemoteHost: // -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// Return values: -// -// * NewInternalPort: -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: + func (client *WANPPPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) { // Request structure. request := &struct { @@ -5114,25 +5244,11 @@ func (client *WANPPPConnection1) GetSpecificPortMappingEntry(NewRemoteHost strin return } -// Arguments: // -// * NewRemoteHost: -// -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// * NewInternalPort: -// -// * NewInternalClient: -// -// * NewEnabled: -// -// * NewPortMappingDescription: -// -// * NewLeaseDuration: -// -// + func (client *WANPPPConnection1) AddPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (err error) { // Request structure. request := &struct { @@ -5194,15 +5310,11 @@ func (client *WANPPPConnection1) AddPortMapping(NewRemoteHost string, NewExterna return } -// Arguments: -// -// * NewRemoteHost: // -// * NewExternalPort: +// Arguments: // // * NewProtocol: allowed values: TCP, UDP -// -// + func (client *WANPPPConnection1) DeletePortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (err error) { // Request structure. request := &struct { @@ -5239,11 +5351,6 @@ func (client *WANPPPConnection1) DeletePortMapping(NewRemoteHost string, NewExte return } -// -// -// Return values: -// -// * NewExternalIPAddress: func (client *WANPPPConnection1) GetExternalIPAddress() (NewExternalIPAddress string, err error) { // Request structure. request := interface{}(nil) diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/example/example_test.go b/Godeps/_workspace/src/github.com/huin/goupnp/example/example_test.go deleted file mode 100644 index 1f3667df7..000000000 --- a/Godeps/_workspace/src/github.com/huin/goupnp/example/example_test.go +++ /dev/null @@ -1,62 +0,0 @@ -package example_test - -import ( - "fmt" - "os" - - "github.com/huin/goupnp" - "github.com/huin/goupnp/dcps/internetgateway1" -) - -// Use discovered WANPPPConnection1 services to find external IP addresses. -func Example_WANPPPConnection1_GetExternalIPAddress() { - clients, errors, err := internetgateway1.NewWANPPPConnection1Clients() - extIPClients := make([]GetExternalIPAddresser, len(clients)) - for i, client := range clients { - extIPClients[i] = client - } - DisplayExternalIPResults(extIPClients, errors, err) - // Output: -} - -// Use discovered WANIPConnection services to find external IP addresses. -func Example_WANIPConnection_GetExternalIPAddress() { - clients, errors, err := internetgateway1.NewWANIPConnection1Clients() - extIPClients := make([]GetExternalIPAddresser, len(clients)) - for i, client := range clients { - extIPClients[i] = client - } - DisplayExternalIPResults(extIPClients, errors, err) - // Output: -} - -type GetExternalIPAddresser interface { - GetExternalIPAddress() (NewExternalIPAddress string, err error) - GetServiceClient() *goupnp.ServiceClient -} - -func DisplayExternalIPResults(clients []GetExternalIPAddresser, errors []error, err error) { - if err != nil { - fmt.Fprintln(os.Stderr, "Error discovering service with UPnP: ", err) - return - } - - if len(errors) > 0 { - fmt.Fprintf(os.Stderr, "Error discovering %d services:\n", len(errors)) - for _, err := range errors { - fmt.Println(" ", err) - } - } - - fmt.Fprintf(os.Stderr, "Successfully discovered %d services:\n", len(clients)) - for _, client := range clients { - device := &client.GetServiceClient().RootDevice.Device - - fmt.Fprintln(os.Stderr, " Device:", device.FriendlyName) - if addr, err := client.GetExternalIPAddress(); err != nil { - fmt.Fprintf(os.Stderr, " Failed to get external IP address: %v\n", err) - } else { - fmt.Fprintf(os.Stderr, " External IP address: %v\n", addr) - } - } -} diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/gotasks/specgen_task.go b/Godeps/_workspace/src/github.com/huin/goupnp/gotasks/specgen_task.go index 0ac1d4ff3..921e8c857 100644 --- a/Godeps/_workspace/src/github.com/huin/goupnp/gotasks/specgen_task.go +++ b/Godeps/_workspace/src/github.com/huin/goupnp/gotasks/specgen_task.go @@ -4,12 +4,11 @@ package gotasks import ( "archive/zip" - "bytes" "encoding/xml" "fmt" "io" - "io/ioutil" "log" + "net/http" "os" "path" "path/filepath" @@ -28,6 +27,53 @@ var ( serviceURNPrefix = "urn:schemas-upnp-org:service:" ) +// DCP contains extra metadata to use when generating DCP source files. +type DCPMetadata struct { + Name string // What to name the Go DCP package. + OfficialName string // Official name for the DCP. + DocURL string // Optional - URL for futher documentation about the DCP. + XMLSpecURL string // Where to download the XML spec from. + // Any special-case functions to run against the DCP before writing it out. + Hacks []DCPHackFn +} + +var dcpMetadata = []DCPMetadata{ + { + Name: "internetgateway1", + OfficialName: "Internet Gateway Device v1", + DocURL: "http://upnp.org/specs/gw/UPnP-gw-InternetGatewayDevice-v1-Device.pdf", + XMLSpecURL: "http://upnp.org/specs/gw/UPnP-gw-IGD-TestFiles-20010921.zip", + }, + { + Name: "internetgateway2", + OfficialName: "Internet Gateway Device v2", + DocURL: "http://upnp.org/specs/gw/UPnP-gw-InternetGatewayDevice-v2-Device.pdf", + XMLSpecURL: "http://upnp.org/specs/gw/UPnP-gw-IGD-Testfiles-20110224.zip", + Hacks: []DCPHackFn{ + func(dcp *DCP) error { + missingURN := "urn:schemas-upnp-org:service:WANIPv6FirewallControl:1" + if _, ok := dcp.ServiceTypes[missingURN]; ok { + return nil + } + urnParts, err := extractURNParts(missingURN, serviceURNPrefix) + if err != nil { + return err + } + dcp.ServiceTypes[missingURN] = urnParts + return nil + }, + }, + }, + { + Name: "av1", + OfficialName: "MediaServer v1 and MediaRenderer v1", + DocURL: "http://upnp.org/specs/av/av1/", + XMLSpecURL: "http://upnp.org/specs/av/UPnP-av-TestFiles-20070927.zip", + }, +} + +type DCPHackFn func(*DCP) error + // NAME // specgen - generates Go code from the UPnP specification files. // @@ -35,104 +81,90 @@ var ( // The specification is available for download from: // // OPTIONS -// -s, --spec_filename= -// Path to the specification file, available from http://upnp.org/resources/upnpresources.zip +// -s, --specs_dir= +// Path to the specification storage directory. This is used to find (and download if not present) the specification ZIP files. Defaults to 'specs' // -o, --out_dir= -// Path to the output directory. This is is where the DCP source files will be placed. Should normally correspond to the directory for github.com/huin/goupnp/dcps +// Path to the output directory. This is is where the DCP source files will be placed. Should normally correspond to the directory for github.com/huin/goupnp/dcps. Defaults to '../dcps' // --nogofmt // Disable passing the output through gofmt. Do this if debugging code output problems and needing to see the generated code prior to being passed through gofmt. func TaskSpecgen(t *tasking.T) { - specFilename := t.Flags.String("spec-filename") - if specFilename == "" { - specFilename = t.Flags.String("s") - } - if specFilename == "" { - t.Fatal("--spec_filename is required") - } - outDir := t.Flags.String("out-dir") - if outDir == "" { - outDir = t.Flags.String("o") - } - if outDir == "" { - log.Fatal("--out_dir is required") + specsDir := fallbackStrValue("specs", t.Flags.String("specs_dir"), t.Flags.String("s")) + if err := os.MkdirAll(specsDir, os.ModePerm); err != nil { + t.Fatalf("Could not create specs-dir %q: %v\n", specsDir, err) } + outDir := fallbackStrValue("../dcps", t.Flags.String("out_dir"), t.Flags.String("o")) useGofmt := !t.Flags.Bool("nogofmt") - specArchive, err := openZipfile(specFilename) - if err != nil { - t.Fatalf("Error opening spec file: %v", err) - } - defer specArchive.Close() - - dcpCol := newDcpsCollection() - for _, f := range globFiles("standardizeddcps/*/*.zip", specArchive.Reader) { - dirName := strings.TrimPrefix(f.Name, "standardizeddcps/") - slashIndex := strings.Index(dirName, "/") - if slashIndex == -1 { - // Should not happen. - t.Logf("Could not find / in %q", dirName) - return +NEXT_DCP: + for _, d := range dcpMetadata { + specFilename := filepath.Join(specsDir, d.Name+".zip") + err := acquireFile(specFilename, d.XMLSpecURL) + if err != nil { + t.Logf("Could not acquire spec for %s, skipping: %v\n", d.Name, err) + continue NEXT_DCP } - dirName = dirName[:slashIndex] - - dcp := dcpCol.dcpForDir(dirName) - if dcp == nil { - t.Logf("No alias defined for directory %q: skipping %s\n", dirName, f.Name) - continue - } else { - t.Logf("Alias found for directory %q: processing %s\n", dirName, f.Name) + dcp := newDCP(d) + if err := dcp.processZipFile(specFilename); err != nil { + log.Printf("Error processing spec for %s in file %q: %v", d.Name, specFilename, err) + continue NEXT_DCP } - - dcp.processZipFile(f) - } - - for _, dcp := range dcpCol.dcpByAlias { + for i, hack := range d.Hacks { + if err := hack(dcp); err != nil { + log.Printf("Error with Hack[%d] for %s: %v", i, d.Name, err) + continue NEXT_DCP + } + } + dcp.writePackage(outDir, useGofmt) if err := dcp.writePackage(outDir, useGofmt); err != nil { log.Printf("Error writing package %q: %v", dcp.Metadata.Name, err) + continue NEXT_DCP } } } -// DCP contains extra metadata to use when generating DCP source files. -type DCPMetadata struct { - Name string // What to name the Go DCP package. - OfficialName string // Official name for the DCP. - DocURL string // Optional - URL for futher documentation about the DCP. +func fallbackStrValue(defaultValue string, values ...string) string { + for _, v := range values { + if v != "" { + return v + } + } + return defaultValue } -var dcpMetadataByDir = map[string]DCPMetadata{ - "Internet Gateway_1": { - Name: "internetgateway1", - OfficialName: "Internet Gateway Device v1", - DocURL: "http://upnp.org/specs/gw/UPnP-gw-InternetGatewayDevice-v1-Device.pdf", - }, - "Internet Gateway_2": { - Name: "internetgateway2", - OfficialName: "Internet Gateway Device v2", - DocURL: "http://upnp.org/specs/gw/UPnP-gw-InternetGatewayDevice-v2-Device.pdf", - }, -} +func acquireFile(specFilename string, xmlSpecURL string) error { + if f, err := os.Open(specFilename); err != nil { + if !os.IsNotExist(err) { + return err + } + } else { + f.Close() + return nil + } -type dcpCollection struct { - dcpByAlias map[string]*DCP -} + resp, err := http.Get(xmlSpecURL) + if err != nil { + return err + } + defer resp.Body.Close() -func newDcpsCollection() *dcpCollection { - c := &dcpCollection{ - dcpByAlias: make(map[string]*DCP), + if resp.StatusCode != http.StatusOK { + return fmt.Errorf("could not download spec %q from %q: ", + specFilename, xmlSpecURL, resp.Status) } - for _, metadata := range dcpMetadataByDir { - c.dcpByAlias[metadata.Name] = newDCP(metadata) + + tmpFilename := specFilename + ".download" + w, err := os.Create(tmpFilename) + if err != nil { + return err } - return c -} + defer w.Close() -func (c *dcpCollection) dcpForDir(dirName string) *DCP { - metadata, ok := dcpMetadataByDir[dirName] - if !ok { - return nil + _, err = io.Copy(w, resp.Body) + if err != nil { + return err } - return c.dcpByAlias[metadata.Name] + + return os.Rename(tmpFilename, specFilename) } // DCP collects together information about a UPnP Device Control Protocol. @@ -151,33 +183,37 @@ func newDCP(metadata DCPMetadata) *DCP { } } -func (dcp *DCP) processZipFile(file *zip.File) { - archive, err := openChildZip(file) +func (dcp *DCP) processZipFile(filename string) error { + archive, err := zip.OpenReader(filename) if err != nil { - log.Println("Error reading child zip file:", err) - return + return fmt.Errorf("error reading zip file %q: %v", filename, err) } + defer archive.Close() for _, deviceFile := range globFiles("*/device/*.xml", archive) { - dcp.processDeviceFile(deviceFile) + if err := dcp.processDeviceFile(deviceFile); err != nil { + return err + } } for _, scpdFile := range globFiles("*/service/*.xml", archive) { - dcp.processSCPDFile(scpdFile) + if err := dcp.processSCPDFile(scpdFile); err != nil { + return err + } } + return nil } -func (dcp *DCP) processDeviceFile(file *zip.File) { +func (dcp *DCP) processDeviceFile(file *zip.File) error { var device goupnp.Device if err := unmarshalXmlFile(file, &device); err != nil { - log.Printf("Error decoding device XML from file %q: %v", file.Name, err) - return + return fmt.Errorf("error decoding device XML from file %q: %v", file.Name, err) } + var mainErr error device.VisitDevices(func(d *goupnp.Device) { t := strings.TrimSpace(d.DeviceType) if t != "" { u, err := extractURNParts(t, deviceURNPrefix) if err != nil { - log.Println(err) - return + mainErr = err } dcp.DeviceTypes[t] = u } @@ -185,11 +221,11 @@ func (dcp *DCP) processDeviceFile(file *zip.File) { device.VisitServices(func(s *goupnp.Service) { u, err := extractURNParts(s.ServiceType, serviceURNPrefix) if err != nil { - log.Println(err) - return + mainErr = err } dcp.ServiceTypes[s.ServiceType] = u }) + return mainErr } func (dcp *DCP) writePackage(outDir string, useGofmt bool) error { @@ -217,22 +253,21 @@ func (dcp *DCP) writePackage(outDir string, useGofmt bool) error { return output.Close() } -func (dcp *DCP) processSCPDFile(file *zip.File) { +func (dcp *DCP) processSCPDFile(file *zip.File) error { scpd := new(scpd.SCPD) if err := unmarshalXmlFile(file, scpd); err != nil { - log.Printf("Error decoding SCPD XML from file %q: %v", file.Name, err) - return + return fmt.Errorf("error decoding SCPD XML from file %q: %v", file.Name, err) } scpd.Clean() urnParts, err := urnPartsFromSCPDFilename(file.Name) if err != nil { - log.Printf("Could not recognize SCPD filename %q: %v", file.Name, err) - return + return fmt.Errorf("could not recognize SCPD filename %q: %v", file.Name, err) } dcp.Services = append(dcp.Services, SCPDWithURN{ URNParts: urnParts, SCPD: scpd, }) + return nil } type SCPDWithURN struct { @@ -240,7 +275,19 @@ type SCPDWithURN struct { SCPD *scpd.SCPD } -func (s *SCPDWithURN) WrapArgument(arg scpd.Argument) (*argumentWrapper, error) { +func (s *SCPDWithURN) WrapArguments(args []*scpd.Argument) (argumentWrapperList, error) { + wrappedArgs := make(argumentWrapperList, len(args)) + for i, arg := range args { + wa, err := s.wrapArgument(arg) + if err != nil { + return nil, err + } + wrappedArgs[i] = wa + } + return wrappedArgs, nil +} + +func (s *SCPDWithURN) wrapArgument(arg *scpd.Argument) (*argumentWrapper, error) { relVar := s.SCPD.GetStateVariable(arg.RelatedStateVariable) if relVar == nil { return nil, fmt.Errorf("no such state variable: %q, for argument %q", arg.RelatedStateVariable, arg.Name) @@ -250,7 +297,7 @@ func (s *SCPDWithURN) WrapArgument(arg scpd.Argument) (*argumentWrapper, error) return nil, fmt.Errorf("unknown data type: %q, for state variable %q, for argument %q", relVar.DataType.Type, arg.RelatedStateVariable, arg.Name) } return &argumentWrapper{ - Argument: arg, + Argument: *arg, relVar: relVar, conv: cnv, }, nil @@ -266,6 +313,12 @@ func (arg *argumentWrapper) AsParameter() string { return fmt.Sprintf("%s %s", arg.Name, arg.conv.ExtType) } +func (arg *argumentWrapper) HasDoc() bool { + rng := arg.relVar.AllowedValueRange + return ((rng != nil && (rng.Minimum != "" || rng.Maximum != "" || rng.Step != "")) || + len(arg.relVar.AllowedValues) > 0) +} + func (arg *argumentWrapper) Document() string { relVar := arg.relVar if rng := relVar.AllowedValueRange; rng != nil { @@ -295,6 +348,17 @@ func (arg *argumentWrapper) Unmarshal(objVar string) string { return fmt.Sprintf("soap.Unmarshal%s(%s.%s)", arg.conv.FuncSuffix, objVar, arg.Name) } +type argumentWrapperList []*argumentWrapper + +func (args argumentWrapperList) HasDoc() bool { + for _, arg := range args { + if arg.HasDoc() { + return true + } + } + return false +} + type conv struct { FuncSuffix string ExtType string @@ -325,49 +389,10 @@ var typeConvs = map[string]conv{ "boolean": conv{"Boolean", "bool"}, "bin.base64": conv{"BinBase64", "[]byte"}, "bin.hex": conv{"BinHex", "[]byte"}, + "uri": conv{"URI", "*url.URL"}, } -type closeableZipReader struct { - io.Closer - *zip.Reader -} - -func openZipfile(filename string) (*closeableZipReader, error) { - file, err := os.Open(filename) - if err != nil { - return nil, err - } - fi, err := file.Stat() - if err != nil { - return nil, err - } - archive, err := zip.NewReader(file, fi.Size()) - if err != nil { - return nil, err - } - return &closeableZipReader{ - Closer: file, - Reader: archive, - }, nil -} - -// openChildZip opens a zip file within another zip file. -func openChildZip(file *zip.File) (*zip.Reader, error) { - zipFile, err := file.Open() - if err != nil { - return nil, err - } - defer zipFile.Close() - - zipBytes, err := ioutil.ReadAll(zipFile) - if err != nil { - return nil, err - } - - return zip.NewReader(bytes.NewReader(zipBytes), int64(len(zipBytes))) -} - -func globFiles(pattern string, archive *zip.Reader) []*zip.File { +func globFiles(pattern string, archive *zip.ReadCloser) []*zip.File { var files []*zip.File for _, f := range archive.File { if matched, err := path.Match(pattern, f.Name); err != nil { @@ -435,14 +460,14 @@ var packageTmpl = template.Must(template.New("package").Parse(`{{$name := .Metad // {{if .Metadata.DocURL}} // This DCP is documented in detail at: {{.Metadata.DocURL}}{{end}} // -// Typically, use one of the New* functions to discover services on the local -// network. +// Typically, use one of the New* functions to create clients for services. package {{$name}} // Generated file - do not edit by hand. See README.md import ( + "net/url" "time" "github.com/huin/goupnp" @@ -484,38 +509,77 @@ func New{{$srvIdent}}Clients() (clients []*{{$srvIdent}}, errors []error, err er if genericClients, errors, err = goupnp.NewServiceClients({{$srv.Const}}); err != nil { return } - clients = make([]*{{$srvIdent}}, len(genericClients)) + clients = new{{$srvIdent}}ClientsFromGenericClients(genericClients) + return +} + +// New{{$srvIdent}}ClientsByURL discovers instances of the service at the given +// URL, and returns clients to any that are found. An error is returned if +// there was an error probing the service. +// +// This is a typical entry calling point into this package when reusing an +// previously discovered service URL. +func New{{$srvIdent}}ClientsByURL(loc *url.URL) ([]*{{$srvIdent}}, error) { + genericClients, err := goupnp.NewServiceClientsByURL(loc, {{$srv.Const}}) + if err != nil { + return nil, err + } + return new{{$srvIdent}}ClientsFromGenericClients(genericClients), nil +} + +// New{{$srvIdent}}ClientsFromRootDevice discovers instances of the service in +// a given root device, and returns clients to any that are found. An error is +// returned if there was not at least one instance of the service within the +// device. The location parameter is simply assigned to the Location attribute +// of the wrapped ServiceClient(s). +// +// This is a typical entry calling point into this package when reusing an +// previously discovered root device. +func New{{$srvIdent}}ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*{{$srvIdent}}, error) { + genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, {{$srv.Const}}) + if err != nil { + return nil, err + } + return new{{$srvIdent}}ClientsFromGenericClients(genericClients), nil +} + +func new{{$srvIdent}}ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*{{$srvIdent}} { + clients := make([]*{{$srvIdent}}, len(genericClients)) for i := range genericClients { clients[i] = &{{$srvIdent}}{genericClients[i]} } - return + return clients } {{range .SCPD.Actions}}{{/* loops over *SCPDWithURN values */}} -{{$inargs := .InputArguments}}{{$outargs := .OutputArguments}} -// {{if $inargs}}Arguments:{{range $inargs}}{{$argWrap := $srv.WrapArgument .}} +{{$winargs := $srv.WrapArguments .InputArguments}} +{{$woutargs := $srv.WrapArguments .OutputArguments}} +{{if $winargs.HasDoc}} +// +// Arguments:{{range $winargs}}{{if .HasDoc}} // -// * {{.Name}}: {{$argWrap.Document}}{{end}}{{end}} +// * {{.Name}}: {{.Document}}{{end}}{{end}}{{end}} +{{if $woutargs.HasDoc}} // -// {{if $outargs}}Return values:{{range $outargs}}{{$argWrap := $srv.WrapArgument .}} +// Return values:{{range $woutargs}}{{if .HasDoc}} // -// * {{.Name}}: {{$argWrap.Document}}{{end}}{{end}} -func (client *{{$srvIdent}}) {{.Name}}({{range $inargs}}{{/* -*/}}{{$argWrap := $srv.WrapArgument .}}{{$argWrap.AsParameter}}, {{end}}{{/* -*/}}) ({{range $outargs}}{{/* -*/}}{{$argWrap := $srv.WrapArgument .}}{{$argWrap.AsParameter}}, {{end}} err error) { +// * {{.Name}}: {{.Document}}{{end}}{{end}}{{end}} +func (client *{{$srvIdent}}) {{.Name}}({{range $winargs}}{{/* +*/}}{{.AsParameter}}, {{end}}{{/* +*/}}) ({{range $woutargs}}{{/* +*/}}{{.AsParameter}}, {{end}} err error) { // Request structure. - request := {{if $inargs}}&{{template "argstruct" $inargs}}{{"{}"}}{{else}}{{"interface{}(nil)"}}{{end}} + request := {{if $winargs}}&{{template "argstruct" $winargs}}{{"{}"}}{{else}}{{"interface{}(nil)"}}{{end}} // BEGIN Marshal arguments into request. -{{range $inargs}}{{$argWrap := $srv.WrapArgument .}} - if request.{{.Name}}, err = {{$argWrap.Marshal}}; err != nil { +{{range $winargs}} + if request.{{.Name}}, err = {{.Marshal}}; err != nil { return }{{end}} // END Marshal arguments into request. // Response structure. - response := {{if $outargs}}&{{template "argstruct" $outargs}}{{"{}"}}{{else}}{{"interface{}(nil)"}}{{end}} + response := {{if $woutargs}}&{{template "argstruct" $woutargs}}{{"{}"}}{{else}}{{"interface{}(nil)"}}{{end}} // Perform the SOAP call. if err = client.SOAPClient.PerformAction({{$srv.URNParts.Const}}, "{{.Name}}", request, response); err != nil { @@ -523,8 +587,8 @@ func (client *{{$srvIdent}}) {{.Name}}({{range $inargs}}{{/* } // BEGIN Unmarshal arguments from response. -{{range $outargs}}{{$argWrap := $srv.WrapArgument .}} - if {{.Name}}, err = {{$argWrap.Unmarshal "response"}}; err != nil { +{{range $woutargs}} + if {{.Name}}, err = {{.Unmarshal "response"}}; err != nil { return }{{end}} // END Unmarshal arguments from response. diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/goupnp.go b/Godeps/_workspace/src/github.com/huin/goupnp/goupnp.go index 7799a32ce..fcb8dcd23 100644 --- a/Godeps/_workspace/src/github.com/huin/goupnp/goupnp.go +++ b/Godeps/_workspace/src/github.com/huin/goupnp/goupnp.go @@ -20,6 +20,7 @@ import ( "net/http" "net/url" "time" + "golang.org/x/net/html/charset" "github.com/huin/goupnp/httpu" @@ -38,8 +39,16 @@ func (err ContextError) Error() string { // MaybeRootDevice contains either a RootDevice or an error. type MaybeRootDevice struct { + // Set iff Err == nil. Root *RootDevice - Err error + + // The location the device was discovered at. This can be used with + // DeviceByURL, assuming the device is still present. A location represents + // the discovery of a device, regardless of if there was an error probing it. + Location *url.URL + + // Any error encountered probing a discovered device. + Err error } // DiscoverDevices attempts to find targets of the given type. This is @@ -67,30 +76,37 @@ func DiscoverDevices(searchTarget string) ([]MaybeRootDevice, error) { maybe.Err = ContextError{"unexpected bad location from search", err} continue } - locStr := loc.String() - root := new(RootDevice) - if err := requestXml(locStr, DeviceXMLNamespace, root); err != nil { - maybe.Err = ContextError{fmt.Sprintf("error requesting root device details from %q", locStr), err} - continue - } - var urlBaseStr string - if root.URLBaseStr != "" { - urlBaseStr = root.URLBaseStr + maybe.Location = loc + if root, err := DeviceByURL(loc); err != nil { + maybe.Err = err } else { - urlBaseStr = locStr - } - urlBase, err := url.Parse(urlBaseStr) - if err != nil { - maybe.Err = ContextError{fmt.Sprintf("error parsing location URL %q", locStr), err} - continue + maybe.Root = root } - root.SetURLBase(urlBase) - maybe.Root = root } return results, nil } +func DeviceByURL(loc *url.URL) (*RootDevice, error) { + locStr := loc.String() + root := new(RootDevice) + if err := requestXml(locStr, DeviceXMLNamespace, root); err != nil { + return nil, ContextError{fmt.Sprintf("error requesting root device details from %q", locStr), err} + } + var urlBaseStr string + if root.URLBaseStr != "" { + urlBaseStr = root.URLBaseStr + } else { + urlBaseStr = locStr + } + urlBase, err := url.Parse(urlBaseStr) + if err != nil { + return nil, ContextError{fmt.Sprintf("error parsing location URL %q", locStr), err} + } + root.SetURLBase(urlBase) + return root, nil +} + func requestXml(url string, defaultSpace string, doc interface{}) error { timeout := time.Duration(3 * time.Second) client := http.Client{ diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/service_client.go b/Godeps/_workspace/src/github.com/huin/goupnp/service_client.go index c0d16ce2a..9111c93cb 100644 --- a/Godeps/_workspace/src/github.com/huin/goupnp/service_client.go +++ b/Godeps/_workspace/src/github.com/huin/goupnp/service_client.go @@ -2,18 +2,26 @@ package goupnp import ( "fmt" + "net/url" + "github.com/huin/goupnp/soap" ) // ServiceClient is a SOAP client, root device and the service for the SOAP -// client rolled into one value. The root device and service are intended to be -// informational. +// client rolled into one value. The root device, location, and service are +// intended to be informational. Location can be used to later recreate a +// ServiceClient with NewServiceClientByURL if the service is still present; +// bypassing the discovery process. type ServiceClient struct { SOAPClient *soap.SOAPClient RootDevice *RootDevice + Location *url.URL Service *Service } +// NewServiceClients discovers services, and returns clients for them. err will +// report any error with the discovery process (blocking any device/service +// discovery), errors reports errors on a per-root-device basis. func NewServiceClients(searchTarget string) (clients []ServiceClient, errors []error, err error) { var maybeRootDevices []MaybeRootDevice if maybeRootDevices, err = DiscoverDevices(searchTarget); err != nil { @@ -28,26 +36,50 @@ func NewServiceClients(searchTarget string) (clients []ServiceClient, errors []e continue } - device := &maybeRootDevice.Root.Device - srvs := device.FindService(searchTarget) - if len(srvs) == 0 { - errors = append(errors, fmt.Errorf("goupnp: service %q not found within device %q (UDN=%q)", - searchTarget, device.FriendlyName, device.UDN)) + deviceClients, err := NewServiceClientsFromRootDevice(maybeRootDevice.Root, maybeRootDevice.Location, searchTarget) + if err != nil { + errors = append(errors, err) continue } - - for _, srv := range srvs { - clients = append(clients, ServiceClient{ - SOAPClient: srv.NewSOAPClient(), - RootDevice: maybeRootDevice.Root, - Service: srv, - }) - } + clients = append(clients, deviceClients...) } return } +// NewServiceClientsByURL creates client(s) for the given service URN, for a +// root device at the given URL. +func NewServiceClientsByURL(loc *url.URL, searchTarget string) ([]ServiceClient, error) { + rootDevice, err := DeviceByURL(loc) + if err != nil { + return nil, err + } + return NewServiceClientsFromRootDevice(rootDevice, loc, searchTarget) +} + +// NewServiceClientsFromDevice creates client(s) for the given service URN, in +// a given root device. The loc parameter is simply assigned to the +// Location attribute of the returned ServiceClient(s). +func NewServiceClientsFromRootDevice(rootDevice *RootDevice, loc *url.URL, searchTarget string) ([]ServiceClient, error) { + device := &rootDevice.Device + srvs := device.FindService(searchTarget) + if len(srvs) == 0 { + return nil, fmt.Errorf("goupnp: service %q not found within device %q (UDN=%q)", + searchTarget, device.FriendlyName, device.UDN) + } + + clients := make([]ServiceClient, 0, len(srvs)) + for _, srv := range srvs { + clients = append(clients, ServiceClient{ + SOAPClient: srv.NewSOAPClient(), + RootDevice: rootDevice, + Location: loc, + Service: srv, + }) + } + return clients, nil +} + // GetServiceClient returns the ServiceClient itself. This is provided so that the // service client attributes can be accessed via an interface method on a // wrapping type. diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/soap/soap_test.go b/Godeps/_workspace/src/github.com/huin/goupnp/soap/soap_test.go deleted file mode 100644 index 75dbbdbf1..000000000 --- a/Godeps/_workspace/src/github.com/huin/goupnp/soap/soap_test.go +++ /dev/null @@ -1,85 +0,0 @@ -package soap - -import ( - "bytes" - "io/ioutil" - "net/http" - "net/url" - "reflect" - "testing" -) - -type capturingRoundTripper struct { - err error - resp *http.Response - capturedReq *http.Request -} - -func (rt *capturingRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - rt.capturedReq = req - return rt.resp, rt.err -} - -func TestActionInputs(t *testing.T) { - url, err := url.Parse("http://example.com/soap") - if err != nil { - t.Fatal(err) - } - rt := &capturingRoundTripper{ - err: nil, - resp: &http.Response{ - StatusCode: 200, - Body: ioutil.NopCloser(bytes.NewBufferString(` - - - - valueA - valueB - - - - `)), - }, - } - client := SOAPClient{ - EndpointURL: *url, - HTTPClient: http.Client{ - Transport: rt, - }, - } - - type In struct { - Foo string - Bar string `soap:"bar"` - } - type Out struct { - A string - B string - } - in := In{"foo", "bar"} - gotOut := Out{} - err = client.PerformAction("mynamespace", "myaction", &in, &gotOut) - if err != nil { - t.Fatal(err) - } - - wantBody := (soapPrefix + - `` + - `foo` + - `bar` + - `` + - soapSuffix) - body, err := ioutil.ReadAll(rt.capturedReq.Body) - if err != nil { - t.Fatal(err) - } - gotBody := string(body) - if wantBody != gotBody { - t.Errorf("Bad request body\nwant: %q\n got: %q", wantBody, gotBody) - } - - wantOut := Out{"valueA", "valueB"} - if !reflect.DeepEqual(wantOut, gotOut) { - t.Errorf("Bad output\nwant: %+v\n got: %+v", wantOut, gotOut) - } -} diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/soap/types.go b/Godeps/_workspace/src/github.com/huin/goupnp/soap/types.go index cd16510e3..fdbeec8d4 100644 --- a/Godeps/_workspace/src/github.com/huin/goupnp/soap/types.go +++ b/Godeps/_workspace/src/github.com/huin/goupnp/soap/types.go @@ -5,6 +5,7 @@ import ( "encoding/hex" "errors" "fmt" + "net/url" "regexp" "strconv" "strings" @@ -506,3 +507,13 @@ func MarshalBinHex(v []byte) (string, error) { func UnmarshalBinHex(s string) ([]byte, error) { return hex.DecodeString(s) } + +// MarshalURI marshals *url.URL to SOAP "uri" type. +func MarshalURI(v *url.URL) (string, error) { + return v.String(), nil +} + +// UnmarshalURI unmarshals *url.URL from the SOAP "uri" type. +func UnmarshalURI(s string) (*url.URL, error) { + return url.Parse(s) +} diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/soap/types_test.go b/Godeps/_workspace/src/github.com/huin/goupnp/soap/types_test.go deleted file mode 100644 index da6816190..000000000 --- a/Godeps/_workspace/src/github.com/huin/goupnp/soap/types_test.go +++ /dev/null @@ -1,481 +0,0 @@ -package soap - -import ( - "bytes" - "math" - "testing" - "time" -) - -type convTest interface { - Marshal() (string, error) - Unmarshal(string) (interface{}, error) - Equal(result interface{}) bool -} - -// duper is an interface that convTest values may optionally also implement to -// generate another convTest for a value in an otherwise identical testCase. -type duper interface { - Dupe(tag string) []convTest -} - -type testCase struct { - value convTest - str string - wantMarshalErr bool - wantUnmarshalErr bool - noMarshal bool - noUnMarshal bool - tag string -} - -type Ui1Test uint8 - -func (v Ui1Test) Marshal() (string, error) { - return MarshalUi1(uint8(v)) -} -func (v Ui1Test) Unmarshal(s string) (interface{}, error) { - return UnmarshalUi1(s) -} -func (v Ui1Test) Equal(result interface{}) bool { - return uint8(v) == result.(uint8) -} -func (v Ui1Test) Dupe(tag string) []convTest { - if tag == "dupe" { - return []convTest{ - Ui2Test(v), - Ui4Test(v), - } - } - return nil -} - -type Ui2Test uint16 - -func (v Ui2Test) Marshal() (string, error) { - return MarshalUi2(uint16(v)) -} -func (v Ui2Test) Unmarshal(s string) (interface{}, error) { - return UnmarshalUi2(s) -} -func (v Ui2Test) Equal(result interface{}) bool { - return uint16(v) == result.(uint16) -} - -type Ui4Test uint32 - -func (v Ui4Test) Marshal() (string, error) { - return MarshalUi4(uint32(v)) -} -func (v Ui4Test) Unmarshal(s string) (interface{}, error) { - return UnmarshalUi4(s) -} -func (v Ui4Test) Equal(result interface{}) bool { - return uint32(v) == result.(uint32) -} - -type I1Test int8 - -func (v I1Test) Marshal() (string, error) { - return MarshalI1(int8(v)) -} -func (v I1Test) Unmarshal(s string) (interface{}, error) { - return UnmarshalI1(s) -} -func (v I1Test) Equal(result interface{}) bool { - return int8(v) == result.(int8) -} -func (v I1Test) Dupe(tag string) []convTest { - if tag == "dupe" { - return []convTest{ - I2Test(v), - I4Test(v), - } - } - return nil -} - -type I2Test int16 - -func (v I2Test) Marshal() (string, error) { - return MarshalI2(int16(v)) -} -func (v I2Test) Unmarshal(s string) (interface{}, error) { - return UnmarshalI2(s) -} -func (v I2Test) Equal(result interface{}) bool { - return int16(v) == result.(int16) -} - -type I4Test int32 - -func (v I4Test) Marshal() (string, error) { - return MarshalI4(int32(v)) -} -func (v I4Test) Unmarshal(s string) (interface{}, error) { - return UnmarshalI4(s) -} -func (v I4Test) Equal(result interface{}) bool { - return int32(v) == result.(int32) -} - -type IntTest int64 - -func (v IntTest) Marshal() (string, error) { - return MarshalInt(int64(v)) -} -func (v IntTest) Unmarshal(s string) (interface{}, error) { - return UnmarshalInt(s) -} -func (v IntTest) Equal(result interface{}) bool { - return int64(v) == result.(int64) -} - -type Fixed14_4Test float64 - -func (v Fixed14_4Test) Marshal() (string, error) { - return MarshalFixed14_4(float64(v)) -} -func (v Fixed14_4Test) Unmarshal(s string) (interface{}, error) { - return UnmarshalFixed14_4(s) -} -func (v Fixed14_4Test) Equal(result interface{}) bool { - return math.Abs(float64(v)-result.(float64)) < 0.001 -} - -type CharTest rune - -func (v CharTest) Marshal() (string, error) { - return MarshalChar(rune(v)) -} -func (v CharTest) Unmarshal(s string) (interface{}, error) { - return UnmarshalChar(s) -} -func (v CharTest) Equal(result interface{}) bool { - return rune(v) == result.(rune) -} - -type DateTest struct{ time.Time } - -func (v DateTest) Marshal() (string, error) { - return MarshalDate(time.Time(v.Time)) -} -func (v DateTest) Unmarshal(s string) (interface{}, error) { - return UnmarshalDate(s) -} -func (v DateTest) Equal(result interface{}) bool { - return v.Time.Equal(result.(time.Time)) -} -func (v DateTest) Dupe(tag string) []convTest { - if tag != "no:dateTime" { - return []convTest{DateTimeTest{v.Time}} - } - return nil -} - -type TimeOfDayTest struct { - TimeOfDay -} - -func (v TimeOfDayTest) Marshal() (string, error) { - return MarshalTimeOfDay(v.TimeOfDay) -} -func (v TimeOfDayTest) Unmarshal(s string) (interface{}, error) { - return UnmarshalTimeOfDay(s) -} -func (v TimeOfDayTest) Equal(result interface{}) bool { - return v.TimeOfDay == result.(TimeOfDay) -} -func (v TimeOfDayTest) Dupe(tag string) []convTest { - if tag != "no:time.tz" { - return []convTest{TimeOfDayTzTest{v.TimeOfDay}} - } - return nil -} - -type TimeOfDayTzTest struct { - TimeOfDay -} - -func (v TimeOfDayTzTest) Marshal() (string, error) { - return MarshalTimeOfDayTz(v.TimeOfDay) -} -func (v TimeOfDayTzTest) Unmarshal(s string) (interface{}, error) { - return UnmarshalTimeOfDayTz(s) -} -func (v TimeOfDayTzTest) Equal(result interface{}) bool { - return v.TimeOfDay == result.(TimeOfDay) -} - -type DateTimeTest struct{ time.Time } - -func (v DateTimeTest) Marshal() (string, error) { - return MarshalDateTime(time.Time(v.Time)) -} -func (v DateTimeTest) Unmarshal(s string) (interface{}, error) { - return UnmarshalDateTime(s) -} -func (v DateTimeTest) Equal(result interface{}) bool { - return v.Time.Equal(result.(time.Time)) -} -func (v DateTimeTest) Dupe(tag string) []convTest { - if tag != "no:dateTime.tz" { - return []convTest{DateTimeTzTest{v.Time}} - } - return nil -} - -type DateTimeTzTest struct{ time.Time } - -func (v DateTimeTzTest) Marshal() (string, error) { - return MarshalDateTimeTz(time.Time(v.Time)) -} -func (v DateTimeTzTest) Unmarshal(s string) (interface{}, error) { - return UnmarshalDateTimeTz(s) -} -func (v DateTimeTzTest) Equal(result interface{}) bool { - return v.Time.Equal(result.(time.Time)) -} - -type BooleanTest bool - -func (v BooleanTest) Marshal() (string, error) { - return MarshalBoolean(bool(v)) -} -func (v BooleanTest) Unmarshal(s string) (interface{}, error) { - return UnmarshalBoolean(s) -} -func (v BooleanTest) Equal(result interface{}) bool { - return bool(v) == result.(bool) -} - -type BinBase64Test []byte - -func (v BinBase64Test) Marshal() (string, error) { - return MarshalBinBase64([]byte(v)) -} -func (v BinBase64Test) Unmarshal(s string) (interface{}, error) { - return UnmarshalBinBase64(s) -} -func (v BinBase64Test) Equal(result interface{}) bool { - return bytes.Equal([]byte(v), result.([]byte)) -} - -type BinHexTest []byte - -func (v BinHexTest) Marshal() (string, error) { - return MarshalBinHex([]byte(v)) -} -func (v BinHexTest) Unmarshal(s string) (interface{}, error) { - return UnmarshalBinHex(s) -} -func (v BinHexTest) Equal(result interface{}) bool { - return bytes.Equal([]byte(v), result.([]byte)) -} - -func Test(t *testing.T) { - const time010203 time.Duration = (1*3600 + 2*60 + 3) * time.Second - const time0102 time.Duration = (1*3600 + 2*60) * time.Second - const time01 time.Duration = (1 * 3600) * time.Second - const time235959 time.Duration = (23*3600 + 59*60 + 59) * time.Second - - // Fake out the local time for the implementation. - localLoc = time.FixedZone("Fake/Local", 6*3600) - defer func() { - localLoc = time.Local - }() - - tests := []testCase{ - // ui1 - {str: "", value: Ui1Test(0), wantUnmarshalErr: true, noMarshal: true, tag: "dupe"}, - {str: " ", value: Ui1Test(0), wantUnmarshalErr: true, noMarshal: true, tag: "dupe"}, - {str: "abc", value: Ui1Test(0), wantUnmarshalErr: true, noMarshal: true, tag: "dupe"}, - {str: "-1", value: Ui1Test(0), wantUnmarshalErr: true, noMarshal: true, tag: "dupe"}, - {str: "0", value: Ui1Test(0), tag: "dupe"}, - {str: "1", value: Ui1Test(1), tag: "dupe"}, - {str: "255", value: Ui1Test(255), tag: "dupe"}, - {str: "256", value: Ui1Test(0), wantUnmarshalErr: true, noMarshal: true}, - - // ui2 - {str: "65535", value: Ui2Test(65535)}, - {str: "65536", value: Ui2Test(0), wantUnmarshalErr: true, noMarshal: true}, - - // ui4 - {str: "4294967295", value: Ui4Test(4294967295)}, - {str: "4294967296", value: Ui4Test(0), wantUnmarshalErr: true, noMarshal: true}, - - // i1 - {str: "", value: I1Test(0), wantUnmarshalErr: true, noMarshal: true, tag: "dupe"}, - {str: " ", value: I1Test(0), wantUnmarshalErr: true, noMarshal: true, tag: "dupe"}, - {str: "abc", value: I1Test(0), wantUnmarshalErr: true, noMarshal: true, tag: "dupe"}, - {str: "0", value: I1Test(0), tag: "dupe"}, - {str: "-1", value: I1Test(-1), tag: "dupe"}, - {str: "127", value: I1Test(127), tag: "dupe"}, - {str: "-128", value: I1Test(-128), tag: "dupe"}, - {str: "128", value: I1Test(0), wantUnmarshalErr: true, noMarshal: true}, - {str: "-129", value: I1Test(0), wantUnmarshalErr: true, noMarshal: true}, - - // i2 - {str: "32767", value: I2Test(32767)}, - {str: "-32768", value: I2Test(-32768)}, - {str: "32768", value: I2Test(0), wantUnmarshalErr: true, noMarshal: true}, - {str: "-32769", value: I2Test(0), wantUnmarshalErr: true, noMarshal: true}, - - // i4 - {str: "2147483647", value: I4Test(2147483647)}, - {str: "-2147483648", value: I4Test(-2147483648)}, - {str: "2147483648", value: I4Test(0), wantUnmarshalErr: true, noMarshal: true}, - {str: "-2147483649", value: I4Test(0), wantUnmarshalErr: true, noMarshal: true}, - - // int - {str: "9223372036854775807", value: IntTest(9223372036854775807)}, - {str: "-9223372036854775808", value: IntTest(-9223372036854775808)}, - {str: "9223372036854775808", value: IntTest(0), wantUnmarshalErr: true, noMarshal: true}, - {str: "-9223372036854775809", value: IntTest(0), wantUnmarshalErr: true, noMarshal: true}, - - // fixed.14.4 - {str: "0.0000", value: Fixed14_4Test(0)}, - {str: "1.0000", value: Fixed14_4Test(1)}, - {str: "1.2346", value: Fixed14_4Test(1.23456)}, - {str: "-1.0000", value: Fixed14_4Test(-1)}, - {str: "-1.2346", value: Fixed14_4Test(-1.23456)}, - {str: "10000000000000.0000", value: Fixed14_4Test(1e13)}, - {str: "100000000000000.0000", value: Fixed14_4Test(1e14), wantMarshalErr: true, wantUnmarshalErr: true}, - {str: "-10000000000000.0000", value: Fixed14_4Test(-1e13)}, - {str: "-100000000000000.0000", value: Fixed14_4Test(-1e14), wantMarshalErr: true, wantUnmarshalErr: true}, - - // char - {str: "a", value: CharTest('a')}, - {str: "z", value: CharTest('z')}, - {str: "\u1234", value: CharTest(0x1234)}, - {str: "aa", value: CharTest(0), wantMarshalErr: true, wantUnmarshalErr: true}, - {str: "", value: CharTest(0), wantMarshalErr: true, wantUnmarshalErr: true}, - - // date - {str: "2013-10-08", value: DateTest{time.Date(2013, 10, 8, 0, 0, 0, 0, localLoc)}, tag: "no:dateTime"}, - {str: "20131008", value: DateTest{time.Date(2013, 10, 8, 0, 0, 0, 0, localLoc)}, noMarshal: true, tag: "no:dateTime"}, - {str: "2013-10-08T10:30:50", value: DateTest{}, wantUnmarshalErr: true, noMarshal: true, tag: "no:dateTime"}, - {str: "2013-10-08T10:30:50Z", value: DateTest{}, wantUnmarshalErr: true, noMarshal: true, tag: "no:dateTime"}, - {str: "", value: DateTest{}, wantMarshalErr: true, wantUnmarshalErr: true, noMarshal: true}, - {str: "-1", value: DateTest{}, wantUnmarshalErr: true, noMarshal: true}, - - // time - {str: "00:00:00", value: TimeOfDayTest{TimeOfDay{FromMidnight: 0}}}, - {str: "000000", value: TimeOfDayTest{TimeOfDay{FromMidnight: 0}}, noMarshal: true}, - {str: "24:00:00", value: TimeOfDayTest{TimeOfDay{FromMidnight: 24 * time.Hour}}, noMarshal: true}, // ISO8601 special case - {str: "24:01:00", value: TimeOfDayTest{}, wantUnmarshalErr: true, noMarshal: true}, - {str: "24:00:01", value: TimeOfDayTest{}, wantUnmarshalErr: true, noMarshal: true}, - {str: "25:00:00", value: TimeOfDayTest{}, wantUnmarshalErr: true, noMarshal: true}, - {str: "00:60:00", value: TimeOfDayTest{}, wantUnmarshalErr: true, noMarshal: true}, - {str: "00:00:60", value: TimeOfDayTest{}, wantUnmarshalErr: true, noMarshal: true}, - {str: "01:02:03", value: TimeOfDayTest{TimeOfDay{FromMidnight: time010203}}}, - {str: "010203", value: TimeOfDayTest{TimeOfDay{FromMidnight: time010203}}, noMarshal: true}, - {str: "23:59:59", value: TimeOfDayTest{TimeOfDay{FromMidnight: time235959}}}, - {str: "235959", value: TimeOfDayTest{TimeOfDay{FromMidnight: time235959}}, noMarshal: true}, - {str: "01:02", value: TimeOfDayTest{TimeOfDay{FromMidnight: time0102}}, noMarshal: true}, - {str: "0102", value: TimeOfDayTest{TimeOfDay{FromMidnight: time0102}}, noMarshal: true}, - {str: "01", value: TimeOfDayTest{TimeOfDay{FromMidnight: time01}}, noMarshal: true}, - {str: "foo 01:02:03", value: TimeOfDayTest{}, wantUnmarshalErr: true, noMarshal: true, tag: "no:time.tz"}, - {str: "foo\n01:02:03", value: TimeOfDayTest{}, wantUnmarshalErr: true, noMarshal: true, tag: "no:time.tz"}, - {str: "01:02:03 foo", value: TimeOfDayTest{}, wantUnmarshalErr: true, noMarshal: true, tag: "no:time.tz"}, - {str: "01:02:03\nfoo", value: TimeOfDayTest{}, wantUnmarshalErr: true, noMarshal: true, tag: "no:time.tz"}, - {str: "01:02:03Z", value: TimeOfDayTest{}, wantUnmarshalErr: true, noMarshal: true, tag: "no:time.tz"}, - {str: "01:02:03+01", value: TimeOfDayTest{}, wantUnmarshalErr: true, noMarshal: true, tag: "no:time.tz"}, - {str: "01:02:03+01:23", value: TimeOfDayTest{}, wantUnmarshalErr: true, noMarshal: true, tag: "no:time.tz"}, - {str: "01:02:03+0123", value: TimeOfDayTest{}, wantUnmarshalErr: true, noMarshal: true, tag: "no:time.tz"}, - {str: "01:02:03-01", value: TimeOfDayTest{}, wantUnmarshalErr: true, noMarshal: true, tag: "no:time.tz"}, - {str: "01:02:03-01:23", value: TimeOfDayTest{}, wantUnmarshalErr: true, noMarshal: true, tag: "no:time.tz"}, - {str: "01:02:03-0123", value: TimeOfDayTest{}, wantUnmarshalErr: true, noMarshal: true, tag: "no:time.tz"}, - - // time.tz - {str: "24:00:01", value: TimeOfDayTzTest{}, wantUnmarshalErr: true, noMarshal: true}, - {str: "01Z", value: TimeOfDayTzTest{TimeOfDay{time01, true, 0}}, noMarshal: true}, - {str: "01:02:03Z", value: TimeOfDayTzTest{TimeOfDay{time010203, true, 0}}}, - {str: "01+01", value: TimeOfDayTzTest{TimeOfDay{time01, true, 3600}}, noMarshal: true}, - {str: "01:02:03+01", value: TimeOfDayTzTest{TimeOfDay{time010203, true, 3600}}, noMarshal: true}, - {str: "01:02:03+01:23", value: TimeOfDayTzTest{TimeOfDay{time010203, true, 3600 + 23*60}}}, - {str: "01:02:03+0123", value: TimeOfDayTzTest{TimeOfDay{time010203, true, 3600 + 23*60}}, noMarshal: true}, - {str: "01:02:03-01", value: TimeOfDayTzTest{TimeOfDay{time010203, true, -3600}}, noMarshal: true}, - {str: "01:02:03-01:23", value: TimeOfDayTzTest{TimeOfDay{time010203, true, -(3600 + 23*60)}}}, - {str: "01:02:03-0123", value: TimeOfDayTzTest{TimeOfDay{time010203, true, -(3600 + 23*60)}}, noMarshal: true}, - - // dateTime - {str: "2013-10-08T00:00:00", value: DateTimeTest{time.Date(2013, 10, 8, 0, 0, 0, 0, localLoc)}, tag: "no:dateTime.tz"}, - {str: "20131008", value: DateTimeTest{time.Date(2013, 10, 8, 0, 0, 0, 0, localLoc)}, noMarshal: true}, - {str: "2013-10-08T10:30:50", value: DateTimeTest{time.Date(2013, 10, 8, 10, 30, 50, 0, localLoc)}, tag: "no:dateTime.tz"}, - {str: "2013-10-08T10:30:50T", value: DateTimeTest{}, wantUnmarshalErr: true, noMarshal: true}, - {str: "2013-10-08T10:30:50+01", value: DateTimeTest{}, wantUnmarshalErr: true, noMarshal: true, tag: "no:dateTime.tz"}, - {str: "2013-10-08T10:30:50+01:23", value: DateTimeTest{}, wantUnmarshalErr: true, noMarshal: true, tag: "no:dateTime.tz"}, - {str: "2013-10-08T10:30:50+0123", value: DateTimeTest{}, wantUnmarshalErr: true, noMarshal: true, tag: "no:dateTime.tz"}, - {str: "2013-10-08T10:30:50-01", value: DateTimeTest{}, wantUnmarshalErr: true, noMarshal: true, tag: "no:dateTime.tz"}, - {str: "2013-10-08T10:30:50-01:23", value: DateTimeTest{}, wantUnmarshalErr: true, noMarshal: true, tag: "no:dateTime.tz"}, - {str: "2013-10-08T10:30:50-0123", value: DateTimeTest{}, wantUnmarshalErr: true, noMarshal: true, tag: "no:dateTime.tz"}, - - // dateTime.tz - {str: "2013-10-08T10:30:50", value: DateTimeTzTest{time.Date(2013, 10, 8, 10, 30, 50, 0, localLoc)}, noMarshal: true}, - {str: "2013-10-08T10:30:50+01", value: DateTimeTzTest{time.Date(2013, 10, 8, 10, 30, 50, 0, time.FixedZone("+01:00", 3600))}, noMarshal: true}, - {str: "2013-10-08T10:30:50+01:23", value: DateTimeTzTest{time.Date(2013, 10, 8, 10, 30, 50, 0, time.FixedZone("+01:23", 3600+23*60))}}, - {str: "2013-10-08T10:30:50+0123", value: DateTimeTzTest{time.Date(2013, 10, 8, 10, 30, 50, 0, time.FixedZone("+01:23", 3600+23*60))}, noMarshal: true}, - {str: "2013-10-08T10:30:50-01", value: DateTimeTzTest{time.Date(2013, 10, 8, 10, 30, 50, 0, time.FixedZone("-01:00", -3600))}, noMarshal: true}, - {str: "2013-10-08T10:30:50-01:23", value: DateTimeTzTest{time.Date(2013, 10, 8, 10, 30, 50, 0, time.FixedZone("-01:23", -(3600+23*60)))}}, - {str: "2013-10-08T10:30:50-0123", value: DateTimeTzTest{time.Date(2013, 10, 8, 10, 30, 50, 0, time.FixedZone("-01:23", -(3600+23*60)))}, noMarshal: true}, - - // boolean - {str: "0", value: BooleanTest(false)}, - {str: "1", value: BooleanTest(true)}, - {str: "false", value: BooleanTest(false), noMarshal: true}, - {str: "true", value: BooleanTest(true), noMarshal: true}, - {str: "no", value: BooleanTest(false), noMarshal: true}, - {str: "yes", value: BooleanTest(true), noMarshal: true}, - {str: "", value: BooleanTest(false), noMarshal: true, wantUnmarshalErr: true}, - {str: "other", value: BooleanTest(false), noMarshal: true, wantUnmarshalErr: true}, - {str: "2", value: BooleanTest(false), noMarshal: true, wantUnmarshalErr: true}, - {str: "-1", value: BooleanTest(false), noMarshal: true, wantUnmarshalErr: true}, - - // bin.base64 - {str: "", value: BinBase64Test{}}, - {str: "YQ==", value: BinBase64Test("a")}, - {str: "TG9uZ2VyIFN0cmluZy4=", value: BinBase64Test("Longer String.")}, - {str: "TG9uZ2VyIEFsaWduZWQu", value: BinBase64Test("Longer Aligned.")}, - - // bin.hex - {str: "", value: BinHexTest{}}, - {str: "61", value: BinHexTest("a")}, - {str: "4c6f6e67657220537472696e672e", value: BinHexTest("Longer String.")}, - {str: "4C6F6E67657220537472696E672E", value: BinHexTest("Longer String."), noMarshal: true}, - } - - // Generate extra test cases from convTests that implement duper. - var extras []testCase - for i := range tests { - if duper, ok := tests[i].value.(duper); ok { - dupes := duper.Dupe(tests[i].tag) - for _, duped := range dupes { - dupedCase := testCase(tests[i]) - dupedCase.value = duped - extras = append(extras, dupedCase) - } - } - } - tests = append(tests, extras...) - - for _, test := range tests { - if test.noMarshal { - } else if resultStr, err := test.value.Marshal(); err != nil && !test.wantMarshalErr { - t.Errorf("For %T marshal %v, want %q, got error: %v", test.value, test.value, test.str, err) - } else if err == nil && test.wantMarshalErr { - t.Errorf("For %T marshal %v, want error, got %q", test.value, test.value, resultStr) - } else if err == nil && resultStr != test.str { - t.Errorf("For %T marshal %v, want %q, got %q", test.value, test.value, test.str, resultStr) - } - - if test.noUnMarshal { - } else if resultValue, err := test.value.Unmarshal(test.str); err != nil && !test.wantUnmarshalErr { - t.Errorf("For %T unmarshal %q, want %v, got error: %v", test.value, test.str, test.value, err) - } else if err == nil && test.wantUnmarshalErr { - t.Errorf("For %T unmarshal %q, want error, got %v", test.value, test.str, resultValue) - } else if err == nil && !test.value.Equal(resultValue) { - t.Errorf("For %T unmarshal %q, want %v, got %v", test.value, test.str, test.value, resultValue) - } - } -} diff --git a/Godeps/_workspace/src/github.com/huin/goupnp/ssdp/registry.go b/Godeps/_workspace/src/github.com/huin/goupnp/ssdp/registry.go index 38d10203f..2f84beaae 100644 --- a/Godeps/_workspace/src/github.com/huin/goupnp/ssdp/registry.go +++ b/Godeps/_workspace/src/github.com/huin/goupnp/ssdp/registry.go @@ -21,6 +21,40 @@ var ( maxAgeRx = regexp.MustCompile("max-age=([0-9]+)") ) +const ( + EventAlive = EventType(iota) + EventUpdate + EventByeBye +) + +type EventType int8 + +func (et EventType) String() string { + switch et { + case EventAlive: + return "EventAlive" + case EventUpdate: + return "EventUpdate" + case EventByeBye: + return "EventByeBye" + default: + return fmt.Sprintf("EventUnknown(%d)", int8(et)) + } +} + +type Update struct { + // The USN of the service. + USN string + // What happened. + EventType EventType + // The entry, which is nil if the service was not known and + // EventType==EventByeBye. The contents of this must not be modified as it is + // shared with the registry and other listeners. Once created, the Registry + // does not modify the Entry value - any updates are replaced with a new + // Entry value. + Entry *Entry +} + type Entry struct { // The address that the entry data was actually received from. RemoteAddr string @@ -32,7 +66,7 @@ type Entry struct { Server string Host string // Location of the UPnP root device description. - Location *url.URL + Location url.URL // Despite BOOTID,CONFIGID being required fields, apparently they are not // always set by devices. Set to -1 if not present. @@ -83,7 +117,7 @@ func newEntryFromRequest(r *http.Request) (*Entry, error) { NT: r.Header.Get("NT"), Server: r.Header.Get("SERVER"), Host: r.Header.Get("HOST"), - Location: loc, + Location: *loc, BootID: bootID, ConfigID: configID, SearchPort: uint16(searchPort), @@ -125,15 +159,71 @@ func parseUpnpIntHeader(headers http.Header, headerName string, def int32) (int3 var _ httpu.Handler = new(Registry) // Registry maintains knowledge of discovered devices and services. +// +// NOTE: the interface for this is experimental and may change, or go away +// entirely. type Registry struct { lock sync.Mutex byUSN map[string]*Entry + + listenersLock sync.RWMutex + listeners map[chan<- Update]struct{} } func NewRegistry() *Registry { return &Registry{ - byUSN: make(map[string]*Entry), + byUSN: make(map[string]*Entry), + listeners: make(map[chan<- Update]struct{}), + } +} + +// NewServerAndRegistry is a convenience function to create a registry, and an +// httpu server to pass it messages. Call ListenAndServe on the server for +// messages to be processed. +func NewServerAndRegistry() (*httpu.Server, *Registry) { + reg := NewRegistry() + srv := &httpu.Server{ + Addr: ssdpUDP4Addr, + Multicast: true, + Handler: reg, + } + return srv, reg +} + +func (reg *Registry) AddListener(c chan<- Update) { + reg.listenersLock.Lock() + defer reg.listenersLock.Unlock() + reg.listeners[c] = struct{}{} +} + +func (reg *Registry) RemoveListener(c chan<- Update) { + reg.listenersLock.Lock() + defer reg.listenersLock.Unlock() + delete(reg.listeners, c) +} + +func (reg *Registry) sendUpdate(u Update) { + reg.listenersLock.RLock() + defer reg.listenersLock.RUnlock() + for c := range reg.listeners { + c <- u + } +} + +// GetService returns known service (or device) entries for the given service +// URN. +func (reg *Registry) GetService(serviceURN string) []*Entry { + // Currently assumes that the map is small, so we do a linear search rather + // than indexed to avoid maintaining two maps. + var results []*Entry + reg.lock.Lock() + defer reg.lock.Unlock() + for _, entry := range reg.byUSN { + if entry.NT == serviceURN { + results = append(results, entry) + } } + return results } // ServeMessage implements httpu.Handler, and uses SSDP NOTIFY requests to @@ -156,7 +246,9 @@ func (reg *Registry) ServeMessage(r *http.Request) { default: err = fmt.Errorf("unknown NTS value: %q", nts) } - log.Printf("In %s request from %s: %v", nts, r.RemoteAddr, err) + if err != nil { + log.Printf("goupnp/ssdp: failed to handle %s message from %s: %v", nts, r.RemoteAddr, err) + } } func (reg *Registry) handleNTSAlive(r *http.Request) error { @@ -166,9 +258,14 @@ func (reg *Registry) handleNTSAlive(r *http.Request) error { } reg.lock.Lock() - defer reg.lock.Unlock() - reg.byUSN[entry.USN] = entry + reg.lock.Unlock() + + reg.sendUpdate(Update{ + USN: entry.USN, + EventType: EventAlive, + Entry: entry, + }) return nil } @@ -185,18 +282,31 @@ func (reg *Registry) handleNTSUpdate(r *http.Request) error { entry.BootID = nextBootID reg.lock.Lock() - defer reg.lock.Unlock() - reg.byUSN[entry.USN] = entry + reg.lock.Unlock() + + reg.sendUpdate(Update{ + USN: entry.USN, + EventType: EventUpdate, + Entry: entry, + }) return nil } func (reg *Registry) handleNTSByebye(r *http.Request) error { - reg.lock.Lock() - defer reg.lock.Unlock() + usn := r.Header.Get("USN") - delete(reg.byUSN, r.Header.Get("USN")) + reg.lock.Lock() + entry := reg.byUSN[usn] + delete(reg.byUSN, usn) + reg.lock.Unlock() + + reg.sendUpdate(Update{ + USN: usn, + EventType: EventByeBye, + Entry: entry, + }) return nil } diff --git a/p2p/nat/natupnp.go b/p2p/nat/natupnp.go index 0bcb262bf..c544fbcb6 100644 --- a/p2p/nat/natupnp.go +++ b/p2p/nat/natupnp.go @@ -148,7 +148,12 @@ func discover(out chan<- *upnp, target string, matcher func(*goupnp.RootDevice, return } // check for a matching IGD service - sc := goupnp.ServiceClient{service.NewSOAPClient(), devs[i].Root, service} + sc := goupnp.ServiceClient{ + SOAPClient: service.NewSOAPClient(), + RootDevice: devs[i].Root, + Location: devs[i].Location, + Service: service, + } sc.SOAPClient.HTTPClient.Timeout = soapRequestTimeout upnp := matcher(devs[i].Root, sc) if upnp == nil { -- cgit v1.2.3 From f570b68ed107d5e835a71cf1194e2b82c496a387 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 29 Oct 2015 22:54:44 +0100 Subject: p2p/nat: add docs for discover --- p2p/nat/natupnp.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/p2p/nat/natupnp.go b/p2p/nat/natupnp.go index c544fbcb6..890a35043 100644 --- a/p2p/nat/natupnp.go +++ b/p2p/nat/natupnp.go @@ -133,6 +133,9 @@ func discoverUPnP() Interface { return nil } +// finds devices matching the given target and calls matcher for all +// advertised services of each device. The first non-nil service found +// is sent into out. If no service matched, nil is sent. func discover(out chan<- *upnp, target string, matcher func(*goupnp.RootDevice, goupnp.ServiceClient) *upnp) { devs, err := goupnp.DiscoverDevices(target) if err != nil { -- cgit v1.2.3 From 1bc789553aae0b269c5be38df83950fada53237b Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Fri, 30 Oct 2015 10:01:19 +0100 Subject: eth: added new testnet peers --- eth/backend.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eth/backend.go b/eth/backend.go index ee857e146..4bd0eb371 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -78,7 +78,8 @@ var ( } defaultTestNetBootNodes = []*discover.Node{ - discover.MustParseNode("enode://5374c1bff8df923d3706357eeb4983cd29a63be40a269aaa2296ee5f3b2119a8978c0ed68b8f6fc84aad0df18790417daadf91a4bfbb786a16c9b0a199fa254a@92.51.165.126:30303"), + discover.MustParseNode("enode://e4533109cc9bd7604e4ff6c095f7a1d807e15b38e9bfeb05d3b7c423ba86af0a9e89abbf40bd9dde4250fef114cd09270fa4e224cbeef8b7bf05a51e8260d6b8@94.242.229.4:40404"), + discover.MustParseNode("enode://8c336ee6f03e99613ad21274f269479bf4413fb294d697ef15ab897598afb931f56beb8e97af530aee20ce2bcba5776f4a312bc168545de4d43736992c814592@94.242.229.203:30303"), } staticNodes = "static-nodes.json" // Path within to search for the static node list -- cgit v1.2.3 From 3c6e285d3bfa03935f4f346a2cb32236143e2fca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 29 Oct 2015 19:53:24 +0200 Subject: cmd/geth, cmd/utils, eth: group CLI flags by purpose --- Godeps/Godeps.json | 4 +- .../src/github.com/codegangsta/cli/.travis.yml | 9 +- .../src/github.com/codegangsta/cli/README.md | 33 +- .../src/github.com/codegangsta/cli/app.go | 90 +-- .../src/github.com/codegangsta/cli/app_test.go | 622 ----------------- .../codegangsta/cli/autocomplete/bash_autocomplete | 2 + .../src/github.com/codegangsta/cli/cli.go | 21 + .../src/github.com/codegangsta/cli/cli_test.go | 100 --- .../src/github.com/codegangsta/cli/command.go | 43 +- .../src/github.com/codegangsta/cli/command_test.go | 49 -- .../src/github.com/codegangsta/cli/context.go | 72 +- .../src/github.com/codegangsta/cli/context_test.go | 111 --- .../src/github.com/codegangsta/cli/flag.go | 45 +- .../src/github.com/codegangsta/cli/flag_test.go | 742 --------------------- .../src/github.com/codegangsta/cli/help.go | 111 +-- .../src/github.com/codegangsta/cli/helpers_test.go | 19 - cmd/geth/main.go | 5 +- cmd/geth/usage.go | 212 ++++++ cmd/utils/flags.go | 119 ++-- eth/backend.go | 6 - 20 files changed, 585 insertions(+), 1830 deletions(-) delete mode 100644 Godeps/_workspace/src/github.com/codegangsta/cli/app_test.go delete mode 100644 Godeps/_workspace/src/github.com/codegangsta/cli/cli_test.go delete mode 100644 Godeps/_workspace/src/github.com/codegangsta/cli/command_test.go delete mode 100644 Godeps/_workspace/src/github.com/codegangsta/cli/context_test.go delete mode 100644 Godeps/_workspace/src/github.com/codegangsta/cli/flag_test.go delete mode 100644 Godeps/_workspace/src/github.com/codegangsta/cli/helpers_test.go create mode 100644 cmd/geth/usage.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index ee77a1c76..d2641dc19 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -7,8 +7,8 @@ "Deps": [ { "ImportPath": "github.com/codegangsta/cli", - "Comment": "1.2.0-95-g9b2bd2b", - "Rev": "9b2bd2b3489748d4d0a204fa4eb2ee9e89e0ebc6" + "Comment": "1.2.0-161-gf445c89", + "Rev": "f445c894402839580d30de47551cedc152dad814" }, { "ImportPath": "github.com/davecgh/go-spew/spew", diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/.travis.yml b/Godeps/_workspace/src/github.com/codegangsta/cli/.travis.yml index baf46abc6..34d39c871 100644 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/.travis.yml +++ b/Godeps/_workspace/src/github.com/codegangsta/cli/.travis.yml @@ -1,5 +1,12 @@ language: go -go: 1.1 +sudo: false + +go: +- 1.0.3 +- 1.1.2 +- 1.2.2 +- 1.3.3 +- 1.4.2 script: - go vet ./... diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/README.md b/Godeps/_workspace/src/github.com/codegangsta/cli/README.md index 4b3ddb0a3..234655710 100644 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/README.md +++ b/Godeps/_workspace/src/github.com/codegangsta/cli/README.md @@ -1,18 +1,17 @@ +[![Coverage](http://gocover.io/_badge/github.com/codegangsta/cli?0)](http://gocover.io/github.com/codegangsta/cli) [![Build Status](https://travis-ci.org/codegangsta/cli.png?branch=master)](https://travis-ci.org/codegangsta/cli) +[![GoDoc](https://godoc.org/github.com/codegangsta/cli?status.svg)](https://godoc.org/github.com/codegangsta/cli) # cli.go -cli.go is simple, fast, and fun package for building command line apps in Go. The goal is to enable developers to write fast and distributable command line applications in an expressive way. - -You can view the API docs here: -http://godoc.org/github.com/codegangsta/cli +`cli.go` is simple, fast, and fun package for building command line apps in Go. The goal is to enable developers to write fast and distributable command line applications in an expressive way. ## Overview Command line apps are usually so tiny that there is absolutely no reason why your code should *not* be self-documenting. Things like generating help text and parsing command flags/options should not hinder productivity when writing a command line app. -**This is where cli.go comes into play.** cli.go makes command line programming fun, organized, and expressive! +**This is where `cli.go` comes into play.** `cli.go` makes command line programming fun, organized, and expressive! ## Installation -Make sure you have a working Go environment (go 1.1 is *required*). [See the install instructions](http://golang.org/doc/install.html). +Make sure you have a working Go environment (go 1.1+ is *required*). [See the install instructions](http://golang.org/doc/install.html). To install `cli.go`, simply run: ``` @@ -25,7 +24,7 @@ export PATH=$PATH:$GOPATH/bin ``` ## Getting Started -One of the philosophies behind cli.go is that an API should be playful and full of discovery. So a cli.go app can be as little as one line of code in `main()`. +One of the philosophies behind `cli.go` is that an API should be playful and full of discovery. So a `cli.go` app can be as little as one line of code in `main()`. ``` go package main @@ -103,7 +102,8 @@ $ greet Hello friend! ``` -cli.go also generates some bitchass help text: +`cli.go` also generates neat help text: + ``` $ greet help NAME: @@ -158,6 +158,8 @@ app.Action = func(c *cli.Context) { ... ``` +See full list of flags at http://godoc.org/github.com/codegangsta/cli + #### Alternate Names You can set alternate (or short) names for flags by providing a comma-delimited list for the `Name`. e.g. @@ -289,6 +291,21 @@ setting the `PROG` variable to the name of your program: `PROG=myprogram source /.../cli/autocomplete/bash_autocomplete` +#### To Distribute + +Copy `autocomplete/bash_autocomplete` into `/etc/bash_completion.d/` and rename +it to the name of the program you wish to add autocomplete support for (or +automatically install it there if you are distributing a package). Don't forget +to source the file to make it active in the current shell. + +``` + sudo cp src/bash_autocomplete /etc/bash_completion.d/ + source /etc/bash_completion.d/ +``` + +Alternatively, you can just document that users should source the generic +`autocomplete/bash_autocomplete` in their bash configuration with `$PROG` set +to the name of their program (as above). ## Contribution Guidelines Feel free to put up a pull request to fix a bug or maybe add a feature. I will give it a code review and make sure that it does not break backwards compatibility. If I or any other collaborators agree that it is in line with the vision of the project, we will work with you to get the code into a mergeable state and merge it into the master branch. diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/app.go b/Godeps/_workspace/src/github.com/codegangsta/cli/app.go index cd2900519..9a15c0c03 100644 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/app.go +++ b/Godeps/_workspace/src/github.com/codegangsta/cli/app.go @@ -5,19 +5,20 @@ import ( "io" "io/ioutil" "os" - "strings" - "text/tabwriter" - "text/template" "time" ) // App is the main structure of a cli application. It is recomended that -// and app be created with the cli.NewApp() function +// an app be created with the cli.NewApp() function type App struct { // The name of the program. Defaults to os.Args[0] Name string + // Full name of command for help, defaults to Name + HelpName string // Description of the program. Usage string + // Description of the program argument format. + ArgsUsage string // Version of the program Version string // List of commands to execute @@ -46,6 +47,8 @@ type App struct { Compiled time.Time // List of all authors who contributed Authors []Author + // Copyright of the binary if any + Copyright string // Name of Author (Note: Use App.Authors, this is deprecated) Author string // Email of Author (Note: Use App.Authors, this is deprecated) @@ -68,6 +71,7 @@ func compileTime() time.Time { func NewApp() *App { return &App{ Name: os.Args[0], + HelpName: os.Args[0], Usage: "A new cli application", Version: "0.0.0", BashComplete: DefaultAppComplete, @@ -83,25 +87,14 @@ func (a *App) Run(arguments []string) (err error) { a.Authors = append(a.Authors, Author{Name: a.Author, Email: a.Email}) } - if HelpPrinter == nil { - defer func() { - HelpPrinter = nil - }() - - HelpPrinter = func(templ string, data interface{}) { - funcMap := template.FuncMap{ - "join": strings.Join, - } - - w := tabwriter.NewWriter(a.Writer, 0, 8, 1, '\t', 0) - t := template.Must(template.New("help").Funcs(funcMap).Parse(templ)) - err := t.Execute(w, data) - if err != nil { - panic(err) - } - w.Flush() + newCmds := []Command{} + for _, c := range a.Commands { + if c.HelpName == "" { + c.HelpName = fmt.Sprintf("%s %s", a.HelpName, c.Name) } + newCmds = append(newCmds, c) } + a.Commands = newCmds // append help to commands if a.Command(helpCommand.Name) == nil && !a.HideHelp { @@ -127,17 +120,16 @@ func (a *App) Run(arguments []string) (err error) { nerr := normalizeFlags(a.Flags, set) if nerr != nil { fmt.Fprintln(a.Writer, nerr) - context := NewContext(a, set, set) + context := NewContext(a, set, nil) ShowAppHelp(context) - fmt.Fprintln(a.Writer) return nerr } - context := NewContext(a, set, set) + context := NewContext(a, set, nil) if err != nil { - fmt.Fprintf(a.Writer, "Incorrect Usage.\n\n") - ShowAppHelp(context) + fmt.Fprintln(a.Writer, "Incorrect Usage.") fmt.Fprintln(a.Writer) + ShowAppHelp(context) return err } @@ -145,20 +137,26 @@ func (a *App) Run(arguments []string) (err error) { return nil } - if checkHelp(context) { + if !a.HideHelp && checkHelp(context) { + ShowAppHelp(context) return nil } - if checkVersion(context) { + if !a.HideVersion && checkVersion(context) { + ShowVersion(context) return nil } if a.After != nil { defer func() { - // err is always nil here. - // There is a check to see if it is non-nil - // just few lines before. - err = a.After(context) + afterErr := a.After(context) + if afterErr != nil { + if err != nil { + err = NewMultiError(err, afterErr) + } else { + err = afterErr + } + } }() } @@ -203,6 +201,15 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) { } } + newCmds := []Command{} + for _, c := range a.Commands { + if c.HelpName == "" { + c.HelpName = fmt.Sprintf("%s %s", a.HelpName, c.Name) + } + newCmds = append(newCmds, c) + } + a.Commands = newCmds + // append flags if a.EnableBashCompletion { a.appendFlag(BashCompletionFlag) @@ -213,21 +220,22 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) { set.SetOutput(ioutil.Discard) err = set.Parse(ctx.Args().Tail()) nerr := normalizeFlags(a.Flags, set) - context := NewContext(a, set, ctx.globalSet) + context := NewContext(a, set, ctx) if nerr != nil { fmt.Fprintln(a.Writer, nerr) + fmt.Fprintln(a.Writer) if len(a.Commands) > 0 { ShowSubcommandHelp(context) } else { ShowCommandHelp(ctx, context.Args().First()) } - fmt.Fprintln(a.Writer) return nerr } if err != nil { - fmt.Fprintf(a.Writer, "Incorrect Usage.\n\n") + fmt.Fprintln(a.Writer, "Incorrect Usage.") + fmt.Fprintln(a.Writer) ShowSubcommandHelp(context) return err } @@ -248,10 +256,14 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) { if a.After != nil { defer func() { - // err is always nil here. - // There is a check to see if it is non-nil - // just few lines before. - err = a.After(context) + afterErr := a.After(context) + if afterErr != nil { + if err != nil { + err = NewMultiError(err, afterErr) + } else { + err = afterErr + } + } }() } diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/app_test.go b/Godeps/_workspace/src/github.com/codegangsta/cli/app_test.go deleted file mode 100644 index 4a40b89cd..000000000 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/app_test.go +++ /dev/null @@ -1,622 +0,0 @@ -package cli_test - -import ( - "flag" - "fmt" - "os" - "testing" - - "github.com/codegangsta/cli" -) - -func ExampleApp() { - // set args for examples sake - os.Args = []string{"greet", "--name", "Jeremy"} - - app := cli.NewApp() - app.Name = "greet" - app.Flags = []cli.Flag{ - cli.StringFlag{Name: "name", Value: "bob", Usage: "a name to say"}, - } - app.Action = func(c *cli.Context) { - fmt.Printf("Hello %v\n", c.String("name")) - } - app.Author = "Harrison" - app.Email = "harrison@lolwut.com" - app.Authors = []cli.Author{cli.Author{Name: "Oliver Allen", Email: "oliver@toyshop.com"}} - app.Run(os.Args) - // Output: - // Hello Jeremy -} - -func ExampleAppSubcommand() { - // set args for examples sake - os.Args = []string{"say", "hi", "english", "--name", "Jeremy"} - app := cli.NewApp() - app.Name = "say" - app.Commands = []cli.Command{ - { - Name: "hello", - Aliases: []string{"hi"}, - Usage: "use it to see a description", - Description: "This is how we describe hello the function", - Subcommands: []cli.Command{ - { - Name: "english", - Aliases: []string{"en"}, - Usage: "sends a greeting in english", - Description: "greets someone in english", - Flags: []cli.Flag{ - cli.StringFlag{ - Name: "name", - Value: "Bob", - Usage: "Name of the person to greet", - }, - }, - Action: func(c *cli.Context) { - fmt.Println("Hello,", c.String("name")) - }, - }, - }, - }, - } - - app.Run(os.Args) - // Output: - // Hello, Jeremy -} - -func ExampleAppHelp() { - // set args for examples sake - os.Args = []string{"greet", "h", "describeit"} - - app := cli.NewApp() - app.Name = "greet" - app.Flags = []cli.Flag{ - cli.StringFlag{Name: "name", Value: "bob", Usage: "a name to say"}, - } - app.Commands = []cli.Command{ - { - Name: "describeit", - Aliases: []string{"d"}, - Usage: "use it to see a description", - Description: "This is how we describe describeit the function", - Action: func(c *cli.Context) { - fmt.Printf("i like to describe things") - }, - }, - } - app.Run(os.Args) - // Output: - // NAME: - // describeit - use it to see a description - // - // USAGE: - // command describeit [arguments...] - // - // DESCRIPTION: - // This is how we describe describeit the function -} - -func ExampleAppBashComplete() { - // set args for examples sake - os.Args = []string{"greet", "--generate-bash-completion"} - - app := cli.NewApp() - app.Name = "greet" - app.EnableBashCompletion = true - app.Commands = []cli.Command{ - { - Name: "describeit", - Aliases: []string{"d"}, - Usage: "use it to see a description", - Description: "This is how we describe describeit the function", - Action: func(c *cli.Context) { - fmt.Printf("i like to describe things") - }, - }, { - Name: "next", - Usage: "next example", - Description: "more stuff to see when generating bash completion", - Action: func(c *cli.Context) { - fmt.Printf("the next example") - }, - }, - } - - app.Run(os.Args) - // Output: - // describeit - // d - // next - // help - // h -} - -func TestApp_Run(t *testing.T) { - s := "" - - app := cli.NewApp() - app.Action = func(c *cli.Context) { - s = s + c.Args().First() - } - - err := app.Run([]string{"command", "foo"}) - expect(t, err, nil) - err = app.Run([]string{"command", "bar"}) - expect(t, err, nil) - expect(t, s, "foobar") -} - -var commandAppTests = []struct { - name string - expected bool -}{ - {"foobar", true}, - {"batbaz", true}, - {"b", true}, - {"f", true}, - {"bat", false}, - {"nothing", false}, -} - -func TestApp_Command(t *testing.T) { - app := cli.NewApp() - fooCommand := cli.Command{Name: "foobar", Aliases: []string{"f"}} - batCommand := cli.Command{Name: "batbaz", Aliases: []string{"b"}} - app.Commands = []cli.Command{ - fooCommand, - batCommand, - } - - for _, test := range commandAppTests { - expect(t, app.Command(test.name) != nil, test.expected) - } -} - -func TestApp_CommandWithArgBeforeFlags(t *testing.T) { - var parsedOption, firstArg string - - app := cli.NewApp() - command := cli.Command{ - Name: "cmd", - Flags: []cli.Flag{ - cli.StringFlag{Name: "option", Value: "", Usage: "some option"}, - }, - Action: func(c *cli.Context) { - parsedOption = c.String("option") - firstArg = c.Args().First() - }, - } - app.Commands = []cli.Command{command} - - app.Run([]string{"", "cmd", "my-arg", "--option", "my-option"}) - - expect(t, parsedOption, "my-option") - expect(t, firstArg, "my-arg") -} - -func TestApp_RunAsSubcommandParseFlags(t *testing.T) { - var context *cli.Context - - a := cli.NewApp() - a.Commands = []cli.Command{ - { - Name: "foo", - Action: func(c *cli.Context) { - context = c - }, - Flags: []cli.Flag{ - cli.StringFlag{ - Name: "lang", - Value: "english", - Usage: "language for the greeting", - }, - }, - Before: func(_ *cli.Context) error { return nil }, - }, - } - a.Run([]string{"", "foo", "--lang", "spanish", "abcd"}) - - expect(t, context.Args().Get(0), "abcd") - expect(t, context.String("lang"), "spanish") -} - -func TestApp_CommandWithFlagBeforeTerminator(t *testing.T) { - var parsedOption string - var args []string - - app := cli.NewApp() - command := cli.Command{ - Name: "cmd", - Flags: []cli.Flag{ - cli.StringFlag{Name: "option", Value: "", Usage: "some option"}, - }, - Action: func(c *cli.Context) { - parsedOption = c.String("option") - args = c.Args() - }, - } - app.Commands = []cli.Command{command} - - app.Run([]string{"", "cmd", "my-arg", "--option", "my-option", "--", "--notARealFlag"}) - - expect(t, parsedOption, "my-option") - expect(t, args[0], "my-arg") - expect(t, args[1], "--") - expect(t, args[2], "--notARealFlag") -} - -func TestApp_CommandWithNoFlagBeforeTerminator(t *testing.T) { - var args []string - - app := cli.NewApp() - command := cli.Command{ - Name: "cmd", - Action: func(c *cli.Context) { - args = c.Args() - }, - } - app.Commands = []cli.Command{command} - - app.Run([]string{"", "cmd", "my-arg", "--", "notAFlagAtAll"}) - - expect(t, args[0], "my-arg") - expect(t, args[1], "--") - expect(t, args[2], "notAFlagAtAll") -} - -func TestApp_Float64Flag(t *testing.T) { - var meters float64 - - app := cli.NewApp() - app.Flags = []cli.Flag{ - cli.Float64Flag{Name: "height", Value: 1.5, Usage: "Set the height, in meters"}, - } - app.Action = func(c *cli.Context) { - meters = c.Float64("height") - } - - app.Run([]string{"", "--height", "1.93"}) - expect(t, meters, 1.93) -} - -func TestApp_ParseSliceFlags(t *testing.T) { - var parsedOption, firstArg string - var parsedIntSlice []int - var parsedStringSlice []string - - app := cli.NewApp() - command := cli.Command{ - Name: "cmd", - Flags: []cli.Flag{ - cli.IntSliceFlag{Name: "p", Value: &cli.IntSlice{}, Usage: "set one or more ip addr"}, - cli.StringSliceFlag{Name: "ip", Value: &cli.StringSlice{}, Usage: "set one or more ports to open"}, - }, - Action: func(c *cli.Context) { - parsedIntSlice = c.IntSlice("p") - parsedStringSlice = c.StringSlice("ip") - parsedOption = c.String("option") - firstArg = c.Args().First() - }, - } - app.Commands = []cli.Command{command} - - app.Run([]string{"", "cmd", "my-arg", "-p", "22", "-p", "80", "-ip", "8.8.8.8", "-ip", "8.8.4.4"}) - - IntsEquals := func(a, b []int) bool { - if len(a) != len(b) { - return false - } - for i, v := range a { - if v != b[i] { - return false - } - } - return true - } - - StrsEquals := func(a, b []string) bool { - if len(a) != len(b) { - return false - } - for i, v := range a { - if v != b[i] { - return false - } - } - return true - } - var expectedIntSlice = []int{22, 80} - var expectedStringSlice = []string{"8.8.8.8", "8.8.4.4"} - - if !IntsEquals(parsedIntSlice, expectedIntSlice) { - t.Errorf("%v does not match %v", parsedIntSlice, expectedIntSlice) - } - - if !StrsEquals(parsedStringSlice, expectedStringSlice) { - t.Errorf("%v does not match %v", parsedStringSlice, expectedStringSlice) - } -} - -func TestApp_DefaultStdout(t *testing.T) { - app := cli.NewApp() - - if app.Writer != os.Stdout { - t.Error("Default output writer not set.") - } -} - -type mockWriter struct { - written []byte -} - -func (fw *mockWriter) Write(p []byte) (n int, err error) { - if fw.written == nil { - fw.written = p - } else { - fw.written = append(fw.written, p...) - } - - return len(p), nil -} - -func (fw *mockWriter) GetWritten() (b []byte) { - return fw.written -} - -func TestApp_SetStdout(t *testing.T) { - w := &mockWriter{} - - app := cli.NewApp() - app.Name = "test" - app.Writer = w - - err := app.Run([]string{"help"}) - - if err != nil { - t.Fatalf("Run error: %s", err) - } - - if len(w.written) == 0 { - t.Error("App did not write output to desired writer.") - } -} - -func TestApp_BeforeFunc(t *testing.T) { - beforeRun, subcommandRun := false, false - beforeError := fmt.Errorf("fail") - var err error - - app := cli.NewApp() - - app.Before = func(c *cli.Context) error { - beforeRun = true - s := c.String("opt") - if s == "fail" { - return beforeError - } - - return nil - } - - app.Commands = []cli.Command{ - cli.Command{ - Name: "sub", - Action: func(c *cli.Context) { - subcommandRun = true - }, - }, - } - - app.Flags = []cli.Flag{ - cli.StringFlag{Name: "opt"}, - } - - // run with the Before() func succeeding - err = app.Run([]string{"command", "--opt", "succeed", "sub"}) - - if err != nil { - t.Fatalf("Run error: %s", err) - } - - if beforeRun == false { - t.Errorf("Before() not executed when expected") - } - - if subcommandRun == false { - t.Errorf("Subcommand not executed when expected") - } - - // reset - beforeRun, subcommandRun = false, false - - // run with the Before() func failing - err = app.Run([]string{"command", "--opt", "fail", "sub"}) - - // should be the same error produced by the Before func - if err != beforeError { - t.Errorf("Run error expected, but not received") - } - - if beforeRun == false { - t.Errorf("Before() not executed when expected") - } - - if subcommandRun == true { - t.Errorf("Subcommand executed when NOT expected") - } - -} - -func TestApp_AfterFunc(t *testing.T) { - afterRun, subcommandRun := false, false - afterError := fmt.Errorf("fail") - var err error - - app := cli.NewApp() - - app.After = func(c *cli.Context) error { - afterRun = true - s := c.String("opt") - if s == "fail" { - return afterError - } - - return nil - } - - app.Commands = []cli.Command{ - cli.Command{ - Name: "sub", - Action: func(c *cli.Context) { - subcommandRun = true - }, - }, - } - - app.Flags = []cli.Flag{ - cli.StringFlag{Name: "opt"}, - } - - // run with the After() func succeeding - err = app.Run([]string{"command", "--opt", "succeed", "sub"}) - - if err != nil { - t.Fatalf("Run error: %s", err) - } - - if afterRun == false { - t.Errorf("After() not executed when expected") - } - - if subcommandRun == false { - t.Errorf("Subcommand not executed when expected") - } - - // reset - afterRun, subcommandRun = false, false - - // run with the Before() func failing - err = app.Run([]string{"command", "--opt", "fail", "sub"}) - - // should be the same error produced by the Before func - if err != afterError { - t.Errorf("Run error expected, but not received") - } - - if afterRun == false { - t.Errorf("After() not executed when expected") - } - - if subcommandRun == false { - t.Errorf("Subcommand not executed when expected") - } -} - -func TestAppNoHelpFlag(t *testing.T) { - oldFlag := cli.HelpFlag - defer func() { - cli.HelpFlag = oldFlag - }() - - cli.HelpFlag = cli.BoolFlag{} - - app := cli.NewApp() - err := app.Run([]string{"test", "-h"}) - - if err != flag.ErrHelp { - t.Errorf("expected error about missing help flag, but got: %s (%T)", err, err) - } -} - -func TestAppHelpPrinter(t *testing.T) { - oldPrinter := cli.HelpPrinter - defer func() { - cli.HelpPrinter = oldPrinter - }() - - var wasCalled = false - cli.HelpPrinter = func(template string, data interface{}) { - wasCalled = true - } - - app := cli.NewApp() - app.Run([]string{"-h"}) - - if wasCalled == false { - t.Errorf("Help printer expected to be called, but was not") - } -} - -func TestAppVersionPrinter(t *testing.T) { - oldPrinter := cli.VersionPrinter - defer func() { - cli.VersionPrinter = oldPrinter - }() - - var wasCalled = false - cli.VersionPrinter = func(c *cli.Context) { - wasCalled = true - } - - app := cli.NewApp() - ctx := cli.NewContext(app, nil, nil) - cli.ShowVersion(ctx) - - if wasCalled == false { - t.Errorf("Version printer expected to be called, but was not") - } -} - -func TestAppCommandNotFound(t *testing.T) { - beforeRun, subcommandRun := false, false - app := cli.NewApp() - - app.CommandNotFound = func(c *cli.Context, command string) { - beforeRun = true - } - - app.Commands = []cli.Command{ - cli.Command{ - Name: "bar", - Action: func(c *cli.Context) { - subcommandRun = true - }, - }, - } - - app.Run([]string{"command", "foo"}) - - expect(t, beforeRun, true) - expect(t, subcommandRun, false) -} - -func TestGlobalFlagsInSubcommands(t *testing.T) { - subcommandRun := false - app := cli.NewApp() - - app.Flags = []cli.Flag{ - cli.BoolFlag{Name: "debug, d", Usage: "Enable debugging"}, - } - - app.Commands = []cli.Command{ - cli.Command{ - Name: "foo", - Subcommands: []cli.Command{ - { - Name: "bar", - Action: func(c *cli.Context) { - if c.GlobalBool("debug") { - subcommandRun = true - } - }, - }, - }, - }, - } - - app.Run([]string{"command", "-d", "foo", "bar"}) - - expect(t, subcommandRun, true) -} diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/autocomplete/bash_autocomplete b/Godeps/_workspace/src/github.com/codegangsta/cli/autocomplete/bash_autocomplete index 9b55dd990..d9231f4cf 100644 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/autocomplete/bash_autocomplete +++ b/Godeps/_workspace/src/github.com/codegangsta/cli/autocomplete/bash_autocomplete @@ -1,5 +1,7 @@ #! /bin/bash +: ${PROG:=$(basename ${BASH_SOURCE})} + _cli_bash_autocomplete() { local cur prev opts base COMPREPLY=() diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/cli.go b/Godeps/_workspace/src/github.com/codegangsta/cli/cli.go index b74254581..31dc9124d 100644 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/cli.go +++ b/Godeps/_workspace/src/github.com/codegangsta/cli/cli.go @@ -17,3 +17,24 @@ // app.Run(os.Args) // } package cli + +import ( + "strings" +) + +type MultiError struct { + Errors []error +} + +func NewMultiError(err ...error) MultiError { + return MultiError{Errors: err} +} + +func (m MultiError) Error() string { + errs := make([]string, len(m.Errors)) + for i, err := range m.Errors { + errs[i] = err.Error() + } + + return strings.Join(errs, "\n") +} diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/cli_test.go b/Godeps/_workspace/src/github.com/codegangsta/cli/cli_test.go deleted file mode 100644 index 8a8df9736..000000000 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/cli_test.go +++ /dev/null @@ -1,100 +0,0 @@ -package cli_test - -import ( - "os" - - "github.com/codegangsta/cli" -) - -func Example() { - app := cli.NewApp() - app.Name = "todo" - app.Usage = "task list on the command line" - app.Commands = []cli.Command{ - { - Name: "add", - Aliases: []string{"a"}, - Usage: "add a task to the list", - Action: func(c *cli.Context) { - println("added task: ", c.Args().First()) - }, - }, - { - Name: "complete", - Aliases: []string{"c"}, - Usage: "complete a task on the list", - Action: func(c *cli.Context) { - println("completed task: ", c.Args().First()) - }, - }, - } - - app.Run(os.Args) -} - -func ExampleSubcommand() { - app := cli.NewApp() - app.Name = "say" - app.Commands = []cli.Command{ - { - Name: "hello", - Aliases: []string{"hi"}, - Usage: "use it to see a description", - Description: "This is how we describe hello the function", - Subcommands: []cli.Command{ - { - Name: "english", - Aliases: []string{"en"}, - Usage: "sends a greeting in english", - Description: "greets someone in english", - Flags: []cli.Flag{ - cli.StringFlag{ - Name: "name", - Value: "Bob", - Usage: "Name of the person to greet", - }, - }, - Action: func(c *cli.Context) { - println("Hello, ", c.String("name")) - }, - }, { - Name: "spanish", - Aliases: []string{"sp"}, - Usage: "sends a greeting in spanish", - Flags: []cli.Flag{ - cli.StringFlag{ - Name: "surname", - Value: "Jones", - Usage: "Surname of the person to greet", - }, - }, - Action: func(c *cli.Context) { - println("Hola, ", c.String("surname")) - }, - }, { - Name: "french", - Aliases: []string{"fr"}, - Usage: "sends a greeting in french", - Flags: []cli.Flag{ - cli.StringFlag{ - Name: "nickname", - Value: "Stevie", - Usage: "Nickname of the person to greet", - }, - }, - Action: func(c *cli.Context) { - println("Bonjour, ", c.String("nickname")) - }, - }, - }, - }, { - Name: "bye", - Usage: "says goodbye", - Action: func(c *cli.Context) { - println("bye") - }, - }, - } - - app.Run(os.Args) -} diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/command.go b/Godeps/_workspace/src/github.com/codegangsta/cli/command.go index b61691c86..fac754deb 100644 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/command.go +++ b/Godeps/_workspace/src/github.com/codegangsta/cli/command.go @@ -18,6 +18,8 @@ type Command struct { Usage string // A longer explanation of how the command works Description string + // A short description of the arguments of this command + ArgsUsage string // The function to call when checking for bash command completions BashComplete func(context *Context) // An action to execute before any sub-subcommands are run, but after the context is ready @@ -36,11 +38,23 @@ type Command struct { SkipFlagParsing bool // Boolean to hide built-in help command HideHelp bool + + // Full name of command for help, defaults to full command name, including parent commands. + HelpName string + commandNamePath []string +} + +// Returns the full name of the command. +// For subcommands this ensures that parent commands are part of the command path +func (c Command) FullName() string { + if c.commandNamePath == nil { + return c.Name + } + return strings.Join(c.commandNamePath, " ") } // Invokes the command given the context, parses ctx.Args() to generate command-specific flags func (c Command) Run(ctx *Context) error { - if len(c.Subcommands) > 0 || c.Before != nil || c.After != nil { return c.startApp(ctx) } @@ -91,9 +105,9 @@ func (c Command) Run(ctx *Context) error { } if err != nil { - fmt.Fprint(ctx.App.Writer, "Incorrect Usage.\n\n") - ShowCommandHelp(ctx, c.Name) + fmt.Fprintln(ctx.App.Writer, "Incorrect Usage.") fmt.Fprintln(ctx.App.Writer) + ShowCommandHelp(ctx, c.Name) return err } @@ -102,10 +116,9 @@ func (c Command) Run(ctx *Context) error { fmt.Fprintln(ctx.App.Writer, nerr) fmt.Fprintln(ctx.App.Writer) ShowCommandHelp(ctx, c.Name) - fmt.Fprintln(ctx.App.Writer) return nerr } - context := NewContext(ctx.App, set, ctx.globalSet) + context := NewContext(ctx.App, set, ctx) if checkCommandCompletions(context, c.Name) { return nil @@ -144,6 +157,12 @@ func (c Command) startApp(ctx *Context) error { // set the name and usage app.Name = fmt.Sprintf("%s %s", ctx.App.Name, c.Name) + if c.HelpName == "" { + app.HelpName = c.HelpName + } else { + app.HelpName = fmt.Sprintf("%s %s", ctx.App.Name, c.Name) + } + if c.Description != "" { app.Usage = c.Description } else { @@ -158,6 +177,13 @@ func (c Command) startApp(ctx *Context) error { app.Flags = c.Flags app.HideHelp = c.HideHelp + app.Version = ctx.App.Version + app.HideVersion = ctx.App.HideVersion + app.Compiled = ctx.App.Compiled + app.Author = ctx.App.Author + app.Email = ctx.App.Email + app.Writer = ctx.App.Writer + // bash completion app.EnableBashCompletion = ctx.App.EnableBashCompletion if c.BashComplete != nil { @@ -173,5 +199,12 @@ func (c Command) startApp(ctx *Context) error { app.Action = helpSubcommand.Action } + var newCmds []Command + for _, cc := range app.Commands { + cc.commandNamePath = []string{c.Name, cc.Name} + newCmds = append(newCmds, cc) + } + app.Commands = newCmds + return app.RunAsSubcommand(ctx) } diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/command_test.go b/Godeps/_workspace/src/github.com/codegangsta/cli/command_test.go deleted file mode 100644 index 4125b0c1b..000000000 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/command_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package cli_test - -import ( - "flag" - "testing" - - "github.com/codegangsta/cli" -) - -func TestCommandDoNotIgnoreFlags(t *testing.T) { - app := cli.NewApp() - set := flag.NewFlagSet("test", 0) - test := []string{"blah", "blah", "-break"} - set.Parse(test) - - c := cli.NewContext(app, set, set) - - command := cli.Command{ - Name: "test-cmd", - Aliases: []string{"tc"}, - Usage: "this is for testing", - Description: "testing", - Action: func(_ *cli.Context) {}, - } - err := command.Run(c) - - expect(t, err.Error(), "flag provided but not defined: -break") -} - -func TestCommandIgnoreFlags(t *testing.T) { - app := cli.NewApp() - set := flag.NewFlagSet("test", 0) - test := []string{"blah", "blah"} - set.Parse(test) - - c := cli.NewContext(app, set, set) - - command := cli.Command{ - Name: "test-cmd", - Aliases: []string{"tc"}, - Usage: "this is for testing", - Description: "testing", - Action: func(_ *cli.Context) {}, - SkipFlagParsing: true, - } - err := command.Run(c) - - expect(t, err, nil) -} diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/context.go b/Godeps/_workspace/src/github.com/codegangsta/cli/context.go index 37221bdc2..f541f41c3 100644 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/context.go +++ b/Godeps/_workspace/src/github.com/codegangsta/cli/context.go @@ -16,14 +16,14 @@ type Context struct { App *App Command Command flagSet *flag.FlagSet - globalSet *flag.FlagSet setFlags map[string]bool globalSetFlags map[string]bool + parentContext *Context } // Creates a new context. For use in when invoking an App or Command action. -func NewContext(app *App, set *flag.FlagSet, globalSet *flag.FlagSet) *Context { - return &Context{App: app, flagSet: set, globalSet: globalSet} +func NewContext(app *App, set *flag.FlagSet, parentCtx *Context) *Context { + return &Context{App: app, flagSet: set, parentContext: parentCtx} } // Looks up the value of a local int flag, returns 0 if no int flag exists @@ -73,37 +73,58 @@ func (c *Context) Generic(name string) interface{} { // Looks up the value of a global int flag, returns 0 if no int flag exists func (c *Context) GlobalInt(name string) int { - return lookupInt(name, c.globalSet) + if fs := lookupGlobalFlagSet(name, c); fs != nil { + return lookupInt(name, fs) + } + return 0 } // Looks up the value of a global time.Duration flag, returns 0 if no time.Duration flag exists func (c *Context) GlobalDuration(name string) time.Duration { - return lookupDuration(name, c.globalSet) + if fs := lookupGlobalFlagSet(name, c); fs != nil { + return lookupDuration(name, fs) + } + return 0 } // Looks up the value of a global bool flag, returns false if no bool flag exists func (c *Context) GlobalBool(name string) bool { - return lookupBool(name, c.globalSet) + if fs := lookupGlobalFlagSet(name, c); fs != nil { + return lookupBool(name, fs) + } + return false } // Looks up the value of a global string flag, returns "" if no string flag exists func (c *Context) GlobalString(name string) string { - return lookupString(name, c.globalSet) + if fs := lookupGlobalFlagSet(name, c); fs != nil { + return lookupString(name, fs) + } + return "" } // Looks up the value of a global string slice flag, returns nil if no string slice flag exists func (c *Context) GlobalStringSlice(name string) []string { - return lookupStringSlice(name, c.globalSet) + if fs := lookupGlobalFlagSet(name, c); fs != nil { + return lookupStringSlice(name, fs) + } + return nil } // Looks up the value of a global int slice flag, returns nil if no int slice flag exists func (c *Context) GlobalIntSlice(name string) []int { - return lookupIntSlice(name, c.globalSet) + if fs := lookupGlobalFlagSet(name, c); fs != nil { + return lookupIntSlice(name, fs) + } + return nil } // Looks up the value of a global generic flag, returns nil if no generic flag exists func (c *Context) GlobalGeneric(name string) interface{} { - return lookupGeneric(name, c.globalSet) + if fs := lookupGlobalFlagSet(name, c); fs != nil { + return lookupGeneric(name, fs) + } + return nil } // Returns the number of flags set @@ -126,11 +147,17 @@ func (c *Context) IsSet(name string) bool { func (c *Context) GlobalIsSet(name string) bool { if c.globalSetFlags == nil { c.globalSetFlags = make(map[string]bool) - c.globalSet.Visit(func(f *flag.Flag) { - c.globalSetFlags[f.Name] = true - }) + ctx := c + if ctx.parentContext != nil { + ctx = ctx.parentContext + } + for ; ctx != nil && c.globalSetFlags[name] == false; ctx = ctx.parentContext { + ctx.flagSet.Visit(func(f *flag.Flag) { + c.globalSetFlags[f.Name] = true + }) + } } - return c.globalSetFlags[name] == true + return c.globalSetFlags[name] } // Returns a slice of flag names used in this context. @@ -157,6 +184,11 @@ func (c *Context) GlobalFlagNames() (names []string) { return } +// Returns the parent context, if any +func (c *Context) Parent() *Context { + return c.parentContext +} + type Args []string // Returns the command line arguments associated with the context. @@ -201,6 +233,18 @@ func (a Args) Swap(from, to int) error { return nil } +func lookupGlobalFlagSet(name string, ctx *Context) *flag.FlagSet { + if ctx.parentContext != nil { + ctx = ctx.parentContext + } + for ; ctx != nil; ctx = ctx.parentContext { + if f := ctx.flagSet.Lookup(name); f != nil { + return ctx.flagSet + } + } + return nil +} + func lookupInt(name string, set *flag.FlagSet) int { f := set.Lookup(name) if f != nil { diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/context_test.go b/Godeps/_workspace/src/github.com/codegangsta/cli/context_test.go deleted file mode 100644 index d4a1877f0..000000000 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/context_test.go +++ /dev/null @@ -1,111 +0,0 @@ -package cli_test - -import ( - "flag" - "testing" - "time" - - "github.com/codegangsta/cli" -) - -func TestNewContext(t *testing.T) { - set := flag.NewFlagSet("test", 0) - set.Int("myflag", 12, "doc") - globalSet := flag.NewFlagSet("test", 0) - globalSet.Int("myflag", 42, "doc") - command := cli.Command{Name: "mycommand"} - c := cli.NewContext(nil, set, globalSet) - c.Command = command - expect(t, c.Int("myflag"), 12) - expect(t, c.GlobalInt("myflag"), 42) - expect(t, c.Command.Name, "mycommand") -} - -func TestContext_Int(t *testing.T) { - set := flag.NewFlagSet("test", 0) - set.Int("myflag", 12, "doc") - c := cli.NewContext(nil, set, set) - expect(t, c.Int("myflag"), 12) -} - -func TestContext_Duration(t *testing.T) { - set := flag.NewFlagSet("test", 0) - set.Duration("myflag", time.Duration(12*time.Second), "doc") - c := cli.NewContext(nil, set, set) - expect(t, c.Duration("myflag"), time.Duration(12*time.Second)) -} - -func TestContext_String(t *testing.T) { - set := flag.NewFlagSet("test", 0) - set.String("myflag", "hello world", "doc") - c := cli.NewContext(nil, set, set) - expect(t, c.String("myflag"), "hello world") -} - -func TestContext_Bool(t *testing.T) { - set := flag.NewFlagSet("test", 0) - set.Bool("myflag", false, "doc") - c := cli.NewContext(nil, set, set) - expect(t, c.Bool("myflag"), false) -} - -func TestContext_BoolT(t *testing.T) { - set := flag.NewFlagSet("test", 0) - set.Bool("myflag", true, "doc") - c := cli.NewContext(nil, set, set) - expect(t, c.BoolT("myflag"), true) -} - -func TestContext_Args(t *testing.T) { - set := flag.NewFlagSet("test", 0) - set.Bool("myflag", false, "doc") - c := cli.NewContext(nil, set, set) - set.Parse([]string{"--myflag", "bat", "baz"}) - expect(t, len(c.Args()), 2) - expect(t, c.Bool("myflag"), true) -} - -func TestContext_IsSet(t *testing.T) { - set := flag.NewFlagSet("test", 0) - set.Bool("myflag", false, "doc") - set.String("otherflag", "hello world", "doc") - globalSet := flag.NewFlagSet("test", 0) - globalSet.Bool("myflagGlobal", true, "doc") - c := cli.NewContext(nil, set, globalSet) - set.Parse([]string{"--myflag", "bat", "baz"}) - globalSet.Parse([]string{"--myflagGlobal", "bat", "baz"}) - expect(t, c.IsSet("myflag"), true) - expect(t, c.IsSet("otherflag"), false) - expect(t, c.IsSet("bogusflag"), false) - expect(t, c.IsSet("myflagGlobal"), false) -} - -func TestContext_GlobalIsSet(t *testing.T) { - set := flag.NewFlagSet("test", 0) - set.Bool("myflag", false, "doc") - set.String("otherflag", "hello world", "doc") - globalSet := flag.NewFlagSet("test", 0) - globalSet.Bool("myflagGlobal", true, "doc") - globalSet.Bool("myflagGlobalUnset", true, "doc") - c := cli.NewContext(nil, set, globalSet) - set.Parse([]string{"--myflag", "bat", "baz"}) - globalSet.Parse([]string{"--myflagGlobal", "bat", "baz"}) - expect(t, c.GlobalIsSet("myflag"), false) - expect(t, c.GlobalIsSet("otherflag"), false) - expect(t, c.GlobalIsSet("bogusflag"), false) - expect(t, c.GlobalIsSet("myflagGlobal"), true) - expect(t, c.GlobalIsSet("myflagGlobalUnset"), false) - expect(t, c.GlobalIsSet("bogusGlobal"), false) -} - -func TestContext_NumFlags(t *testing.T) { - set := flag.NewFlagSet("test", 0) - set.Bool("myflag", false, "doc") - set.String("otherflag", "hello world", "doc") - globalSet := flag.NewFlagSet("test", 0) - globalSet.Bool("myflagGlobal", true, "doc") - c := cli.NewContext(nil, set, globalSet) - set.Parse([]string{"--myflag", "--otherflag=foo"}) - globalSet.Parse([]string{"--myflagGlobal"}) - expect(t, c.NumFlags(), 2) -} diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/flag.go b/Godeps/_workspace/src/github.com/codegangsta/cli/flag.go index 251158667..531b09130 100644 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/flag.go +++ b/Godeps/_workspace/src/github.com/codegangsta/cli/flag.go @@ -99,21 +99,27 @@ func (f GenericFlag) getName() string { return f.Name } +// StringSlice is an opaque type for []string to satisfy flag.Value type StringSlice []string +// Set appends the string value to the list of values func (f *StringSlice) Set(value string) error { *f = append(*f, value) return nil } +// String returns a readable representation of this value (for usage defaults) func (f *StringSlice) String() string { return fmt.Sprintf("%s", *f) } +// Value returns the slice of strings set by this flag func (f *StringSlice) Value() []string { return *f } +// StringSlice is a string flag that can be specified multiple times on the +// command-line type StringSliceFlag struct { Name string Value *StringSlice @@ -121,12 +127,14 @@ type StringSliceFlag struct { EnvVar string } +// String returns the usage func (f StringSliceFlag) String() string { firstName := strings.Trim(strings.Split(f.Name, ",")[0], " ") pref := prefixFor(firstName) return withEnvHint(f.EnvVar, fmt.Sprintf("%s [%v]\t%v", prefixedNames(f.Name), pref+firstName+" option "+pref+firstName+" option", f.Usage)) } +// Apply populates the flag given the flag set and environment func (f StringSliceFlag) Apply(set *flag.FlagSet) { if f.EnvVar != "" { for _, envVar := range strings.Split(f.EnvVar, ",") { @@ -144,6 +152,9 @@ func (f StringSliceFlag) Apply(set *flag.FlagSet) { } eachName(f.Name, func(name string) { + if f.Value == nil { + f.Value = &StringSlice{} + } set.Var(f.Value, name, f.Usage) }) } @@ -152,10 +163,11 @@ func (f StringSliceFlag) getName() string { return f.Name } +// StringSlice is an opaque type for []int to satisfy flag.Value type IntSlice []int +// Set parses the value into an integer and appends it to the list of values func (f *IntSlice) Set(value string) error { - tmp, err := strconv.Atoi(value) if err != nil { return err @@ -165,14 +177,18 @@ func (f *IntSlice) Set(value string) error { return nil } +// String returns a readable representation of this value (for usage defaults) func (f *IntSlice) String() string { return fmt.Sprintf("%d", *f) } +// Value returns the slice of ints set by this flag func (f *IntSlice) Value() []int { return *f } +// IntSliceFlag is an int flag that can be specified multiple times on the +// command-line type IntSliceFlag struct { Name string Value *IntSlice @@ -180,12 +196,14 @@ type IntSliceFlag struct { EnvVar string } +// String returns the usage func (f IntSliceFlag) String() string { firstName := strings.Trim(strings.Split(f.Name, ",")[0], " ") pref := prefixFor(firstName) return withEnvHint(f.EnvVar, fmt.Sprintf("%s [%v]\t%v", prefixedNames(f.Name), pref+firstName+" option "+pref+firstName+" option", f.Usage)) } +// Apply populates the flag given the flag set and environment func (f IntSliceFlag) Apply(set *flag.FlagSet) { if f.EnvVar != "" { for _, envVar := range strings.Split(f.EnvVar, ",") { @@ -206,6 +224,9 @@ func (f IntSliceFlag) Apply(set *flag.FlagSet) { } eachName(f.Name, func(name string) { + if f.Value == nil { + f.Value = &IntSlice{} + } set.Var(f.Value, name, f.Usage) }) } @@ -214,16 +235,19 @@ func (f IntSliceFlag) getName() string { return f.Name } +// BoolFlag is a switch that defaults to false type BoolFlag struct { Name string Usage string EnvVar string } +// String returns a readable representation of this value (for usage defaults) func (f BoolFlag) String() string { return withEnvHint(f.EnvVar, fmt.Sprintf("%s\t%v", prefixedNames(f.Name), f.Usage)) } +// Apply populates the flag given the flag set and environment func (f BoolFlag) Apply(set *flag.FlagSet) { val := false if f.EnvVar != "" { @@ -248,16 +272,20 @@ func (f BoolFlag) getName() string { return f.Name } +// BoolTFlag this represents a boolean flag that is true by default, but can +// still be set to false by --some-flag=false type BoolTFlag struct { Name string Usage string EnvVar string } +// String returns a readable representation of this value (for usage defaults) func (f BoolTFlag) String() string { return withEnvHint(f.EnvVar, fmt.Sprintf("%s\t%v", prefixedNames(f.Name), f.Usage)) } +// Apply populates the flag given the flag set and environment func (f BoolTFlag) Apply(set *flag.FlagSet) { val := true if f.EnvVar != "" { @@ -282,6 +310,7 @@ func (f BoolTFlag) getName() string { return f.Name } +// StringFlag represents a flag that takes as string value type StringFlag struct { Name string Value string @@ -289,6 +318,7 @@ type StringFlag struct { EnvVar string } +// String returns the usage func (f StringFlag) String() string { var fmtString string fmtString = "%s %v\t%v" @@ -302,6 +332,7 @@ func (f StringFlag) String() string { return withEnvHint(f.EnvVar, fmt.Sprintf(fmtString, prefixedNames(f.Name), f.Value, f.Usage)) } +// Apply populates the flag given the flag set and environment func (f StringFlag) Apply(set *flag.FlagSet) { if f.EnvVar != "" { for _, envVar := range strings.Split(f.EnvVar, ",") { @@ -322,6 +353,8 @@ func (f StringFlag) getName() string { return f.Name } +// IntFlag is a flag that takes an integer +// Errors if the value provided cannot be parsed type IntFlag struct { Name string Value int @@ -329,10 +362,12 @@ type IntFlag struct { EnvVar string } +// String returns the usage func (f IntFlag) String() string { return withEnvHint(f.EnvVar, fmt.Sprintf("%s \"%v\"\t%v", prefixedNames(f.Name), f.Value, f.Usage)) } +// Apply populates the flag given the flag set and environment func (f IntFlag) Apply(set *flag.FlagSet) { if f.EnvVar != "" { for _, envVar := range strings.Split(f.EnvVar, ",") { @@ -356,6 +391,8 @@ func (f IntFlag) getName() string { return f.Name } +// DurationFlag is a flag that takes a duration specified in Go's duration +// format: https://golang.org/pkg/time/#ParseDuration type DurationFlag struct { Name string Value time.Duration @@ -363,10 +400,12 @@ type DurationFlag struct { EnvVar string } +// String returns a readable representation of this value (for usage defaults) func (f DurationFlag) String() string { return withEnvHint(f.EnvVar, fmt.Sprintf("%s \"%v\"\t%v", prefixedNames(f.Name), f.Value, f.Usage)) } +// Apply populates the flag given the flag set and environment func (f DurationFlag) Apply(set *flag.FlagSet) { if f.EnvVar != "" { for _, envVar := range strings.Split(f.EnvVar, ",") { @@ -390,6 +429,8 @@ func (f DurationFlag) getName() string { return f.Name } +// Float64Flag is a flag that takes an float value +// Errors if the value provided cannot be parsed type Float64Flag struct { Name string Value float64 @@ -397,10 +438,12 @@ type Float64Flag struct { EnvVar string } +// String returns the usage func (f Float64Flag) String() string { return withEnvHint(f.EnvVar, fmt.Sprintf("%s \"%v\"\t%v", prefixedNames(f.Name), f.Value, f.Usage)) } +// Apply populates the flag given the flag set and environment func (f Float64Flag) Apply(set *flag.FlagSet) { if f.EnvVar != "" { for _, envVar := range strings.Split(f.EnvVar, ",") { diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/flag_test.go b/Godeps/_workspace/src/github.com/codegangsta/cli/flag_test.go deleted file mode 100644 index f0f096a2d..000000000 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/flag_test.go +++ /dev/null @@ -1,742 +0,0 @@ -package cli_test - -import ( - "fmt" - "os" - "reflect" - "strings" - "testing" - - "github.com/codegangsta/cli" -) - -var boolFlagTests = []struct { - name string - expected string -}{ - {"help", "--help\t"}, - {"h", "-h\t"}, -} - -func TestBoolFlagHelpOutput(t *testing.T) { - - for _, test := range boolFlagTests { - flag := cli.BoolFlag{Name: test.name} - output := flag.String() - - if output != test.expected { - t.Errorf("%s does not match %s", output, test.expected) - } - } -} - -var stringFlagTests = []struct { - name string - value string - expected string -}{ - {"help", "", "--help \t"}, - {"h", "", "-h \t"}, - {"h", "", "-h \t"}, - {"test", "Something", "--test \"Something\"\t"}, -} - -func TestStringFlagHelpOutput(t *testing.T) { - - for _, test := range stringFlagTests { - flag := cli.StringFlag{Name: test.name, Value: test.value} - output := flag.String() - - if output != test.expected { - t.Errorf("%s does not match %s", output, test.expected) - } - } -} - -func TestStringFlagWithEnvVarHelpOutput(t *testing.T) { - os.Clearenv() - os.Setenv("APP_FOO", "derp") - for _, test := range stringFlagTests { - flag := cli.StringFlag{Name: test.name, Value: test.value, EnvVar: "APP_FOO"} - output := flag.String() - - if !strings.HasSuffix(output, " [$APP_FOO]") { - t.Errorf("%s does not end with [$APP_FOO]", output) - } - } -} - -var stringSliceFlagTests = []struct { - name string - value *cli.StringSlice - expected string -}{ - {"help", func() *cli.StringSlice { - s := &cli.StringSlice{} - s.Set("") - return s - }(), "--help [--help option --help option]\t"}, - {"h", func() *cli.StringSlice { - s := &cli.StringSlice{} - s.Set("") - return s - }(), "-h [-h option -h option]\t"}, - {"h", func() *cli.StringSlice { - s := &cli.StringSlice{} - s.Set("") - return s - }(), "-h [-h option -h option]\t"}, - {"test", func() *cli.StringSlice { - s := &cli.StringSlice{} - s.Set("Something") - return s - }(), "--test [--test option --test option]\t"}, -} - -func TestStringSliceFlagHelpOutput(t *testing.T) { - - for _, test := range stringSliceFlagTests { - flag := cli.StringSliceFlag{Name: test.name, Value: test.value} - output := flag.String() - - if output != test.expected { - t.Errorf("%q does not match %q", output, test.expected) - } - } -} - -func TestStringSliceFlagWithEnvVarHelpOutput(t *testing.T) { - os.Clearenv() - os.Setenv("APP_QWWX", "11,4") - for _, test := range stringSliceFlagTests { - flag := cli.StringSliceFlag{Name: test.name, Value: test.value, EnvVar: "APP_QWWX"} - output := flag.String() - - if !strings.HasSuffix(output, " [$APP_QWWX]") { - t.Errorf("%q does not end with [$APP_QWWX]", output) - } - } -} - -var intFlagTests = []struct { - name string - expected string -}{ - {"help", "--help \"0\"\t"}, - {"h", "-h \"0\"\t"}, -} - -func TestIntFlagHelpOutput(t *testing.T) { - - for _, test := range intFlagTests { - flag := cli.IntFlag{Name: test.name} - output := flag.String() - - if output != test.expected { - t.Errorf("%s does not match %s", output, test.expected) - } - } -} - -func TestIntFlagWithEnvVarHelpOutput(t *testing.T) { - os.Clearenv() - os.Setenv("APP_BAR", "2") - for _, test := range intFlagTests { - flag := cli.IntFlag{Name: test.name, EnvVar: "APP_BAR"} - output := flag.String() - - if !strings.HasSuffix(output, " [$APP_BAR]") { - t.Errorf("%s does not end with [$APP_BAR]", output) - } - } -} - -var durationFlagTests = []struct { - name string - expected string -}{ - {"help", "--help \"0\"\t"}, - {"h", "-h \"0\"\t"}, -} - -func TestDurationFlagHelpOutput(t *testing.T) { - - for _, test := range durationFlagTests { - flag := cli.DurationFlag{Name: test.name} - output := flag.String() - - if output != test.expected { - t.Errorf("%s does not match %s", output, test.expected) - } - } -} - -func TestDurationFlagWithEnvVarHelpOutput(t *testing.T) { - os.Clearenv() - os.Setenv("APP_BAR", "2h3m6s") - for _, test := range durationFlagTests { - flag := cli.DurationFlag{Name: test.name, EnvVar: "APP_BAR"} - output := flag.String() - - if !strings.HasSuffix(output, " [$APP_BAR]") { - t.Errorf("%s does not end with [$APP_BAR]", output) - } - } -} - -var intSliceFlagTests = []struct { - name string - value *cli.IntSlice - expected string -}{ - {"help", &cli.IntSlice{}, "--help [--help option --help option]\t"}, - {"h", &cli.IntSlice{}, "-h [-h option -h option]\t"}, - {"h", &cli.IntSlice{}, "-h [-h option -h option]\t"}, - {"test", func() *cli.IntSlice { - i := &cli.IntSlice{} - i.Set("9") - return i - }(), "--test [--test option --test option]\t"}, -} - -func TestIntSliceFlagHelpOutput(t *testing.T) { - - for _, test := range intSliceFlagTests { - flag := cli.IntSliceFlag{Name: test.name, Value: test.value} - output := flag.String() - - if output != test.expected { - t.Errorf("%q does not match %q", output, test.expected) - } - } -} - -func TestIntSliceFlagWithEnvVarHelpOutput(t *testing.T) { - os.Clearenv() - os.Setenv("APP_SMURF", "42,3") - for _, test := range intSliceFlagTests { - flag := cli.IntSliceFlag{Name: test.name, Value: test.value, EnvVar: "APP_SMURF"} - output := flag.String() - - if !strings.HasSuffix(output, " [$APP_SMURF]") { - t.Errorf("%q does not end with [$APP_SMURF]", output) - } - } -} - -var float64FlagTests = []struct { - name string - expected string -}{ - {"help", "--help \"0\"\t"}, - {"h", "-h \"0\"\t"}, -} - -func TestFloat64FlagHelpOutput(t *testing.T) { - - for _, test := range float64FlagTests { - flag := cli.Float64Flag{Name: test.name} - output := flag.String() - - if output != test.expected { - t.Errorf("%s does not match %s", output, test.expected) - } - } -} - -func TestFloat64FlagWithEnvVarHelpOutput(t *testing.T) { - os.Clearenv() - os.Setenv("APP_BAZ", "99.4") - for _, test := range float64FlagTests { - flag := cli.Float64Flag{Name: test.name, EnvVar: "APP_BAZ"} - output := flag.String() - - if !strings.HasSuffix(output, " [$APP_BAZ]") { - t.Errorf("%s does not end with [$APP_BAZ]", output) - } - } -} - -var genericFlagTests = []struct { - name string - value cli.Generic - expected string -}{ - {"test", &Parser{"abc", "def"}, "--test \"abc,def\"\ttest flag"}, - {"t", &Parser{"abc", "def"}, "-t \"abc,def\"\ttest flag"}, -} - -func TestGenericFlagHelpOutput(t *testing.T) { - - for _, test := range genericFlagTests { - flag := cli.GenericFlag{Name: test.name, Value: test.value, Usage: "test flag"} - output := flag.String() - - if output != test.expected { - t.Errorf("%q does not match %q", output, test.expected) - } - } -} - -func TestGenericFlagWithEnvVarHelpOutput(t *testing.T) { - os.Clearenv() - os.Setenv("APP_ZAP", "3") - for _, test := range genericFlagTests { - flag := cli.GenericFlag{Name: test.name, EnvVar: "APP_ZAP"} - output := flag.String() - - if !strings.HasSuffix(output, " [$APP_ZAP]") { - t.Errorf("%s does not end with [$APP_ZAP]", output) - } - } -} - -func TestParseMultiString(t *testing.T) { - (&cli.App{ - Flags: []cli.Flag{ - cli.StringFlag{Name: "serve, s"}, - }, - Action: func(ctx *cli.Context) { - if ctx.String("serve") != "10" { - t.Errorf("main name not set") - } - if ctx.String("s") != "10" { - t.Errorf("short name not set") - } - }, - }).Run([]string{"run", "-s", "10"}) -} - -func TestParseMultiStringFromEnv(t *testing.T) { - os.Clearenv() - os.Setenv("APP_COUNT", "20") - (&cli.App{ - Flags: []cli.Flag{ - cli.StringFlag{Name: "count, c", EnvVar: "APP_COUNT"}, - }, - Action: func(ctx *cli.Context) { - if ctx.String("count") != "20" { - t.Errorf("main name not set") - } - if ctx.String("c") != "20" { - t.Errorf("short name not set") - } - }, - }).Run([]string{"run"}) -} - -func TestParseMultiStringFromEnvCascade(t *testing.T) { - os.Clearenv() - os.Setenv("APP_COUNT", "20") - (&cli.App{ - Flags: []cli.Flag{ - cli.StringFlag{Name: "count, c", EnvVar: "COMPAT_COUNT,APP_COUNT"}, - }, - Action: func(ctx *cli.Context) { - if ctx.String("count") != "20" { - t.Errorf("main name not set") - } - if ctx.String("c") != "20" { - t.Errorf("short name not set") - } - }, - }).Run([]string{"run"}) -} - -func TestParseMultiStringSlice(t *testing.T) { - (&cli.App{ - Flags: []cli.Flag{ - cli.StringSliceFlag{Name: "serve, s", Value: &cli.StringSlice{}}, - }, - Action: func(ctx *cli.Context) { - if !reflect.DeepEqual(ctx.StringSlice("serve"), []string{"10", "20"}) { - t.Errorf("main name not set") - } - if !reflect.DeepEqual(ctx.StringSlice("s"), []string{"10", "20"}) { - t.Errorf("short name not set") - } - }, - }).Run([]string{"run", "-s", "10", "-s", "20"}) -} - -func TestParseMultiStringSliceFromEnv(t *testing.T) { - os.Clearenv() - os.Setenv("APP_INTERVALS", "20,30,40") - - (&cli.App{ - Flags: []cli.Flag{ - cli.StringSliceFlag{Name: "intervals, i", Value: &cli.StringSlice{}, EnvVar: "APP_INTERVALS"}, - }, - Action: func(ctx *cli.Context) { - if !reflect.DeepEqual(ctx.StringSlice("intervals"), []string{"20", "30", "40"}) { - t.Errorf("main name not set from env") - } - if !reflect.DeepEqual(ctx.StringSlice("i"), []string{"20", "30", "40"}) { - t.Errorf("short name not set from env") - } - }, - }).Run([]string{"run"}) -} - -func TestParseMultiStringSliceFromEnvCascade(t *testing.T) { - os.Clearenv() - os.Setenv("APP_INTERVALS", "20,30,40") - - (&cli.App{ - Flags: []cli.Flag{ - cli.StringSliceFlag{Name: "intervals, i", Value: &cli.StringSlice{}, EnvVar: "COMPAT_INTERVALS,APP_INTERVALS"}, - }, - Action: func(ctx *cli.Context) { - if !reflect.DeepEqual(ctx.StringSlice("intervals"), []string{"20", "30", "40"}) { - t.Errorf("main name not set from env") - } - if !reflect.DeepEqual(ctx.StringSlice("i"), []string{"20", "30", "40"}) { - t.Errorf("short name not set from env") - } - }, - }).Run([]string{"run"}) -} - -func TestParseMultiInt(t *testing.T) { - a := cli.App{ - Flags: []cli.Flag{ - cli.IntFlag{Name: "serve, s"}, - }, - Action: func(ctx *cli.Context) { - if ctx.Int("serve") != 10 { - t.Errorf("main name not set") - } - if ctx.Int("s") != 10 { - t.Errorf("short name not set") - } - }, - } - a.Run([]string{"run", "-s", "10"}) -} - -func TestParseMultiIntFromEnv(t *testing.T) { - os.Clearenv() - os.Setenv("APP_TIMEOUT_SECONDS", "10") - a := cli.App{ - Flags: []cli.Flag{ - cli.IntFlag{Name: "timeout, t", EnvVar: "APP_TIMEOUT_SECONDS"}, - }, - Action: func(ctx *cli.Context) { - if ctx.Int("timeout") != 10 { - t.Errorf("main name not set") - } - if ctx.Int("t") != 10 { - t.Errorf("short name not set") - } - }, - } - a.Run([]string{"run"}) -} - -func TestParseMultiIntFromEnvCascade(t *testing.T) { - os.Clearenv() - os.Setenv("APP_TIMEOUT_SECONDS", "10") - a := cli.App{ - Flags: []cli.Flag{ - cli.IntFlag{Name: "timeout, t", EnvVar: "COMPAT_TIMEOUT_SECONDS,APP_TIMEOUT_SECONDS"}, - }, - Action: func(ctx *cli.Context) { - if ctx.Int("timeout") != 10 { - t.Errorf("main name not set") - } - if ctx.Int("t") != 10 { - t.Errorf("short name not set") - } - }, - } - a.Run([]string{"run"}) -} - -func TestParseMultiIntSlice(t *testing.T) { - (&cli.App{ - Flags: []cli.Flag{ - cli.IntSliceFlag{Name: "serve, s", Value: &cli.IntSlice{}}, - }, - Action: func(ctx *cli.Context) { - if !reflect.DeepEqual(ctx.IntSlice("serve"), []int{10, 20}) { - t.Errorf("main name not set") - } - if !reflect.DeepEqual(ctx.IntSlice("s"), []int{10, 20}) { - t.Errorf("short name not set") - } - }, - }).Run([]string{"run", "-s", "10", "-s", "20"}) -} - -func TestParseMultiIntSliceFromEnv(t *testing.T) { - os.Clearenv() - os.Setenv("APP_INTERVALS", "20,30,40") - - (&cli.App{ - Flags: []cli.Flag{ - cli.IntSliceFlag{Name: "intervals, i", Value: &cli.IntSlice{}, EnvVar: "APP_INTERVALS"}, - }, - Action: func(ctx *cli.Context) { - if !reflect.DeepEqual(ctx.IntSlice("intervals"), []int{20, 30, 40}) { - t.Errorf("main name not set from env") - } - if !reflect.DeepEqual(ctx.IntSlice("i"), []int{20, 30, 40}) { - t.Errorf("short name not set from env") - } - }, - }).Run([]string{"run"}) -} - -func TestParseMultiIntSliceFromEnvCascade(t *testing.T) { - os.Clearenv() - os.Setenv("APP_INTERVALS", "20,30,40") - - (&cli.App{ - Flags: []cli.Flag{ - cli.IntSliceFlag{Name: "intervals, i", Value: &cli.IntSlice{}, EnvVar: "COMPAT_INTERVALS,APP_INTERVALS"}, - }, - Action: func(ctx *cli.Context) { - if !reflect.DeepEqual(ctx.IntSlice("intervals"), []int{20, 30, 40}) { - t.Errorf("main name not set from env") - } - if !reflect.DeepEqual(ctx.IntSlice("i"), []int{20, 30, 40}) { - t.Errorf("short name not set from env") - } - }, - }).Run([]string{"run"}) -} - -func TestParseMultiFloat64(t *testing.T) { - a := cli.App{ - Flags: []cli.Flag{ - cli.Float64Flag{Name: "serve, s"}, - }, - Action: func(ctx *cli.Context) { - if ctx.Float64("serve") != 10.2 { - t.Errorf("main name not set") - } - if ctx.Float64("s") != 10.2 { - t.Errorf("short name not set") - } - }, - } - a.Run([]string{"run", "-s", "10.2"}) -} - -func TestParseMultiFloat64FromEnv(t *testing.T) { - os.Clearenv() - os.Setenv("APP_TIMEOUT_SECONDS", "15.5") - a := cli.App{ - Flags: []cli.Flag{ - cli.Float64Flag{Name: "timeout, t", EnvVar: "APP_TIMEOUT_SECONDS"}, - }, - Action: func(ctx *cli.Context) { - if ctx.Float64("timeout") != 15.5 { - t.Errorf("main name not set") - } - if ctx.Float64("t") != 15.5 { - t.Errorf("short name not set") - } - }, - } - a.Run([]string{"run"}) -} - -func TestParseMultiFloat64FromEnvCascade(t *testing.T) { - os.Clearenv() - os.Setenv("APP_TIMEOUT_SECONDS", "15.5") - a := cli.App{ - Flags: []cli.Flag{ - cli.Float64Flag{Name: "timeout, t", EnvVar: "COMPAT_TIMEOUT_SECONDS,APP_TIMEOUT_SECONDS"}, - }, - Action: func(ctx *cli.Context) { - if ctx.Float64("timeout") != 15.5 { - t.Errorf("main name not set") - } - if ctx.Float64("t") != 15.5 { - t.Errorf("short name not set") - } - }, - } - a.Run([]string{"run"}) -} - -func TestParseMultiBool(t *testing.T) { - a := cli.App{ - Flags: []cli.Flag{ - cli.BoolFlag{Name: "serve, s"}, - }, - Action: func(ctx *cli.Context) { - if ctx.Bool("serve") != true { - t.Errorf("main name not set") - } - if ctx.Bool("s") != true { - t.Errorf("short name not set") - } - }, - } - a.Run([]string{"run", "--serve"}) -} - -func TestParseMultiBoolFromEnv(t *testing.T) { - os.Clearenv() - os.Setenv("APP_DEBUG", "1") - a := cli.App{ - Flags: []cli.Flag{ - cli.BoolFlag{Name: "debug, d", EnvVar: "APP_DEBUG"}, - }, - Action: func(ctx *cli.Context) { - if ctx.Bool("debug") != true { - t.Errorf("main name not set from env") - } - if ctx.Bool("d") != true { - t.Errorf("short name not set from env") - } - }, - } - a.Run([]string{"run"}) -} - -func TestParseMultiBoolFromEnvCascade(t *testing.T) { - os.Clearenv() - os.Setenv("APP_DEBUG", "1") - a := cli.App{ - Flags: []cli.Flag{ - cli.BoolFlag{Name: "debug, d", EnvVar: "COMPAT_DEBUG,APP_DEBUG"}, - }, - Action: func(ctx *cli.Context) { - if ctx.Bool("debug") != true { - t.Errorf("main name not set from env") - } - if ctx.Bool("d") != true { - t.Errorf("short name not set from env") - } - }, - } - a.Run([]string{"run"}) -} - -func TestParseMultiBoolT(t *testing.T) { - a := cli.App{ - Flags: []cli.Flag{ - cli.BoolTFlag{Name: "serve, s"}, - }, - Action: func(ctx *cli.Context) { - if ctx.BoolT("serve") != true { - t.Errorf("main name not set") - } - if ctx.BoolT("s") != true { - t.Errorf("short name not set") - } - }, - } - a.Run([]string{"run", "--serve"}) -} - -func TestParseMultiBoolTFromEnv(t *testing.T) { - os.Clearenv() - os.Setenv("APP_DEBUG", "0") - a := cli.App{ - Flags: []cli.Flag{ - cli.BoolTFlag{Name: "debug, d", EnvVar: "APP_DEBUG"}, - }, - Action: func(ctx *cli.Context) { - if ctx.BoolT("debug") != false { - t.Errorf("main name not set from env") - } - if ctx.BoolT("d") != false { - t.Errorf("short name not set from env") - } - }, - } - a.Run([]string{"run"}) -} - -func TestParseMultiBoolTFromEnvCascade(t *testing.T) { - os.Clearenv() - os.Setenv("APP_DEBUG", "0") - a := cli.App{ - Flags: []cli.Flag{ - cli.BoolTFlag{Name: "debug, d", EnvVar: "COMPAT_DEBUG,APP_DEBUG"}, - }, - Action: func(ctx *cli.Context) { - if ctx.BoolT("debug") != false { - t.Errorf("main name not set from env") - } - if ctx.BoolT("d") != false { - t.Errorf("short name not set from env") - } - }, - } - a.Run([]string{"run"}) -} - -type Parser [2]string - -func (p *Parser) Set(value string) error { - parts := strings.Split(value, ",") - if len(parts) != 2 { - return fmt.Errorf("invalid format") - } - - (*p)[0] = parts[0] - (*p)[1] = parts[1] - - return nil -} - -func (p *Parser) String() string { - return fmt.Sprintf("%s,%s", p[0], p[1]) -} - -func TestParseGeneric(t *testing.T) { - a := cli.App{ - Flags: []cli.Flag{ - cli.GenericFlag{Name: "serve, s", Value: &Parser{}}, - }, - Action: func(ctx *cli.Context) { - if !reflect.DeepEqual(ctx.Generic("serve"), &Parser{"10", "20"}) { - t.Errorf("main name not set") - } - if !reflect.DeepEqual(ctx.Generic("s"), &Parser{"10", "20"}) { - t.Errorf("short name not set") - } - }, - } - a.Run([]string{"run", "-s", "10,20"}) -} - -func TestParseGenericFromEnv(t *testing.T) { - os.Clearenv() - os.Setenv("APP_SERVE", "20,30") - a := cli.App{ - Flags: []cli.Flag{ - cli.GenericFlag{Name: "serve, s", Value: &Parser{}, EnvVar: "APP_SERVE"}, - }, - Action: func(ctx *cli.Context) { - if !reflect.DeepEqual(ctx.Generic("serve"), &Parser{"20", "30"}) { - t.Errorf("main name not set from env") - } - if !reflect.DeepEqual(ctx.Generic("s"), &Parser{"20", "30"}) { - t.Errorf("short name not set from env") - } - }, - } - a.Run([]string{"run"}) -} - -func TestParseGenericFromEnvCascade(t *testing.T) { - os.Clearenv() - os.Setenv("APP_FOO", "99,2000") - a := cli.App{ - Flags: []cli.Flag{ - cli.GenericFlag{Name: "foos", Value: &Parser{}, EnvVar: "COMPAT_FOO,APP_FOO"}, - }, - Action: func(ctx *cli.Context) { - if !reflect.DeepEqual(ctx.Generic("foos"), &Parser{"99", "2000"}) { - t.Errorf("value not set from env") - } - }, - } - a.Run([]string{"run"}) -} diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/help.go b/Godeps/_workspace/src/github.com/codegangsta/cli/help.go index 7c4f81be6..a246f63ac 100644 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/help.go +++ b/Godeps/_workspace/src/github.com/codegangsta/cli/help.go @@ -1,6 +1,12 @@ package cli -import "fmt" +import ( + "fmt" + "io" + "strings" + "text/tabwriter" + "text/template" +) // The text template for the Default help topic. // cli.go uses text/template to render templates. You can @@ -9,30 +15,33 @@ var AppHelpTemplate = `NAME: {{.Name}} - {{.Usage}} USAGE: - {{.Name}} {{if .Flags}}[global options] {{end}}command{{if .Flags}} [command options]{{end}} [arguments...] - + {{.HelpName}} {{if .Flags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}} + {{if .Version}} VERSION: {{.Version}} - -AUTHOR(S): - {{range .Authors}}{{ . }} - {{end}} + {{end}}{{if len .Authors}} +AUTHOR(S): + {{range .Authors}}{{ . }}{{end}} + {{end}}{{if .Commands}} COMMANDS: {{range .Commands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}} - {{end}}{{if .Flags}} + {{end}}{{end}}{{if .Flags}} GLOBAL OPTIONS: {{range .Flags}}{{.}} - {{end}}{{end}} + {{end}}{{end}}{{if .Copyright }} +COPYRIGHT: + {{.Copyright}} + {{end}} ` // The text template for the command help topic. // cli.go uses text/template to render templates. You can // render custom help text by setting this variable. var CommandHelpTemplate = `NAME: - {{.Name}} - {{.Usage}} + {{.HelpName}} - {{.Usage}} USAGE: - command {{.Name}}{{if .Flags}} [command options]{{end}} [arguments...]{{if .Description}} + {{.HelpName}}{{if .Flags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{if .Description}} DESCRIPTION: {{.Description}}{{end}}{{if .Flags}} @@ -46,10 +55,10 @@ OPTIONS: // cli.go uses text/template to render templates. You can // render custom help text by setting this variable. var SubcommandHelpTemplate = `NAME: - {{.Name}} - {{.Usage}} + {{.HelpName}} - {{.Usage}} USAGE: - {{.Name}} command{{if .Flags}} [command options]{{end}} [arguments...] + {{.HelpName}} command{{if .Flags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}} COMMANDS: {{range .Commands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}} @@ -60,9 +69,10 @@ OPTIONS: ` var helpCommand = Command{ - Name: "help", - Aliases: []string{"h"}, - Usage: "Shows a list of commands or help for one command", + Name: "help", + Aliases: []string{"h"}, + Usage: "Shows a list of commands or help for one command", + ArgsUsage: "[command]", Action: func(c *Context) { args := c.Args() if args.Present() { @@ -74,9 +84,10 @@ var helpCommand = Command{ } var helpSubcommand = Command{ - Name: "help", - Aliases: []string{"h"}, - Usage: "Shows a list of commands or help for one command", + Name: "help", + Aliases: []string{"h"}, + Usage: "Shows a list of commands or help for one command", + ArgsUsage: "[command]", Action: func(c *Context) { args := c.Args() if args.Present() { @@ -87,16 +98,16 @@ var helpSubcommand = Command{ }, } -// Prints help for the App -type helpPrinter func(templ string, data interface{}) +// Prints help for the App or Command +type helpPrinter func(w io.Writer, templ string, data interface{}) -var HelpPrinter helpPrinter = nil +var HelpPrinter helpPrinter = printHelp // Prints version for the App var VersionPrinter = printVersion func ShowAppHelp(c *Context) { - HelpPrinter(AppHelpTemplate, c.App) + HelpPrinter(c.App.Writer, AppHelpTemplate, c.App) } // Prints the list of subcommands as the default app completion method @@ -109,24 +120,24 @@ func DefaultAppComplete(c *Context) { } // Prints help for the given command -func ShowCommandHelp(c *Context, command string) { +func ShowCommandHelp(ctx *Context, command string) { // show the subcommand help for a command with subcommands if command == "" { - HelpPrinter(SubcommandHelpTemplate, c.App) + HelpPrinter(ctx.App.Writer, SubcommandHelpTemplate, ctx.App) return } - for _, c := range c.App.Commands { + for _, c := range ctx.App.Commands { if c.HasName(command) { - HelpPrinter(CommandHelpTemplate, c) + HelpPrinter(ctx.App.Writer, CommandHelpTemplate, c) return } } - if c.App.CommandNotFound != nil { - c.App.CommandNotFound(c, command) + if ctx.App.CommandNotFound != nil { + ctx.App.CommandNotFound(ctx, command) } else { - fmt.Fprintf(c.App.Writer, "No help topic for '%v'\n", command) + fmt.Fprintf(ctx.App.Writer, "No help topic for '%v'\n", command) } } @@ -160,22 +171,42 @@ func ShowCommandCompletions(ctx *Context, command string) { } } -func checkVersion(c *Context) bool { - if c.GlobalBool("version") { - ShowVersion(c) - return true +func printHelp(out io.Writer, templ string, data interface{}) { + funcMap := template.FuncMap{ + "join": strings.Join, } - return false + w := tabwriter.NewWriter(out, 0, 8, 1, '\t', 0) + t := template.Must(template.New("help").Funcs(funcMap).Parse(templ)) + err := t.Execute(w, data) + if err != nil { + panic(err) + } + w.Flush() } -func checkHelp(c *Context) bool { - if c.GlobalBool("h") || c.GlobalBool("help") { - ShowAppHelp(c) - return true +func checkVersion(c *Context) bool { + found := false + if VersionFlag.Name != "" { + eachName(VersionFlag.Name, func(name string) { + if c.GlobalBool(name) || c.Bool(name) { + found = true + } + }) } + return found +} - return false +func checkHelp(c *Context) bool { + found := false + if HelpFlag.Name != "" { + eachName(HelpFlag.Name, func(name string) { + if c.GlobalBool(name) || c.Bool(name) { + found = true + } + }) + } + return found } func checkCommandHelp(c *Context, name string) bool { diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/helpers_test.go b/Godeps/_workspace/src/github.com/codegangsta/cli/helpers_test.go deleted file mode 100644 index cdc4feb2f..000000000 --- a/Godeps/_workspace/src/github.com/codegangsta/cli/helpers_test.go +++ /dev/null @@ -1,19 +0,0 @@ -package cli_test - -import ( - "reflect" - "testing" -) - -/* Test Helpers */ -func expect(t *testing.T, a interface{}, b interface{}) { - if a != b { - t.Errorf("Expected %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a)) - } -} - -func refute(t *testing.T, a interface{}, b interface{}) { - if a == b { - t.Errorf("Did not expect %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a)) - } -} diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 8bdc01999..f752029b7 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -74,7 +74,7 @@ func init() { { Action: blockRecovery, Name: "recover", - Usage: "attempts to recover a corrupted database by setting a new block by number or hash. See help recover.", + Usage: "Attempts to recover a corrupted database by setting a new block by number or hash", Description: ` The recover commands will attempt to read out the last block based on that. @@ -339,10 +339,8 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso utils.RPCCORSDomainFlag, utils.VerbosityFlag, utils.BacktraceAtFlag, - utils.LogToStdErrFlag, utils.LogVModuleFlag, utils.LogFileFlag, - utils.LogJSONFlag, utils.PProfEanbledFlag, utils.PProfPortFlag, utils.MetricsEnabledFlag, @@ -402,7 +400,6 @@ func makeDefaultExtra() []byte { glog.V(logger.Debug).Infof("extra: %x\n", extra) return nil } - return extra } diff --git a/cmd/geth/usage.go b/cmd/geth/usage.go new file mode 100644 index 000000000..9223b7cd6 --- /dev/null +++ b/cmd/geth/usage.go @@ -0,0 +1,212 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with go-ethereum. If not, see . + +// Contains the geth command usage template and generator. + +package main + +import ( + "io" + + "github.com/codegangsta/cli" + "github.com/ethereum/go-ethereum/cmd/utils" +) + +// AppHelpTemplate is the test template for the default, global app help topic. +var AppHelpTemplate = `NAME: + {{.App.Name}} - {{.App.Usage}} + +USAGE: + {{.App.HelpName}} [options]{{if .App.Commands}} command [command options]{{end}} {{if .App.ArgsUsage}}{{.App.ArgsUsage}}{{else}}[arguments...]{{end}} + {{if .App.Version}} +VERSION: + {{.App.Version}} + {{end}}{{if len .App.Authors}} +AUTHOR(S): + {{range .App.Authors}}{{ . }}{{end}} + {{end}}{{if .App.Commands}} +COMMANDS: + {{range .App.Commands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}} + {{end}}{{end}}{{if .FlagGroups}} +{{range .FlagGroups}}{{.Name}} OPTIONS: + {{range .Flags}}{{.}} + {{end}} +{{end}}{{end}}{{if .App.Copyright }} +COPYRIGHT: + {{.App.Copyright}} + {{end}} +` + +// flagGroup is a collection of flags belonging to a single topic. +type flagGroup struct { + Name string + Flags []cli.Flag +} + +// AppHelpFlagGroups is the application flags, grouped by functionality. +var AppHelpFlagGroups = []flagGroup{ + { + Name: "ETHEREUM", + Flags: []cli.Flag{ + utils.DataDirFlag, + utils.NetworkIdFlag, + utils.OlympicFlag, + utils.TestNetFlag, + utils.DevModeFlag, + utils.GenesisFileFlag, + utils.IdentityFlag, + utils.FastSyncFlag, + utils.CacheFlag, + utils.BlockchainVersionFlag, + }, + }, + { + Name: "ACCOUNT", + Flags: []cli.Flag{ + utils.UnlockedAccountFlag, + utils.PasswordFileFlag, + }, + }, + { + Name: "API AND CONSOLE", + Flags: []cli.Flag{ + utils.RPCEnabledFlag, + utils.RPCListenAddrFlag, + utils.RPCPortFlag, + utils.RpcApiFlag, + utils.IPCDisabledFlag, + utils.IPCApiFlag, + utils.IPCPathFlag, + utils.RPCCORSDomainFlag, + utils.JSpathFlag, + utils.ExecFlag, + }, + }, + { + Name: "NETWORKING", + Flags: []cli.Flag{ + utils.BootnodesFlag, + utils.ListenPortFlag, + utils.MaxPeersFlag, + utils.MaxPendingPeersFlag, + utils.NATFlag, + utils.NoDiscoverFlag, + utils.NodeKeyFileFlag, + utils.NodeKeyHexFlag, + }, + }, + { + Name: "MINER", + Flags: []cli.Flag{ + utils.MiningEnabledFlag, + utils.MinerThreadsFlag, + utils.MiningGPUFlag, + utils.AutoDAGFlag, + utils.EtherbaseFlag, + utils.GasPriceFlag, + utils.ExtraDataFlag, + }, + }, + { + Name: "GAS PRICE ORACLE", + Flags: []cli.Flag{ + utils.GpoMinGasPriceFlag, + utils.GpoMaxGasPriceFlag, + utils.GpoFullBlockRatioFlag, + utils.GpobaseStepDownFlag, + utils.GpobaseStepUpFlag, + utils.GpobaseCorrectionFactorFlag, + }, + }, + { + Name: "VIRTUAL MACHINE", + Flags: []cli.Flag{ + utils.VMDebugFlag, + utils.VMEnableJitFlag, + utils.VMForceJitFlag, + utils.VMJitCacheFlag, + }, + }, + { + Name: "LOGGING AND DEBUGGING", + Flags: []cli.Flag{ + utils.VerbosityFlag, + utils.LogVModuleFlag, + utils.BacktraceAtFlag, + utils.LogFileFlag, + utils.PProfEanbledFlag, + utils.PProfPortFlag, + utils.MetricsEnabledFlag, + }, + }, + { + Name: "EXPERIMENTAL", + Flags: []cli.Flag{ + utils.WhisperEnabledFlag, + utils.NatspecEnabledFlag, + }, + }, + { + Name: "MISCELLANEOUS", + Flags: []cli.Flag{ + utils.SolcPathFlag, + }, + }, +} + +func init() { + // Override the default app help template + cli.AppHelpTemplate = AppHelpTemplate + + // Define a one shot struct to pass to the usage template + type helpData struct { + App interface{} + FlagGroups []flagGroup + } + // Override the default app help printer, but only for the global app help + originalHelpPrinter := cli.HelpPrinter + cli.HelpPrinter = func(w io.Writer, tmpl string, data interface{}) { + if tmpl == AppHelpTemplate { + // Iterate over all the flags and add any uncategorized ones + categorized := make(map[string]struct{}) + for _, group := range AppHelpFlagGroups { + for _, flag := range group.Flags { + categorized[flag.String()] = struct{}{} + } + } + uncategorized := []cli.Flag{} + for _, flag := range data.(*cli.App).Flags { + if _, ok := categorized[flag.String()]; !ok { + uncategorized = append(uncategorized, flag) + } + } + if len(uncategorized) > 0 { + // Append all ungategorized options to the misc group + miscs := len(AppHelpFlagGroups[len(AppHelpFlagGroups)-1].Flags) + AppHelpFlagGroups[len(AppHelpFlagGroups)-1].Flags = append(AppHelpFlagGroups[len(AppHelpFlagGroups)-1].Flags, uncategorized...) + + // Make sure they are removed afterwards + defer func() { + AppHelpFlagGroups[len(AppHelpFlagGroups)-1].Flags = AppHelpFlagGroups[len(AppHelpFlagGroups)-1].Flags[:miscs] + }() + } + // Render out custom usage screen + originalHelpPrinter(w, tmpl, helpData{data, AppHelpFlagGroups}) + } else { + originalHelpPrinter(w, tmpl, data) + } + } +} diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index c2b92be46..8d1c8ea47 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -101,35 +101,29 @@ var ( // General settings DataDirFlag = DirectoryFlag{ Name: "datadir", - Usage: "Data directory to be used", + Usage: "Data directory for the databases and keystore", Value: DirectoryString{common.DefaultDataDir()}, } NetworkIdFlag = cli.IntFlag{ Name: "networkid", - Usage: "Network Id (integer)", + Usage: "Network identifier (integer, 0=Olympic, 1=Frontier, 2=Morden)", Value: eth.NetworkId, } - BlockchainVersionFlag = cli.IntFlag{ - Name: "blockchainversion", - Usage: "Blockchain version (integer)", - Value: core.BlockChainVersion, - } - GenesisNonceFlag = cli.IntFlag{ - Name: "genesisnonce", - Usage: "Sets the genesis nonce", - Value: 42, + OlympicFlag = cli.BoolFlag{ + Name: "olympic", + Usage: "Olympic network: pre-configured pre-release test network", } - GenesisFileFlag = cli.StringFlag{ - Name: "genesis", - Usage: "Inserts/Overwrites the genesis block (json format)", + TestNetFlag = cli.BoolFlag{ + Name: "testnet", + Usage: "Morden network: pre-configured test network with modified starting nonces (replay protection)", } DevModeFlag = cli.BoolFlag{ Name: "dev", - Usage: "Developer mode. This mode creates a private network and sets several debugging flags", + Usage: "Developer mode: pre-configured private network with several debugging flags", } - TestNetFlag = cli.BoolFlag{ - Name: "testnet", - Usage: "Testnet mode. This enables your node to operate on the testnet", + GenesisFileFlag = cli.StringFlag{ + Name: "genesis", + Usage: "Insert/overwrite the genesis block (JSON format)", } IdentityFlag = cli.StringFlag{ Name: "identity", @@ -146,12 +140,13 @@ var ( } CacheFlag = cli.IntFlag{ Name: "cache", - Usage: "Megabytes of memory allocated to internal caching", + Usage: "Megabytes of memory allocated to internal caching (min 16MB / database forced)", Value: 0, } - OlympicFlag = cli.BoolFlag{ - Name: "olympic", - Usage: "Use olympic style protocol", + BlockchainVersionFlag = cli.IntFlag{ + Name: "blockchainversion", + Usage: "Blockchain version (integer)", + Value: core.BlockChainVersion, } FastSyncFlag = cli.BoolFlag{ Name: "fast", @@ -161,22 +156,20 @@ var ( Name: "lightkdf", Usage: "Reduce KDF memory & CPU usage at some expense of KDF strength", } - - // miner settings + // Miner settings // TODO: refactor CPU vs GPU mining flags - MiningGPUFlag = cli.StringFlag{ - Name: "minegpu", - Usage: "Mine with given GPUs. '--minegpu 0,1' will mine with the first two GPUs found.", + MiningEnabledFlag = cli.BoolFlag{ + Name: "mine", + Usage: "Enable mining", } - MinerThreadsFlag = cli.IntFlag{ Name: "minerthreads", - Usage: "Number of miner threads", + Usage: "Number of CPU threads to use for mining", Value: runtime.NumCPU(), } - MiningEnabledFlag = cli.BoolFlag{ - Name: "mine", - Usage: "Enable mining", + MiningGPUFlag = cli.StringFlag{ + Name: "minergpus", + Usage: "List of GPUs to use for mining (e.g. '0,1' will use the first two GPUs found)", } AutoDAGFlag = cli.BoolFlag{ Name: "autodag", @@ -184,27 +177,27 @@ var ( } EtherbaseFlag = cli.StringFlag{ Name: "etherbase", - Usage: "Public address for block mining rewards. By default the address first created is used", + Usage: "Public address for block mining rewards (default = first account created)", Value: "0", } GasPriceFlag = cli.StringFlag{ Name: "gasprice", - Usage: "Sets the minimal gasprice when mining transactions", + Usage: "Minimal gas price to accept for mining a transactions", Value: new(big.Int).Mul(big.NewInt(50), common.Shannon).String(), } ExtraDataFlag = cli.StringFlag{ Name: "extradata", - Usage: "Extra data for the miner", + Usage: "Block extra data set by the miner (default = client version)", } - + // Account settings UnlockedAccountFlag = cli.StringFlag{ Name: "unlock", - Usage: "Unlock the account given until this program exits (prompts for password). '--unlock n' unlocks the n-th account in order or creation.", + Usage: "Unlock an account (may be creation index) until this program exits (prompts for password)", Value: "", } PasswordFileFlag = cli.StringFlag{ Name: "password", - Usage: "Path to password file to use with options and subcommands needing a password", + Usage: "Password file to use with options/subcommands needing a pass phrase", Value: "", } @@ -228,32 +221,24 @@ var ( } // logging and debug settings - LogFileFlag = cli.StringFlag{ - Name: "logfile", - Usage: "Send log output to a file", - } VerbosityFlag = cli.IntFlag{ Name: "verbosity", Usage: "Logging verbosity: 0-6 (0=silent, 1=error, 2=warn, 3=info, 4=core, 5=debug, 6=debug detail)", Value: int(logger.InfoLevel), } - LogJSONFlag = cli.StringFlag{ - Name: "logjson", - Usage: "Send json structured log output to a file or '-' for standard output (default: no json output)", + LogFileFlag = cli.StringFlag{ + Name: "logfile", + Usage: "Log output file within the data dir (default = no log file generated)", Value: "", } - LogToStdErrFlag = cli.BoolFlag{ - Name: "logtostderr", - Usage: "Logs are written to standard error instead of to files.", - } LogVModuleFlag = cli.GenericFlag{ Name: "vmodule", - Usage: "The syntax of the argument is a comma-separated list of pattern=N, where pattern is a literal file name (minus the \".go\" suffix) or \"glob\" pattern and N is a log verbosity level.", + Usage: "Per-module verbosity: comma-separated list of =, where is file literal or a glog pattern", Value: glog.GetVModule(), } BacktraceAtFlag = cli.GenericFlag{ - Name: "backtrace_at", - Usage: "If set to a file and line number (e.g., \"block.go:271\") holding a logging statement, a stack trace will be logged", + Name: "backtrace", + Usage: "Request a stack trace at a specific logging statement (e.g. \"block.go:271\")", Value: glog.GetTraceLocation(), } PProfEanbledFlag = cli.BoolFlag{ @@ -262,37 +247,37 @@ var ( } PProfPortFlag = cli.IntFlag{ Name: "pprofport", - Usage: "Port on which the profiler should listen", + Usage: "Profile server listening port", Value: 6060, } MetricsEnabledFlag = cli.BoolFlag{ Name: metrics.MetricsEnabledFlag, - Usage: "Enables metrics collection and reporting", + Usage: "Enable metrics collection and reporting", } // RPC settings RPCEnabledFlag = cli.BoolFlag{ Name: "rpc", - Usage: "Enable the JSON-RPC server", + Usage: "Enable the HTTP-RPC server", } RPCListenAddrFlag = cli.StringFlag{ Name: "rpcaddr", - Usage: "Listening address for the JSON-RPC server", + Usage: "HTTP-RPC server listening interface", Value: "127.0.0.1", } RPCPortFlag = cli.IntFlag{ Name: "rpcport", - Usage: "Port on which the JSON-RPC server should listen", + Usage: "HTTP-RPC server listening port", Value: 8545, } RPCCORSDomainFlag = cli.StringFlag{ Name: "rpccorsdomain", - Usage: "Domain on which to send Access-Control-Allow-Origin header", + Usage: "Domains from which to accept cross origin requests (browser enforced)", Value: "", } RpcApiFlag = cli.StringFlag{ Name: "rpcapi", - Usage: "Specify the API's which are offered over the HTTP RPC interface", + Usage: "API's offered over the HTTP-RPC interface", Value: comms.DefaultHttpRpcApis, } IPCDisabledFlag = cli.BoolFlag{ @@ -301,7 +286,7 @@ var ( } IPCApiFlag = cli.StringFlag{ Name: "ipcapi", - Usage: "Specify the API's which are offered over the IPC interface", + Usage: "API's offered over the IPC-RPC interface", Value: comms.DefaultIpcApis, } IPCPathFlag = DirectoryFlag{ @@ -311,7 +296,7 @@ var ( } ExecFlag = cli.StringFlag{ Name: "exec", - Usage: "Execute javascript statement (only in combination with console/attach)", + Usage: "Execute JavaScript statement (only in combination with console/attach)", } // Network Settings MaxPeersFlag = cli.IntFlag{ @@ -331,7 +316,7 @@ var ( } BootnodesFlag = cli.StringFlag{ Name: "bootnodes", - Usage: "Space-separated enode URLs for p2p discovery bootstrap", + Usage: "Space-separated enode URLs for P2P discovery bootstrap", Value: "", } NodeKeyFileFlag = cli.StringFlag{ @@ -353,19 +338,21 @@ var ( } WhisperEnabledFlag = cli.BoolFlag{ Name: "shh", - Usage: "Enable whisper", + Usage: "Enable Whisper", } // ATM the url is left to the user and deployment to JSpathFlag = cli.StringFlag{ Name: "jspath", - Usage: "JS root path for loadScript and document root for admin.httpGet", + Usage: "JavaSript root path for `loadScript` and document root for `admin.httpGet`", Value: ".", } SolcPathFlag = cli.StringFlag{ Name: "solc", - Usage: "solidity compiler to be used", + Usage: "Solidity compiler command to be used", Value: "solc", } + + // Gas price oracle settings GpoMinGasPriceFlag = cli.StringFlag{ Name: "gpomin", Usage: "Minimum suggested gas price", @@ -441,7 +428,6 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config { cfg := ð.Config{ Name: common.MakeName(clientID, version), DataDir: MustDataDir(ctx), - GenesisNonce: ctx.GlobalInt(GenesisNonceFlag.Name), GenesisFile: ctx.GlobalString(GenesisFileFlag.Name), FastSync: ctx.GlobalBool(FastSyncFlag.Name), BlockChainVersion: ctx.GlobalInt(BlockchainVersionFlag.Name), @@ -450,7 +436,6 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config { NetworkId: ctx.GlobalInt(NetworkIdFlag.Name), LogFile: ctx.GlobalString(LogFileFlag.Name), Verbosity: ctx.GlobalInt(VerbosityFlag.Name), - LogJSON: ctx.GlobalString(LogJSONFlag.Name), Etherbase: common.HexToAddress(etherbase), MinerThreads: ctx.GlobalInt(MinerThreadsFlag.Name), AccountManager: am, diff --git a/eth/backend.go b/eth/backend.go index ee857e146..72487457a 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -91,7 +91,6 @@ type Config struct { Name string NetworkId int - GenesisNonce int GenesisFile string GenesisBlock *types.Block // used by block tests FastSync bool @@ -104,7 +103,6 @@ type Config struct { DataDir string LogFile string Verbosity int - LogJSON string VmDebug bool NatSpec bool DocRoot string @@ -273,11 +271,7 @@ type Ethereum struct { } func New(config *Config) (*Ethereum, error) { - // Bootstrap database logger.New(config.DataDir, config.LogFile, config.Verbosity) - if len(config.LogJSON) > 0 { - logger.NewJSONsystem(config.DataDir, config.LogJSON) - } // Let the database take 3/4 of the max open files (TODO figure out a way to get the actual limit of the open files) const dbCount = 3 -- cgit v1.2.3 From 8c38f8d81529ada04fde4e3d41530aa61b477792 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Sat, 31 Oct 2015 02:18:41 +0100 Subject: miner: synchronise start / stop This PR fixes an issue where the remote worker was stopped twice and not properly handled. This adds a synchronised running check to the start and stop methods preventing closing of a channel more than once. --- miner/remote_agent.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/miner/remote_agent.go b/miner/remote_agent.go index 18ddf121c..00b5f7e08 100644 --- a/miner/remote_agent.go +++ b/miner/remote_agent.go @@ -20,6 +20,7 @@ import ( "errors" "math/big" "sync" + "sync/atomic" "time" "github.com/ethereum/ethash" @@ -45,6 +46,8 @@ type RemoteAgent struct { hashrateMu sync.RWMutex hashrate map[common.Hash]hashrate + + running int32 // running indicates whether the agent is active. Call atomically } func NewRemoteAgent() *RemoteAgent { @@ -70,18 +73,22 @@ func (a *RemoteAgent) SetReturnCh(returnCh chan<- *Result) { } func (a *RemoteAgent) Start() { + if !atomic.CompareAndSwapInt32(&a.running, 0, 1) { + return + } + a.quit = make(chan struct{}) a.workCh = make(chan *Work, 1) go a.maintainLoop() } func (a *RemoteAgent) Stop() { - if a.quit != nil { - close(a.quit) - } - if a.workCh != nil { - close(a.workCh) + if !atomic.CompareAndSwapInt32(&a.running, 1, 0) { + return } + + close(a.quit) + close(a.workCh) } // GetHashRate returns the accumulated hashrate of all identifier combined -- cgit v1.2.3 From f75becc264f8bde0f58391fc226243d03e78aa7b Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Fri, 30 Oct 2015 11:02:13 +0100 Subject: cmd/geth, VERSION: bumped version 1.3.1 --- VERSION | 2 +- cmd/geth/main.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index f0bb29e76..3a3cd8cc8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3.0 +1.3.1 diff --git a/cmd/geth/main.go b/cmd/geth/main.go index f752029b7..f70a0bb67 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -48,10 +48,10 @@ import ( const ( ClientIdentifier = "Geth" - Version = "1.3.0-dev" + Version = "1.3.1" VersionMajor = 1 VersionMinor = 3 - VersionPatch = 0 + VersionPatch = 1 ) var ( -- cgit v1.2.3